Commit Graph

7134 Commits

Author SHA1 Message Date
Drew Jaynes
b1127321ec Docs: Fix one line of the DocBlock for the JsonSerializable compat interface to use a tab instead of spaces.
Props Frozzare.
Fixes #35699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 01:18:27 +00:00
Drew Jaynes
6a94d3e2e3 Docs: Use the correct parameter name in the DocBlock for wp_kses_post_deep(), introduced in [36429].
Props sebastianpisula.
Fixes #35700. See #35316.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 00:18:26 +00:00
Drew Jaynes
c1b837b47f Docs: Add a missing type to the return description for map_deep().
Props sebastianpisula.
See #35700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 00:15:27 +00:00
Sergey Biryukov
6e60f8b6f8 Login: In login_header(), use correct separator for RTL locales.
Props ramiy.
Fixes #35737.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 22:56:27 +00:00
Boone Gorges
146320744f Allow comments to be queried by 'any' post_type or post_status.
Props kouratoras.
Fixes #35512.
Built from https://develop.svn.wordpress.org/trunk@36486


git-svn-id: http://core.svn.wordpress.org/trunk@36453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 04:51:25 +00:00
Boone Gorges
fe1dd15126 Allow get_terms() results to ordered by metadata.
The `$orderby` parameter of `get_terms()` now accepts the following values,
related to term meta:

* 'meta_value'
* 'meta_value_num'
* the value of the `$meta_key` parameter
* any key from the `$meta_query` array

This brings order-by-meta support for terms in line with post, comment, and
user queries.

As a byproduct of these improvements, `$meta_key` and `$meta_value` parameters
have been introduced to `get_terms()`. They interact with `$meta_query` in the
same way as in `WP_Query` and other query classes.

Props jadpm, eherman24.
Fixes #34996.
Built from https://develop.svn.wordpress.org/trunk@36485


git-svn-id: http://core.svn.wordpress.org/trunk@36452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 04:42:26 +00:00
Boone Gorges
f1c0ed714a WP_Query taxonomy query vars should be set to first of multiple taxonomies.
This provides better parity with `get_queried_object()`, which will return the
first taxonomy/term matched by the current query.

[29891] introduced the abnormal behavior for the 'taxonomy' and 'term'
query vars.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 03:58:27 +00:00
Andrew Ozz
3a2ef071d4 TinyMCE inline link:
- Fix not displaying anything when the URL is only a fragment. Show the whole URL.
- Fix editing a link when it is the very first word in the editor.
- Fix editing a link then some of the surrounding text or space is selected. Change the selection to only the link node.
- Add placeholder when adding new link.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 00:51:27 +00:00
Boone Gorges
20c07afbd5 When updating a user, invalidate its 'userslugs' cache.
`user_nicename` can be changed via `wp_update_user()`, so we invalidate just
to be safe.

Props thebrandonallen.
Fixes #35750.
Built from https://develop.svn.wordpress.org/trunk@36482


git-svn-id: http://core.svn.wordpress.org/trunk@36449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 19:03:26 +00:00
Boone Gorges
8db393ada6 Make the $post param optional in get_post_field().
When `$post` is `null`, the current post object will be returned.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:58:25 +00:00
Boone Gorges
b5d12e130c Comments: Restore the ability to bypass post_id filter using 0 or '0'.
The changes introduced in [36381], while logical and clearly awesome, introduce
the potential for much breakage. Those who want to query for comments with a
null `comment_post_ID` should use `'post_in' => array( 0 )` instead.

Reverts [36381], [36387].
See #35090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:50:25 +00:00
Boone Gorges
8e5cf1c2fe Comments: Add 'parent__in' and 'parent__not_in' to query var defaults.
Query var defaults are used to calculate a cache key. The fact that these
params were not listed among the defaults was causing cache keys to be
insufficiently specific.

Props danielbachhuber.
Fixes #35677.
Built from https://develop.svn.wordpress.org/trunk@36479


