Yoast\WP\SEO\Presentations
Indexable_Search_Result_Page_Presentation::generate_open_graph_url()
Generates the Open Graph URL.
Метод класса: Indexable_Search_Result_Page_Presentation{}
Хуков нет.
Возвращает
Строку
. The Open Graph URL.
Использование
$Indexable_Search_Result_Page_Presentation = new Indexable_Search_Result_Page_Presentation(); $Indexable_Search_Result_Page_Presentation->generate_open_graph_url();
Код Indexable_Search_Result_Page_Presentation::generate_open_graph_url() Indexable Search Result Page Presentation::generate open graph url Yoast 23.4
public function generate_open_graph_url() { $search_query = \get_search_query(); // Regex catches case when /search/page/N without search term is itself mistaken for search term. if ( ! empty( $search_query ) && ! \preg_match( '|^page/\d+$|', $search_query ) ) { return \get_search_link(); } return ''; }