ACF_Rest_Embed_Links::hook_link_handlers
Hook into all REST-enabled post type, taxonomy, and the user controllers in order to prepare links.
Метод класса: ACF_Rest_Embed_Links{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->hook_link_handlers();
Код ACF_Rest_Embed_Links::hook_link_handlers() ACF Rest Embed Links::hook link handlers ACF 6.4.2
private function hook_link_handlers() {
foreach ( get_post_types( array( 'show_in_rest' => true ) ) as $post_type ) {
add_filter( "rest_prepare_{$post_type}", array( $this, 'load_item_links' ), 10, 3 );
}
foreach ( get_taxonomies( array( 'show_in_rest' => true ) ) as $taxonomy ) {
add_filter( "rest_prepare_{$taxonomy}", array( $this, 'load_item_links' ), 10, 3 );
}
add_filter( 'rest_prepare_user', array( $this, 'load_item_links' ), 10, 3 );
}