Commit Graph

7254 Commits

Author SHA1 Message Date
Weston Ruter
5228a99e97 Customize: Update unit test for WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item() to account for slashing if user can't unfiltered_html.
Fixes unit tests which broke under multisite config after [36608].

Fixes #35869.

Built from https://develop.svn.wordpress.org/trunk@36610


git-svn-id: http://core.svn.wordpress.org/trunk@36577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 05:10:27 +00:00
Boone Gorges
68f3ee8f64 Docs: WP_Meta_Query accepts 'EXISTS' or 'NOT EXISTS' for $compare.
Props apaliku, jdgrimes.
Fixes #35891.
Built from https://develop.svn.wordpress.org/trunk@36609


git-svn-id: http://core.svn.wordpress.org/trunk@36576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 03:56:27 +00:00
Weston Ruter
b206327acb Customize: Fix previewing and updating of nav menu items containing slashed/slashable characters.
Prevents slashes from being added when a user without `unfiltered_html` previews a nav menu item containing an apostrophe or some other slashable character, and prevents the loss of an intentional slash (e.g. "\o/") when saving a nav menu item, regardless of capability.

Fixes #35869.

Built from https://develop.svn.wordpress.org/trunk@36608


git-svn-id: http://core.svn.wordpress.org/trunk@36575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 00:14:25 +00:00
Eric Lewis
04da8bb63a Posts: Non-trashed posts should take slug priority over trashed posts.
When determining a unique post slug, trashed posts are taken into account. Previously, new posts would add suffixes to their slugs (e.g. `about-2`) when a post in the trash had the desired slug (e.g. `about`). 

To avoid this behavior, when a post is trashed its slug (i.e. `post_name`) is now suffixed with `-%trashed%`. The post's pre-trash slug is stored as post meta, and if the post is restored from trash, its desired slug is reapplied. 

For existing trashed posts which don't have the `-%trashed%` suffix, the suffix is added when a post with its desired slug is created.

Props ocean90, boonebgorges, ryan, SergeyBiryukov, coffee2code, helen, williamsba1.
See #11863.

Built from https://develop.svn.wordpress.org/trunk@36607


git-svn-id: http://core.svn.wordpress.org/trunk@36574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-21 21:45:28 +00:00
Weston Ruter
b3d6f127eb Customize: Fix "Loading..." message from persisting in panel title when user does not have manage_options cap to edit blogname.
Reverts part of [36388].

Fixes #35579.

Built from https://develop.svn.wordpress.org/trunk@36606


git-svn-id: http://core.svn.wordpress.org/trunk@36573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-21 06:15:28 +00:00
Dominik Schilling
141b4dbd91 JSHint for [36602].
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36605


git-svn-id: http://core.svn.wordpress.org/trunk@36572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 22:14:27 +00:00
Dominik Schilling
826e2d8ea1 Script Loader: Fix missing script output when the groups of dependencies are different.
Aka: Don't lose the grandchild.

Props gitlost, ocean90.
Fixes #35873.
Built from https://develop.svn.wordpress.org/trunk@36604


git-svn-id: http://core.svn.wordpress.org/trunk@36571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 22:11:25 +00:00
Dominik Schilling
a40a04ef42 i18n-tools: Respect the coding standards when adding textdomains with add-textdomain.php.
Props GaryJ, groovecoder.
Fixes #21616.
Built from https://develop.svn.wordpress.org/trunk@36603


git-svn-id: http://core.svn.wordpress.org/trunk@36570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:44:25 +00:00
Andrew Ozz
30feff9c99 TinyMCE, inline link dialog:
- Fix passing values to the (old) modal on open when non-linked text is selected and Advanced is clicked before pasting an URL.
- When the user has selected text partially including a link and opens the editing dialog, auto-select the link only. Helps when a linked word is selected by double-clicking.
- Remove all placeholders on saving.
- Do not add undo level on inserting link placeholder.
- Remove the placeholder when canceling from the modal.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36602


git-svn-id: http://core.svn.wordpress.org/trunk@36569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:36:25 +00:00
Drew Jaynes
f636747fa4 Docs: Fix two incorrect notations of the $show_admin_bar global to specify a boolean type, not WP_Admin_Bar.
See [36491]. Fixes #35686.

Built from https://develop.svn.wordpress.org/trunk@36601


git-svn-id: http://core.svn.wordpress.org/trunk@36568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:27:26 +00:00
Dominik Schilling
0307aadf0f i18n-tools: Add the ability to parse a whole directory with add-textdomain.php.
Props iamntz.
Fixes #35499.
Built from https://develop.svn.wordpress.org/trunk@36600


git-svn-id: http://core.svn.wordpress.org/trunk@36567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:03:25 +00:00
Dominik Schilling
c57946c3f2 i18n-tools: Remove PHP4 constructor from add-textdomain.php.
`_deprecated_constructor()` isn't available in non-WordPress context.

See #31982.
Built from https://develop.svn.wordpress.org/trunk@36599


git-svn-id: http://core.svn.wordpress.org/trunk@36566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 20:34:25 +00:00
Boone Gorges
fce93c4771 In get_terms(), assemble WHERE conditions in an array instead of concatenating.
This method is more reliable when adding new `WHERE` conditions.

