Commit Graph

36539 Commits

Author SHA1 Message Date
Sergey Biryukov
dae17ac91a Pings/Trackbacks: Avoid scheduling multiple do_pings events in _publish_post_hook().
Props ethitter.
Fixes #39828.

git-svn-id: https://develop.svn.wordpress.org/trunk@40054 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-10 03:08:28 +00:00
Sergey Biryukov
b4638abeda Docs: Add missing meta_type and meta_compare arguments to WP_Term_Query::__construct() and get_terms() docblocks.
Props 1naveengiri.
Fixes #39825.

git-svn-id: https://develop.svn.wordpress.org/trunk@40053 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-10 02:27:36 +00:00
Andrea Fercia
7487559dfd Buttons: Improve the .button-link CSS class for link-like buttons.
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
2017-02-09 16:46:58 +00:00
Scott Taylor
87364b0586 Media: in wp.media.view.DeleteSelectedPermanentlyButton, move destructive async operations outside of the selection loop.
Fixes #39780.


git-svn-id: https://develop.svn.wordpress.org/trunk@40051 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-08 19:43:58 +00:00
Scott Taylor
baff296dfa Media: in wp.media.view.Toolbar.refresh(), check for a selection before iterating over models.
Props chandrapatel.
Fixes #39511.


git-svn-id: https://develop.svn.wordpress.org/trunk@40050 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-08 19:16:34 +00:00
Pascal Birchler
4004400047 Taxonomy: Disallow overriding the name property when registering a taxonomy.
Props wpfo for initial patch.
Fixes #39308.

git-svn-id: https://develop.svn.wordpress.org/trunk@40049 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-06 19:38:36 +00:00
Sergey Biryukov
8900e2466e Docs: Add a note to retrieve_password_message filter that password reset email will not be sent if the filtered message is empty.
Props sudar.
Fixes #39788.

git-svn-id: https://develop.svn.wordpress.org/trunk@40048 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-06 04:15:22 +00:00
Sergey Biryukov
912059b82f Docs: Use third-person singular verb for rest_avatar_sizes filter description.
See #39130.

git-svn-id: https://develop.svn.wordpress.org/trunk@40047 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-06 02:57:46 +00:00
Sergey Biryukov
d295ea290e Docs: Use third-person singular verb for wp_get_custom_css filter description.
See #39130.

git-svn-id: https://develop.svn.wordpress.org/trunk@40046 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-06 02:56:42 +00:00
Sergey Biryukov
b5ce5759aa Customize: Introduce get_header_video_url filter for the return value of get_header_video_url().
Props sanket.parmar, celloexpressions.
Fixes #39512.

git-svn-id: https://develop.svn.wordpress.org/trunk@40045 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-06 02:51:20 +00:00
Pascal Birchler
acd6d129b9 General: Add tests for wp_parse_slug_list().
Props danielbachhuber.
See #35582.

git-svn-id: https://develop.svn.wordpress.org/trunk@40044 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-05 20:34:12 +00:00
Sergey Biryukov
bdae9cd0fd Docs: Clarify that get_the_category_list() and the_category() display links as an unordered list by default.
See #39130.

git-svn-id: https://develop.svn.wordpress.org/trunk@40043 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-05 15:15:45 +00:00
Sergey Biryukov
d20d535e24 Docs: Clarify that has_excerpt() checks if the post has a custom excerpt, not some generated excerpt.
See #35487.

git-svn-id: https://develop.svn.wordpress.org/trunk@40042 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-05 14:34:16 +00:00
Weston Ruter
647f06c2c1 Customize: Extend auto-draft life of a customize_changeset post whenever modified.
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
2017-02-05 06:38:57 +00:00
Adam Silverstein
4b22b97004 REST API: JavaScript client should use _.extend when merging objects.
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
2017-02-03 21:45:06 +00:00
Sergey Biryukov
0b63252b2d Media: In wp_unique_filename(), use explicit type casting when incrementing $number.
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
2017-02-03 20:57:38 +00:00
SergeyBiryukov
3155c8ac3e REST API: After [38947], improve the wording of the message to clarify that rest_authentication_errors is a filter.
See #38446.

git-svn-id: https://develop.svn.wordpress.org/trunk@40038 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-01 21:31:02 +00:00
James Nylen
6c32c99a97 REST API: Improve posts orderby tests
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
2017-02-01 20:30:17 +00:00
Weston Ruter
7d8b03458c Customize: Ensure root values are accessible in multidimensional custom setting types.
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
2017-02-01 01:39:39 +00:00
Sergey Biryukov
43aed27058 Update/Install: Give context to "Deleted! string to allow for differentiation between theme and plugin translations.
Props swissspidy.
See #39747. See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@40035 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-31 09:58:49 +00:00
Sergey Biryukov
b732afec11 Update/Install: Give context to some more install/update strings to allow for differentiation between theme and plugin translations.
Fixes #39747. See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@40034 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-31 09:26:52 +00:00
Sergey Biryukov
a52789b8b9 I18N: Use a consistent translator comment ("accessibility text") for strings used in aria-label attributes.
See #32000.

git-svn-id: https://develop.svn.wordpress.org/trunk@40033 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-31 08:54:49 +00:00
Sergey Biryukov
78e0bfb343 Text Changes: Remove periods from checkbox labels in Discussion meta box to improve consistency throughout the admin.
Checkbox labels generally don't have periods, unless it's a complete sentence.

Props juhise.
Fixes #33780.

git-svn-id: https://develop.svn.wordpress.org/trunk@40032 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-31 07:05:00 +00:00
Boone Gorges
3e6e1a12f6 Avoid PHP notices in get_post_type_archive_template().
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
2017-01-30 19:31:25 +00:00
Peter Wilson
99a101ff27 Feeds: Prevent empty feeds from returning 404 errors.
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
2017-01-29 23:08:54 +00:00
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