git-svn-id: http://core.svn.wordpress.org/trunk@36446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:36:28 +00:00
Gary Pendergast
e42e8c6d72 Tests: Use the new wpdb::close() method for closing the DB connection.
Props markoheijnen.

Fixes #34903.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 01:06:28 +00:00
Andrea Fercia
f75f20edb2 Accessibility: simplify the Plugins and Themes tables on the Updates screen.
Although it may seem counterintuitive at first, in very limited cases it's
better to remove improper semantics (this is not a tabular data table) in
order to reduce noise for screen reader users and simplify all the things.
Also improves headings to better separate sections.

Fixes #34780.
Built from https://develop.svn.wordpress.org/trunk@36477


git-svn-id: http://core.svn.wordpress.org/trunk@36444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-04 19:19:27 +00:00
Drew Jaynes
94fdeabe27 Docs: Document the $args parameter for get_categories() as a hash notation.
The only specific default for `get_categories()` is `$taxonomy` with a value of 'category', all the other arguments are documented separately in `get_terms()`.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-04 14:50:26 +00:00
Drew Jaynes
6bbb34818c Docs: Reference get_terms() for arguments available in get_categories().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-04 14:38:28 +00:00
Drew Jaynes
26bf8cda9b Docs: Add more complete information to DocBlocks for private core functions _wp_dashboard_control_callback() and _wp_dashboard_recent_comments_row().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:20:26 +00:00
Drew Jaynes
6995ec613e Docs: Add private access notation to the DocBlock for the core _wp_handle_upload() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:19:25 +00:00
Drew Jaynes
d62a1bf1e9 Docs: Mark two private functions as such in wp-admin/ajax-actions.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:17:26 +00:00
Drew Jaynes
9351a7c9ff Docs: Add a missing DocBlock for the private _add_themes_utility_last() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:07:27 +00:00
Dominik Schilling
72c6f7f86f Suppress possible warnings in PHP < 5.3.3 by parse_url() in wp_validate_redirect().
PHP 5.3.3 removed the E_WARNING that was emitted when URL parsing failed.
Built from https://develop.svn.wordpress.org/trunk@36446


git-svn-id: http://core.svn.wordpress.org/trunk@36413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 16:34:27 +00:00
Aaron Jorbin
5c4031dd84 Revert [35792]
This causes a regression and causes redirects to potentially fail.

See #5114 #34028
props ocean90

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


git-svn-id: http://core.svn.wordpress.org/trunk@36412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 16:24:26 +00:00
Dominik Schilling
361ed7a3d6 Better validation of the URL used in HTTP redirects.
Built from https://develop.svn.wordpress.org/trunk@36444


git-svn-id: http://core.svn.wordpress.org/trunk@36411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 15:11:28 +00:00
Dominik Schilling
f65de8ec9f HTTP: 0.1.2.3 is not a valid IP.
Built from https://develop.svn.wordpress.org/trunk@36435


git-svn-id: http://core.svn.wordpress.org/trunk@36402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 12:55:29 +00:00
Gary Pendergast
e19a8796fd Database: Allow loading when only the mysqlnd extension is loaded.
We do an early check for a mysql extension being loaded, but it fails if the `mysqlnd` extension is the only one present.

Props nexurium.

Fixes #33261.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 00:59:25 +00:00
Gary Pendergast
5779ed9d8a WPDB: Add a close() method to wpdb, for when the connection needs to be manually closed.
In the event that it was closed prematurely, `wpdb::query()` will re-open the connection automatically.

Fixes #34903.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 00:13:26 +00:00
Weston Ruter
9f7d608a6a Customizer: Fix searching for available nav menu items by updating reference to nonce.
Fixes regression introduced in [36414] where the nonce for listing available nav menu items was updated to use the new centralized location at `wp.customize.settings.nonce`, but the nonce for search did not get updated.

See #35617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-01 21:36:28 +00:00
Dominik Schilling
cd892b86b4 Media: In wp_read_image_metadata() make sure that IPTC keywords are UTF8 encoded.
Prevents missing `_wp_attachment_metadata` when an image contains keywords with latin extended characters.