See #35495.
Built from https://develop.svn.wordpress.org/trunk@36598


git-svn-id: http://core.svn.wordpress.org/trunk@36565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 20:04:26 +00:00
Andrew Ozz
acb6cb1d74 TinyMCE: fix the regex that removes spaces from empty paragraphs. Was causing problems when wpautop is disabled and there are many U+00A0 chars between the opening <p> and an inline tag. These chars are inserted by the browsers to maintain consecutive spaces typed by the users in contentEditable.
Fixes #35890.
Built from https://develop.svn.wordpress.org/trunk@36597


git-svn-id: http://core.svn.wordpress.org/trunk@36564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 19:56:27 +00:00
Dominik Schilling
24cfa6a40a Tests: Test that jQuery can be moved into footer after [36550].
Props gitlost.
See #25247.
Built from https://develop.svn.wordpress.org/trunk@36596


git-svn-id: http://core.svn.wordpress.org/trunk@36563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 16:17:25 +00:00
Dominik Schilling
21b9965613 Theme Compat: Replace the custom comment form with comment_form() and reduce number of links.
`comment_form()` has nearly the same markup as the custom form but also includes the latest enhancements like improved a11y and more filters.

Add translators comments, props ramiy.

Fixes #35888.
Built from https://develop.svn.wordpress.org/trunk@36595


git-svn-id: http://core.svn.wordpress.org/trunk@36562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 14:41:27 +00:00
Boone Gorges
26955c8507 Tests: Add decorators to PHPMailer mock object.
The new `get_recipient()` and `get_sent()` methods greatly simplify the
syntax required when writing tests for `wp_mail()`.

Props welcher.
Fixes #34161.
Built from https://develop.svn.wordpress.org/trunk@36594


git-svn-id: http://core.svn.wordpress.org/trunk@36561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 03:41:27 +00:00
Rachel Baker
9fdb970ceb Docs: Add missing @since and @access tags to get_curies method and filter from r36533
See #34729, #32246.
Built from https://develop.svn.wordpress.org/trunk@36593


git-svn-id: http://core.svn.wordpress.org/trunk@36560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 23:42:27 +00:00
Dominik Schilling
a04b869652 Styles: Pass the media attribute as an argument to the style_loader_tag filter.
Props sebastian.pisula.
Fixes #34765.
Built from https://develop.svn.wordpress.org/trunk@36592


git-svn-id: http://core.svn.wordpress.org/trunk@36559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 21:05:26 +00:00
Dominik Schilling
0285fd946d Script Loader: Don't parse $src if the current color scheme isn't registered.
Avoids a `parse_url()` call on each request if the default colors scheme is in use.

Fixes #35882.
Built from https://develop.svn.wordpress.org/trunk@36591


git-svn-id: http://core.svn.wordpress.org/trunk@36558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 20:44:26 +00:00
Dominik Schilling
9d8204467c Styles: Bail if WP_Styles::_css_href() returns an empty value.
The style `colors` gets registered with `true` as the source value which gets handled later by `wp_style_loader_src()`, a callback for the `style_loader_src` filter in `WP_Styles::_css_href()`. `wp_style_loader_src()` may return false, for example for the default color scheme.

This was removed in [36550].

See #35229.
Built from https://develop.svn.wordpress.org/trunk@36590


git-svn-id: http://core.svn.wordpress.org/trunk@36557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 20:34:26 +00:00
Andrew Ozz
edceb0173c TinyMCE: update to 4.3.4. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #35876.
Built from https://develop.svn.wordpress.org/trunk@36589


git-svn-id: http://core.svn.wordpress.org/trunk@36556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 19:19:26 +00:00
Rachel Baker
06225cc394 Comments: Refresh the Moderate Comment screen for a friendlier experience with email moderation actions.
Brings some love to this neglected screen:
* format `comment_content`, instead of escaping in one massive block of text
* only wrap the comment date in a link if the comment permalink exists
* include link to the Edit Comment screen at the bottom of the comment_content
* update the message styles to match other screens
* append `#wpbody-content` to the comment email message links for accessibility

Props johnbillion, rachelbaker, afercia, melchoyce, karmatosed.

Fixes #34133
Built from https://develop.svn.wordpress.org/trunk@36588


git-svn-id: http://core.svn.wordpress.org/trunk@36555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 19:14:26 +00:00
Andrea Fercia
30866ceb5d Accessibility: Improve color contrast updating any #999 gray used for text or icons to a darker gray.
Fixes #35660.
Built from https://develop.svn.wordpress.org/trunk@36587


git-svn-id: http://core.svn.wordpress.org/trunk@36554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 18:44:27 +00:00
Weston Ruter
6b775d4afe Customize: Add selective refresh framework with implementation for widgets and re-implementation for nav menus.
See https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/.

Props westonruter, valendesigns, DrewAPicture, ocean90.
Fixes #27355.

Built from https://develop.svn.wordpress.org/trunk@36586


