Updates `.button-link` adding color and underline to make link-like buttons look
like links by default. Introduces `.button-link-delete` as a modifier, stackable
CSS class for red button-links.
Props Cheffheid, afercia.
See #34242.
Fixes#35126.
git-svn-id: https://develop.svn.wordpress.org/trunk@40052 602fd350-edb4-49c9-b593-d223f7449a82
Keep bumping the date for the auto-draft to preserve it from garbage-collection via `wp_delete_auto_drafts()` after 7 days.
See #30937.
Fixes#39713.
git-svn-id: https://develop.svn.wordpress.org/trunk@40041 602fd350-edb4-49c9-b593-d223f7449a82
Correct an issue during the client's dynamic route discovery in `wp.api.utils.decorateFromRoute` where `_.union` potentially failed if used on objects.
Props ketuchetan.
Fixes#39341.
git-svn-id: https://develop.svn.wordpress.org/trunk@40040 602fd350-edb4-49c9-b593-d223f7449a82
This prevents the "non-numeric value encountered" warning in PHP 7.1, caused by trying to increment an empty string on the first loop iteration.
Props drrobotnik for initial patch.
Fixes#39774.
git-svn-id: https://develop.svn.wordpress.org/trunk@40039 602fd350-edb4-49c9-b593-d223f7449a82
This commit adds tests for `orderby=relevance` combined with a search term in the REST API.
It also improves tests for the `orderby` parameter in `WP_REST_Posts_Controller` by looking at the generated SQL query instead of creating a bunch of carefully arranged test objects. This should be much more robust, and we can use this approach in other places (such as #39055).
Fixes#39079.
git-svn-id: https://develop.svn.wordpress.org/trunk@40037 602fd350-edb4-49c9-b593-d223f7449a82
Fixes bad conditions in `WP_Customize_Setting::get_root_value()` and `WP_Customize_Setting::set_root_value()`.
Props dlh.
Amends [35007].
See #32103.
Fixes#36952.
git-svn-id: https://develop.svn.wordpress.org/trunk@40036 602fd350-edb4-49c9-b593-d223f7449a82
The function should fail more gracefully when called in the context
where `get_query_var( 'post_type' )` doesn't represent an actual post
type.
Props technopolitica, dlh.
Fixes#38374.
git-svn-id: https://develop.svn.wordpress.org/trunk@40031 602fd350-edb4-49c9-b593-d223f7449a82
Partial revert of [38929].
This reverts the source code from the commit for #30210 to prevent valid but empty feeds from returning 404 file not found errors for the home and custom feeds.
The tests in the commit that remain applicable are retained.
Props pavelevap for reporting, stevenkword for initial patch.
See #30210.
Fixes#39157.
git-svn-id: https://develop.svn.wordpress.org/trunk@40030 602fd350-edb4-49c9-b593-d223f7449a82
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