Fixes #35316.
Built from https://develop.svn.wordpress.org/trunk@36429


git-svn-id: http://core.svn.wordpress.org/trunk@36396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-01 14:53:27 +00:00
Andrea Fercia
c9e5edd637 Menus: Avoid displaying two spinners when adding selected menu items.
Fixes #35682.
Built from https://develop.svn.wordpress.org/trunk@36427


git-svn-id: http://core.svn.wordpress.org/trunk@36394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-31 18:06:27 +00:00
Andrea Fercia
82f59fc6ef Menus: after [36379] prevent "Quick Search" form submission when pressing Enter.
Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36426


git-svn-id: http://core.svn.wordpress.org/trunk@36393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-31 14:03:27 +00:00
Rachel Baker
2573fa7ab8 Comments: Add back $req variable in comments_template().
The variables in `comments_template()` should never be assumed to be unused. This function includes the `comments.php` template file from the active theme or falls back to `theme-compat/comments.php`. This is why including a file within a function only brings pain and sorrow.

Reverts r36322.

See #35473.
Built from https://develop.svn.wordpress.org/trunk@36425


git-svn-id: http://core.svn.wordpress.org/trunk@36392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 22:13:26 +00:00
Rachel Baker
099b35933d Comments: Add a back link to wp_die() comment form submission error display.
Fixes #4332.

Props wonderboymusic, westonruter, shamess, rachelbaker.
Built from https://develop.svn.wordpress.org/trunk@36424


git-svn-id: http://core.svn.wordpress.org/trunk@36391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 21:56:27 +00:00
Andrea Fercia
98518bdd4d Install: Improve the install page language chooser button style.
Fixes #34547.
Built from https://develop.svn.wordpress.org/trunk@36423


git-svn-id: http://core.svn.wordpress.org/trunk@36390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 14:53:26 +00:00
Andrea Fercia
62d8fda8dd After [36171] remove all the occurrences of the old CSS clearfix.
The old clearfix was applied to very specific items and defined multiple times
across CSS files. Uses the new generic `.wp-clearfix` utility class instead.

See #26396.
Built from https://develop.svn.wordpress.org/trunk@36422


git-svn-id: http://core.svn.wordpress.org/trunk@36389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 13:46:27 +00:00
Dion Hulse
1abb98520b Update Random_Compat to the latest version (1.1.6).
See #35665

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


git-svn-id: http://core.svn.wordpress.org/trunk@36388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 00:57:28 +00:00
Boone Gorges
bb6a068e29 Simplify action placement in update_metadata().
By combining a number of `foreach` loops, we make the code more readable and
potentially faster in the case where many metadata rows are being updated.

Props Shelob9.
Fixes #35652.
Built from https://develop.svn.wordpress.org/trunk@36420


git-svn-id: http://core.svn.wordpress.org/trunk@36387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-29 04:52:28 +00:00
Dion Hulse
34b9af6efd Menus: Remove a redundant and unused 0 parameter from the Delete Menu link on the nav menus admin screen.
Fixes #35641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 06:14:25 +00:00
Boone Gorges
4b4978ecbd Pass additional params to 'get_archive_links' filter.
Props sebastian.pisula.
Fixes #35573.
Built from https://develop.svn.wordpress.org/trunk@36418


git-svn-id: http://core.svn.wordpress.org/trunk@36385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 04:46:26 +00:00
Eric Lewis
24adb71a56 Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:51:26 +00:00
Eric Lewis
22467e840f Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:35:27 +00:00
Boone Gorges
af34d4f296 Fix set up/tear down of post types in comment query test.
Introduced in [31015].

Props kouratoras.
Fixes #35633.
Built from https://develop.svn.wordpress.org/trunk@36415