git-svn-id: http://core.svn.wordpress.org/trunk@36553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 18:41:28 +00:00
Andrea Fercia
0f88dbfee0 Accessibility: Fix displaying of Universal time and Local time info on the General Settings screen.
In [36263] they were mistakenly moved within a conditional check.

Fixes #35064.
Built from https://develop.svn.wordpress.org/trunk@36585


git-svn-id: http://core.svn.wordpress.org/trunk@36552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 16:09:26 +00:00
Andrea Fercia
08510d2e5d Accessibility: after [36000] conditionally print out the aria-describedby attribute on the Featured Image postbox.
Fixes #35076.
Built from https://develop.svn.wordpress.org/trunk@36584


git-svn-id: http://core.svn.wordpress.org/trunk@36551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 15:10:28 +00:00
Weston Ruter
34010353cc Customize: Prevent consecutive refresh requests from preview from causing JS error.
Fixes "Uncaught TypeError: this.targetWindow is not a function".

See #27355.
Fixes #35866.

Built from https://develop.svn.wordpress.org/trunk@36583


git-svn-id: http://core.svn.wordpress.org/trunk@36550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 03:47:27 +00:00
Andrea Fercia
77dbab1e1b Accessibility: Reduce the WordPress shades of grey, Episode 2.
See #35783.
Built from https://develop.svn.wordpress.org/trunk@36582


git-svn-id: http://core.svn.wordpress.org/trunk@36549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 22:30:27 +00:00
Andrea Fercia
ecdcae565e Plugins: Remove an unused variable after [35953].
Fixes #35050.
Built from https://develop.svn.wordpress.org/trunk@36581


git-svn-id: http://core.svn.wordpress.org/trunk@36548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:33:25 +00:00
Dominik Schilling
6f2a56bf3e Themes: After [36546] restore theme search functionality.
* Correct several incorrect uses of `_.union`. Since Underscore 1.7.0 `_.union` supports only arrays and not variadic args.
* Use a namespaced event `themes:update`. Backbone 1.2 added a built in `update` event that triggers after any amount of models are added or removed from a collection.

Props adamsilverstein.
See #34350.
Built from https://develop.svn.wordpress.org/trunk@36580


git-svn-id: http://core.svn.wordpress.org/trunk@36547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:21:26 +00:00
Dominik Schilling
284f88e35a Themes: Fix flickering of the theme screenshot on hover in WebKit browsers.
Props JoeFusco.
Fixes #35787.
Built from https://develop.svn.wordpress.org/trunk@36579


git-svn-id: http://core.svn.wordpress.org/trunk@36546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:11:27 +00:00
Dominik Schilling
529a53e903 Formatting: Avoid a PHP warning when wptexturize() is called with a trailing less-than symbol.
Props westonruter.
Fixes #35864.
Built from https://develop.svn.wordpress.org/trunk@36578


git-svn-id: http://core.svn.wordpress.org/trunk@36545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 20:31:27 +00:00
Drew Jaynes
cc1261f7fd Docs: Add an explanation for the dynamic portion of the {$taxonomy}_term_edit_form_top hook, introduced in [36526].
See #32246.

Built from https://develop.svn.wordpress.org/trunk@36577


git-svn-id: http://core.svn.wordpress.org/trunk@36544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 18:19:26 +00:00
Drew Jaynes
e020ccd081 Docs: Add formatting to a changelog entry in the hook doc for the rest_dispatch_request filter.
See [36534]. See #32246.

Built from https://develop.svn.wordpress.org/trunk@36576


git-svn-id: http://core.svn.wordpress.org/trunk@36543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 18:18:25 +00:00
Dominik Schilling
71b735974b Media Library: After [36546] restore the "Add new" functionality.
Rework handling of the `'toggle:upload:attachment'` event using `.on` vs `.listenTo` for better compatibility with the current version of Backbone.

Props adamsilverstein.
See #34350.
Fixes #35853.
Built from https://develop.svn.wordpress.org/trunk@36575


git-svn-id: http://core.svn.wordpress.org/trunk@36542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:50:26 +00:00
Dominik Schilling
d499011145 Add missing test changes for [36573].
See #34755.
Built from https://develop.svn.wordpress.org/trunk@36574


git-svn-id: http://core.svn.wordpress.org/trunk@36541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:44:26 +00:00
Dominik Schilling
658d825ea9 Customizer: In nav menus show the location name instead of slug.
Props ryankienstra.
Fixes #34755.
Built from https://develop.svn.wordpress.org/trunk@36573


git-svn-id: http://core.svn.wordpress.org/trunk@36540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:16:27 +00:00
Jeremy Felt
7ee69ca8d1 Remove extra spaces between function names and brackets
These were introduced when making list table view modes sticky.

See #16774, #34365.

Built from https://develop.svn.wordpress.org/trunk@36572


git-svn-id: http://core.svn.wordpress.org/trunk@36539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 16:51:27 +00:00
Dominik Schilling
956627ff83 Don't display errors during Ajax requests.
See #34915 for REST and #23811 for XML-RPC.

Props pento.
Fixes #26262.
Built from https://develop.svn.wordpress.org/trunk@36571


