Commit Graph

36614 Commits

Author SHA1 Message Date
Sergey Biryukov 860e7ccccd Link Manager: Correct version number for `_deprecated_argument()` in `xfn_check()`.
Props grapplerulrich.
Fixes #39737.

git-svn-id: https://develop.svn.wordpress.org/trunk@40029 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-29 22:13:37 +00:00
Sergey Biryukov 53670e4afc I18N: Merge similar strings in `_deprecated_argument()` calls.
Add translator comments.

Props ramiy, SergeyBiryukov.
Fixes #39020.

git-svn-id: https://develop.svn.wordpress.org/trunk@40028 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-29 11:49:49 +00:00
Sergey Biryukov 3f2f2c77c6 Docs: Clarify that `wp_list_pages()` and `get_pages()` only work with hierarchical post types.
Props doublehhh.
Fixes #39369.

git-svn-id: https://develop.svn.wordpress.org/trunk@40027 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-29 10:58:04 +00:00
Sergey Biryukov a0bdc5efe4 Embeds: After [31148], list correct method in `WP_oEmbed::$compat_methods`.
Props LewisCowles.
Fixes #39292.

git-svn-id: https://develop.svn.wordpress.org/trunk@40026 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-29 07:31:29 +00:00
Pascal Birchler e859050b34 Plugins: Remove trailing pipe symbol in sub navigation after updating the last plugin.
Props sagarprajapati.
Fixes #39655.

git-svn-id: https://develop.svn.wordpress.org/trunk@40025 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-28 17:00:39 +00:00
David A. Kennedy 40ec54618b Twenty Seventeen: Rename "Sidebar" widget area for clarity
Renames the "Sidebar" widget area to "Blog Sidebar" and adjust its description to set better expectations for users as to where it appears in the theme.

Props apmarshall 

Fixes #39567.


git-svn-id: https://develop.svn.wordpress.org/trunk@40024 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-28 00:24:14 +00:00
David A. Kennedy 7748800a48 Bundled Themes: Allow category display in post preview even when only one category
The category is not shown in the preview. And because of how `themename_categorized_blog()` function in each theme returns false for 1 or fewer categories,  and in this case it won't show the new category.

The patch uses `is_preview()` to fix that in Twenty Fourteen, Fifteen and Seventeen.

Props lancewillett.

Fixes #39531.


git-svn-id: https://develop.svn.wordpress.org/trunk@40023 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-27 22:08:37 +00:00
David A. Kennedy f84ad90c1f Twenty Fourteen: Fix fatal errors in WordPress versions before 4.0.0
The line of code throwing the error was introduced in WordPress 4.5 in r37040 "Customize: Require opt-in for selective refresh of widgets". Since `is_customize_preview()` was introduced in 4.0.0 and Twenty Fourteen should work from WordPress 3.6 and up, this caused the issue.

The patch adds an `is_customize_preview` function if it's missing.

Props adamsilverstein.

Fixes #39407.


git-svn-id: https://develop.svn.wordpress.org/trunk@40022 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-27 20:30:34 +00:00
Andrea Fercia fbbf3578b8 Accessibility: Make the inline uploader button a real button.
See `wp.media.view.UploaderWindow`.

Fixes #39305.


git-svn-id: https://develop.svn.wordpress.org/trunk@40021 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-27 18:32:00 +00:00
Adam Silverstein 856416049d Media: ensure JavaScript initialized when media edit screen is loaded directly.
Fix a JavaScript error when the media edit screen is loaded directly via a url such as `/wp-admin/post.php?post={post_id}&action=edit&image-editor`. Add a check in `imgLoaded` for `this.hold.sizer` which is set up during initialization and required for the cropping tool. Call `init` if this is undefined.

Props NoseGraze.
Fixes #38138.


git-svn-id: https://develop.svn.wordpress.org/trunk@40020 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-27 18:29:48 +00:00
Andrew Ozz 1a068f2a61 TinyMCE: improve the previews for embedded WordPress posts:
- Add option to force a sandbox iframe in wpview.
- Use it to show the embedded post preview.
- Remove the deprecated `wpembed` plugin.js

Fixes #39513.

git-svn-id: https://develop.svn.wordpress.org/trunk@40019 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-27 04:24:58 +00:00
Weston Ruter a2ac38016d Customize: Trim whitespace from nav menu item titles so that the underlying object's original title appears as input placeholder and in the control's title.
Whitespace is trimmed from titles in PHP when saved in any case, so this aligns the client-side behavior with what happens on the server.

