specific index is not set, look to the post status and default of the post type. if ( $this->model->is_robots_noindex === null ) { $post_status_private = \get_post_status( $this->model->object_id ) === 'private'; $post_type_noindex = ! $this->post_type->is_indexable( $this->model->object_sub_type ); if ( $post_status_private || $post_type_noindex ) { $robots['index'] = 'noindex'; } } return $this->filter_robots( $robots ); } /** * Generates the Twitter description. * * @return string The Twitter description. */ public function generate_twitter_description() { $twitter_description = parent::generate_twitter_description(); if ( $twitter_description ) { return $twitter_description; } if ( $this->open_graph_description && $this->context->open_graph_enabled === true ) { return ''; } return $this->post->get_the_excerpt( $this->model->object_id ); } /** * Generates the Twitter image. * * @return string The Twitter image. */ public function generate_twitter_image() { if ( \post_password_required() ) { return ''; } return parent::generate_twitter_image(); } /** * Generates the Twitter creator. * * @return string The Twitter creator. */ public function generate_twitter_creator() { if ( $this->model->object_sub_type !== 'post' ) { return ''; } $twitter_creator = \ltrim( \trim( \get_the_author_meta( 'twitter', $this->source->post_author ) ), '@' ); /** * Filter: 'wpseo_twitter_creator_account' - Allow changing the Twitter account as output in the Twitter card by Yoast SEO. * * @api string $twitter The twitter account name string. */ $twitter_creator = \apply_filters( 'wpseo_twitter_creator_account', $twitter_creator ); if ( \is_string( $twitter_creator ) && $twitter_creator !== '' ) { return '@' . $twitter_creator; } $site_twitter = $this->options->get( 'twitter_site', '' ); if ( \is_string( $site_twitter ) && $site_twitter !== '' ) { return '@' . $site_twitter; } return ''; } /** * Wraps the get_paginated_url pagination helper method. * * @codeCoverageIgnore A wrapper method. * * @param string $url The un-paginated URL of the current archive. * @param string $page The page number to add on to $url for the $link tag. * * @return string The paginated URL. */ protected function get_paginated_url( $url, $page ) { return $this->pagination->get_paginated_url( $url, $page, false ); } } WordPress › Error

Ha habido un error crítico en esta web.

Aprende más sobre el diagnóstico de WordPress.