git-svn-id: http://core.svn.wordpress.org/trunk@36538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 16:43:27 +00:00
Dion Hulse
04ad9e674d HTTP API: Certificate bundle: Attempt to move a certificate lower in the file to allow older OpenSSL versions to parse it & communicate with WordPress.org securely again.
The OpenSSL version which was failing in this case was `OpenSSL 0.9.8e 23 Feb 2007`.

See #35637 #30434 #25007

Built from https://develop.svn.wordpress.org/trunk@36570


git-svn-id: http://core.svn.wordpress.org/trunk@36537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 08:21:28 +00:00
Andrew Ozz
2d94e025a2 Replace wp_upload_dir() with the new wp_get_upload_dir() in all cases where a file is not being uploaded. Deprecate _wp_upload_dir_baseurl(), and replace it with wp_get_upload_dir().
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36569


git-svn-id: http://core.svn.wordpress.org/trunk@36536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 00:24:27 +00:00
Drew Jaynes
c6ee6246ef Docs: Remove a duplicate @static tag from the WP_Customize_Panel->instance_count property DocBlock.
See #32246.

Built from https://develop.svn.wordpress.org/trunk@36568


git-svn-id: http://core.svn.wordpress.org/trunk@36535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 00:14:26 +00:00
Boone Gorges
d9945e5bd4 Reintroduce term meta unit test accidentally removed in [36566].
Built from https://develop.svn.wordpress.org/trunk@36567


git-svn-id: http://core.svn.wordpress.org/trunk@36534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 23:02:25 +00:00
Boone Gorges
571e14f897 More performance improvements to metadata lazyloading.
Comment and term meta lazyloading for `WP_Query` loops, introduced in 4.4,
depended on filter callback methods belonging to `WP_Query` objects. This meant
storing `WP_Query` objects in the `$wp_filter` global (via `add_filter()`),
requiring that PHP retain the objects in memory, even when the local variables
would typically be expunged during normal garbage collection. In cases where a
large number of `WP_Query` objects were instantiated on a single pageload,
and/or where the contents of the `WP_Query` objects were quite large, serious
performance issues could result.

We skirt this problem by moving metadata lazyloading out of `WP_Query`. The
new `WP_Metadata_Lazyloader` class acts as a lazyload queue. Query instances
register items whose metadata should be lazyloaded - such as post terms, or
comments - and a `WP_Metadata_Lazyloader` method will intercept comment and
term meta requests to perform the cache priming. Since `WP_Metadata_Lazyloader`
instances are far smaller than `WP_Query` (containing only object IDs), and
clean up after themselves far better than the previous `WP_Query` methods (bp
only running their callbacks a single time for a given set of queued objects),
the resource use is decreased dramatically.

See [36525] for an earlier step in this direction.

Props lpawlik, stevegrunwell, boonebgorges.
Fixes #35816.
Built from https://develop.svn.wordpress.org/trunk@36566


git-svn-id: http://core.svn.wordpress.org/trunk@36533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:58:26 +00:00
Andrew Ozz
da5b3a55c4 Improve the performance of wp_upload_dir():
- Cache the output in non-persistent cache.
- Cache the result from `wp_mkdir_p()` in persistent cache (when present).
- Introduce `wp_get_upload_dir()` for use when not uploading files. It is equivalent to `wp_upload_dir()` but does not check for the existence or create the upload directory.
- Change tests to use the non-cached `_wp_upload_dir()`. They change options on the fly (should never be used in production) to simulate different environments.
- Introduce `_upload_dir_no_subdir()` and `_upload_dir_https()` to facilitate testing. These use the proper `upload_dir` filter to simulate different environments.

Props kovshenin, azaozz.
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36565


git-svn-id: http://core.svn.wordpress.org/trunk@36532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:51:26 +00:00
Boone Gorges
84350eb6b6 Add changelog entry for publicly_queryable argument in register_taxonomy().
Missed in [36525].

Fixes #34491.
Built from https://develop.svn.wordpress.org/trunk@36564


git-svn-id: http://core.svn.wordpress.org/trunk@36531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:04:32 +00:00
Dominik Schilling
ca6726f331 Tests: Add test for wp_get_installed_translations().
Introduces language files in /tests/phpunit/data/language. Each file includes the header and 5 translations.

Props realloc for initial patch.
Fixes #35284.
Built from https://develop.svn.wordpress.org/trunk@36563


git-svn-id: http://core.svn.wordpress.org/trunk@36530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:02:26 +00:00
Jeremy Felt
3e14571132 Multisite: Make view mode sticky for network users and sites list tables.
Fixes #34365.

Built from https://develop.svn.wordpress.org/trunk@36562


git-svn-id: http://core.svn.wordpress.org/trunk@36529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:00:27 +00:00
Jeremy Felt
e7a7f08c8b Multisite: Avoid a PHP Notice when saving a site address without a path.
Props kjbenk.
Fixes #35631.

Built from https://develop.svn.wordpress.org/trunk@36561


git-svn-id: http://core.svn.wordpress.org/trunk@36528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 20:50:27 +00:00
Dominik Schilling
bffdae7b1d Plugins: Remove slashes from search terms and use urldecode() in non-URL contexts.
Fixes #35712.
Built from https://develop.svn.wordpress.org/trunk@36560


