WP_REST_Font_Families_Controller::prepare_font_face_links()
Prepares child font face links for the request.
Метод класса: WP_REST_Font_Families_Controller{}
Хуков нет.
Возвращает
Массив
. Links for the child font face posts.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->prepare_font_face_links( $font_family_id );
- $font_family_id(int) (обязательный)
- Font family post ID.
Код WP_REST_Font_Families_Controller::prepare_font_face_links() WP REST Font Families Controller::prepare font face links WP 6.7.1
protected function prepare_font_face_links( $font_family_id ) { $font_face_ids = $this->get_font_face_ids( $font_family_id ); $links = array(); foreach ( $font_face_ids as $font_face_id ) { $links[] = array( 'embeddable' => true, 'href' => rest_url( sprintf( '%s/%s/%s/font-faces/%s', $this->namespace, $this->rest_base, $font_family_id, $font_face_id ) ), ); } return $links; }