Commit Graph

29039 Commits

Author SHA1 Message Date
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
Drew Jaynes
ffb4ec93b8 Clarify inline documentation for WP_Date_Query to better explain the relationship between an individual clause's 'compare' argument and various integer-based date arguments.
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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31336 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:16:35 +00:00
Gary Pendergast
4c49dd62e3 Shiny Updates: If the current user is not allowed to install/update plugins, we should return a JSON error, so it can be used by the JS handlers.
See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31335 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:15:59 +00:00
Gary Pendergast
d0379f4fb7 Shiny Updates: Add capability checks to the ajax callbacks, to ensure the current user is allowed to install/update plugins.
See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31334 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:04:32 +00:00
Gary Pendergast
748d595b5c Shiny Updates: Add ajax-y updates to the plugin list page, and ajax-y updates and installs to the plugin card page.
This also includes JS architecture that can be expanded to support theme, core and language pack updates.

Props pento, ericlewis, lgladdy, adamsilverstein, DrewAPicture

See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31333 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 04:18:57 +00:00
Andrew Ozz
f205eb63d0 Fix displaying long tag names in the Tags postbox. Props trishasalas, carolinegeven, iseulde. Fixes #18946.
git-svn-id: https://develop.svn.wordpress.org/trunk@31332 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-04 22:14:31 +00:00
Helen Hou-Sandi
8d0b774e65 Accessibility: remove remaining instances of accesskey.
It is a poorly implemented browser feature, not particularly discoverable, and causes more problems than it helps solve.

props afercia.
fixes #29715.


git-svn-id: https://develop.svn.wordpress.org/trunk@31331 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-04 03:45:24 +00:00
Helen Hou-Sandi
fe32344314 Themes: Allow version number in the overlay to be selected.
props johneckman.
fixes #31205.


git-svn-id: https://develop.svn.wordpress.org/trunk@31330 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 15:14:59 +00:00
Dominik Schilling (ocean90)
8bc9ad756d Ensure that WP_Customize_Setting::value() returns default value for setting if not dirty.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31329 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 10:14:28 +00:00
Dion Hulse
5811dcbcd6 Remove an extra indent from most of media-new.php.
git-svn-id: https://develop.svn.wordpress.org/trunk@31328 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 07:46:21 +00:00
Dion Hulse
4ed2d89ced WP_Upgrader: Remove references to non-existant variables that have never existed.
Props jdgrimes. Fixes  #29087


git-svn-id: https://develop.svn.wordpress.org/trunk@31327 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:17:05 +00:00
dd32
5f13a0e3e5 Remove an unused parameter on install_plugins_upload().
Props michalzuber. Fixes #28964


git-svn-id: https://develop.svn.wordpress.org/trunk@31326 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:13:02 +00:00
Sergey Biryukov
4aada86274 Add 'widget_nav_menu_args' filter for Custom Menu widget arguments.
props cyman, DrewAPicture.
fixes #29463.

git-svn-id: https://develop.svn.wordpress.org/trunk@31325 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 02:55:21 +00:00
Sergey Biryukov
5e9b89bf59 When using WP_Query's 'fields' => 'ids' (or 'fields' => 'id=>parent'), make sure the returned result is always an array of integers.
fixes #31194. see #27252.

git-svn-id: https://develop.svn.wordpress.org/trunk@31324 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 02:28:52 +00:00
Boone Gorges
f05f380638 In get_sample_permalink(), override 'future' status before generating permalink.
In [31114], `get_permalink()` was modified to prevent pretty permalinks from
being generated for posts with the 'future' post status. This inadvertently
broke the pretty permalink preview for scheduled posts. The fix is to include
the 'future' status in the list of statuses that `get_sample_permalink()` fakes
as 'publish' before it fetches a permalink.

Props DrewAPicture.
Fixes #30910.

git-svn-id: https://develop.svn.wordpress.org/trunk@31323 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-02 16:49:23 +00:00
Dominik Schilling (ocean90)
c61dff8c21 jQuery UI: Add jquery-ui-core as dependency for jquery-ui-progressbar.
props tyxla.
fixes #31208.

git-svn-id: https://develop.svn.wordpress.org/trunk@31322 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-02 10:33:49 +00:00
Boone Gorges
5f6ea53e86 When querying for a specific post, allow posts with a non-public status to be returned as long as that status is specified.
This makes it possible to, for example, retrieve a specific post using the
`p` parameter of `WP_Query`, even if the post is in the Trash, by including
the `post_status=trash` parameter.

Props ebinnion.
Fixes #29167.

git-svn-id: https://develop.svn.wordpress.org/trunk@31321 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-01 20:25:42 +00:00
Sergey Biryukov
09d350b835 Menus: Don't display "Move" text without direction if there is only one menu item.
props kucrut for initial patch.
fixes #30765.

git-svn-id: https://develop.svn.wordpress.org/trunk@31320 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-01 05:28:29 +00:00
Dominik Schilling (ocean90)
917af97d4f i18n tools: Sync makepot.php with i18n.svn.
fixes #31193.

git-svn-id: https://develop.svn.wordpress.org/trunk@31319 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 22:01:33 +00:00
Sergey Biryukov
54dedff5c7 Reduce the size of the WordPress logo tap target on log in screen on mobile, to avoid unexpected redirect away from the form.
props mzak.
fixes #31185.