git-svn-id: http://core.svn.wordpress.org/trunk@36382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 23:13:27 +00:00
Weston Ruter
c376477265 Customizer: Export nonce, theme, and url app settings in preview as exported in pane.
* Introduce `WP_Customize_Manager::get_nonces()` to consolidate logic for retrieving nonces.
* Export nonces centrally in `wp.customize.settings.nonce` with each request and update nav menus preview to utilize.
* Send updated nonces to preview upon `nonce-refresh`.
* Request full preview refresh if Nav Menu selective refresh request fails (e.g. due to bad nonce).
* Update nav menus and widgets in Customizer to utilize `customize_refresh_nonces` for exporting nonces and keeping them up to date.

See #27355.
Fixes #35617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 17:55:26 +00:00
Dominik Schilling
e8cc1b5a32 Multisite: Add the global cache group sites to restore_current_blog() and wp_start_object_cache().
See #32450.
Built from https://develop.svn.wordpress.org/trunk@36413


git-svn-id: http://core.svn.wordpress.org/trunk@36380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 13:51:26 +00:00
Dominik Schilling
87b5e06838 Multisite: Add the global cache group networks to restore_current_blog().
Missed in [36258].

See #35251.
Built from https://develop.svn.wordpress.org/trunk@36411


git-svn-id: http://core.svn.wordpress.org/trunk@36378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 13:43:28 +00:00
Eric Lewis
c48e9eea46 Build/Test Tools: Move class WP_UnitTest_Factory into its own file.
In [36347] we moved all PHP factory classes into their own files except the main class. The main class is now in its own file, and `factory.php` is solely an include manifest for all factory classes.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 03:27:26 +00:00
Eric Lewis
2d2353cbde General: Document the difference between site_url() and home_url().
`site_url()` returns a url where WordPress application files are accessible (e.g. where the `wp-admin/` folder resides). `home_url()` returns a url where the front-end of the WordPress site can be visited.

See #35238.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 02:55:27 +00:00
Weston Ruter
c7923b2c9d Customizer: Improve parity between JS Setting models in preview with JS Setting models in pane.
* Ensure that Setting `Value` objects in preview get initial `_dirty` flag set if values among POST data.
* Upon `saved` event, send `saved` message to preview with the `response` to trigger `saved` event there.
* Reset `_dirty` flag for all setting `Value` objects in preview upon `saved`.
* Continue to create settings synced from pane even after initial bootstrap, and create them as dirty.
* Ensure that `id` property is set for setting `Value` objects in preview.

See #27355.
Fixes #35616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 23:52:25 +00:00
Andrea Fercia
972215f9f9 Accessibility: Improve the focus style on the Credits screen.
Leads and contributing developers will now look nicer when focused.
Also, combines adjacent image and text links for the same resource thus
simplifying markup and reducing noise for screen reader users.

Props walbo, afercia.
Fixes #34953.
Built from https://develop.svn.wordpress.org/trunk@36406


git-svn-id: http://core.svn.wordpress.org/trunk@36373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 22:38:28 +00:00
Eric Lewis
0efd5b3d00 Comments: Fire an action after a comment is removed from object cache.
When a comment is removed from the object cache, the `clean_comment_cache` action is now fired. This provides plugin and theme developers a chance to perform secondary cache invalidation as needed.

Props spacedmonkey.
Fixes #35610.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 03:47:25 +00:00
Boone Gorges
e6d2b6cab0 Query: Respect 'suppress_filters' when filtering search-related SQL.
Props 5um17.
Fixes #35594.
Built from https://develop.svn.wordpress.org/trunk@36404


git-svn-id: http://core.svn.wordpress.org/trunk@36371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 03:12:25 +00:00
Boone Gorges
de89efc4dc Introduce $comment_status and $ping_status params for WP_Query.
Props birgire.
Fixes #35601.
Built from https://develop.svn.wordpress.org/trunk@36403


git-svn-id: http://core.svn.wordpress.org/trunk@36370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:56:26 +00:00
Boone Gorges
de9d742b9a Allow is_post_type_viewable() to accept a post type name.
Previously, it accepted only a post type object.

