[wp-trac] [WordPress Trac] #50635: Deprecate wp_slash_strings_only() in favour of wp_slash()
WordPress Trac
noreply at wordpress.org
Sun Oct 18 07:43:31 UTC 2020
#50635: Deprecate wp_slash_strings_only() in favour of wp_slash()
-------------------------+-----------------------------
Reporter: ocean90 | Owner: SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.6
Component: Formatting | Version: 5.5
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: rest-api
-------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:7 garrett-eclipse]:
> 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`.
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50635#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list