* Add a new folder in `wp-includes/js`, `media`
* Create manifest files for `views`, `models`, `grid`, and `audio-video`
* Make `browserify` an `npm` dependency
* Add Grunt tasks for `browserify` and `uglify:media` on `build` and `watch`
* Update the paths loaded for media files in `script-loader`
* All new files were created using `svn cp` from their original location
Please run `npm install`. While developing media JS, you must run `grunt watch`.
See #28510.
Built from https://develop.svn.wordpress.org/trunk@31373
git-svn-id: http://core.svn.wordpress.org/trunk@31354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Introduce WP_Customize_Manager::add_dynamic_settings() to register dynamically-created settings.
* Introduce `customize_dynamic_setting_args` filter to pass an array of args to a dynamic setting's constructor.
* Add unit tests for WP_Customize_Manager and WP_Customize_Widgets.
* See WP_Customize_Widgets as an example.
props westonruter.
fixes#30936.
Built from https://develop.svn.wordpress.org/trunk@31370
git-svn-id: http://core.svn.wordpress.org/trunk@31351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It's possible to have an empty `tax_query` and `is_tax=true` when the initial
query contains a taxonomy var (and is processed as such during
`WP_Query::parse_query()`) but the taxonomy var is unset during a 'parse_query'
callback. While this kind of behavior is not necessarily something we need to
support, we should continue to avoid PHP notices in such cases, as we did prior
to WP 4.1.
Fixes#31246.
Built from https://develop.svn.wordpress.org/trunk@31366
git-svn-id: http://core.svn.wordpress.org/trunk@31347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When editing a post, non-hierarchical taxonomy terms are sent as the
comma-separated list entered into the tax_input metabox. Passing these
values directly to `wp_update_post()` meant that they were interpreted as
term slugs rather than term names, causing mismatches when a typed string
matched the slug of one term and the name of a different term. We fix the
problem by preprocessing tax_input data sent from post.php, converting it to
unambiguous term_ids before saving.
Props boonebgorges, ArminBraun.
Fixes#30615.
Built from https://develop.svn.wordpress.org/trunk@31359
git-svn-id: http://core.svn.wordpress.org/trunk@31340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When terms are entered into the database, term fields are sanitized with
`sanitize_term_field()`. To ensure that the `SELECT ... WHERE` queries in
`WP_Tax_Query::transform_query()` are not broken by overzealous sanitization,
`sanitize_term_field()` should be used in that case as well. This fixes a bug
where a tax_query using 'field=name' would fail if the 'terms' parameter
contained characters (like spaces) that were improperly removed by
`sanitize_title_for_query()`.
Fixes#27810.
Built from https://develop.svn.wordpress.org/trunk@31346
git-svn-id: http://core.svn.wordpress.org/trunk@31327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[30989] made jQuery UI Core a dependency for QUnit tests. This change did not
account for the fact that jQuery JS assets are minimized (and non-minimized
versions unavailable) when `grunt copy` populates the `/build` directory. To
ensure that QUnit tests pass when run during `grunt qunit:compiled`, we
manually fix the asset path to read 'core.min.js'.
See #25781.
Built from https://develop.svn.wordpress.org/trunk@31344
git-svn-id: http://core.svn.wordpress.org/trunk@31325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The implementation of `meta_query` orderby introduced in [31312] put clause
identifiers into a 'name' parameter of the clause. For greater clarity, this
changeset updates the syntax to use the associative array key used when
defining `meta_query` parameters, instead of the 'name' parameter.
Props Funkatronic, DrewAPicture.
Fixes#31045.
Built from https://develop.svn.wordpress.org/trunk@31340
git-svn-id: http://core.svn.wordpress.org/trunk@31321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This parameter allows developers to choose the post field that will be used to
fill in the 'option' attribute of the generated dropdown markup.
See [31006] #30306 for a parallel enhancement in `wp_dropdown_categories()`.
Props jfarthing84.
Fixes#12494.
Built from https://develop.svn.wordpress.org/trunk@31338
git-svn-id: http://core.svn.wordpress.org/trunk@31319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If the 'compare' argument equals 'IN' or 'NOT IN', arrays of any number of specific, valid values are accepted and simply considered based on the value of 'operator' (OR or AND). If the 'compare' argument is a range such as 'BETWEEN' or 'NOT BETWEEN', arrays of only two valid values are accepted.
Props boonebgorges.
Fixes#31036.
Built from https://develop.svn.wordpress.org/trunk@31336
git-svn-id: http://core.svn.wordpress.org/trunk@31317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There was regression introduced by #28580 where only changed (dirty) settings now are POST'ed to the Customizer preview.
* Allow WP_Customize_Manager::post_value() to accept a second $default argument.
* Introduce WP_Customize_Manager::unsanitized_post_values() for accessing previously-private member variable _post_values.
* Do require_once instead of require for Customizer classes.
* Add unit tests for WP_Customize_Manager and WP_Customize_Setting.
props westonruter.
fixes#30988.
Built from https://develop.svn.wordpress.org/trunk@31329
git-svn-id: http://core.svn.wordpress.org/trunk@31310 1a063a9b-81f0-0310-95a4-ce76da25c4cd