Props spacedmonkey.
Fixes #35609.
Built from https://develop.svn.wordpress.org/trunk@36402


git-svn-id: http://core.svn.wordpress.org/trunk@36369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:37:26 +00:00
Boone Gorges
0d33e0904e Add tests for is_post_type_viewable().
See #35609.
Built from https://develop.svn.wordpress.org/trunk@36401


git-svn-id: http://core.svn.wordpress.org/trunk@36368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:27:26 +00:00
Boone Gorges
ced24390f9 Normalize 'clean_term_cache' docs formatting after [36399].
Built from https://develop.svn.wordpress.org/trunk@36400


git-svn-id: http://core.svn.wordpress.org/trunk@36367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:19:26 +00:00
Boone Gorges
32e5795042 Pass $clean_taxonomy param to 'clean_term_cache' action.
Props spacedmonkey.
Fixes #35611.
Built from https://develop.svn.wordpress.org/trunk@36399


git-svn-id: http://core.svn.wordpress.org/trunk@36366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:18:26 +00:00
Sergey Biryukov
f6cde8e3c5 Docs: Correct return value for is_allowed_http_origin().
Props kraftbj.
Fixes #35607.
Built from https://develop.svn.wordpress.org/trunk@36398


git-svn-id: http://core.svn.wordpress.org/trunk@36365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 00:39:26 +00:00
Eric Lewis
d01e8db4ad Plugins: Clarify that mu-plugins can't be "active" in docs.
Plugins installed in the plugins/ folder can be activated by users. This puts the plugin in an "active" state. Plugins in the mu-folder/ are "must-use" plugins that are always loaded. They can't be activated, and thereby can't be "active." Because of this, using the `is_plugin_active()` or `is_plugin_active_for_network()` returns false when checking for these plugins. This clarifies that behavior in the functions' docs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 00:32:27 +00:00
Andrea Fercia
af25083b6f Accessibility: Improve the color contrast ratio replacing the residual occurrences of the #777 gray.
Uses the existing `#72777c` on white backgrounds and the new `#555d66` "dark medium gray" on darker backgrounds.

Fixes #35605.
Built from https://develop.svn.wordpress.org/trunk@36396


git-svn-id: http://core.svn.wordpress.org/trunk@36363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 00:04:26 +00:00
Andrea Fercia
eba8321e21 Accessibility: Fix the color contrast ratio in the login screen.
Props scarinessreported for the initial patch.
Fixes #31548.
Built from https://develop.svn.wordpress.org/trunk@36395


git-svn-id: http://core.svn.wordpress.org/trunk@36362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 23:52:25 +00:00
Konstantin Obenland
d28ce2a1e4 Pass data consistently on plugin, network plugin, and network theme screens.
List tables on these three screens look similar but come with unexpected caveats.
The network themes screen in particular has been neglected, using a `.plugin`
class to inherit its sibling's styles and not providing classes and data
attributes that the other two offer. This will provide some more consistency.

Fixes #35335.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 22:55:25 +00:00
Jeremy Felt
0b69f2cd63 Multisite: Introduce the WP_Site class.
* A `WP_Site` object initially matches a row from `wp_blogs`.
* A site can be retrieved by its ID through `WP_Site::get_instance()`.
* Adds `sites` to the global cache group and captures instance lookups.
* The multisite bootstrap now ensures `$current_blog` is an instance of `WP_Site`.

Props johnjamesjacoby, jeremyfelt.
See #32450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 21:51:26 +00:00
Dominik Schilling
f3c20d5011 Docs: Fix indentation in add_filter() example.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@36392


git-svn-id: http://core.svn.wordpress.org/trunk@36359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 18:58:27 +00:00
Drew Jaynes
3fc149d9ee Docs: Fix parameter documentation ordering in the hook docs for the register_taxonomy_args filter.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 17:11:27 +00:00
Peter Westwood
90b80fce4e i18n tools: Add the text domain to translate_nooped_plural() calls as well.
Fixes #34126 props jrf.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-24 15:29:26 +00:00
Peter Westwood
bc56bc2d5f i18n tools: Add a test for the add-textdomain.php script.
Built from https://develop.svn.wordpress.org/trunk@36389