git-svn-id: http://core.svn.wordpress.org/trunk@36527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 20:15:26 +00:00
Dominik Schilling
10234c1907 Tests: Add a test for testing wp_enqueue_script() with an alias handle in the footer.
Props kovshenin.
See #35643.
Built from https://develop.svn.wordpress.org/trunk@36559


git-svn-id: http://core.svn.wordpress.org/trunk@36526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:53:26 +00:00
Dominik Schilling
8b781dfaa7 Updates: Prevent further actions if an update button is disabled.
Props adamsilverstein, afercia.
Fixes #35257.
Built from https://develop.svn.wordpress.org/trunk@36558


git-svn-id: http://core.svn.wordpress.org/trunk@36525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:42:26 +00:00
Dominik Schilling
d1d90a3263 Make $wp_local_package explicitly global in wp-settings.php.
Props danielbachhuber.
Fixes #34975.
Built from https://develop.svn.wordpress.org/trunk@36557


git-svn-id: http://core.svn.wordpress.org/trunk@36524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:32:25 +00:00
Jeremy Felt
309ea2f138 Multisite: Add a hook to the end of the network's Add New User form.
The `network_user_new_form` action can be used to extend the new user form.

Props ptahdunbar.
Fixes #15389.

Built from https://develop.svn.wordpress.org/trunk@36556


git-svn-id: http://core.svn.wordpress.org/trunk@36523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:15:26 +00:00
Jeremy Felt
39cd3583a4 Multisite: Add a hook to the end of the Add Site form.
The `network_site_new_form` action can be used to extend the new site form.

Props igmoweb, ocean90.
Fixes #34739.

Built from https://develop.svn.wordpress.org/trunk@36555


git-svn-id: http://core.svn.wordpress.org/trunk@36522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:03:25 +00:00
Dominik Schilling
7e5a563876 Credits: Remove unused strings.
Props Ankit K Gupta.
Fixes #34909.
Built from https://develop.svn.wordpress.org/trunk@36554


git-svn-id: http://core.svn.wordpress.org/trunk@36521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:00:28 +00:00
Dominik Schilling
de0e09983d Install: Enhance the language of the "Success" message.
Props ckoerner.
Fixes #34897.
Built from https://develop.svn.wordpress.org/trunk@36553


git-svn-id: http://core.svn.wordpress.org/trunk@36520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 18:58:26 +00:00
Dominik Schilling
442a637e1e Tests: Add Tests_dbDelta::assertTableHasPrimaryKey().
Also fix a typo in the name for the compound key.

Props charlestonsw.
Fixes #34877.
Built from https://develop.svn.wordpress.org/trunk@36552


git-svn-id: http://core.svn.wordpress.org/trunk@36519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 18:55:27 +00:00
Andrew Ozz
27b3dddb2e Styles:
- Restore loading order for wp-admin: open-sans, dashicons, etc.
- Remove couple of redundant dependencies.

See #35229.
Built from https://develop.svn.wordpress.org/trunk@36551


git-svn-id: http://core.svn.wordpress.org/trunk@36518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 18:01:26 +00:00
Dominik Schilling
bc5d22266d Script/Style Dependencies: Make sure that inline styles for handles without a source are printed.
This prevents breaking plugins which are adding inline styles to the `wp-admin` handle after [36341].

Props dd32, ocean90.
Fixes #35229.
Built from https://develop.svn.wordpress.org/trunk@36550


git-svn-id: http://core.svn.wordpress.org/trunk@36517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 17:11:26 +00:00
Dominik Schilling
0d89816985 Tests: Indent test_wp_register_script() with tabs.
Built from https://develop.svn.wordpress.org/trunk@36549


git-svn-id: http://core.svn.wordpress.org/trunk@36516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 16:07:26 +00:00
Dominik Schilling
c673740166 Autoprefixer for [36532].
See #31195.
Built from https://develop.svn.wordpress.org/trunk@36548


git-svn-id: http://core.svn.wordpress.org/trunk@36515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:39:26 +00:00
Dominik Schilling
a9afddcd20 Tests: Indent test_wp_register_style() with tabs.
Built from https://develop.svn.wordpress.org/trunk@36547


git-svn-id: http://core.svn.wordpress.org/trunk@36514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:37:26 +00:00
Dominik Schilling
4693b25171 Update Backbone and Underscore to the latest versions.
Backbone, from 1.1.2 to 1.2.3. Underscore, from 1.6.0 to 1.8.3.