Amends [38618].
See #38015.
Fixes #39600.


git-svn-id: https://develop.svn.wordpress.org/trunk@39994 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 18:07:58 +00:00
Boone Gorges 18e09d246e Revert to pre-4.7 behavior for fetching object instances by id.
This changeset reverts [38381], which caused inconsistencies in the way the
REST API fetches posts and other objects.

See #38792, #37738.

git-svn-id: https://develop.svn.wordpress.org/trunk@39992 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 16:52:51 +00:00
Joe Hoyle 0167cea791 REST API: Fix unit tests for posts out of bounds errors
Previously we were assuming pagination headers would be sent when the request for posts is out of bounds. Instead presume it will return an error.

See #39061.

git-svn-id: https://develop.svn.wordpress.org/trunk@39991 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 15:15:07 +00:00
Dominik Schilling (ocean90) 4c00303955 Press This: Do not show Categories & Tags UI for users who cannot assign terms to posts anyways.
git-svn-id: https://develop.svn.wordpress.org/trunk@39968 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 13:57:55 +00:00
Joe Hoyle 38b400c4d7 REST API: Return an error if the page number is out of bounds.
Return an error from the REST API if a page number larger than the total pages count is requested.

Props morganestes.
Fixes #39061.

git-svn-id: https://develop.svn.wordpress.org/trunk@39967 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 13:52:06 +00:00
John Blackbourn a96089e8e6 Posts, Post Types: When using Excerpt mode on the Posts list table, ensure the excerpt output matches what was manually entered into the Excerpt field.
git-svn-id: https://develop.svn.wordpress.org/trunk@39956 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 13:40:17 +00:00
Joe Hoyle 0a82ee0a31 REST API: Unify object access handling for simplicity.
Rather than repeating ourselves, unifying the access into a single method keeps everything tidy. While we're at it, add in additional schema handling for common parameters.

See #38792.

git-svn-id: https://develop.svn.wordpress.org/trunk@39954 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 13:38:27 +00:00
Dominik Schilling (ocean90) d2374614c2 Query: Ensure that queries work correctly with post type names with special characters.
git-svn-id: https://develop.svn.wordpress.org/trunk@39952 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 13:32:24 +00:00
Weston Ruter 8f4e0b7ed8 Customize: Always enqueue `customize-preview` stylesheet in the customizer preview to style selective refresh and visual edit shortcuts.
Enqueues the style along with the `customize-preview` script in the manager instead of via the `widgets` and `nav_menus` components, ensuring that the stylesheet is loaded for users who cannot manage widgets or nav menus.

Props dlh.
See #27403.
Fixes #39498.


git-svn-id: https://develop.svn.wordpress.org/trunk@39951 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 03:46:52 +00:00
Sergey Biryukov f6938b23b1 Docs: Add missing file header to `wp-admin/includes/noop.php`, introduced in [34037].
Props carl-alberto.
Fixes #39690.

git-svn-id: https://develop.svn.wordpress.org/trunk@39950 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-25 23:09:37 +00:00
Peter Wilson 6de7c69c0d Menus: Prevent notice thrown in class-walker-page.php.
Calling `Walker_Page::walk()` directly was causing an `Undefined index: item_spacing` notice to be thrown, this adds an `isset()` check to prevent it.

Props bhargavbhandari90.
Fixes #39564.


git-svn-id: https://develop.svn.wordpress.org/trunk@39949 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 23:28:13 +00:00
Felix Arntz cf0ca2645f Multisite: Show menu items in `My Sites > Network Admin` admin bar menu based on more precise capability checks.
Previously the menu items would all be displayed solely based on the `manage_network` capability. This change provides parity with the network admin menu.

Unit tests for the network admin menu functionality of `wp_admin_bar_my_sites_menu()` have been added.

Props chandrapatel.
Fixes #39082.


git-svn-id: https://develop.svn.wordpress.org/trunk@39948 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 16:28:30 +00:00
Felix Arntz ed4e456601 Multisite: Replace `is_super_admin()` with a proper capability check when showing a notice about `WPLANG`.
In multisite, the notice is displayed to users that have the `manage_network_options` capability. In non-multisite, the notice is displayed to users with the `manage_options` capability.

