return new WP_Error( 'rest_cannot_delete',
/* translators: %s: Custom field key. */
sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.'
),
$name ),
array
( 'key' =>
$name,
'status' =>
rest_authorization_required_code(),
) );
} if ( null ===
get_metadata_raw( $meta_type,
$object_id,
wp_slash( $meta_key ) ) ) { return true;
} if ( !
delete_metadata( $meta_type,
$object_id,
wp_slash( $meta_key ) ) ) { return new WP_Error( 'rest_meta_database_error',
__( 'Could not delete meta value from database.'
),
array
( 'key' =>
$name,
'status' => WP_Http::INTERNAL_SERVER_ERROR,
) );