$issue ) { if ( is_array( $issue ) && ( $issue['key'] ?? '' ) === $key ) { return array( 'selector' => (string) $issue['selector'], 'number' => $index + 1, 'title' => (string) ( $issue['text']['title'] ?? '' ), ); } } return null; } /** Enqueues the highlight script when the request asks for it and is allowed to. */ function waysill_enqueue_highlight(): void { $target = waysill_highlight_target(); if ( null !== $target ) { waysill_enqueue_entry( 'highlight', array( 'highlight' => $target ) ); } } add_action( 'wp_enqueue_scripts', 'waysill_enqueue_highlight' );