mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Formatting: Deprecate wp_slash_strings_only() in favor of wp_slash().
The reason for introducing `wp_slash_strings_only()` in [46454] was to keep non-string values untouched. Later, `wp_slash()` itself was updated in [48433] to prevent changing non-string values. To avoid confusion, `wp_slash_strings_only()` is now deprecated. Props ayeshrajans, ocean90. Fixes #50635. git-svn-id: https://develop.svn.wordpress.org/trunk@49188 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -372,7 +372,7 @@ abstract class WP_REST_Meta_Fields {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ! update_metadata( $meta_type, $object_id, wp_slash( $meta_key ), wp_slash_strings_only( $value ) ) ) {
|
||||
if ( ! update_metadata( $meta_type, $object_id, wp_slash( $meta_key ), wp_slash( $value ) ) ) {
|
||||
return new WP_Error(
|
||||
'rest_meta_database_error',
|
||||
/* translators: %s: Custom field key. */
|
||||
|
||||
Reference in New Issue
Block a user