WPSEO_Import_WPSEO::import_post_robots()
Imports the robot values from WPSEO plugin. These have to be converted to the Yoast format.
Метод класса: WPSEO_Import_WPSEO{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->import_post_robots();
Код WPSEO_Import_WPSEO::import_post_robots() WPSEO Import WPSEO::import post robots Yoast 22.3
private function import_post_robots() { $query_posts = new WP_Query( 'post_type=any&meta_key=_wpseo_edit_robots&order=ASC&fields=ids&nopaging=true' ); if ( ! empty( $query_posts->posts ) ) { foreach ( array_values( $query_posts->posts ) as $post_id ) { $this->import_post_robot( $post_id ); } } }