( ! empty( $robots['noimageindex'] ) ) { $robots['imageindex'] = null; // `max-image-preview` should set be to `none` when `noimageindex` is present. // Using `isset` rather than `! empty` here so that in the rare case of `max-image-preview` // being equal to an empty string due to filtering, its value would still be set to `none`. if ( isset( $robots['max-image-preview'] ) ) { $robots['max-image-preview'] = 'none'; } } if ( ! empty( $robots['nosnippet'] ) ) { $robots['snippet'] = null; } if ( ! empty( $robots['noindex'] ) ) { $robots['index'] = null; $robots['imageindex'] = null; $robots['noimageindex'] = null; $robots['archive'] = null; $robots['noarchive'] = null; $robots['snippet'] = null; $robots['nosnippet'] = null; $robots['max-snippet'] = null; $robots['max-image-preview'] = null; $robots['max-video-preview'] = null; } return $robots; } /** * Sorts the robots array. * * @param array $robots The robots array. * * @return array The sorted robots array. */ protected function sort_robots( $robots ) { \uksort( $robots, static function ( $a, $b ) { $order = [ 'index' => 0, 'noindex' => 1, 'follow' => 2, 'nofollow' => 3, ]; $ai = ( $order[ $a ] ?? 4 ); $bi = ( $order[ $b ] ?? 4 ); return ( $ai - $bi ); } ); return $robots; } }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/wordpress-seo/src/integrations/front-end/wp-robots-integration.php:1) in /htdocs/wp-includes/pluggable.php on line 1450

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/wordpress-seo/src/integrations/front-end/wp-robots-integration.php:1) in /htdocs/wp-includes/pluggable.php on line 1453