Commit Graph

28926 Commits

Author SHA1 Message Date
Gary Pendergast 350cfba6c8 WPDB: When checking to see if we can use utf8mb4, we also need to make sure PHP's MySQL client library is capable of using utf8mb4.
See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31391 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 22:27:43 +00:00
John Blackbourn fa36ce3810 Revert [30696] pending further investigation.
See #31011, #13071


git-svn-id: https://develop.svn.wordpress.org/trunk@31390 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 21:49:18 +00:00
Aaron Jorbin 5abd98618d Add translator comments for new strings.
These strings were added in [31388].

Props ocean90.
Fixes 26553.



git-svn-id: https://develop.svn.wordpress.org/trunk@31389 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 20:14:19 +00:00
Aaron Jorbin cf09359d34 Use screen reader text instead of a title attribute in comments_popup_link
To better understand screen reader text, check out https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/

Screen Reader text improves the user experience for screen reader users. It provides additional context for links, document forms and other pieces of a page that may exist visually, but are lost when looking only at the html of a site.  This does change the output of comments_popup_link if you don't pass in values for $zero, $one, $more or $none. Theme authors can and should style <code>.screen-reader-text</code> in ways that are recommended in the above article to hide it visually.

Props joedolson
Fixes #26553





git-svn-id: https://develop.svn.wordpress.org/trunk@31388 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 19:26:56 +00:00
Scott Taylor d5888fbc13 After [31386], this needs to happen in `audio-video.manifest.js`.
See #31058.


git-svn-id: https://develop.svn.wordpress.org/trunk@31387 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 18:44:32 +00:00
Scott Taylor 7ea1eb7e94 Avoid an IE8 JS error when removing a MediaElement player.
Props afercia.
Fixes #31058.


git-svn-id: https://develop.svn.wordpress.org/trunk@31386 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 18:42:33 +00:00
Scott Taylor a3210a100d Media JS files:
* In media manifests, ditch IIFEs and global injection, these get dynamically scoped via Browserify
* Remove the `debug` option from `browserify:media`
* Add `jshint:media` to `jshint:corejs`
* Add a trailing newline to all new module files

Props iseulde.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31385 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 16:00:44 +00:00
Dominik Schilling (ocean90) da09ac082b Improve the Customize experience on mobile.
Before: https://make.wordpress.org/flow/2015/02/02/a-peek-at-the-customizer-on-an-iphone-6/
After: https://make.wordpress.org/flow/2015/02/03/vizrec-for-28784-improve-the-customize-experience-on-mobile-iphone-6-28784-diff-4-2-alpha-31325/

props celloexpressions.
see #28784.

git-svn-id: https://develop.svn.wordpress.org/trunk@31384 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 12:35:38 +00:00
Dion Hulse 0d65892e29 Updates: Display plugin update rows even for plugins which are not hosted by WordPress.org or the HTTP request times out on.
See #29583.
Fixes #30767 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31382 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 06:31:18 +00:00
Drew Jaynes b325f149d8 Improve return and parameter documentation for `check_admin_referer()`, `check_ajax_referer()`, and `wp_verify_nonce()`.
Also update and clarify docsfor the `check_admin_referer` and `check_ajax_referer` hooks.

Props johnbillion, DrewAPicture.
Fixes #31055.


git-svn-id: https://develop.svn.wordpress.org/trunk@31381 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 04:56:42 +00:00
Scott Taylor cf8018aef9 Bind `this` at calltime instead of letting `self` spill down into closures.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31380 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 04:44:39 +00:00
Scott Taylor 1c9874a7f2 Make sure that `media/views.js` doesn't load Models that already exist in `media/models.js`.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31379 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 04:13:38 +00:00
Gary Pendergast b136100978 WPDB: The `mysqli_query()` call in `wpdb::set_charset()` had the parameters the wrong way around.
git-svn-id: https://develop.svn.wordpress.org/trunk@31374 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 01:25:47 +00:00
Scott Taylor 4eb88c3d15 Split the media JS files into modules:
* 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31373 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 00:42:28 +00:00
Gary Pendergast be3c59e64c WPDB: Some character set tests were failing if `DB_CHARSET` was empty, or a non-utf8 character set.
git-svn-id: https://develop.svn.wordpress.org/trunk@31372 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 00:38:11 +00:00
Gary Pendergast afdd7da11b WPDB: When we're removing invalid text text from strings with multiple different character sets, `wpdb::strip_invalid_text()` wasn't correctly switching connection character sets.
Fixes #31262