Props Dhaval Parekh.
Fixes #39207. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39947 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 13:12:28 +00:00
Felix Arntz 88c2b69d9e Multisite: Remove unnecessary `is_super_admin()` check when adding an existing user to a site.
Prior to this change, a super admin user that is added to a site who they are already a member of would still get reinvited.

Props supercoder.
Fixes #39220. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39946 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 12:02:25 +00:00
Felix Arntz 34c9399db8 Multisite: Replace `is_super_admin()` with `manage_network_users` when trying to import new users.
Props bhargavbhandari90.
Fixes #39212. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39945 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 11:39:01 +00:00
Felix Arntz 8bf00cceaf Multisite: Replace `is_super_admin()` with `manage_network` when showing a message to the network administrator in `wp-signup.php`.
Props jignesh.nakrani.
Fixes #39209. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39944 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 11:07:15 +00:00
Felix Arntz 816686b709 Multisite: Replace `is_super_admin()` with `manage_network_users` when trying to change the role of oneself.
Props abhishek kaushik.
Fixes #39204. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39943 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 11:03:07 +00:00
Sergey Biryukov b7b052df58 Twenty Seventeen: Improve typography for Simplified Chinese (`zh_CN`).
Props ze3kr, Dharm1025.
Fixes #39379.

git-svn-id: https://develop.svn.wordpress.org/trunk@39942 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 07:26:34 +00:00
Sergey Biryukov c9d95475c6 Text Changes: Add a period to the only `wp_die()` message that didn't have it: "Invalid plugin page".
Props Presskopp.
Fixes #39664.

git-svn-id: https://develop.svn.wordpress.org/trunk@39941 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-22 02:32:57 +00:00
Sergey Biryukov cc9843a12c Docs: After [39939], "locales" should be plural.
See #39658.

git-svn-id: https://develop.svn.wordpress.org/trunk@39940 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-21 17:25:40 +00:00
Sergey Biryukov 385e9d1a78 I18N: Add support for Bosnian locale in `remove_accents()`.
Applies "letter D with stroke" replacement made in [38646] for Serbian (`sr_RS`) to Bosnian (`bs_BA`) as well.

Props H3llas for the report.
Fixes #39658.

git-svn-id: https://develop.svn.wordpress.org/trunk@39939 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-21 17:15:57 +00:00
Sergey Biryukov a37269ee4a Posts, Post Types: Preserve author filter in list table after entering a page number in paging input.
Props sagarprajapati.
Fixes #39523.

git-svn-id: https://develop.svn.wordpress.org/trunk@39938 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-21 02:20:38 +00:00
Sergey Biryukov 33cf1046db Users: Preserve role filter in list table after entering a page number in paging input.
Props kailanitish90, sagarprajapati.
Fixes #39435.

git-svn-id: https://develop.svn.wordpress.org/trunk@39937 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-21 02:20:23 +00:00
Sergey Biryukov 34bc9bde36 Docs: After [38672], update `$type` parameter description for `submit_button()` and `get_submit_button()`.
Remove the mention of `secondary` and `delete` classes as core values, add `small` and `large`.

Props afercia.
Fixes #23477.

git-svn-id: https://develop.svn.wordpress.org/trunk@39936 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 20:36:07 +00:00
Felix Arntz 51c38bec8b Multisite: Replace `is_super_admin()` with `manage_network_users` when trying to add an existing user via username.
Props dhanendran.
Fixes #39202. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39935 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:48:31 +00:00
Felix Arntz 043cf0fc00 Multisite: Replace `is_super_admin()` with `manage_network_users` when checking for users autocomplete capabilities.
Props ashokkumar24.
Fixes #39201. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39934 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:42:21 +00:00
Felix Arntz d0bdcb93f0 Multisite: Replace `is_super_admin()` with `manage_network_options` in `wp-admin/options.php`.
Props sathyapulse.
Fixes #39200. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39933 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:38:15 +00:00
Felix Arntz 60f3612684 Multisite: Do not check for `is_super_admin()` when trying to set user settings.
The checks were introduced in [22256] to prevent user settings to be set for super admins that were not a member of the current site. However the latter should apply to any kind of user, so the `is_super_admin()` check is redundant. Furthermore, removing these checks is necessary for the ongoing effort to get rid of `is_super_admin()` checks in general.

