Commit Graph

33388 Commits

Author SHA1 Message Date
Boone Gorges 3ec4faf6e3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36479 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-05 18:35:47 +00:00
Gary Pendergast cdf27d383d Tests: Use the new `wpdb::close()` method for closing the DB connection.
Props markoheijnen.

Fixes #34903.



git-svn-id: https://develop.svn.wordpress.org/trunk@36478 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-05 01:05:47 +00:00
Andrea Fercia 6b49ad22ba 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36477 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-04 19:18:21 +00:00
Drew Jaynes a50e6f1d26 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36476 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-04 14:49:49 +00:00
Drew Jaynes 66d8f82d2e Docs: Reference `get_terms()` for arguments available in `get_categories()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36475 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-04 14:37:07 +00:00
Drew Jaynes 9f52463206 Docs: Add more complete information to DocBlocks for private core functions `_wp_dashboard_control_callback()` and `_wp_dashboard_recent_comments_row()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36474 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-03 20:19:31 +00:00
Drew Jaynes 5572e1d4f4 Docs: Add private access notation to the DocBlock for the core `_wp_handle_upload()` function.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36473 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-03 20:18:15 +00:00
Drew Jaynes 3aaf9506ce Docs: Mark two private functions as such in wp-admin/ajax-actions.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36472 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-03 20:16:42 +00:00
Drew Jaynes 4f884dd8b2 Docs: Add a missing DocBlock for the private `_add_themes_utility_last()` function.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36471 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-03 20:06:39 +00:00
Dominik Schilling (ocean90) 7bc7bd07d4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36446 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 16:33:02 +00:00
Aaron Jorbin 5bf2ce0d66 Revert [35792]
This causes a regression and causes redirects to potentially fail.

See #5114 #34028
props ocean90


git-svn-id: https://develop.svn.wordpress.org/trunk@36445 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 16:23:15 +00:00
Dominik Schilling (ocean90) ce68dd0ec5 Better validation of the URL used in HTTP redirects.
git-svn-id: https://develop.svn.wordpress.org/trunk@36444 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 15:10:09 +00:00
Dominik Schilling (ocean90) 6e8dc736c4 HTTP: `0.1.2.3` is not a valid IP.
git-svn-id: https://develop.svn.wordpress.org/trunk@36435 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 12:54:59 +00:00
Gary Pendergast 022bd3f851 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@36434 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 00:58:32 +00:00
Gary Pendergast 2918cca22c 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@36433 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-02 00:12:28 +00:00
Weston Ruter 15002741b5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36432 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-01 21:35:27 +00:00
Dominik Schilling (ocean90) 62705eef00 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36429 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-01 14:52:15 +00:00
Andrea Fercia 2635b3dadb Menus: Avoid displaying two spinners when adding selected menu items.
Fixes #35682.

git-svn-id: https://develop.svn.wordpress.org/trunk@36427 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-31 18:05:45 +00:00
Andrea Fercia 66cb522610 Menus: after [36379] prevent "Quick Search" form submission when pressing Enter.
Fixes #35374.

git-svn-id: https://develop.svn.wordpress.org/trunk@36426 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-31 14:02:18 +00:00
Rachel Baker c8cd8c8a36 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36425 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-30 22:12:29 +00:00
Rachel Baker d95233cce9 Comments: Add a back link to `wp_die()` comment form submission error display.
Fixes #4332.

Props wonderboymusic, westonruter, shamess, rachelbaker.

git-svn-id: https://develop.svn.wordpress.org/trunk@36424 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-30 21:55:32 +00:00
Andrea Fercia 07e07702ed Install: Improve the install page language chooser button style.
Fixes #34547.

git-svn-id: https://develop.svn.wordpress.org/trunk@36423 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-30 14:52:55 +00:00
Andrea Fercia cde933e306 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36422 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-30 13:45:37 +00:00
Dion Hulse 3964f0ef33 Update Random_Compat to the latest version (1.1.6).
See #35665


git-svn-id: https://develop.svn.wordpress.org/trunk@36421 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-30 00:56:07 +00:00
Boone Gorges fdd7d91162 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36420 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-29 04:51:11 +00:00
Dion Hulse b27ed68003 Menus: Remove a redundant and unused `0` parameter from the `Delete Menu` link on the nav menus admin screen.
Fixes #35641.