The new versions of Backbone and Underscore offer numerous small bug fixes and some optimizations and other improvements. Check the [http://backbonejs.org/#changelog Backbone changelog] and [http://underscorejs.org/#changelog Underscore changelog] for the full details. 

The new versions include some significant changes that may break existing code. Plugins or themes that rely on the bundled Backbone and/or Underscore libraries should carefully check functionality with the latest versions and run any available unit tests to ensure compatibility.

Some changes of note that were addressed in core as part of this upgrade:

* `_.flatten` no longer works with objects since Underscore.js 1.7. `_.flatten()` working with objects was an unintended side-affect of the implementation, see [https://github.com/jashkenas/underscore/issues/1904#issuecomment-60241576 underscore#1904]. Check any `_flatten` usage and only flatten arrays.
* As of Backbone 1.2.0, you can no longer modify the `events` hash or your view's `el` property in `initialize`, so don't try to modify them there. 
* Since Underscore 1.7, Underscore templates no longer accept an initial data object. `_.template` always returns a function now so make sure you use it that way.

Props adamsilverstein.
Fixes #34350.
Built from https://develop.svn.wordpress.org/trunk@36546


git-svn-id: http://core.svn.wordpress.org/trunk@36513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:22:26 +00:00
Dominik Schilling
53245b1294 Setup: Improve wording on the page for the database connection details.
See #26879.
Built from https://develop.svn.wordpress.org/trunk@36545


git-svn-id: http://core.svn.wordpress.org/trunk@36512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:03:26 +00:00
Dominik Schilling
7482a4d4ac Setup: Use "Username" instead of "User Name".
Props thisisit.
Fixes #35850.
Built from https://develop.svn.wordpress.org/trunk@36544


git-svn-id: http://core.svn.wordpress.org/trunk@36511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:00:28 +00:00
Andrew Ozz
2413e41f8c Do not strip slashes from the whole &_POST when doing autosaves.
Props joehoyle.
Fixes #35408.
Built from https://develop.svn.wordpress.org/trunk@36543


git-svn-id: http://core.svn.wordpress.org/trunk@36510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 00:10:27 +00:00
Andrew Ozz
0ff58701e0 Comments: look for wp_error when checking whether $wpdb->get_col_length() has failed.
See #10377.
Built from https://develop.svn.wordpress.org/trunk@36542


git-svn-id: http://core.svn.wordpress.org/trunk@36509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 23:50:27 +00:00
Dominik Schilling
9e73dea03a Introduce a $parent_class parameter for _deprecated_constructor().
Use the parameter for the deprecated constructor warning in `WP_Widget` to provide an indication to which widget is using the PHP4 style constructor.

Props sebastian.pisula.
Fixes #33440.
Built from https://develop.svn.wordpress.org/trunk@36541


git-svn-id: http://core.svn.wordpress.org/trunk@36508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 23:20:26 +00:00
Dominik Schilling
8a52014638 In wp_title() fix a 7 year old typo.
Props joelerr.
Fixes #34879.
Built from https://develop.svn.wordpress.org/trunk@36540


git-svn-id: http://core.svn.wordpress.org/trunk@36507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 22:28:26 +00:00
Dominik Schilling
3f3fe5a7ed Themes: Use the attachment ID as the key in get_uploaded_header_images().
Prevents missing header images when an image has the same name as another header image.

Props sirbrillig.
Fixes #31786.
Built from https://develop.svn.wordpress.org/trunk@36539


git-svn-id: http://core.svn.wordpress.org/trunk@36506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 22:12:27 +00:00
Dominik Schilling
51473acfb3 i18n: Prevent is_textdomain_loaded() from returning true even if there are no translations for the domain.
In `get_translations_for_domain()` don't fill the global `$l10n` with `NOOP_Translations` instances, return a `NOOP_Translations` instance instead.

Props nacin, jrf.
Fixes #21319.
Built from https://develop.svn.wordpress.org/trunk@36538


git-svn-id: http://core.svn.wordpress.org/trunk@36505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 21:15:29 +00:00
Andrea Fercia
008cba0333 Accessibility: Reduce the WordPress shades of grey, first part.
See #35783.
Built from https://develop.svn.wordpress.org/trunk@36537


git-svn-id: http://core.svn.wordpress.org/trunk@36504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 16:09:29 +00:00
Ryan McCue
3e65236aa7 REST API: Apply rest_post_dispatch to embedded responses.
Fixes #35628.
Props @danielbachhuber.

Built from https://develop.svn.wordpress.org/trunk@36536


git-svn-id: http://core.svn.wordpress.org/trunk@36503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 06:06:27 +00:00
Ryan McCue
03ba67a0b7 REST API: Allow explicit HEAD callbacks.
HEAD callbacks can now be registered independently, with the GET
callback still used as a fallback.

Fixes #34841.

Built from https://develop.svn.wordpress.org/trunk@36535


git-svn-id: http://core.svn.wordpress.org/trunk@36502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 05:51:26 +00:00
Ryan McCue
0438795671 REST API: Add routing args to rest_dispatch_request filter.
This allows requests to be hijacked via the filter more easily.

Fixes #35507.

Built from https://develop.svn.wordpress.org/trunk@36534


git-svn-id: http://core.svn.wordpress.org/trunk@36501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 04:40:26 +00:00
Ryan McCue
47bee5157b REST API: Add support for CURIEs.
CURIEs are Compact URIs, which provide a more usable way to use
custom relations in the API. The `wp` CURIE is registered by default
for `https://api.w.org/` URI relations.

Fixes #34729.
Props joehoyle.

Built from https://develop.svn.wordpress.org/trunk@36533


git-svn-id: http://core.svn.wordpress.org/trunk@36500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 02:19:27 +00:00
Weston Ruter
b5e18056e5 Customize: Add a user-friendly way to preview site responsiveness for desktop, tablet, and mobile.
Introduces `WP_Customize_Manager::get_previewable_devices()` with a `customize_previewable_devices` filter to change the default device and which devices are available for previewing. This is a feature that was first pioneered on WordPress.com.

Props celloexpressions, folletto, valendesigns, westonruter, welcher, adamsilverstein, michaelarestad, Fab1en.
Fixes #31195.

Built from https://develop.svn.wordpress.org/trunk@36532


git-svn-id: http://core.svn.wordpress.org/trunk@36499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:57:26 +00:00
Ryan McCue
a6b6adb45d REST API: Fix tests from r36529.
See #35329.

Built from https://develop.svn.wordpress.org/trunk@36531


git-svn-id: http://core.svn.wordpress.org/trunk@36498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:51:25 +00:00
Rachel Baker
85e82cf571 REST API: Don’t display errors during REST API requests.
Uses `wp_debug_mode()` to prevent response from being broken by debug errors. Matches similar behavior of the XML-RPC API.

Props rockwell15.

Fixes #34915.
Built from https://develop.svn.wordpress.org/trunk@36530


git-svn-id: http://core.svn.wordpress.org/trunk@36497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:36:25 +00:00
Ryan McCue
796f0c844c REST API: Add helper function to get server instance.
This allows using rest_do_request() outside of the API itself easily.

Props danielbachhuber, swissspidy.

Built from https://develop.svn.wordpress.org/trunk@36529


git-svn-id: http://core.svn.wordpress.org/trunk@36496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:12:26 +00:00
Andrea Fercia
4ac63be963 Accessibility: improve the color contrast ratio for the TinyMCE button icons.
Also, tries to use the new grays from the Design Handbook wherever applicable.

Props michaelarestad, afercia.
Fixes #35604.
Built from https://develop.svn.wordpress.org/trunk@36528


git-svn-id: http://core.svn.wordpress.org/trunk@36495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-15 21:11:28 +00:00
Drew Jaynes
e41a0998e6 Docs: Add an internal note to the DocBlock for comment_form_title() explaining restoration of the $comment global.
See [36512]. See #35624.

Built from https://develop.svn.wordpress.org/trunk@36527


git-svn-id: http://core.svn.wordpress.org/trunk@36494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 19:15:28 +00:00
Boone Gorges
9a178f2510 Introduce {$taxonomy}_term_edit_form_top action to edit-tag-form.php.
This new action gives developers a place to output content at the beginning
of the form element on edit-tags.php.

Props flixos90.
Fixes #35252.
Built from https://develop.svn.wordpress.org/trunk@36526


git-svn-id: http://core.svn.wordpress.org/trunk@36493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 04:01:26 +00:00
Boone Gorges
48b8ea78da Introduce publicly_queryable taxonomy argument.
Taxonomies registered as `publicly_queryable` can be queried as taxonomy
archives.

If not provided explicitly, the value of `publicly_queryable` is inherited
from `public`.

Props Chouby.
Fixes #34491.
Built from https://develop.svn.wordpress.org/trunk@36525


git-svn-id: http://core.svn.wordpress.org/trunk@36492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 03:51:26 +00:00
Boone Gorges
60cf073672 Improve WP_Query lazyloading logic, for better performance.
Lazyloading for comment meta and term meta, introduced into `WP_Query` in
4.4, used flags - `updated_term_meta_cache` and `updated_comment_meta_cache` -
in an attempt to prevent cache priming from happening more than once per query
object. This technique was mostly effective, but not entirely efficient, since
the flag didn't prevent the `lazyload_*_meta` callbacks from running. The
obvious solution - removing the filter callback after it'd be run once - was
dismissed for 4.4 because of concerns that `remove_filter()` could disable
lazyloading too generally in the context of nested queries, due to the way
`_wp_filter_build_unique_id()` doesn't always build sufficiently unique IDs for
similar objects. However, further testing shows that this concern is only valid
in a very small subset of cases, while the cost of keeping the query objects in
memory, via the `$wp_filter` global, is quite significant. As such, this
changeset removes the flags in favor of the `remove_filter()` technique.

See #35454, #35816.
Built from https://develop.svn.wordpress.org/trunk@36524


git-svn-id: http://core.svn.wordpress.org/trunk@36491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 03:05:27 +00:00
Weston Ruter
9343641855 Customize: Ensure that nav menu items can be shift-clicked to edit in secondary instances of the same nav menu.
When the same nav menu is shown multiple times on a page, only the first instance of the nav menu will include `id` attributes. Subsequent instances will have the `id` attributes omitted. However, in both cases the underlying nav menu item's post ID is available among the `class` names, so the post ID can be more reliably obtained from `class` instead of the `id` attribute.  

Amends [36383].
Fixes #32681.

Built from https://develop.svn.wordpress.org/trunk@36523


git-svn-id: http://core.svn.wordpress.org/trunk@36490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 00:12:25 +00:00
Weston Ruter
453ff22d7f Customize: Hide widgets re-order button when no re-ordering is possible.
Hide the re-order button if there are no widgets in the sidebar, or if there is there is only one sidebar and there is only one widget in the sidebar.

Props rabmalin, westonruter.
Fixes #35533.

Built from https://develop.svn.wordpress.org/trunk@36522


git-svn-id: http://core.svn.wordpress.org/trunk@36489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 23:52:27 +00:00
Rachel Baker
f99ec3db18 Comments: In the comments list table, only link rows inside the “Submitted On” column to the comment if it is publicly viewable.
The date within the comments list table “Submitted On” column will only be wrapped in `get_comment_link()` if the comment is approved and associated with a valid `comment_post_ID`.

Fixes #35279.
Built from https://develop.svn.wordpress.org/trunk@36521


git-svn-id: http://core.svn.wordpress.org/trunk@36488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 21:43:26 +00:00
Boone Gorges
f846e08f2c Make sure fixtures have empty post_content in search test.
The generator sequence was causing false positives when the search terms
('1' and '0') happened to match the current sequence number (eg,
'Post content 190').

Introduced in [36278].

See #31025.
Built from https://develop.svn.wordpress.org/trunk@36520


git-svn-id: http://core.svn.wordpress.org/trunk@36487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 21:07:25 +00:00
Aaron Jorbin
c521ca706f Improve Automated Feed Tests
Multiple improvements to the RSS2 automated tests along with the addition of Atom tests.
1. General whitespace cleanup (since the rss2 file serves as the base of the atom file).
2. Adds an author and category to the tests.
3. Since the content of the posts is the same, we don't need to test all of the post content.
4. Adds many posts so that the post count can be checked

Props stevenkword
Fixes #35160.


Built from https://develop.svn.wordpress.org/trunk@36519


git-svn-id: http://core.svn.wordpress.org/trunk@36486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 19:03:26 +00:00
Andrea Fercia
eee7f18225 Customizer: reduce the spinner re-painted area to the smallest possible one.
Also, changes the "customize container" and the theme installer preview
background from white to the default body `#f1f1f1` background.

Fixes #35649.
Built from https://develop.svn.wordpress.org/trunk@36518


git-svn-id: http://core.svn.wordpress.org/trunk@36485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 18:35:25 +00:00
Rachel Baker
cf0288e291 Media: Fix inline docs typo inside wp_calculate_image_srcset() function.
mathces -> matches.

Props neoxx.

Fixes #35714.
Built from https://develop.svn.wordpress.org/trunk@36517


git-svn-id: http://core.svn.wordpress.org/trunk@36484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 18:15:30 +00:00
Boone Gorges
0e27fdcc47 Bail from get_term() if a filter returns an object that is not a WP_Term.
This prevents fatal errors in certain cases.

Props tmuikku.
Fixes #35808.
Built from https://develop.svn.wordpress.org/trunk@36516


git-svn-id: http://core.svn.wordpress.org/trunk@36483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 14:26:27 +00:00
Rachel Baker
58fe478fe1 Comments: Unit test for `wp_get_comment_fields_max_lengths().
This adds tests for the comment form field lengths returned by `wp_get_comment_fields_max_lengths()`. Replaces unit test removed in r36514. 

See #10377.
Built from https://develop.svn.wordpress.org/trunk@36515


git-svn-id: http://core.svn.wordpress.org/trunk@36482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 14:18:26 +00:00
Rachel Baker
8abd201a0b Comments: Change wp_get_comment_column_max_length() function to wp_get_comment_fields_max_lengths() for consolidation and better fallbacks.
Instead of returning a value for each of the related table column lengths, return an array of all of the column lengths used in the comment form.
Better fallback handling, where each field falls back to the expected max_length instead of an arbitrary number.

Props azaozz.

Fixes #10377.
Built from https://develop.svn.wordpress.org/trunk@36514


git-svn-id: http://core.svn.wordpress.org/trunk@36481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 13:55:28 +00:00
Andrew Ozz
a2dddbf8f5 TinyMCE: fix removing a space before inline tags when applying formatting shortcuts.
Fixes #35798.
Built from https://develop.svn.wordpress.org/trunk@36513


git-svn-id: http://core.svn.wordpress.org/trunk@36480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 04:23:26 +00:00
Boone Gorges
1877b8c726 Set the $comment global in comment_form_title().
In [33963], `comment_form_title()` was refactored so that it no longer made
reference to the `$comment` global. This broke some functionality within the
comment form, as certain template would no longer be able to access the
"current" comment.

Props d4z_c0nf, WisdmLabs, boonebgorges.
Fixes #35624.
Built from https://develop.svn.wordpress.org/trunk@36512


git-svn-id: http://core.svn.wordpress.org/trunk@36479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 04:10:25 +00:00
Boone Gorges
3e9c88d75a In delete_metadata(), only invalidate cache for affected objects.
The `$delete_all` flag in `delete_metadata()` triggers cache invalidation for
multiple objects. Previously, invalidation took place for all objects matching
the `$meta_key` parameter, regardless of whether `$meta_value` was also set.
This resulted in overly aggressive invalidation.

Props rahal.aboulfeth.
Fixes #35797.
Built from https://develop.svn.wordpress.org/trunk@36511


git-svn-id: http://core.svn.wordpress.org/trunk@36478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 02:47:26 +00:00