git-svn-id: https://develop.svn.wordpress.org/trunk@31371 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 00:33:32 +00:00
Dominik Schilling (ocean90) 2518bbbb1f Customizer: Introduce an API to create WP_Customize_Settings for dynamically-created settings.
* 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31370 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 23:10:05 +00:00
Boone Gorges 76b84b9231 Add `orderby=meta_value_num` support to `WP_User_Query`.
Props tyxla, genkisan.
Fixes #27887.

git-svn-id: https://develop.svn.wordpress.org/trunk@31369 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 16:58:14 +00:00
Sergey Biryukov ad90613648 Use a positive wording for translations update notice.
props DrewAPicture, siobhan, netweb.
fixes #28199.

git-svn-id: https://develop.svn.wordpress.org/trunk@31368 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 04:08:50 +00:00
Boone Gorges b121105f26 Late escaping in `get_terms()` and `WP_Tax_Query`.
Props vortfu, dd32.

git-svn-id: https://develop.svn.wordpress.org/trunk@31367 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 01:58:51 +00:00
Boone Gorges bdda122e7f In `WP_Query::get_queried_object()`, avoid PHP notices when `is_tax` is paired with an empty `tax_query`.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31366 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 19:49:17 +00:00
Sergey Biryukov fa1a382dff Remove unnecessary `array_shift()` usage in `get_terms()` for better performance.
props bswatson, VolodymyrC.
fixes #31182.

git-svn-id: https://develop.svn.wordpress.org/trunk@31365 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 19:44:13 +00:00
Sergey Biryukov 692f79087f In `_wp_menu_output()`, `$submenu_items` is an array and should be initialized as such.
props ipm-frommen.
fixes #31257.

git-svn-id: https://develop.svn.wordpress.org/trunk@31364 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 17:56:18 +00:00
Sergey Biryukov 8aac5ba74e Avoid inadvertent stomping of the original `$args` parameter passed to `plugins_api_result` and `themes_api_result` filters in `plugins_api()` and `themes_api()`, respectively.
Fixes a regression introduced in [25956].

props Corphi, obenland.
fixes #29079.

git-svn-id: https://develop.svn.wordpress.org/trunk@31363 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 06:20:42 +00:00
Andrew Ozz 24a33d8181 TinyMCE: ensure the image toolbar stays visible when the image is much wider than the editor. Props iseulde, fixes #20696 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@31362 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 22:59:35 +00:00
Andrew Ozz 329115bf05 Editor: prevent errors in editor-expand when the Text editor is not used. Props iseulde, fixes #31163.
git-svn-id: https://develop.svn.wordpress.org/trunk@31361 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 22:24:43 +00:00
Dominik Schilling (ocean90) 1b6e82cf98 Customizer: Add changelog entry for the 'default' parameter added in [31329].
props westonruter.
see #30988.

git-svn-id: https://develop.svn.wordpress.org/trunk@31360 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 21:13:50 +00:00
Boone Gorges fb4048fcdd Parse non-hierarchical tag input into term IDs before sending to `wp_insert_post()`.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31359 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 20:31:37 +00:00
Gary Pendergast 8f02177c40 Upgrades: wp_usermeta is a global table in multisite, so it should only be upgraded by the single site routines when we're not in a multisite install.
See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31358 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 13:40:17 +00:00
Drew Jaynes 88b0b7d9da Update the DocBlock for `wp_dropdown_categories()` to reflect that the entire `$args` parameter array is optional instead of individual arugments.
See #30306.


git-svn-id: https://develop.svn.wordpress.org/trunk@31357 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 09:03:26 +00:00
Drew Jaynes 475337bd97 Adjust the DocBlock for `wp_dropdown_pages()` to mark the entire `$args` parameter array as optional instead of each individual argument.
See #12494.


git-svn-id: https://develop.svn.wordpress.org/trunk@31356 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 08:55:52 +00:00
Drew Jaynes 53209f19b3 Add documentation for the `$value_field` argument added to `wp_dropdown_pages()` in [31338].
See #12494.


git-svn-id: https://develop.svn.wordpress.org/trunk@31355 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 08:50:20 +00:00
Gary Pendergast 029f637aa5 Upgrades: When upgrading a table to utf8mb4, we should run the `ALTER TABLE` query, even if it doesn't have any text columns. This will update the table's default character set, so that any text columns added in the future will have the expected character set.
See #21212 