Props chandrapatel for initial patch.
Fixes #39199. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39932 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:32:13 +00:00
Sergey Biryukov c0926aa662 REST API: Add `group` and description to `WP_Test_REST_Request_Validation`.
Props danielbachhuber.
Fixes #39654.

git-svn-id: https://develop.svn.wordpress.org/trunk@39931 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:12:59 +00:00
Felix Arntz efbe7902ce Multisite: Display correct scheme for the main site in `site-info.php`.
Props greatislander.
Fixes #39365.


git-svn-id: https://develop.svn.wordpress.org/trunk@39930 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:02:37 +00:00
Felix Arntz 29aa25c4af Multisite: Correct and improve i18n strings in `wp-signup.php`.
The strings addressing the network administrator in `wp-signup.php` were still using the old terminology of blogs and sites. Furthermore concatenation of the strings has been removed to make them i18n-friendly.

Props jignesh.nakrani, SergeyBiryukov.
Fixes #39611.


git-svn-id: https://develop.svn.wordpress.org/trunk@39929 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 16:51:59 +00:00
Adam Silverstein 3a449139db Menus: trigger an event when menu items are added or removed.
Fire a `menu-item-added` event after a menu item is added to the DOM. Fire a `menu-removing-item` event before a menu item is removed from the DOM. Enables hooking into and responding to menu changes.

Props welcher, adamsilverstein.
Fixes #31218.


git-svn-id: https://develop.svn.wordpress.org/trunk@39928 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 16:14:23 +00:00
Sergey Biryukov 83e7606f76 Customize: Remove redundant context for "Reorder" and "Done" strings in nav menu and widget area controls to ensure consistent translations.
Props pavelevap, Presskopp.
Fixes #33747.

git-svn-id: https://develop.svn.wordpress.org/trunk@39927 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 05:59:32 +00:00
Sergey Biryukov 1925fd16e4 Media: Pass the current attachment object to `display_media_states` filter, for consistency with `display_post_states`.
Props pbiron, chriseverson.
Fixes #39628.

git-svn-id: https://develop.svn.wordpress.org/trunk@39926 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 05:19:26 +00:00
Sergey Biryukov 7a9d5c9ab9 Media: After [36837], check the correct theme modification name for custom logo in `_media_states()`.
Props pbiron, mitraval192.
Fixes #39627.

git-svn-id: https://develop.svn.wordpress.org/trunk@39925 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-19 02:02:39 +00:00
Weston Ruter 4e8e97983c Customize: Allow custom post types to be used in starter content.
Changes `WP_Customize_Nav_Menus::insert_auto_draft_post()` so it can be invoked for a `post_type` that is not registered (yet).

See #38615, #38114.
Fixes #39610.


git-svn-id: https://develop.svn.wordpress.org/trunk@39924 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-19 00:00:24 +00:00
Ryan McCue 7d2c104068 REST API: Correctly serve the index with PATH_INFO
When hitting the index, untrailingslashit() would make the REST route empty, which would then use the fallback inside WP_REST_Server. This isn't a problem most of the time, but WP_REST_Server contains a fallback to PATH_INFO. Combined with PATH_INFO permalinks, this would give a 404 on the API index, as it attempts to look up a route for "/wp-json/".

Props ccprog.
Fixes #39432.


git-svn-id: https://develop.svn.wordpress.org/trunk@39923 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 05:39:15 +00:00
Ryan McCue bbf129c935 REST API: Allow shortcircuiting rest_pre_insert_comment
rest_pre_insert_{post_type} allows returning a WP_Error from the filter to shortcircuit actually creating the object, so it makes sense to do so for comments too.

Props dspilka.
Fixes #39578.


git-svn-id: https://develop.svn.wordpress.org/trunk@39922 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 05:17:15 +00:00
Gary Pendergast 16bbc492a5 dbDelta: Ignore index subparts when checking for duplicate indices.
If index lengths change in table definitions, we don't recreate the index - instead, we throw a database error, as `dbDelta()` tries to create a new index with the same name.

It's better to leave the index as is, MySQL doesn't have an efficient process for resizing indices, and dropping/creating is a slow process which we don't want to trigger automatically.

Fixes #34870.



git-svn-id: https://develop.svn.wordpress.org/trunk@39921 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 04:00:09 +00:00