git-svn-id: http://core.svn.wordpress.org/trunk@36356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-24 15:26:28 +00:00
Weston Ruter
57c2b5d192 Customizer: Use "(Untitled)" as site title if blogname is empty.
Fixes a layout issue in the Customizer UI. Also de-duplicate title display logic, outputting "Loading..." as site title in PHP with actual title being set upon Customizer `ready`. Also update the site title in response to a `blogname` setting change as opposed to `input` DOM events on the control.

Fixes #35579.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 23:15:27 +00:00
Boone Gorges
00cf77999d In comments list table, $post_id should default to false rather than 0.
After [36381], the default value of `0` was causing the list table at
edit-comments.php to be empty. `false` prevents this.

This fix is likely temporary, while more research is done into the backward
compatibility concerns tied to [36381].

See #35090.
Built from https://develop.svn.wordpress.org/trunk@36387


git-svn-id: http://core.svn.wordpress.org/trunk@36354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 22:16:26 +00:00
Eric Lewis
51ae114302 Networks and sites: Replace "blog" usage with "site" in docs.
This effort focuses on `src/wp-includes/link-template.php`.

Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

Props mrahmadawais.
Fixes #35589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 16:47:29 +00:00
Sergey Biryukov
b0b311053e Docs: Correct wpdb::db_version() description.
Props luciole135.
Fixes #35588.
Built from https://develop.svn.wordpress.org/trunk@36385


git-svn-id: http://core.svn.wordpress.org/trunk@36352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 11:22:26 +00:00
Ella Iseulde Van Dorpe
3663a5bca5 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 00:08:26 +00:00
Weston Ruter
fb8544a0ac Customizer: Add shift-click on nav menu items in preview to focus on corresponding nav menu item controls in pane.
Add missing `params.completeCallback` to `MenuItemControl.focus()` for parity with `Control.focus()`. Also adds `params` to `MenuItemControl.expandForm`, `MenuItemControl.collapseForm()`, and `MenuItemControl.toggleForm()`.

Props MattGeri, westonruter.
Fixes #32681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 21:21:26 +00:00
Drew Jaynes
196271e5b4 Docs: List out possible values for the $show parameter in the description for get_bloginfo().
Fixes #35581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:22:25 +00:00
Boone Gorges
c5ab953773 Allow comment query results to be limited to comments with comment_post_ID = 0.
Previously, this was not possible due to an overly broad `empty()` check.

Passing `null`, `false`, or `''` to 'post_id', or omitting 'post_id'
altogether, will continue to return comments regardless of `comment_post_ID`,
as before. Passing `0` or `'0'` will limit results to comments with no
associated post.

Props danielbachhuber.
Fixes #35090.
Built from https://develop.svn.wordpress.org/trunk@36381


git-svn-id: http://core.svn.wordpress.org/trunk@36348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:20:25 +00:00
Drew Jaynes
90b4ee93b3 Docs: Improve documentation for bloginfo() including cross-reference info for the $show parameter passed through to get_bloginfo().
See #35581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:17:28 +00:00
Andrea Fercia
450cbb3e81 Accessibility: Remove title attributes from the Menus screen.
Also, adds missing labels and improves the existing ones. 
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.

Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36379


git-svn-id: http://core.svn.wordpress.org/trunk@36346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 14:26:27 +00:00
Sergey Biryukov
6699b761e1 Docs: Remove redundant PHP tags from get_object_taxonomies() description.
Props dotancohen.
Fixes #35553.
Built from https://develop.svn.wordpress.org/trunk@36377


git-svn-id: http://core.svn.wordpress.org/trunk@36344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 02:41:26 +00:00
Andrew Ozz
ca1906b159 TinyMCE: remove the srcset and sizes attributes (if any) after replacing or editing an image.
See #35434.
Built from https://develop.svn.wordpress.org/trunk@36376


