diff --git a/src/wp-content/themes/twentyfourteen/inc/featured-content.php b/src/wp-content/themes/twentyfourteen/inc/featured-content.php index b98ab983919df..3193aa8b93549 100644 --- a/src/wp-content/themes/twentyfourteen/inc/featured-content.php +++ b/src/wp-content/themes/twentyfourteen/inc/featured-content.php @@ -212,7 +212,7 @@ public static function delete_transient() { * @since Twenty Fourteen 1.0 * * @param WP_Query $query WP_Query object. - * @return WP_Query Possibly-modified WP_Query. + * @return void */ public static function pre_get_posts( $query ) { diff --git a/src/wp-content/themes/twentytwenty/inc/template-tags.php b/src/wp-content/themes/twentytwenty/inc/template-tags.php index fdf51ccee9624..e15ae6652bbec 100644 --- a/src/wp-content/themes/twentytwenty/inc/template-tags.php +++ b/src/wp-content/themes/twentytwenty/inc/template-tags.php @@ -29,7 +29,7 @@ * * @param array $args Arguments for displaying the site logo either as an image or text. * @param bool $display Display or return the HTML. - * @return string Compiled HTML based on our arguments. + * @return string|void Compiled HTML based on our arguments. */ function twentytwenty_site_logo( $args = array(), $display = true ) { $logo = get_custom_logo(); @@ -107,7 +107,7 @@ function twentytwenty_site_logo( $args = array(), $display = true ) { * @since Twenty Twenty 1.0 * * @param bool $display Display or return the HTML. - * @return string The HTML to display. + * @return string|void The HTML to display. */ function twentytwenty_site_description( $display = true ) { $description = get_bloginfo( 'description' ); @@ -249,7 +249,7 @@ function twentytwenty_edit_post_link( $link, $post_id, $text ) { * * @param int $post_id The ID of the post. * @param string $location The location where the meta is shown. - * @return string Post meta HTML. + * @return string|void Post meta HTML. */ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) { diff --git a/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php b/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php index 53db8dffb216f..d4bc16e20171d 100644 --- a/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php +++ b/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php @@ -35,8 +35,12 @@ public function __construct() { public function register( $wp_customize ) { // Change site-title & description to postMessage. - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; // @phpstan-ignore-line. Assume that this setting exists. - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; // @phpstan-ignore-line. Assume that this setting exists. + foreach ( array( 'blogname', 'blogdescription' ) as $setting_id ) { + $setting = $wp_customize->get_setting( $setting_id ); + if ( $setting ) { + $setting->transport = 'postMessage'; + } + } // Add partial for blogname. $wp_customize->selective_refresh->add_partial( diff --git a/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php b/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php index d5672c4054f3c..6644e7d02eeab 100644 --- a/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php +++ b/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php @@ -98,7 +98,7 @@ public function enqueue_scripts() { if ( is_rtl() ) { $url = get_template_directory_uri() . '/assets/css/style-dark-mode-rtl.css'; } - wp_enqueue_style( 'tt1-dark-mode', $url, array( 'twenty-twenty-one-style' ), wp_get_theme()->get( 'Version' ) ); // @phpstan-ignore-line. Version is always a string. + wp_enqueue_style( 'tt1-dark-mode', $url, array( 'twenty-twenty-one-style' ), wp_get_theme()->get( 'Version' ) ); } /** diff --git a/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-svg-icons.php b/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-svg-icons.php index 398ef82bbd7c8..2a261433e4843 100644 --- a/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-svg-icons.php +++ b/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-svg-icons.php @@ -181,18 +181,17 @@ public static function get_svg( $group, $icon, $size ) { * * @since Twenty Twenty-One 1.0 * - * @param array $arr Array of icons. + * @param array $arr Array of icons. */ $arr = apply_filters( "twenty_twenty_one_svg_icons_{$group}", $arr ); $svg = ''; - if ( array_key_exists( $icon, $arr ) ) { + if ( isset( $arr[ $icon ] ) && is_string( $arr[ $icon ] ) ) { $repl = sprintf( '