[wp-trac] [WordPress Trac] #42807: Add filter to modfiy wp.api versionString
WordPress Trac
noreply at wordpress.org
Mon Dec 11 00:53:04 UTC 2017
#42807: Add filter to modfiy wp.api versionString
--------------------------+------------------------------
Reporter: mkaz | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: | Focuses: javascript
--------------------------+------------------------------
Comment (by dd32):
Replying to [comment:6 mkaz]:
> @rmccue @dd32 Agreed, if `sites/blodId` were a prefix instead of in the
middle, it would be easier. I'm not sure about changing the WPCOM API.
FWIW Part of what I'm saying is that it doesn't seem like this is a filter
that should be in core, and therefor supported as "something you should
do". I think I'd rather see an alternative approach found instead, either
core or on the WordPress.com side unless it's something that's needed by a
lot of people.
One option instead would be to add a super-low-level filter which could be
used as an override here - for example one in `WP_Scripts::localize()`
(ie. `wp_scripts_localise_l10n => $l10n, $handle, $object_name`) and maybe
something in `WP_Scripts::add_inline_script()` too. It'd have slightly
more uses outside of this specific ticket too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42807#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list