git-svn-id: https://develop.svn.wordpress.org/trunk@31354 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:58:15 +00:00
Aaron Jorbin 0b5e8a1702 Travis hates tabs.
Related [31352]

see #30755


git-svn-id: https://develop.svn.wordpress.org/trunk@31353 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:57:54 +00:00
Aaron Jorbin b42b3b7c14 Update Travis-ci Slack notification token
see #30755



git-svn-id: https://develop.svn.wordpress.org/trunk@31352 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:51:58 +00:00
Gary Pendergast 8004484a6b Upgrades: When deciding if we can upgrade a table to utf8mb4, make sure we're checking the character set, not the collation.
Bump the DB version as well, as the update in [31349] wouldn't have triggered for anyone who tried it.

See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31351 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:25:22 +00:00
Aaron Jorbin 6a100e472f Temporarily (I hope) remove PHP 5.2 from tests being run on travis-ci
Travis-ci has disabled PHP 5.2. This has happened before when 5.2 didn't compile and then was restored when that was fixed.

upstream: https://github.com/travis-ci/travis-ci/issues/3152
related: https://github.com/WP-API/WP-API/issues/846

See #31244.



git-svn-id: https://develop.svn.wordpress.org/trunk@31350 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:13:37 +00:00
Gary Pendergast 9f6ddf8944 WPDB: If a site is using the `utf8` charset, and their version of MySQL supports `utf8mb4`, auto-upgrade them to `utf8mb4`.
This patch also resizes some indexes, to allow for the 767 byte index size limit in standard MySQL installs.

See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31349 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 04:50:19 +00:00
Andrew Nacin 43789f822a Remove leading space from the definition of a global cache group.
This only applied in a rare situation during the switch_to_blog() process where no global groups were currently defined.

see #31243.


git-svn-id: https://develop.svn.wordpress.org/trunk@31348 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 03:25:32 +00:00
Andrew Nacin 30e57104e6 Add useremail and userslugs as global cache groups. fixes #31243.
git-svn-id: https://develop.svn.wordpress.org/trunk@31347 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 03:23:46 +00:00
Boone Gorges 41db99c31a Use field-specific sanitization in `WP_Tax_Query::transform_query()`.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31346 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 02:01:24 +00:00
Gary Pendergast ba2beaf37d Shiny Updates: Fix a PHP warning when installing new plugins.
Props lgladdy for the initial patch.

See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31345 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 00:33:49 +00:00
boonebgorges 77aebc6d71 Use minified jquery-ui-core file during qunit:compiled Grunt task.
[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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31344 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 20:35:02 +00:00
Helen Hou-Sandi cdbea14c09 MCE views: Always refresh the view after updating a gallery.
This allows things like caption changes to be synced, as they are tied to the attachment and not the shortcode.

props iseulde.
fixes #31239.


git-svn-id: https://develop.svn.wordpress.org/trunk@31343 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 20:11:04 +00:00
Boone Gorges 90947c2c45 Another array syntax fix for Customizer tests.
See [31339], #30988.

git-svn-id: https://develop.svn.wordpress.org/trunk@31342 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:54:06 +00:00
Boone Gorges cc6ef67db7 jshint fixes for shiny updates JS.
As introduced in [31333].

Props iseulde.
See #29820.

git-svn-id: https://develop.svn.wordpress.org/trunk@31341 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:51:42 +00:00
Boone Gorges 0f28011bcf Modify `meta_query orderby syntax to use array keys as clause "handles".
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31340 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:37:47 +00:00
Boone Gorges 9d72e1c6a2 Use temporary variable for array in `Tests_Customize_Setting::test_preview_standard_types_multidimensional()`.
The syntax previously used - `call_user_func( 'foo' )['bar']`, where `foo()`
returns an array - is not valid on all supported versions of PHP, and was
breaking the CI builds.

See #30988.

git-svn-id: https://develop.svn.wordpress.org/trunk@31339 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:18:16 +00:00
Boone Gorges c9c9af5df8 Introduce `'value_field'` parameter to `wp_dropdown_pages()`.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31338 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:03:52 +00:00
Boone Gorges a710c0451c Use hash notation for `wp_dropdown_pages()` argument documentation.
git-svn-id: https://develop.svn.wordpress.org/trunk@31337 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 18:59:22 +00:00