OD__, 'Yoast SEO 14.0' ); $presentation = $this->get_current_page_presentation(); return $presentation->robots; } /** * Used for static home and posts pages as well as singular titles. * * @param object|null $object If filled, object to get the title for. * * @return string The content title. */ private function get_title( $object = null ) { _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); $presentation = $this->get_current_page_presentation(); $title = $presentation->title; return $this->replace_vars->replace( $title, $presentation->source ); } /** * This function adds paging details to the title. * * @param string $sep Separator used in the title. * @param string $seplocation Whether the separator should be left or right. * @param string $title The title to append the paging info to. * * @return string */ public function add_paging_to_title( $sep, $seplocation, $title ) { _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); return $title; } /** * Add part to title, while ensuring that the $seplocation variable is respected. * * @param string $sep Separator used in the title. * @param string $seplocation Whether the separator should be left or right. * @param string $title The title to append the title_part to. * @param string $title_part The part to append to the title. * * @return string */ public function add_to_title( $sep, $seplocation, $title, $title_part ) { _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); if ( $seplocation === 'right' ) { return $title . $sep . $title_part; } return $title_part . $sep . $title; } /** * Adds 'prev' and 'next' links to archives. * * @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html */ public function adjacent_rel_links() { _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); $presentation = $this->get_current_page_presentation(); $rel_prev_presenter = new Rel_Prev_Presenter(); $rel_prev_presenter->presentation = $presentation; $rel_prev_presenter->helpers = $this->helpers; $rel_prev_presenter->replace_vars = $this->replace_vars; echo $rel_prev_presenter->present(); $rel_next_presenter = new Rel_Next_Presenter(); $rel_next_presenter->presentation = $presentation; $rel_next_presenter->helpers = $this->helpers; $rel_next_presenter->replace_vars = $this->replace_vars; echo $rel_next_presenter->present(); } /** * Outputs the meta description element or returns the description text. * * @param bool $echo Echo or return output flag. * * @return string */ public function metadesc( $echo = true ) { _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); $presentation = $this->get_current_page_presentation(); $presenter = new Meta_Description_Presenter(); $presenter->presentation = $presentation; $presenter->helpers = $this->helpers; $presenter->replace_vars = $this->replace_vars; if ( ! $echo ) { return $presenter->get(); } $presenter->present(); } /** * Returns the current page presentation. * * @return Indexable_Presentation The current page presentation. */ private function get_current_page_presentation() { $context = $this->context_memoizer->for_current_page(); /** This filter is documented in src/integrations/front-end-integration.php */ return apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context ); } }