#50635 closed enhancement (fixed)
Deprecate wp_slash_strings_only() in favour of wp_slash()
| Reported by: | ocean90 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.6 |
| Component: | Formatting | Version: | 5.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | rest-api |
Attachments (1)
Change History (10)
#3
@
6 years ago
Posted wrong build URL above. Correct one: https://travis-ci.com/github/Ayesh/wordpress-develop/builds/183711321
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
6 years ago
#7
follow-up:
↓ 8
@
6 years ago
Should references of wp_slash_strings_only be removed from the WordPress Importer phpunit data?
When you install from svn the wordpress-importer dir is installed to the tests/phpunit/data/plugins and the wordpress-importer/class-wp-import.php contains references to wp_slash_strings_only, as well there's a pluggable wp_slash_strings_only function in the wordpress-importer/compat.php.
Thanks
#8
in reply to: ↑ 7
;
follow-up:
↓ 9
@
6 years ago
Replying to garrett-eclipse:
Should references of
wp_slash_strings_onlybe removed from the WordPress Importer phpunit data?
When you install from svn thewordpress-importerdir is installed to thetests/phpunit/data/pluginsand thewordpress-importer/class-wp-import.phpcontains references towp_slash_strings_only, as well there's a pluggablewp_slash_strings_onlyfunction in thewordpress-importer/compat.php.
Good catch, thanks! I think the plugin can be left as is for now, as it aims to be compatible with WP 3.7+, and the fix for wp_slash() to handle non-string values is only available since WP 5.5.
That said, the plugin could probably be updated to call wp_slash() on WP 5.5+, and wp_slash_strings_only() on older versions.
#9
in reply to: ↑ 8
@
6 years ago
Replying to SergeyBiryukov:
That said, the plugin could probably be updated to call
wp_slash()on WP 5.5+, andwp_slash_strings_only()on older versions.
Thanks @SergeyBiryukov I've opened a ticket on the plugin repo here;
https://github.com/WordPress/wordpress-importer/issues/83
Deprecates
wp_slash_strings_only()andaddslashes_strings_only()functions, and then replaces the single use of those functions withwp_slash; Tests: https://travis-ci.com/github/Ayesh/wordpress-develop/builds