Deletes a single font family.
Parameters
$request
WP_REST_Requestrequired- Full details about the request.
Source
public function delete_item( $request ) {
$force = isset( $request['force'] ) ? (bool) $request['force'] : false;
// We don't support trashing for font families.
if ( ! $force ) {
return new WP_Error(
'rest_trash_not_supported',
/* translators: %s: force=true */
sprintf( __( 'Font faces do not support trashing. Set "%s" to delete.' ), 'force=true' ),
array( 'status' => 501 )
);
}
return parent::delete_item( $request );
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.