WP_REST_Font_Faces_Controller::get_create_params
Get the params used when creating a new font face.
Метод класса: WP_REST_Font_Faces_Controller{}
Хуков нет.
Возвращает
Массив. Font face create arguments.
Использование
$WP_REST_Font_Faces_Controller = new WP_REST_Font_Faces_Controller(); $WP_REST_Font_Faces_Controller->get_create_params();
Список изменений
| С версии 6.5.0 | Введена. |
Код WP_REST_Font_Faces_Controller::get_create_params() WP REST Font Faces Controller::get create params WP 6.8.3
public function get_create_params() {
$properties = $this->get_item_schema()['properties'];
return array(
'theme_json_version' => $properties['theme_json_version'],
// When creating, font_face_settings is stringified JSON, to work with multipart/form-data used
// when uploading font files.
'font_face_settings' => array(
'description' => __( 'font-face declaration in theme.json format, encoded as a string.' ),
'type' => 'string',
'required' => true,
'validate_callback' => array( $this, 'validate_create_font_face_settings' ),
'sanitize_callback' => array( $this, 'sanitize_font_face_settings' ),
),
);
}