git-svn-id: https://develop.svn.wordpress.org/trunk@31318 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 21:31:26 +00:00
Andrew Ozz
9391d4f572 Separate the tests for IE conditional comments support in WP_Scripts. Props valendesigns, see 16024.
git-svn-id: https://develop.svn.wordpress.org/trunk@31317 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 20:40:49 +00:00
Sergey Biryukov
cec05576e4 Themes: Remove a Chrome workaround that causes theme screenshots to look too crisp and no longer appears to be relevant.
props mzak.
fixes #26584.

git-svn-id: https://develop.svn.wordpress.org/trunk@31316 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 20:38:08 +00:00
Dominik Schilling (ocean90)
606c88fe75 i18n tools: Exclude wp-includes/class-pop3.php in wp_frontend().
The external library uses the underscore alias for the native gettext() function. Makepot extracts these strings too, which results in having 25 unused translations.

fixes #31179.

git-svn-id: https://develop.svn.wordpress.org/trunk@31315 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 20:27:16 +00:00
Dominik Schilling (ocean90)
125897c70e i18n tools: Tabs, not spaces for indentation.
git-svn-id: https://develop.svn.wordpress.org/trunk@31314 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 19:51:03 +00:00
Boone Gorges
32f2903248 Prevent terms in a show_in_quick_edit=false taxonomy from being updated by a faked AJAX request.
The UI for these taxonomies was hidden in [31308], but it remained possible to
send a direct POST request to the `inline-edit` endpoint to bypass the
restriction. The current changeset fixes this.

Props meloniq.
Fixes #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31313 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 19:37:12 +00:00
Boone Gorges
2d737796d2 Improve support for ordering WP_Query results by postmeta.
`WP_Meta_Query` clauses now support a 'name' parameter. When building a
`WP_Query` object, the value of 'orderby' can reference this 'name', so that
it's possible to order by any clause in a meta_query, not just the first one
(as when using 'orderby=meta_value'). This improvement also makes it possible
to order by multiple meta query clauses (or by any other eligible field plus
a meta query clause), using the array syntax for 'orderby' introduced in [29027].

Props Funkatronic, boonebgorges.
Fixes #31045.

git-svn-id: https://develop.svn.wordpress.org/trunk@31312 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 15:47:51 +00:00
Sergey Biryukov
f36af772ea Remove redundant parameter.
see #30753.

git-svn-id: https://develop.svn.wordpress.org/trunk@31311 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 02:11:46 +00:00
Sergey Biryukov
12156f6fab Add a unit test that expects wp_parse_args() to treat 'true' and 'false' in a query string as strings.
props voldemortensen for initial patch.
see #30753.

git-svn-id: https://develop.svn.wordpress.org/trunk@31310 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 02:01:46 +00:00
Drew Jaynes (DrewAPicture)
0c783b06fb Add changelog entries to the post_gallery and post_playlist hook docs for the $instance variable that was added in [31304].
Props ninnypants for the initial patch.
Fixes #31151.


git-svn-id: https://develop.svn.wordpress.org/trunk@31309 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 00:32:09 +00:00
Boone Gorges
c7320c5a86 Fix 'quick_edit_show_taxonomy' filter so that can properly be used for overrides in all cases.
See #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31308 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 19:28:27 +00:00
Boone Gorges
057c428346 Introduce 'show_in_quick_edit' parameter for register_taxonomy().
Setting 'show_in_quick_edit' to false when registering a custom taxonomy will
hide the taxonomy when editing posts using Quick Edit.

The new 'quick_edit_show_taxonomy' filter allows this behavior to be filtered
on a finer scale, as when you want a given taxonomy to be hidden for one post
type but not for others.

Props hlashbrooke.
Fixes #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31307 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 19:17:51 +00:00
Boone Gorges
2fb8562a97 Introduce setExpectedDeprecated() and setExpectedIncorrectUsage() methods to `WP_UnitTestCase.
These methods provide a procedural alternative to the `@expectedDeprecated`
and `@expectedIncorrectUsage` test annotations, and parallel PHPUnit's native
`setExpectedException()`.

Props prasoon2211, jdgrimes.
Fixes #28486.

git-svn-id: https://develop.svn.wordpress.org/trunk@31306 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 16:47:44 +00:00
Sergey Biryukov
14c3492ff5 Rename $instances to $instance in wp_audio_shortcode() and wp_video_shortcode() for consistency with gallery_shortcode() and wp_playlist_shortcode().
see #31151.

git-svn-id: https://develop.svn.wordpress.org/trunk@31305 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 16:05:52 +00:00
Sergey Biryukov
45b0513c1b Pass the current shortcode instance ID to post_gallery and post_playlist filters.
props justincwatt.
fixes #31151.

git-svn-id: https://develop.svn.wordpress.org/trunk@31304 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 16:01:25 +00:00
Sergey Biryukov
e725b36d1e Don't display the Help tab reference in Page Attributes meta box if Help tab was removed.
props bananastalktome.
fixes #31164.

git-svn-id: https://develop.svn.wordpress.org/trunk@31303 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 15:33:33 +00:00
Boone Gorges
9cb4d3c1ce In get_adjacent_post(), return private post if the current user has the capacity to read it.
This mirrors the check that happens post-query in `WP_Query`. See #30911.

Props bswatson.
Fixes #30287.

git-svn-id: https://develop.svn.wordpress.org/trunk@31302 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 02:19:46 +00:00
Boone Gorges
9f8e5d3c17 Add unit tests for 'show_option_all' behavior of wp_list_categories().
See #21881.

git-svn-id: https://develop.svn.wordpress.org/trunk@31301 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 01:39:31 +00:00
Sergey Biryukov
dcb278f006 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
props tomdxw.
fixes #30927.

git-svn-id: https://develop.svn.wordpress.org/trunk@31300 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 21:14:54 +00:00