Commit Graph

33777 Commits

Author SHA1 Message Date
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
Dominik Schilling (ocean90) 494e4ee146 Docs: Fix indentation in `add_filter()` example.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@36392 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 18:57:43 +00:00
Drew Jaynes 2960ad4cbd Docs: Fix parameter documentation ordering in the hook docs for the `register_taxonomy_args` filter.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36391 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 17:10:57 +00:00
Peter Westwood 3c88ac14ee i18n tools: Add the text domain to translate_nooped_plural() calls as well.
Fixes #34126 props jrf.


git-svn-id: https://develop.svn.wordpress.org/trunk@36390 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-24 15:28:40 +00:00
Peter Westwood 1e1ac57375 i18n tools: Add a test for the add-textdomain.php script.
git-svn-id: https://develop.svn.wordpress.org/trunk@36389 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-24 15:25:11 +00:00
Weston Ruter b07466c2bf 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36388 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 23:14:10 +00:00
Boone Gorges e1b5d2d2bf 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36387 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 22:15:19 +00:00
Eric Andrew Lewis 41406e3c6e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36386 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 16:46:31 +00:00
Sergey Biryukov 5d56b9a465 Docs: Correct `wpdb::db_version()` description.
Props luciole135.
Fixes #35588.

git-svn-id: https://develop.svn.wordpress.org/trunk@36385 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 11:21:14 +00:00
Ella Iseulde Van Dorpe b780792d87 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.


git-svn-id: https://develop.svn.wordpress.org/trunk@36384 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 00:07:29 +00:00
Weston Ruter 0e46055d5b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36383 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 21:20:26 +00:00
Drew Jaynes 535d080317 Docs: List out possible values for the `$show` parameter in the description for `get_bloginfo()`.
Fixes #35581.


git-svn-id: https://develop.svn.wordpress.org/trunk@36382 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 20:21:40 +00:00