git-svn-id: http://core.svn.wordpress.org/trunk@36343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 01:19:25 +00:00
Andrea Fercia
496bde4e77 Quick/Bulk Edit: Remove a no more used jQuery loop for unsupported post formats.
See #23426.
See #24096.
Fixes #35564.
Built from https://develop.svn.wordpress.org/trunk@36375


git-svn-id: http://core.svn.wordpress.org/trunk@36342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 22:50:25 +00:00
Weston Ruter
dc343e41fa Customizer: Hide help toggle button in panel when no description is supplied.
This aligns with the `.customize-panel-description` element which is also excluded if there is no description.

Props drebbits.web.
Fixes #35540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 22:01:26 +00:00
Sergey Biryukov
7afa923067 Media: In _wp_handle_upload(), move ending brace to a new line.
Props georgestephanis.
Fixes #35565.
Built from https://develop.svn.wordpress.org/trunk@36373


git-svn-id: http://core.svn.wordpress.org/trunk@36340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 20:27:26 +00:00
Sergey Biryukov
aeefc9af75 Unit Tests: Correct comment in wp-tests-config-sample.php.
Props tahteche.
Fixes #35563.
Built from https://develop.svn.wordpress.org/trunk@36372


git-svn-id: http://core.svn.wordpress.org/trunk@36339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 20:25:27 +00:00
Weston Ruter
c055021d1e Customizer: Fix click.preview event handler for jump links and shift+clicks in preview.
* Prevent following jump links (starting with `#`), but instead scroll that element into view.
* Prevent following links clicked in the Customizer if shift key is pressed when clicking; this fixes an issue when trying to shift-click on a widget or nav menu item (#32681) to just focus on the control in the Customizer.

Fixes #26005.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 06:08:27 +00:00
Dion Hulse
65182e4dc8 Upgrade: Switch the locking mechanism to using static methods so that it can be accessed from other upgrade-classes.
Fixes #34878

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


git-svn-id: http://core.svn.wordpress.org/trunk@36337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 01:22:25 +00:00
Dominik Schilling
23133b0b06 Widgets: Show the "Clear Inactive Widgets" button only after the sidebar with inactive widgets.
Fixes #35447.
Built from https://develop.svn.wordpress.org/trunk@36368


git-svn-id: http://core.svn.wordpress.org/trunk@36335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 21:54:26 +00:00
Drew Jaynes
42caba7134 Docs: Update the @access tag value for WP_Http::_get_first_available_transport() from private to public.
When the method was introduced in [17914], the name was underscore-prefixed as is core style for private-use, though it was also introduced with a `public` access modifier for the declaration. Due to core's committment to backward-compatibility, the access modifier overrules in this case, meaning that while the method is underscore-prefixed and was originally-intentioned to be private, it is and always will be a public method, and the documentation should reflect that.

Props Frozzare.
Fixes #35289.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 18:46:26 +00:00
Jeremy Felt
3018d9827c Themes: Enhance filtering options for allowed themes on a network.
* Move the legacy `allowed_themes` filter to `WP_Theme::get_allowed_on_network()`, where it will continue to filter themes allowed on the network.
* Add `network_allowed_themes` filter to `WP_Theme::get_allowed()` and pass `$blog_id` to provide context.
* Add `site_allowed_themes` filter to `WP_Theme::get_allowed_on_site()` and pass `$blog_id` to provide context.

Props pauldewouters, lamosty, michalzuber, dmsnell, johnnypea, rob.
Fixes #28436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 18:29:27 +00:00
Drew Jaynes
1e1d1375b0 Docs: Add missing @access tags to DocBlocks for WP class methods and properties.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 18:19:27 +00:00
Scott Taylor
cee318ed81 Media: When reusing the initial values from the global MediaElement config object, the config object should first be cloned. Objects in JS are references that will retain any changes. This fixes an issue where player controls could get mixed up between instances when multiple players (namely, single audio and audio playlists, in a certain order) are on the same page.
Props Fab1en.
Fixes #34152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 15:47:28 +00:00
Dion Hulse
dddfbfa1d3 Emoji: Work around a mod_security rule which prevents pages with 4 or more instances of String.fromCharCode( from being served.
Fixes #35412 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 07:40:28 +00:00
Andrew Ozz
6c3261d3da TinyMCE: update to 4.3.3. Update the QUnit tests and revert back to testing the non-minified files in /src.
Fixes #35539.
Built from https://develop.svn.wordpress.org/trunk@36352


git-svn-id: http://core.svn.wordpress.org/trunk@36319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 04:18:33 +00:00
Dion Hulse
78b24ed790 Build Tools: Revert to using a human readable timestamp rather than the unix timestamp in [36315].
Fixes #28722

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


git-svn-id: http://core.svn.wordpress.org/trunk@36318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 02:02:27 +00:00
Jeremy Felt
1def66a1c9 Themes: Add initial tests for the allowed_themes filter.
We'll be adjusting the placement of this filter and adding two other related filters, so we should make sure it continues to work as expected after the change.

See #28436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 23:58:27 +00:00
Dion Hulse
006ae74d4c Core Upgrader: Add a locking mechanism to avoid two concurrent updates of WordPress occuring.
Fixes #34878

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


git-svn-id: http://core.svn.wordpress.org/trunk@36316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 05:07:26 +00:00
Boone Gorges
60a9f41315 Don't double-escape the 'name' param in get_terms().
[32353] changed the way the 'name' param in `get_terms()` is sanitized, by
running it through `sanitize_term_field( 'name' )` before performing the SQL
query. An unintentional side effect of this change was that the string is
double-escaped: once by `wp_filter_kses()`, and once by `esc_sql()`. The
double-escaping was causing 'name' queries to fail when the param contained
apostrophes or other escaped characters.

Fixes #35493.
Built from https://develop.svn.wordpress.org/trunk@36348


git-svn-id: http://core.svn.wordpress.org/trunk@36315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 04:10:25 +00:00
Eric Lewis
96f0c643e3 Build/Test Tools: Move PHP factory classes into their own files.
This makes the code easier to browse.

`factory.php` loads the new files, so this is backwards compatible in case `factory.php` is loaded directly for access to one of the classes.

See #35492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 03:56:27 +00:00
Boone Gorges
f1e6cde0a2 Share post fixture in WP_Comment_Query tests.
See #30017.
Built from https://develop.svn.wordpress.org/trunk@36346


git-svn-id: http://core.svn.wordpress.org/trunk@36313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 03:03:26 +00:00
Boone Gorges
a2c17d92d2 Ignore false values of 'search' in WP_Comment_Query.
Props danielbachhuber.
Fixes #35513.
Built from https://develop.svn.wordpress.org/trunk@36345


git-svn-id: http://core.svn.wordpress.org/trunk@36312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 02:55:27 +00:00
Eric Lewis
3f643ba9af Themes: Show template loading error to users with switch_themes cap.
In [36338], a template loading error was shown only to users with the `install_themes` capability. This is now displayed users with the `switch_themes` capability, as users with this cap can at least switch to a different theme. Also, this will now show for site administrators in multisite, whereas `install_themes` is limited to superadmins.

Props dd32.
See #21931.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 19:57:26 +00:00
Rachel Baker
f956379447 Comments: Remove unused $default_comments_page variable in get_comment_link().
Left in r34735, fetches the `default_comments_page` option twice since this variable is unused. 

See #34073 and #35511.

Props Latz.
Built from https://develop.svn.wordpress.org/trunk@36343


git-svn-id: http://core.svn.wordpress.org/trunk@36310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 16:35:28 +00:00
Dion Hulse
61951f5aff CSS: Reference the original location of the CSS rule being overridden.
See #35229

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


git-svn-id: http://core.svn.wordpress.org/trunk@36309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 09:59:26 +00:00