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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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