git-svn-id: https://develop.svn.wordpress.org/trunk@36419 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-28 06:13:38 +00:00
Boone Gorges c974ac77c4 Pass additional params to 'get_archive_links' filter.
Props sebastian.pisula.
Fixes #35573.

git-svn-id: https://develop.svn.wordpress.org/trunk@36418 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-28 04:45:46 +00:00
Eric Andrew Lewis 27361e6ffe 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36417 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-28 03:50:26 +00:00
ericlewis 3fde994152 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36416 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-28 03:34:02 +00:00
Boone Gorges 7c1854aeb0 Fix set up/tear down of post types in comment query test.
Introduced in [31015].

Props kouratoras.
Fixes #35633.

git-svn-id: https://develop.svn.wordpress.org/trunk@36415 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-27 23:12:07 +00:00
Weston Ruter 304ab7c0e4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36414 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-27 17:54:39 +00:00
Dominik Schilling (ocean90) fe7495efdf Multisite: Add the global cache group `sites` to `restore_current_blog()` and `wp_start_object_cache()`.
See #32450.

git-svn-id: https://develop.svn.wordpress.org/trunk@36413 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-27 13:50:11 +00:00
Dominik Schilling (ocean90) 919c95afe0 Multisite: Add the global cache group `networks` to `restore_current_blog()`.
Missed in [36258].

See #35251.

git-svn-id: https://develop.svn.wordpress.org/trunk@36411 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-27 13:42:35 +00:00
Eric Andrew Lewis 8d562e0d04 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36409 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-27 03:26:15 +00:00
Eric Andrew Lewis 74f26214e7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36408 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-27 02:54:33 +00:00
Weston Ruter 3560d4b3f5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36407 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 23:51:17 +00:00
Andrea Fercia 78bde761bb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36406 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 22:37:41 +00:00
Eric Andrew Lewis 01f88b1ae4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36405 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 03:46:40 +00:00
Boone Gorges 746f545f9a Query: Respect 'suppress_filters' when filtering search-related SQL.
Props 5um17.
Fixes #35594.

git-svn-id: https://develop.svn.wordpress.org/trunk@36404 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 03:11:12 +00:00
Boone Gorges 14b6dbebd2 Introduce `$comment_status` and `$ping_status` params for `WP_Query`.
Props birgire.
Fixes #35601.

git-svn-id: https://develop.svn.wordpress.org/trunk@36403 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 02:55:15 +00:00
Boone Gorges af5a3b663f Allow `is_post_type_viewable()` to accept a post type name.
Previously, it accepted only a post type object.

Props spacedmonkey.
Fixes #35609.

git-svn-id: https://develop.svn.wordpress.org/trunk@36402 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 02:36:32 +00:00
Boone Gorges 81d3d79c1f Add tests for `is_post_type_viewable()`.
See #35609.

git-svn-id: https://develop.svn.wordpress.org/trunk@36401 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 02:26:21 +00:00
Boone Gorges 72f40494de Normalize 'clean_term_cache' docs formatting after [36399].
git-svn-id: https://develop.svn.wordpress.org/trunk@36400 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 02:18:04 +00:00
Boone Gorges ef72cc7b86 Pass `$clean_taxonomy` param to 'clean_term_cache' action.
Props spacedmonkey.
Fixes #35611.

git-svn-id: https://develop.svn.wordpress.org/trunk@36399 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 02:17:02 +00:00
Sergey Biryukov 836ea13929 Docs: Correct return value for `is_allowed_http_origin()`.
Props kraftbj.
Fixes #35607.

git-svn-id: https://develop.svn.wordpress.org/trunk@36398 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 00:38:17 +00:00
Eric Andrew Lewis 63afb0dcc8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36397 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 00:31:08 +00:00
Andrea Fercia d43a7a9f06 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36396 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 00:03:34 +00:00
Andrea Fercia fd5743761a Accessibility: Fix the color contrast ratio in the login screen.
Props scarinessreported for the initial patch.
Fixes #31548.

git-svn-id: https://develop.svn.wordpress.org/trunk@36395 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 23:51:15 +00:00
Konstantin Obenland ddfbfce2e6 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@36394 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 22:54:52 +00:00
Jeremy Felt e497698613 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36393 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 21:51:01 +00:00