Commit Graph

33519 Commits

Author SHA1 Message Date
Eric Andrew Lewis e8ed3fcbf1 Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

This was attempted previously in [36506] which was reverted in [36507]. Some form fields were not being slurped into the form's JSON representation, and it did not scale for a site with many posts. This approach fixes those problems.

Props ocean90, afercia.
See #14134.


git-svn-id: https://develop.svn.wordpress.org/trunk@36510 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-11 19:07:30 +00:00
Boone Gorges 71060260a1 Don't double-unslash meta key when `update_metadata()` falls back on `add_metadata()`.
Props jdgrimes.
Fixes #35795.

git-svn-id: https://develop.svn.wordpress.org/trunk@36509 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-11 17:34:59 +00:00
Boone Gorges d2cbbfe28b Remove unused variable from `get_terms()`.
Unused since [31284].

Props TimothyBlynJacobs.
Fixes #35784.

git-svn-id: https://develop.svn.wordpress.org/trunk@36508 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-11 04:32:08 +00:00
Eric Andrew Lewis 44159f1afa Menus: Revert larger menu support in Edit Menus screen in [36506].
JSON encoding the form as it exists on the page will not scale. 

See #14134.


git-svn-id: https://develop.svn.wordpress.org/trunk@36507 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-10 14:10:17 +00:00
Eric Andrew Lewis afe521a466 Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

See #14134.


git-svn-id: https://develop.svn.wordpress.org/trunk@36506 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-10 03:31:31 +00:00
Dominik Schilling (ocean90) c7e84936c8 Multisite: Don't show the database upgrade admin notice on the upgrade page itself.
Fixes #35782.

git-svn-id: https://develop.svn.wordpress.org/trunk@36505 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-09 14:29:06 +00:00
Dominik Schilling (ocean90) 92a9a57b63 Users: Display the new user email notice in user admin too.
Also, in `new_user_email_admin_notice()` use the global `$pagenow` and add a translators comment for the placeholder.

Fixes #35767.

git-svn-id: https://develop.svn.wordpress.org/trunk@36504 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 13:53:23 +00:00
Dominik Schilling (ocean90) 96b6828558 Users: Use `self_admin_url()` for the email change confirmation link.
Prevents sending users to wp-admin/profile.php if they only have access to wp-admin/user/profile.php.

Fixes #35766.

git-svn-id: https://develop.svn.wordpress.org/trunk@36503 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 13:25:44 +00:00
Drew Jaynes 1c2f0896db Themes: Pass information about the old theme in the form of a `WP_Theme` object when the `switch_theme` action is fired.
Props MikeHansenMe.
See #22401.


git-svn-id: https://develop.svn.wordpress.org/trunk@36502 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 08:25:28 +00:00
Drew Jaynes 2caad3f7b2 Docs: Improove the DocBlock summary for `wp_signon()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36501 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 08:10:47 +00:00
Drew Jaynes 1c80e8ca46 Docs: Make a couple of minor improvements to the DocBlock for `wp_get_raw_referer()`, introduced in [36266].
* Uses a third-person singular verb in the summary
* Makes the return types more specific with `string|false` vs `string|bool`.

See #27152. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36500 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 08:08:48 +00:00
Drew Jaynes 46029e674a Docs: Add a changelog entry for the introduction of maxlength character limits for the 'author', 'email', and 'url' fields in `comment_form()`.
Introduced in [36272].

See #10377. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36499 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 08:04:15 +00:00
Drew Jaynes 305d44d04e Docs: Revert unintended changes in wp-includes/post.php, mistakenly included in [36497].
See #34988. See #33701. 


git-svn-id: https://develop.svn.wordpress.org/trunk@36498 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 02:45:06 +00:00
Drew Jaynes e3cfe3e257 Docs: Add a missing version to the file header for wp-admin/term.php, introduced in [36308].
See #34988. See #33701.


git-svn-id: https://develop.svn.wordpress.org/trunk@36497 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 02:42:25 +00:00
Drew Jaynes 3a0050346b Docs: Update several function DocBlock summaries in wp-includes/nav-menu.php to use third-person singular verbs.
Also removes some unnecessary capitalizations.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36496 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 02:17:29 +00:00
Drew Jaynes 6172a88bad Docs: Make some minor improvements to inline docs for `WP_Site`, introduced in [36393].
* Uses third-person singular verbs in method summaries
* Adds an `@static` tag to the `WP_Site::get_instance()` DocBlock
* Adjusts return types for `WP_Site::get_instance()` to the more explicit `WP_Site|false`

See #32450. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36495 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 02:12:44 +00:00
Drew Jaynes f77e353b66 Docs: Slightly simplify the DocBlock summaries for `home_url()`, `get_home_url()`, `site_url()`, and `get_site_url()`.
See #35238. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36494 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 02:06:01 +00:00
Drew Jaynes 2eeaf25112 Docs: Add an `@access` tag and fix a typo in the DocBlock for `wpdb::close()`.
See #34903. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36493 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 02:02:27 +00:00
Drew Jaynes a1019e97b0 Docs: Add a note to the DocBlock for `current_user_can()` to explain that it will always return true for super admins, unless specifically denied.
Props finnj.
Fixes #35551.


git-svn-id: https://develop.svn.wordpress.org/trunk@36492 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 01:26:17 +00:00
Drew Jaynes 38aeeb5ebe Docs: Fix two notations in the DocBlocks for `show_admin_bar()` and `is_admin_bar_showing()` to reflect use of the `$show_admin_bar` global rather than `$wp_admin_bar`.
Props Frozzare.
Fixes #35686.


git-svn-id: https://develop.svn.wordpress.org/trunk@36491 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 01:21:14 +00:00
Drew Jaynes b925222cb9 Docs: Fix one line of the DocBlock for the `JsonSerializable` compat interface to use a tab instead of spaces.
Props Frozzare.
Fixes #35699.


git-svn-id: https://develop.svn.wordpress.org/trunk@36490 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 01:17:50 +00:00
Drew Jaynes fed210d8ae Docs: Use the correct parameter name in the DocBlock for `wp_kses_post_deep()`, introduced in [36429].
Props sebastianpisula.
Fixes #35700. See #35316.


git-svn-id: https://develop.svn.wordpress.org/trunk@36489 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 00:17:59 +00:00
Drew Jaynes e0787b6a2b Docs: Add a missing type to the return description for `map_deep()`.
Props sebastianpisula.
See #35700.


git-svn-id: https://develop.svn.wordpress.org/trunk@36488 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-07 00:14:15 +00:00
Sergey Biryukov 0ac4ed2e67 Login: In `login_header()`, use correct separator for RTL locales.
Props ramiy.
Fixes #35737.


git-svn-id: https://develop.svn.wordpress.org/trunk@36487 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 22:55:41 +00:00
Boone Gorges ddc9f3dccb Allow comments to be queried by 'any' `post_type` or `post_status`.
Props kouratoras.
Fixes #35512.

git-svn-id: https://develop.svn.wordpress.org/trunk@36486 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 04:50:05 +00:00
Boone Gorges eb8e2fb6ed 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36485 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 04:41:26 +00:00
Boone Gorges 0673904ddf `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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36484 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 03:57:33 +00:00
Andrew Ozz b4779f7368 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36483 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 00:50:31 +00:00
Boone Gorges 3ed7c823c9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36482 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-05 19:02:51 +00:00
Boone Gorges 2c73fd9531 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36481 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-05 18:57:09 +00:00
Boone Gorges ef99ae21be 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36480 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-05 18:49:46 +00:00
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