WP_REST_Font_Faces_Controller::get_create_params
Get the params used when creating a new font face.
Method of the class: WP_REST_Font_Faces_Controller{}
No Hooks.
Returns
Array. Font face create arguments.
Usage
$WP_REST_Font_Faces_Controller = new WP_REST_Font_Faces_Controller(); $WP_REST_Font_Faces_Controller->get_create_params();
Changelog
| Since 6.5.0 | Introduced. |
WP_REST_Font_Faces_Controller::get_create_params() WP REST Font Faces Controller::get create params code WP 7.0
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' ),
),
);
}