Commit Graph

12997 Commits

Author SHA1 Message Date
Drew Jaynes
829139ba1a Docs: Remove @access notations from method DocBlocks in wp-admin/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.


git-svn-id: https://develop.svn.wordpress.org/trunk@41161 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 00:39:34 +00:00
John Blackbourn
609aaef919 Administration: Remove Edit links from all plugin listing screens and the remaining theme listing screens.
This simplifies these list tables, reducing user confusion, without removing functionality.

Fixes #38169


git-svn-id: https://develop.svn.wordpress.org/trunk@41160 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 23:27:47 +00:00
John Blackbourn
c6c413403d Toolbar: Add View User and Edit User links to the admin toolbar to ease navigation between a user's archives and the user editing screen.
Props georgestephanis, lessbloat, johnbillion

Fixes #20307


git-svn-id: https://develop.svn.wordpress.org/trunk@41159 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 16:44:34 +00:00
John Blackbourn
e6028d9c6c Login and Registration: Introduce a username_exists filter, which allows for control over registration of usernames.
Props shamim51

Fixes #39320


git-svn-id: https://develop.svn.wordpress.org/trunk@41158 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 16:24:15 +00:00
Sergey Biryukov
f3368725ac Upgrade/Install: In WP_Ajax_Upgrader_Skin, call ::get_error_codes() method on a WP_Error object $this->errors instead of a string variable $errors.
Props yrpwayne.
Fixes #41449.

git-svn-id: https://develop.svn.wordpress.org/trunk@41157 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 13:38:21 +00:00
Sergey Biryukov
e814f49f74 Users: Use esc_url() instead of esc_attr() to escape the value of the srcset attribute in get_avatar().
Props joemcgill, henry.wright.
Fixes #41215.

git-svn-id: https://develop.svn.wordpress.org/trunk@41156 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 13:21:37 +00:00
John Blackbourn
bdc79c0d75 Users: Introduce filters for the contents of email notifications for new user registrations and password resets.
Introduces:

* `wp_password_change_notification_subject`
* `wp_password_change_notification_message`
* `wp_password_change_notification_headers`
* `wp_new_user_notification_admin_subject`
* `wp_new_user_notification_admin_message`
* `wp_new_user_notification_admin_headers`
* `wp_new_user_notification_subject`
* `wp_new_user_notification_message`
* `wp_new_user_notification_headers`

Props pbearne, dipesh.kakadiya

Fixes #38068


git-svn-id: https://develop.svn.wordpress.org/trunk@41153 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 00:53:21 +00:00
Sergey Biryukov
817e0c1eb7 I18N: Use a consistent context for Visual and Text editor tab labels.
Props pedromendonca.
Fixes #41438.

git-svn-id: https://develop.svn.wordpress.org/trunk@41152 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 22:57:16 +00:00
Sergey Biryukov
e8f7df4669 Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.8.0 entries.
See #41017.

git-svn-id: https://develop.svn.wordpress.org/trunk@41151 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 22:47:27 +00:00
John Blackbourn
850940a7f7 Users: Show a Super Admin label next to Super Admins on all user listing screens when the current user can manage network users.
Fixes #41165


git-svn-id: https://develop.svn.wordpress.org/trunk@41150 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 17:42:14 +00:00
Andrea Fercia
765445ee61 Widgets: make the Recent Posts widget output '(no title)' for posts without a title.
Since WordPress 2.3, the Recent Posts widget used to output the post ID for posts
with an empty title. Using '(no title)' seems a best option and is consistent with
what's already used in other similar cases.

Props antonrinas, Ankit K Gupta.
Fixes #35709.


git-svn-id: https://develop.svn.wordpress.org/trunk@41149 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 16:12:29 +00:00
Andrea Fercia
5de0d45b90 Administration: WP_Screen: strip all tags from the columns display name.
This ensures all the column titles, not just the Comments column one, are
"clean" when later reused for the Screen Options checkboxes. Also introduces
some consistency with what is already done in WP_List_Table.

Fixes #41261.


git-svn-id: https://develop.svn.wordpress.org/trunk@41148 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 16:04:50 +00:00
Sergey Biryukov
5508cdedba Docs: Correct @global entry for $cat_id in WP_Links_List_Table::column_categories().
Props tejas5989.
Fixes #41436.

git-svn-id: https://develop.svn.wordpress.org/trunk@41147 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 13:18:20 +00:00
Sergey Biryukov
c0346dc748 Docs: Add a @global entry for $wpdb in _get_cron_lock.
Props tejas5989.
Fixes #41433.

git-svn-id: https://develop.svn.wordpress.org/trunk@41146 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 12:55:34 +00:00
Sergey Biryukov
280163f8ef Docs: Add @access entry for WP_Comment_Query::fill_descendants().
Props umangvaghela123.
Fixes #41435.

git-svn-id: https://develop.svn.wordpress.org/trunk@41145 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 12:53:36 +00:00
Weston Ruter
cacfda71c4 TinyMCE: Fix styling of selected state for linked images containing captions.
Props azaozz.
Fixes #41408.


git-svn-id: https://develop.svn.wordpress.org/trunk@41141 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 02:18:32 +00:00
Gary Pendergast
029ce05801 REST API: Always add index.php to the REST URL when pretty permalinks are disabled.
When pretty permalinks are disabled, the web server will internally forward requests to `index.php`. Unfortunately, nginx only forwards HTTP/1.0 methods: `PUT`, `PATCH`, and `DELETE` methods will return a 405 error.

To work around this nginx behaviour, including `index.php` in the REST URL skips the internal redirect.

Fixes #40886.



git-svn-id: https://develop.svn.wordpress.org/trunk@41139 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 00:49:22 +00:00
John Blackbourn
44491ba49f Users: Ensure that users with no role on a site are taken into consideration when listing users on Multisite.
This ensures that users who are a member of a site but have no role are correctly listed on the Users screen and can be filtered from the 'None' role filter.

Props tobi823, flixos90, scottlee

Fixes #36196


git-svn-id: https://develop.svn.wordpress.org/trunk@41138 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 00:23:44 +00:00
Weston Ruter
06160eb060 Customize: Update Text widget starter content to utilize visual mode.
Amends [38991].
Props dlh, westonruter.
See #35243, #38114.
Fixes #41410.


git-svn-id: https://develop.svn.wordpress.org/trunk@41136 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 23:24:36 +00:00
Weston Ruter
021dcb13a1 Widgets: Improve notice in Text widget's legacy mode.
Also fixes phpunit test which broke in [41132].

Props melchoyce, westonruter, gk.loveweb.
See #41394, #35243, #40951, #40907.
Fixes #41386.


git-svn-id: https://develop.svn.wordpress.org/trunk@41134 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 23:10:06 +00:00
Weston Ruter
0cfe1b9136 Widgets: Rename Text widget's legacy mode to non-visual mode, restore boolean filter prop, and improve compatibility for widget_text filters applied in Custom HTML widget.
Props westonruter, obenland, timmydcrawford for testing.
Amends [41050].
See #35243, #40951, #40907.
Fixes #41394.


git-svn-id: https://develop.svn.wordpress.org/trunk@41132 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 22:45:55 +00:00
John Blackbourn
0fdf7fdebf Networks and Sites: Introduce an AYS when bulk deleting sites from the Sites screen in Network Admin.
Props flixos90, MaximeCulea

Fixes #41177


git-svn-id: https://develop.svn.wordpress.org/trunk@41131 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 22:40:12 +00:00
John Blackbourn
7a965fcfe6 Comments: Ensure the correct comment ID is passed to the get_comment_author_url filter.
Props dominik.schwind

Fixes #41334


git-svn-id: https://develop.svn.wordpress.org/trunk@41127 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 22:02:45 +00:00
Sergey Biryukov
a661557bce Docs: Correct @access entry for ::load() in WP_Image_Editor, WP_Image_Editor_GD, and WP_Image_Editor_Imagick.
Props upadalavipul.
Fixes #41423.

git-svn-id: https://develop.svn.wordpress.org/trunk@41125 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 14:10:45 +00:00
Sergey Biryukov
3f30fd2866 Docs: Add a @global entry for $wpdb in WP_Comment_Query::fill_descendants().
Props jontyravi.
Fixes #41412.

git-svn-id: https://develop.svn.wordpress.org/trunk@41123 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-23 10:39:13 +00:00
John Blackbourn
90583c8360 Users: Don't show the 'Add Existing User' form on the 'Add New User' screen to users without the promote_users capability.
Props bseddon, Mista-Flo

Fixes #37836


git-svn-id: https://develop.svn.wordpress.org/trunk@41122 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-23 01:13:13 +00:00
John Blackbourn
5f9b52df35 Login and Registration: Correctly encode the redirect location URL when it's passed as a query parameter to the lost password URL.
Props adhun

Fixes #40728


git-svn-id: https://develop.svn.wordpress.org/trunk@41121 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-23 01:05:08 +00:00
John Blackbourn
384ac2a367 Administration: Send an appropriate HTTP response status code when an invalid action is passed to admin-ajax.php.
Props ryanrolds, ayeshrajans

Fixes #41269


git-svn-id: https://develop.svn.wordpress.org/trunk@41120 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-23 00:20:37 +00:00
Weston Ruter
36c2f88a60 Widgets: Include widget_text class name on Custom HTML widget wrapper for theme styling compatibility, in addition to previously-added textwidget class on nested content container.
Amends [40893], [41115].
See #40907.
Fixes #41392 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41116 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-21 21:01:45 +00:00
Weston Ruter
642693bb91 Widgets: Improve theme styling compatibility for Custom HTML widget by adding container with textwidget class.
The same styling from the Text widget should apply to the Custom HTML widget since users are expected to copy HTML from the (legacy) Text widget into the latter.

Amends [40893].
See #40907.
Fixes #41392.


git-svn-id: https://develop.svn.wordpress.org/trunk@41115 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-21 18:12:43 +00:00
Sergey Biryukov
bece1ff7a5 Docs: Correct $term_id parameter description in wp_xmlrpc_server::get_term_custom_fields() and ::set_term_custom_fields().
Props upadalavipul.
Fixes #41397.

git-svn-id: https://develop.svn.wordpress.org/trunk@41114 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-21 13:39:59 +00:00
Sergey Biryukov
668d465aa3 Docs: Add @staticvar entries for $cache and $tested_paths in wp_upload_dir().
Props ajayghaghretiya1.
Fixes #41395.

git-svn-id: https://develop.svn.wordpress.org/trunk@41113 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-21 10:14:09 +00:00
K. Adam White
79bbfd19c9 WP-API JS Client: Interpret Settings resource as a model.
The REST API does not provide a mechanism to distinguish between endpoints representing models and those representing collections, so the Backbone client must make that distinction internally. Previously wp-api.js accounted for `/users/me`, but not for `/settings`. This patch updates the logic so that `/settings` is properly registered as a Backbone model.

When calling `wp.api.init`, additional endpoints can be specified to be models using the `modelEndpoints` argument.

Props @adamsilverstein.
Fixes #41056.


git-svn-id: https://develop.svn.wordpress.org/trunk@41112 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 20:25:28 +00:00
Sergey Biryukov
c66c90a438 Docs: Add a @global entry for $wpdb in get_author_user_ids(), get_editable_authors(), get_editable_user_ids(), get_nonauthor_user_ids(), and get_others_unpublished_posts().
Props parthsanghvi.
Fixes #41368.

git-svn-id: https://develop.svn.wordpress.org/trunk@41111 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 14:01:39 +00:00
Sergey Biryukov
6ac73689f4 Docs: Add a @global entry for $wp_filesystem in wp_ajax_install_theme(), wp_ajax_update_theme(), wp_ajax_delete_theme(), wp_ajax_install_plugin(), wp_ajax_update_plugin(), and wp_ajax_delete_plugin().
Props ronakganatra.
Fixes #41382.

git-svn-id: https://develop.svn.wordpress.org/trunk@41110 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:46:14 +00:00
Sergey Biryukov
3f38a85894 Docs: Add @staticvar entries for get_html_split_regex() and _get_wptexturize_split_regex().
Props ajayghaghretiya1.
Fixes #41385.

git-svn-id: https://develop.svn.wordpress.org/trunk@41109 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:37:19 +00:00
Sergey Biryukov
06f6f249bc Docs: Add @access entries for WP_Upgrader_Skin::set_upgrader(), ::request_filesystem_credentials(), and ::decrement_update_count().
See #41383.

git-svn-id: https://develop.svn.wordpress.org/trunk@41108 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:34:07 +00:00
Sergey Biryukov
f62453c06f Docs: Add @access entry for Automatic_Upgrader_Skin::request_filesystem_credentials().
Props rushabh4486.
Fixes #41383.

git-svn-id: https://develop.svn.wordpress.org/trunk@41107 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:32:19 +00:00
Sergey Biryukov
078f396b17 Docs: Add @access entries for Bulk_Upgrader_Skin::before() and ::after().
Props rushabh4486.
Fixes #41384.

git-svn-id: https://develop.svn.wordpress.org/trunk@41106 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:24:05 +00:00
Sergey Biryukov
6229dd05b5 Docs: Change @version entry for WP_Http::buildCookieHeader() to @since.
See #41381.

git-svn-id: https://develop.svn.wordpress.org/trunk@41105 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:14:50 +00:00
Sergey Biryukov
c6ba869397 Docs: Add @access entries for WP_Http::block_request(), ::handle_redirects(), and ::is_ip_address().
Props ronakganatra.
Fixes #41381.

git-svn-id: https://develop.svn.wordpress.org/trunk@41104 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:13:09 +00:00
Sergey Biryukov
2a4d33f2c6 Docs: Add @access entries for before() and after() methods in Bulk_Plugin_Upgrader_Skin and Bulk_Theme_Upgrader_Skin.
See #41365.

git-svn-id: https://develop.svn.wordpress.org/trunk@41103 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 12:08:19 +00:00
Sergey Biryukov
977c0592e0 Docs: Add @access entries for __construct() in WP_Upgrader_Skin, Bulk_Upgrader_Skin, Language_Pack_Upgrader_Skin, Plugin_Upgrader_Skin, and Theme_Upgrader_Skin.
Props rushabh4486.
Fixes #41376.

git-svn-id: https://develop.svn.wordpress.org/trunk@41102 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 12:05:34 +00:00
Sergey Biryukov
d27ac87b78 Docs: Add @access entries for feedback() and error() methods in WP_Upgrader_Skin, Bulk_Upgrader_Skin, and Language_Pack_Upgrader_Skin.
See #41365.

git-svn-id: https://develop.svn.wordpress.org/trunk@41101 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 11:59:16 +00:00
Sergey Biryukov
dbfa71a638 Docs: Add @access entries for $admin_header_callback and $admin_image_div_callback properties in Custom_Image_Header and Custom_Background.
Props rushabh4486.
Fixes #41377.

git-svn-id: https://develop.svn.wordpress.org/trunk@41100 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 11:53:15 +00:00
Sergey Biryukov
348073994e Docs: Correct @access entry for Custom_Image_Header::default_headers.
Props rushabh4486.
Fixes #41378.

git-svn-id: https://develop.svn.wordpress.org/trunk@41099 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 11:47:34 +00:00
James Nylen
df386b41a9 About page: Add a privacy policy.
Props MattyRob, johnbillion, swissspidy.
Fixes #40794.


git-svn-id: https://develop.svn.wordpress.org/trunk@41096 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 21:41:13 +00:00
Weston Ruter
6e30e93d7f Widgets: Improve Text widget's reliability in syncing Visual tab's contents with Text tab and with hidden sync inputs.
Amends [40631].
Props azaozz, westonruter, rinkuyadav999 for testing.
See #35243.
Fixes #40974 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41094 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 20:48:28 +00:00
Andrew Ozz
8dcb1d0b39 TinyMCE: remove unused code from the wpeditimage plugin.
Fixes #41369.

git-svn-id: https://develop.svn.wordpress.org/trunk@41092 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 13:40:31 +00:00
Sergey Biryukov
f2adcb8e52 Docs: Add @access entry for Automatic_Upgrader_Skin::feedback().
Props akbarhusen.
Fixes #41365.

git-svn-id: https://develop.svn.wordpress.org/trunk@41091 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 11:13:19 +00:00
Weston Ruter
af66f0b03e Widgets: Check for existence of wp.customize.state before attempting to access in Text widget.
Amends [40631].
See #35243.
Fixes #41361 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41088 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 22:35:47 +00:00
Weston Ruter
c941da4468 Widgets: Replace adding balanceTags on widget_custom_html_content filter in favor of just applying widget_text filters in the Custom HTML widget.
Ensures that users who copy HTML from the Text widget in legacy mode over to the Custom HTML widget will continue to get all of the same filters applied, including tag balancing and shortcodes, if a plugin added support. Plugins still have the `widget_text_content` and `widget_custom_html_content` filters they can use to target the specific widget types.

Amends [40893].
See #40951.
Fixes #40907 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41086 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 22:10:41 +00:00
Weston Ruter
0822890218 Widgets: Discount shortcodes and leading/trailing line breaks for triggering Text widget legacy mode.
Since plugin-added shortcode handling is just-in-time deferred to run after `wpautop`, there is no need to retain the presence of shortcodes to trigger legacy mode. Also updates Text widget legacy mode notice informing of Custom HTML widget.

Amends [41050].
Props westonruter, melchoyce.
Fixes #40951 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41070 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 04:16:16 +00:00
Felix Arntz
83af67a0e1 Multisite: Remove help text duplication on Edit Site screens in the network admin.
Prior to this change, the similar help tab and sidebar for these screens were all duplicated for each respective screen. This changeset introduces two internal admin functions `get_site_screen_help_tab_args()` and `get_site_screen_help_sidebar_content()` that make these available in a centralized location.

Props atanasangelovdev.
Fixes #41167.


git-svn-id: https://develop.svn.wordpress.org/trunk@41065 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-17 20:52:26 +00:00
Felix Arntz
ca95a827b8 Multisite: Fix a user-facing message when adding a new site with a new user as admin.
Previously the message would falsely state that the username and password would be sent to the new user. It is actually a link to set the password that they receive in the email.

Props nishitlangaliya.
Fixes #41169.


git-svn-id: https://develop.svn.wordpress.org/trunk@41064 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-17 20:22:08 +00:00
Felix Arntz
03b9931b7a Multisite: Improve caching in WP_Network_Query by ignoring the $fields argument.
Prior to this change there were two different cache keys used for the same query. That is because regardless of the `$fields` argument, the query response will be the same. This was already fixed for `WP_Site_Query` in [41059].

Props spacedmonkey.
Fixes #41347.


git-svn-id: https://develop.svn.wordpress.org/trunk@41063 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-17 20:15:27 +00:00
Aaron Jorbin
eb78c8e092 Update autoprefixer browser support matrix
WordPress no longer supports many old old browsers: https://make.wordpress.org/core/2017/04/23/target-browser-coverage/

This also removes alot of no longer necessary CSS. It served us well, but we are never getting back together with IE8,9,10.

So, in the (paraphrased) words of Taylor Swift:

I remember when we dropped support  the first time
Saying, "This is it, I've had enough, " 'cause like
We hadn't seen many users in a month
When you said you needed flexbox. (What?)
Then you postMessage again and say
"IE8, I miss you and I swear I'm gonna change, trust me."
Remember how that lasted for a day?
I say, "I hate the box model, " we break up, you call me, "I love css-grids."
Ooh, we called it off again last night
But ooh, this time I'm telling you, I'm telling you

We are never ever ever supporting IE 8,9,10,
We are never ever ever supporting IE 8,9,10,
You go talk to EDGE, talk to my FIREFOX, talk to CHROME
But we are never ever ever ever getting back together
Like, ever...

Fixes #37651.
Props stunnedbeast, netweb, jorbin.




git-svn-id: https://develop.svn.wordpress.org/trunk@41062 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-16 01:14:36 +00:00
Adam Silverstein
d2e18ea761 Move sanitizeText and stripTags from press this to wp.sanitize.
Introduce the `wp.sanitize` namespace and add two helpers for text sanitization. `stripTags` strips HTML tags from a string using regex.

Fixes #40635.


git-svn-id: https://develop.svn.wordpress.org/trunk@41061 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-15 15:47:16 +00:00
Felix Arntz
55bb567e0f Multisite: Introduce a self_admin_url filter to adjust the URL to an administration panel.
Props j.hoffmann.
Fixes #37446.


git-svn-id: https://develop.svn.wordpress.org/trunk@41060 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 23:00:55 +00:00
Felix Arntz
c8e811cc7e Multisite: Improve caching in WP_Site_Query by ignoring the $fields argument.
Prior to this change there were two different cache keys used for the same query. That is because regardless of the `$fields` argument, the query response will be the same.

Props spacedmonkey.
Fixes #41197.


git-svn-id: https://develop.svn.wordpress.org/trunk@41059 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 21:24:03 +00:00
Felix Arntz
d18c6696c2 Multisite: Use get_network_option() for language in wpmu_create_blog().
Before this changeset, the language of a new site would always result in the language of the current network, regardless of the `$site_id` parameter passed that actually determines the network for the site. Now the correct `WPLANG` value is used in such cases.

Alongside this change, a few minor documentation changes around the function have been made to account for the current naming conventions of sites and networks.

Props spacedmonkey.
Fixes #40503.


git-svn-id: https://develop.svn.wordpress.org/trunk@41058 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 21:07:17 +00:00
Weston Ruter
e85f291a79 Widgets: Add legacy mode for Text widget and add usage pointers to default visual mode.
The Text widget in legacy mode omits TinyMCE and retains old behavior for matching pre-existing Text widgets. Usage pointers added to default visual mode appear when attempting to paste HTML code into the Visual tab and when clicking on the Text tab, informing users of the new Custom HTML widget.

Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951.


git-svn-id: https://develop.svn.wordpress.org/trunk@41050 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 17:08:20 +00:00
Weston Ruter
b60a603d50 REST API: Ensure maxwidth and maxheight params are forwarded to oEmbed provider in proxy requests.
Also correct phpdoc return tag on `WP_oEmbed_Controller::get_proxy_item()` and remove dead code in oEmbed controller phpunit tests.

Amends [40628].
See #40450.
Fixes #41299.


git-svn-id: https://develop.svn.wordpress.org/trunk@41047 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 16:04:04 +00:00
Gary Pendergast
dac056e135 Emoji: Store the results of the emoji_url and emoji_ext filters in statics.
Previously, these filters were being run once per post, but the changes in [41043] caused them to be run once per emoji found.

We will not stand idly by while this kind of unfair performance penalty is placed on the emoji literate. The filters are now run once only, emoji aficionados everywhere can rest easy, knowing their posts will be just as performant as their emoji-less cousins.

Props ocean90 for noticing this severe oversight.
See #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41046 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 12:44:49 +00:00
Gary Pendergast
4bad064c24 Emoji: Fix some failing unit tests in PHP 5.2 and 5.3.
- Older versions of PHP don't know how to `html_entity_decode()` emoji.
- The fall back regex was a little too broad, catching characters that aren't emoji.

See #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41045 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 11:49:34 +00:00
Gary Pendergast
f780ce0a49 Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.

This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.

The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.

For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.

Fixes #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 05:46:19 +00:00
Drew Jaynes
666b9d7ccd Docs: Improve the DocBlock summary for WP_Query::parse_orderby().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41042 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 15:43:12 +00:00
Drew Jaynes
f72de4fff3 Docs: Document usage of the $wpdb global in WP_Query::parse_search() and WP_Query::parse_orderby().
Props avinapatel.
Fixes #41313.


git-svn-id: https://develop.svn.wordpress.org/trunk@41041 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 15:41:15 +00:00
Sergey Biryukov
d3f21c09f8 Docs: Add a @global entry for $tinymce_version in _WP_Editors::editor_js().
Props jontyravi.
Fixes #41311.

git-svn-id: https://develop.svn.wordpress.org/trunk@41040 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 14:32:57 +00:00
Sergey Biryukov
517e11f834 Docs: Add a @global entry for $wpdb in is_user_member_of_blog().
Props ajayghaghretiya1.
Fixes #41308.

git-svn-id: https://develop.svn.wordpress.org/trunk@41039 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 13:53:28 +00:00
Boone Gorges
834c29fbc6 Taxonomy: Avoid duplicates when querying for terms in taxonomies registered with $args parameter.
[40514] introduced a bug that caused term queries to return some duplicates
when the `$taxonomies` array contained only taxonomies that were originally
registered with an `$args` array. We fix this bug by ensuring that
recursive `get_terms()` queries stop when all queried `$taxonomies` have
already been referenced.

Props bor0, atanasangelovdev.
Fixes #41010.

git-svn-id: https://develop.svn.wordpress.org/trunk@41037 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 13:40:39 +00:00
Sergey Biryukov
5b384419f6 Docs: Add missing @since tags for WP_Post properties and methods.
Props keesiemeijer.
Fixes #41306.

git-svn-id: https://develop.svn.wordpress.org/trunk@41036 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 12:07:56 +00:00
Weston Ruter
f57be206f7 REST API: Remove _wpnonce value from being used in hashed oEmbed proxy cache key.
Amends [40628].
Props r-a-y, westonruter.
See #40450.
Fixes #41048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41035 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 22:50:57 +00:00
Drew Jaynes
f628aaacda Docs: Use a hash notation for the $args parameter to describe the fields argument in the DocBlock for wp_get_post_terms().
Also, the `$taxonomy` parameter can accept either a string or array of taxonomies.

Props ohryan for the initial tip.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41034 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 22:20:16 +00:00
Drew Jaynes
994ef530d1 Docs: Default for the orderby argument in wp_list_categories() is actually 'name', not 'ID'.
Props uicestone.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41033 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 22:05:54 +00:00
Sergey Biryukov
7e8d932935 Docs: Add a @global entry for $allowed_files in get_file_description().
Props div33, ajayghaghretiya1.
Fixes #41294.

git-svn-id: https://develop.svn.wordpress.org/trunk@41032 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 21:39:37 +00:00
Sergey Biryukov
cf4b8bc85f Docs: Fix typo in wp_suspend_cache_invalidation() description.
Props euthelup, milana_cap.
Fixes #41301.

git-svn-id: https://develop.svn.wordpress.org/trunk@41031 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 21:25:20 +00:00
Sergey Biryukov
90aca8c4d7 Docs: Add a @global entry for $wpdb in display_setup_form().
Props mitraval192.
Fixes #41300.

git-svn-id: https://develop.svn.wordpress.org/trunk@41030 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 21:02:35 +00:00
Weston Ruter
6daeb23005 Widgets: Enqueue assets needed by media and text widgets in their _register_one() methods.
The `WP_Widget::_register_one()` method is more guaranteed to be called as opposed to its wrapper `WP_Widget::_register()` which plugins may bypass for performance reasons.

Amends [40631], [40640].
See #35243, #32417.
Fixes #41021.


git-svn-id: https://develop.svn.wordpress.org/trunk@41028 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-11 22:46:45 +00:00
Sergey Biryukov
1c017250b7 Users: Add a "View" link to users listed on the Users screen that points to the user's author archive.
Props ryanplas, johnjamesjacoby, viralsampat, Girishpanchal, xkon.
Fixes #38085.

git-svn-id: https://develop.svn.wordpress.org/trunk@41027 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-11 13:29:51 +00:00
Sergey Biryukov
e4bfc8ca90 Shortcodes: Allow using single quotes for empty value attributes.
Props enrico.sorcinelli.
Fixes #37304.

git-svn-id: https://develop.svn.wordpress.org/trunk@41026 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-11 00:53:33 +00:00
Sergey Biryukov
4c5bb9758a Comments: In WP_Comments_List_Table::extra_tablenav(), save the state of ::has_items() to a static variable, so that the value is consistent between top and bottom navigation.
This prevents "Empty Spam" and "Empty Trash" buttons from disappearing if there's only one page of comments in Spam/Trash.

Fixes #40975.

git-svn-id: https://develop.svn.wordpress.org/trunk@41022 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-10 23:04:26 +00:00
Adam Silverstein
2d5a59194d Media: library grid view - improve browser history support.
Set view state properly when navigating history using the browser back/next button in the media library (grid view). Correctly handle navigating, search, image detail view and image edit mode. Also handle bookmarking/reloading.

Props kucrut, joemcgill, afercia.
Fixes #31846.



git-svn-id: https://develop.svn.wordpress.org/trunk@41021 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-10 19:07:27 +00:00
Weston Ruter
34c3d7d044 Customize: Restrict click target of menu deletion, moving to button from its container.
Props westonruter, afercia.
Fixes #40981.


git-svn-id: https://develop.svn.wordpress.org/trunk@41020 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-10 18:39:56 +00:00
Andrea Fercia
caf4c06f2a Administration: in WP_List_Table->pagination(), properly concatenate CSS classes for the pagination links when infinite_scroll is set to true.
Props SGr33n.
See #19815.
Fixes #40003.


git-svn-id: https://develop.svn.wordpress.org/trunk@41019 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-09 11:11:03 +00:00
Sergey Biryukov
93e7cf5e6f Docs: Update the DocBlock for _WP_Editors::wp_fullscreen_html() after [32677].
See #30949.

git-svn-id: https://develop.svn.wordpress.org/trunk@41015 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-06 23:43:58 +00:00
Sergey Biryukov
342e4fdf2e Docs: Update the list of static variables in wptexturize() DocBlock after [32863].
Props ajayghaghretiya1.
Fixes #41260.

git-svn-id: https://develop.svn.wordpress.org/trunk@41014 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-06 21:01:44 +00:00
Drew Jaynes
895cede84a Options: Pass $default as a new parameter to the pre_option_{$option} and pre_site_option_{$option} filters.
This change standardizes some language in the parameter descriptions between the two hook docs in an effort to reduce confusion between the `$pre_option` pseudo-parameters and the new `$default` ones. `$pre_option` is the truthy value used to short-circuit the `get_*option()` call, `$default` is the value passed to the `get_*option()` returned in the event that 1) a short circuit isn't performed, 2) the option doesn't exist.

Props sc0ttkclark.
Fixes #41254.


git-svn-id: https://develop.svn.wordpress.org/trunk@41013 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-06 15:11:32 +00:00
Weston Ruter
f67018c059 Customize: Prevent edge case fatal error when attempting to save changes to a changeset that had previously been corrupted.
Check return value of `WP_Customize_Manager::get_changeset_post_data()` and return if error instead of assuming it is an array.

Amends [38810].
See #30937.
Fixes #41252.


git-svn-id: https://develop.svn.wordpress.org/trunk@41012 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-06 07:04:11 +00:00
Joe McGill
3eb767b5c3 Sanity check $uploaderToggler in wp.media.view.UploaderInline.
This ensures `$uploaderToggler` exists before checking length so any views
extending or scripts accessing this view, won't encounter errors that stop execution.

Props Blackbam, yahil.
Fixes #41231.


git-svn-id: https://develop.svn.wordpress.org/trunk@41009 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-06 00:40:59 +00:00
Sergey Biryukov
a828890ce2 Menus: Make sure current-menu-parent and current-menu-ancestor classes are properly set for parent items of post type archive submenu items.
Props mrwweb, ajoah, welcher.
Fixes #39800.

git-svn-id: https://develop.svn.wordpress.org/trunk@41008 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 21:30:30 +00:00
Sergey Biryukov
4c099bfae9 Docs: Add a @global entry for $tinymce_version in _WP_Editors::default_settings().
Props tejas5989.
Fixes #41244.

git-svn-id: https://develop.svn.wordpress.org/trunk@41007 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 18:54:56 +00:00
Sergey Biryukov
f8efad31f9 Docs: Add a @global entry for $wpdb in WP_Network_Query::get_network_ids().
Props afzalmultani.
Fixes #41238.

git-svn-id: https://develop.svn.wordpress.org/trunk@41005 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 09:22:14 +00:00
Sergey Biryukov
f0955e58e4 Docs: Add a @global entry for $wp_post_statuses in WP_Customize_Nav_Menus::make_auto_draft_status_previewable().
Props afzalmultani.
See #41238.

git-svn-id: https://develop.svn.wordpress.org/trunk@41004 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 09:20:23 +00:00
Sergey Biryukov
b24850d038 Docs: Add a @global entry for $wp in redirect_canonical().
Props afzalmultani.
See #41238.

git-svn-id: https://develop.svn.wordpress.org/trunk@41003 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 09:18:17 +00:00
Sergey Biryukov
d93f4ff3cb Docs: Add a @global entry for $wp_widget_factory in WP_Customize_Widgets::get_selective_refreshable_widgets().
Props jankimoradiya.
Fixes #41243.

git-svn-id: https://develop.svn.wordpress.org/trunk@41002 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 08:22:54 +00:00
Weston Ruter
8e84510ebb Customize: Fix logic to re-expand a newly inserted nav menu section after placeholder section is replaced.
Fixes todo from Menu Customizer feature plugin: https://github.com/voldemortensen/menu-customizer/commit/0f4ea4e#diff-daa55fade2253f26ccbe02f71058841cR2330
Amends [32806].
Props greuben.
See #32576.
Fixes #40997.


git-svn-id: https://develop.svn.wordpress.org/trunk@41001 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-05 00:43:11 +00:00
Weston Ruter
ebb7793cc6 Widgets: Let Custom HTML widget be "wide" as the Text widget is.
Also update `WP_Customize_Widgets::$core_widget_id_bases` with the new list of core widgets.

Props obenland, westonruter.
See #40907, #40951.


git-svn-id: https://develop.svn.wordpress.org/trunk@41000 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-04 21:00:05 +00:00
Boone Gorges
c806540943 Avoid PHP notices when checking termmeta capabilities against a non-existent term.
Previously, checks like `current_user_can( 'edit_term_meta', $term_id )`
returned the proper value, but generated a PHP notice due to the fact
that `get_term( $term_id )` could, in certain instances, return
`WP_Error` objects.

Props caercam.
Fixes #40891.

git-svn-id: https://develop.svn.wordpress.org/trunk@40999 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-04 19:58:35 +00:00
Drew Jaynes
7bc5812ab3 Docs: Add a missing return notation and to the DocBlock for WP_Session_Tokens::get_instance().
Also adds an inline reference to the `session_token_manager` hook in the description.

Props Shelob9 for the initial patch.
Fixes #40102.


git-svn-id: https://develop.svn.wordpress.org/trunk@40998 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-04 17:15:47 +00:00
Sergey Biryukov
944c7c694c General: Always use colon instead of a semicolon in switch() control structures.
Props jrf.
Fixes #41234.

git-svn-id: https://develop.svn.wordpress.org/trunk@40997 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-04 09:51:25 +00:00
Andrew Ozz
9b5781fef9 TinyMCE: fix adding the <!-- more --> tag when the editor is inline.
Props iseulde.
Fixes #41230.

git-svn-id: https://develop.svn.wordpress.org/trunk@40996 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-03 21:40:22 +00:00
Andrew Ozz
05325257c9 Customizer: improve setting the TinyMCE modals z-index.
Props westonruter, greuben.
See #41158.

git-svn-id: https://develop.svn.wordpress.org/trunk@40995 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-03 21:17:26 +00:00
Boone Gorges
a16d16449d Introduce wp_get_object_terms_args filter.
This filter allows developers to modify the arguments passed to
`wp_get_object_terms()` before the query is run.

Props enrico.sorcinelli.
Fixes #35925.

git-svn-id: https://develop.svn.wordpress.org/trunk@40994 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-02 18:28:21 +00:00
Peter Wilson
3a4ffa09ab Capabilities: Prevent users having the do_not_allow capability.
Meta capabilities use the capability `do_not_allow` to indicate a user should be blocked from performing a particular action. This ensures users can not have the capability as it would cause unexpected behaviour.

Props johnbillion.
Fixes #41059.



git-svn-id: https://develop.svn.wordpress.org/trunk@40993 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-02 05:15:42 +00:00
Sergey Biryukov
bf850da3ec Docs: Add a @global entry for $wp_filter in wp_start_object_cache().
Props bhaveshkhadodara.
Fixes #41222.

git-svn-id: https://develop.svn.wordpress.org/trunk@40992 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 22:13:00 +00:00
Andrew Ozz
02f0ddc844 TinyMCE: respect the Disable the visual editor when writing user setting and don't output the TinyMCE components when using wp_enqueue_editor().
Fixes #40960 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@40991 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 21:30:10 +00:00
Andrew Ozz
0d9dbc2fea Text widget: bump the TinyMCE modals z-index to 500001 so they show in the Customizer.
Props greuben.
Fixes #41158 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@40990 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 20:32:12 +00:00
Drew Jaynes
de79ff87b3 Docs: Remove a few more superfluous @package WordPress and @subpackage notations outside of file headers missed in [40988].
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40989 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 17:10:37 +00:00
Drew Jaynes
de87b6d828 Docs: Remove superfluous @package WordPress and @subpackage notations used outside of file headers in a variety of core files.
Per the inline documentation standards for PHP, there should only be one `@package` and/or `@subpackage` notation per file, and only in the file header.

See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40988 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 16:57:13 +00:00
Drew Jaynes
958d29dc68 Docs: Convert an @uses tag in the class DocBlock for Walker_Nav_Menu_Edit to @see.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40987 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 16:48:04 +00:00
Drew Jaynes
886e1995c6 Docs: Remove an unnecessary @package tag from the DocBlock for post_preview().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40986 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 16:38:49 +00:00
Drew Jaynes
0a9d2d6b8e Docs: Add a valid return type for post_preview() and improve the DocBlock summary.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40985 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 16:36:20 +00:00
boonebgorges
2dff153c75 Introduce most_used taxonomy label, for text on 'Most Used' metabox tab.
Props mdifelice, jlambe.
Fixes #41150.

git-svn-id: https://develop.svn.wordpress.org/trunk@40984 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 14:45:02 +00:00
Drew Jaynes
5384177208 General: Ensure $description gets initialized in get_the_archive_description() if the post type archive conditional is true and the description isn't set.
Props henrywright.
See #38487.


git-svn-id: https://develop.svn.wordpress.org/trunk@40983 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 14:22:59 +00:00
Boone Gorges
6bf8783afd Allow user searches to match the display_name field.
Props bcole808, pcarvalho.
Fixes #39643.

git-svn-id: https://develop.svn.wordpress.org/trunk@40982 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 14:21:50 +00:00
Boone Gorges
107c937394 Allow metadata to be updated via wp_update_comment().
Passing an array of `comment_meta` into `wp_update_comment()` will
now update corresponding metadata. Similar functionality already
exists in `wp_insert_comment()`.

Props dshanske, kraftbj.
Fixes #36784.

git-svn-id: https://develop.svn.wordpress.org/trunk@40981 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 13:35:38 +00:00
Boone Gorges
b3ed160bd1 Users: Allow data to be filtered before updating or creating a user.
Props DaveFX.
Fixes #40545.

git-svn-id: https://develop.svn.wordpress.org/trunk@40980 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 13:29:09 +00:00
Boone Gorges
1721af83d1 Taxonomy: Ignore cached term value when it doesn't match the queried taxonomy.
When a cache entry is found that matches the requested `$term_id`, but
doesn't match an explicitly provided `$taxonomy`, that cache entry
should be ignored.

Props GunGeekATX.
Fixes #40671.

git-svn-id: https://develop.svn.wordpress.org/trunk@40979 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 11:45:09 +00:00
Boone Gorges
a5001396ad Introduce $comment_count param for WP_Query.
This parameter allows querying for posts with a specific value of
`comment_count`. It is also possible to query for posts that match
a `comment_count` comparison by passing an array with 'value' and
'compare' operators (eg `array( 'compare' => '>', 'value' => 5 )`).

Props ramon fincken.
Fixes #28399.

git-svn-id: https://develop.svn.wordpress.org/trunk@40978 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 11:24:26 +00:00
Drew Jaynes
2744e29fd3 Remove an unnecessary initialization of $description due to the else condition in get_the_archive_description().
See [40976]. See #38487.


git-svn-id: https://develop.svn.wordpress.org/trunk@40977 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 05:18:57 +00:00
Drew Jaynes
336d718bfc General: Add support for the post type archive description to get_the_archive_description(), and thereby also the_archive_description().
Props henrywright.
Fixes #38487.


git-svn-id: https://develop.svn.wordpress.org/trunk@40976 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 05:14:18 +00:00
Drew Jaynes
0b5b1a667f Link Template: Clarify documentation for the $id parameter in get_post_permalink(), get_edit_post_link(), edit_post_link(), and get_delete_post_link(), to reflect that either a post ID or WP_Post object is accepted.
Separately, use `$post` for checking the post status and retrieving the page_uri in `get_post_permalink()` instead of referencing back to the original `$id` parameter.

Props GunGeekATX for the initial patch.
Fixes #40780.


git-svn-id: https://develop.svn.wordpress.org/trunk@40975 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 03:28:11 +00:00
Drew Jaynes
417b094dd4 Users: Introduce the manage_users_extra_tablenav action, fired immediately outside the closing "actions" div in the Users list table tablenav.
A similar `manage_posts_extra_tablenav` hook fires in the same location and context in the Posts list table tablenav.

Props GunGeekATX, adamsilverstein.
Fixes #36990.


git-svn-id: https://develop.svn.wordpress.org/trunk@40974 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 03:01:16 +00:00
Drew Jaynes
a14ea35c38 Docs: Add a @property-read notation for the read-only WP_Term::$data property.
See [35269], #34348 and #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40973 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 17:03:24 +00:00
Drew Jaynes
d9ae7f920d Docs: Add missing @since, @access, and @global notations to the DocBlock for WP_Query::parse_search_order().
Props dixitadusara.
Fixes #41045.


git-svn-id: https://develop.svn.wordpress.org/trunk@40972 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 16:07:05 +00:00
Drew Jaynes
3ebd6bfda0 Docs: Add full parameter and return documentation for WP_Text_Diff_Renderer_Table::interleave_changed_lines().
Props coffee2code.
Fixes #38520.


git-svn-id: https://develop.svn.wordpress.org/trunk@40971 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 05:28:20 +00:00
Drew Jaynes
30b915922a Docs: Use third-person singular verbs in the summaries for wp_unschedule_hook() and wp_clear_scheduled_hook().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40970 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:53:53 +00:00
Drew Jaynes
8d783f1275 Docs: Clarify accepted types and values for $menu parameters in several contexts:
* `wp_nav_menu()`
* `wp_get_nav_menu_object()` and its filter `wp_get_nav_menu_object`
* `is_nav_menu()`
* `wp_delete_nav_menu()`
* `wp_get_nav_menu_items()`

Props dimadin.
Fixes #38166.


git-svn-id: https://develop.svn.wordpress.org/trunk@40969 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:48:20 +00:00
Drew Jaynes
63739c5c3d Docs: Provide best practice guidance for achieving parity between $menu_slug values supplied when adding menu and submenu pages, and later trying to compare those initial values against sanitized screen IDs derived from $menu_slug.
At the heart of the matter, the `$menu_slug` parameter in `add_menu_page()` and `add_submenu_page()` is not sanitized with `sanitize_key()`. When the screen object is later built for the admin page, the screen ID is derived from that `$menu_slug` value, though passed through `sanitize_key()`, which can produce unexpected results in comparison check.

Changing the sanitization code to provide actual parity is out of the question at this juncture, so updating the docs to describe how to avoid this edge case is the next best option.

Props GregRoss.
Fixes #35305.


git-svn-id: https://develop.svn.wordpress.org/trunk@40967 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:17:56 +00:00
Drew Jaynes
e087254993 Docs: Add more useful summaries to the DocBlocks for boolean $is_* properties in WP_Query.
Props megane9988 for the initial patch.
Fixes #34726.


git-svn-id: https://develop.svn.wordpress.org/trunk@40966 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 03:43:41 +00:00
Sergey Biryukov
21a6c7b050 Cron API: Introduce wp_unschedule_hook() to clear all events attached to a hook.
This complements `wp_clear_scheduled_hook()`, which only clears events attached with specific arguments.

Props arena, mordauk, jrf.
Fixes #18997.

git-svn-id: https://develop.svn.wordpress.org/trunk@40965 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 00:21:49 +00:00
Drew Jaynes
a970c07994 Docs: Don't reference non-existent hooks inline in the DocBlock descriptions for the following template functions:
* `get_index_template()`
* `get_404_template()`
* `get_author_template()`
* `get_category_template()`
* `get_tag_template()`
* `get_taxonomy_template()`
* `get_date_template()`
* `get_home_template()`
* `get_front_page_template()`
* `get_page_template()`
* `get_search_template()`
* `get_single_template()`
* `get_embed_template()`
* `get_singular_template()`
* `get_attachment_template()`

As mentioned when these dynamic hook references were originally fixed in [33274], we can't link to non-existent hooks inline because the Code Reference auto-linker won't pick up on the dynamic-ness of the hook, it'll just try to link to a hook reference that doesn't exist. In these cases, we need to be generic and provide context for the value of `$type`.

See [38418] for where the original fix was reversed. See this changeset for reversing the reversal.

Props donutz, milana_cap.

Fixes #41198.


git-svn-id: https://develop.svn.wordpress.org/trunk@40964 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 16:04:45 +00:00
Drew Jaynes
2d68e15e00 Docs: Don't reference non-existent hooks inline in the DocBlock description for get_archive_template().
Also removes extra curly braces from the dynamic hook references added in [40962] to aid future re-parsing.

See #41198.


git-svn-id: https://develop.svn.wordpress.org/trunk@40963 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 15:46:29 +00:00
Drew Jaynes
de8cb2d5b2 Docs: Don't reference non-existent hooks inline in the DocBlock description for get_post_type_archive_template().
Props milana_cap.
See #41198.


git-svn-id: https://develop.svn.wordpress.org/trunk@40962 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 15:38:14 +00:00
James Nylen
5c4f490ea8 REST API: Add a filter to allow modifying the response *after* embedded data is added.
Fixes #38964.


git-svn-id: https://develop.svn.wordpress.org/trunk@40961 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 13:16:19 +00:00
Sergey Biryukov
33f8a894cf Administration: In WP_List_Table::comments_bubble(), replace the mdash with its HTML entity for consistency with the similar code in other list tables.
Props afercia.
See #40659, #32152.

git-svn-id: https://develop.svn.wordpress.org/trunk@40960 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 00:03:02 +00:00
Sergey Biryukov
44d162d0b2 Docs: Add a @global entry for $post variable in wp_post_preview_js().
Props avinapatel.
Fixes #41194.

git-svn-id: https://develop.svn.wordpress.org/trunk@40959 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-28 12:54:31 +00:00
Sergey Biryukov
021d5ba403 Docs: Add missing backtick character in export_wp() DocBlock.
Props pbiron.
Fixes #41178.

git-svn-id: https://develop.svn.wordpress.org/trunk@40958 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:57:56 +00:00
Sergey Biryukov
6fa3e5c883 Administration: In taxonomy list tables, display a dash instead of a blank space and add "No description" as a screen reader text when the term description is blank.
Props pratikgandhi, yahil.
Fixes #40659.

git-svn-id: https://develop.svn.wordpress.org/trunk@40957 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:33:31 +00:00
Sergey Biryukov
c0dc34d4c7 Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.
Props Girishpanchal, yahil.
Fixes #40628.

git-svn-id: https://develop.svn.wordpress.org/trunk@40956 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:26:07 +00:00
Sergey Biryukov
4b7514b83d Docs: Remove inaccurate parts of get_header, get_footer, and get_sidebar hooks documentation.
These sentences suggested that the hooks allow a specific template file to be used in place of the default file, which is not the case.

Props desrosj.
Fixes #40892.

git-svn-id: https://develop.svn.wordpress.org/trunk@40955 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 20:55:15 +00:00
Sergey Biryukov
8ab52911d8 Login and Registration: Prevent the enable_login_autofocus filter DocBlock from spilling into JS code.
Props chris@vendiadvertising.com.
Fixes #41176.

git-svn-id: https://develop.svn.wordpress.org/trunk@40954 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 20:36:28 +00:00
Felix Arntz
b5668c3527 Multisite: Remove full stops from radio and checkbox labels in the Network Settings screen.
This change brings consistency with the regular site administration panel settings pages: Radio and checkbox labels do not use full stops there, so those in the network administration panel should not either.

Props Ankit K Gupta.
Fixes #39319.


git-svn-id: https://develop.svn.wordpress.org/trunk@40953 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 19:19:49 +00:00
Drew Jaynes
814936e641 Docs: List out accepted values for the $field parameter in get_the_author_meta().
Props choongsavvii.
Fixes #38258.


git-svn-id: https://develop.svn.wordpress.org/trunk@40952 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 18:23:52 +00:00
Drew Jaynes
8587b077ab Docs: Improve and clarify the DocBlock summary for wpmu_log_new_registrations().
Props daymobrew.
Fixes #39922.


git-svn-id: https://develop.svn.wordpress.org/trunk@40951 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 18:04:58 +00:00
Drew Jaynes
0624e59e02 Docs: Adjust notation for the $context parameter in the DocBlocks for the wp_kses_allowed_html() function and its associated wp_kses_allowed_html filter.
`$context|$allowedtags` can be either a string or array.

Props bor0.
Fixes #40575.


git-svn-id: https://develop.svn.wordpress.org/trunk@40950 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 22:15:18 +00:00
Drew Jaynes
4a248fa9c2 Docs: Notate format_for_editor() as the replacement function in the DocBlock for the deprecated wp_richedit_pre().
Props rabmalin.
See #41121. Fixes #40709.


git-svn-id: https://develop.svn.wordpress.org/trunk@40949 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 22:09:18 +00:00
Drew Jaynes
704731b9d3 Docs: Replace a variety of http links referenced in inline docs with their https counterparts (where possible).
Props johnpgreen.
Fixes #40732.


git-svn-id: https://develop.svn.wordpress.org/trunk@40948 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 22:05:54 +00:00
Drew Jaynes
e995c16086 Docs: Add missing deprecation, introduction, and summary information to the DocBlock for WP_Admin_Bar::recursive_render().
Props coffee2code.
Fixes #40840.


git-svn-id: https://develop.svn.wordpress.org/trunk@40947 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:57:32 +00:00
Drew Jaynes
3154c123c8 Docs: Clarify that the $post parameters for the get_the_modified_date and get_the_modified_time filters can also be of type null.
Props dlh.
Fixes #40845.


git-svn-id: https://develop.svn.wordpress.org/trunk@40946 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:49:27 +00:00
Drew Jaynes
e9ee6fc505 Docs: Add a clarification to the description about what the $output parameter in the embed_html filter doc represents.
Props musus.
Fixes #37752.


git-svn-id: https://develop.svn.wordpress.org/trunk@40945 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:45:42 +00:00
Drew Jaynes
a3fb39bc51 Docs: Add full documentation for members in the labels object returned by get_taxonomy_labels().
Props truongwp.
Fixes #41108.


git-svn-id: https://develop.svn.wordpress.org/trunk@40944 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:41:09 +00:00
Drew Jaynes
42801d8896 Docs: Add a note to the DocBlock for wp_signon() mentioning that it doesn't handle setting the current user.
Also outlines the conditions that must be met for is_user_logged_in() to work with it.

Part props SergeyBiryukov.
Fixes #28116.


git-svn-id: https://develop.svn.wordpress.org/trunk@40943 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 20:07:08 +00:00
Drew Jaynes
9b91a663df Docs: Add full documentation for arguments accepted by wp_get_nav_menu_items().
Also provide differentiation between arguments as passed to `get_posts()` vs used for ordering outputted menu items.

By and large, arguments in the `$args` array are intended to directly affect how nav_menu_item posts are retrieved. When the default ARRAY_A is used for 'output', the 'order' and 'orderby' arguments are essentially ignored, instead giving preference to a hard-coded order of 'ASC' and an orderby value derived from the non-get_posts() argument 'output_key'.

Fixes #15533.


git-svn-id: https://develop.svn.wordpress.org/trunk@40942 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 19:36:45 +00:00
Weston Ruter
f25d9d7909 Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).
Amends [40640], [40631].
Props westonruter, afercia.
See #35243, #32417.
Fixes #40986.


git-svn-id: https://develop.svn.wordpress.org/trunk@40941 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 18:47:13 +00:00
John Blackbourn
d7fc80ca43 Users: Use more appropriate HTTP status codes for errors relating to user management.
Also re-uses one error message string.

Props tuanmh

Fixes #40230


git-svn-id: https://develop.svn.wordpress.org/trunk@40940 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 18:45:33 +00:00
Weston Ruter
01efaabfc5 Widgets: Forcibly limit Video widget to only accept oEmbed URLs from YouTube and Vimeo (for now).
Amends [40640].
Props timmydcrawford.
See #34115, #39994.
Fixes #40935.


git-svn-id: https://develop.svn.wordpress.org/trunk@40939 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:23:52 +00:00
Drew Jaynes
ea1ee4f313 Scripts: Correctly reference WP_Scripts::print_extra_script() as the replacement for the deprecated WP_Scripts::print_scripts_l10n() method, rather than a nonexistent global print_extra_script() function.
Props fergbrain.
See #41121.


git-svn-id: https://develop.svn.wordpress.org/trunk@40938 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:19:23 +00:00
Drew Jaynes
a6b883434b Docs: Fix alignment of the $output parameter in the hook doc for the do_shortcode_tag filter.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40937 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:04:22 +00:00
Peter Wilson
ddbee256ad Emoji: Fix typo in browserSupportsEmoji() comment.
Fairies not Faries, introduced in [40850].

Fixes #41157.



git-svn-id: https://develop.svn.wordpress.org/trunk@40936 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:04:20 +00:00
Weston Ruter
51be161019 Customize: Ensure header_image_data setting exists before attempting to use it.
Amends [27497].
Props Collizo4sky.
Fixes #41007.


git-svn-id: https://develop.svn.wordpress.org/trunk@40935 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:03:16 +00:00
Sergey Biryukov
84fa8a9ff1 Docs: Add a missing quote in user-agent argument description in WP_Http::request().
Props ixkaito.
Fixes #41154.

git-svn-id: https://develop.svn.wordpress.org/trunk@40934 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:59:41 +00:00
Drew Jaynes
2a6d816739 Docs: Improve description wording for get_template_part() in regard to overloading by child themes.
Also, update the summary to use a third-person singular verb.

Props ixmati.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40933 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:55:43 +00:00
Drew Jaynes
1883d96173 Docs: Clarify the description for esc_html__() to note that the original text will be escaped on return if there is no translation, or the text domain isn't loaded.
Props brianlayman.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40932 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:40:39 +00:00
Drew Jaynes
805f4464a4 Docs: Fix a typo in the description for the get_previous_post_link() $link parameter. The default value is '%title', not '%title%'.
Props kmgalanakis.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40931 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:19:24 +00:00
Drew Jaynes
f8788a84a2 Docs: Add more complete documentation about expected values in the $meta parameter for wpmu_create_blog().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40930 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 05:47:27 +00:00
Drew Jaynes
f6399c9950 Improve the usefulness of several _deprecated_function() calls by passing known replacement functions, methods, or hooks.
Props jrf.
See #41121.


git-svn-id: https://develop.svn.wordpress.org/trunk@40929 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 00:04:11 +00:00
Sergey Biryukov
c9539e5a3c Import: Increase color contrast for "This importer is not installed" message on Multisite.
Remove `.not-installed-main-site` class introduced in [38075], but never used.

Props nishitlangaliya, mbootsman.
Fixes #41117.

git-svn-id: https://develop.svn.wordpress.org/trunk@40928 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-24 18:06:43 +00:00
Andrew Ozz
31fa66e976 TinyMCE: fix directionality settings for RTL languages.
Props westonruter, sa3idho.
Fixes #40972 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@40927 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-24 09:18:21 +00:00
Weston Ruter
d29e68fbda Widgets: Rename "HTML Code" widget to "Custom HTML" widget.
Correspondingly renames files, ID base from `html_code` to `custom_html`, and the filter from `widget_html_code_content` to `widget_custom_html_content`.

See #40907.


git-svn-id: https://develop.svn.wordpress.org/trunk@40926 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-23 23:59:23 +00:00
Sergey Biryukov
c1ff9b62f7 Docs: Document tags_input parameter in wp_insert_post().
Props barryceelen.
Fixes #41137.

git-svn-id: https://develop.svn.wordpress.org/trunk@40925 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-23 21:26:13 +00:00
Boone Gorges
50de2303b0 When querying for terms, do not assume that $taxonomies is a 0-indexed array.
In [25108], the logic of term queries was modified to avoid assuming
that the `taxonomies` array was numerically indexed. See #23506. This
fix was inadvertantly reverted during the refactor in [25162].

Props david.binda.
Fixes #41113.

git-svn-id: https://develop.svn.wordpress.org/trunk@40924 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-23 02:05:19 +00:00
Boone Gorges
bb0354dda1 Introduce loop_no_results action.
This action fires when a `WP_Query` query returns no results.

Props mgibbs189.
Props #40850.

git-svn-id: https://develop.svn.wordpress.org/trunk@40923 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-23 01:54:59 +00:00
Drew Jaynes
c321e10c16 Docs: Standardize and add missing deprecation notations in DocBlocks for the following functions:
* `post_form_autocomplete_off()`
* `_rotate_image_resource()`
* `_flip_image_resource()`
* `wp_get_sites()`
* `deactivate_sitewide_plugin()`

Props jrf.
See #41121.


git-svn-id: https://develop.svn.wordpress.org/trunk@40922 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-22 17:47:47 +00:00
Boone Gorges
ddc823a3e9 Cache results in get_objects_in_term().
This helps to reduce database queries when generating nav menus.

Props spacedmonkey.
Fixes #37094.

git-svn-id: https://develop.svn.wordpress.org/trunk@40921 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-22 03:18:18 +00:00
Boone Gorges
7104971dca Improve cache invalidation when splitting shared terms.
This changeset addresses two related issues:

* When splitting shared terms from hierarchical taxonomies, the process of regenerating the taxonomy hierarchy (`_get_taxonomy_hierarchy()`) requires recursive calls to `get_terms()` in order to descend the tree. By waiting until all shared terms in a term group have been invalidated before regenerating their taxonomy hierarchies, we avoid certain race conditions.
* Previously, a coding error prevented single-term caches from being invalidated for children of split terms. This error dates from [31418].

See #37189.

git-svn-id: https://develop.svn.wordpress.org/trunk@40920 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-21 04:11:58 +00:00
Boone Gorges
a529129de5 Introduce clean_taxonomy_cache() function.
Previously, taxonomy-wide caches were cleaned only inside of
`clean_term_cache()`. This made it hard to clean taxonmy caches
in isolation from specific taxonomy terms.

Props spacedmonkey.
See #37189.

git-svn-id: https://develop.svn.wordpress.org/trunk@40919 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-21 04:03:22 +00:00
Boone Gorges
deae2f7cbf Use WP_Term_Query when transforming tax queries.
This change allows tax query transformations to be cached.

Props spacedmonkey.
Fixes #37038.

git-svn-id: https://develop.svn.wordpress.org/trunk@40918 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-21 03:56:25 +00:00
Sergey Biryukov
9d64fe2172 Docs: Add missing @param and @return descriptions for has_term_meta(), wp_delete_category(), and wp_term_is_shared().
Props keesiemeijer.
Fixes #41096.

git-svn-id: https://develop.svn.wordpress.org/trunk@40917 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-20 18:27:53 +00:00
Boone Gorges
03cd8d5b70 Add term meta support to XML-RPC addTerm and editTerm endpoints.
This changeset also includes the new function `has_term_meta()`, a
counterpart to `has_meta()` (for posts).

Props enrico.sorcinelli.
Fixes #35991.

git-svn-id: https://develop.svn.wordpress.org/trunk@40916 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-18 10:39:12 +00:00
Peter Wilson
21e3c92742 Docs: Add wp-admin/js/media.js documentation.
Props jipmoors, jjcomack, diedeexterkate.
Fixes #41072.


git-svn-id: https://develop.svn.wordpress.org/trunk@40915 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 15:36:20 +00:00
Peter Wilson
d87ccc1655 Docs: Add wp-admin/js/custom-background.js documentation.
Props jipmoors.
Fixes #41067.


git-svn-id: https://develop.svn.wordpress.org/trunk@40914 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 13:23:22 +00:00
Sergey Biryukov
2de1815a16 Docs: Add documentation for wp-admin/js/comment.js.
Props ireneyoast, andizer, jipmoors.
Fixes #41065.

git-svn-id: https://develop.svn.wordpress.org/trunk@40913 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 13:01:30 +00:00
Sergey Biryukov
280a9b61f0 Docs: Correct parameter description for posts_join filter.
Props anhskohbo.
Fixes #40991.

git-svn-id: https://develop.svn.wordpress.org/trunk@40912 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 12:45:05 +00:00
Sergey Biryukov
cf9d667583 I18N: Add @global entry for $wp_locale in wp_maybe_decline_date().
Props Dency.
Fixes #41046.

git-svn-id: https://develop.svn.wordpress.org/trunk@40911 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 12:23:55 +00:00
Sergey Biryukov
9338781b41 Editor: Correct $settings parameter description in _WP_Editors::editor().
Props truongwp.
Fixes #40963.

git-svn-id: https://develop.svn.wordpress.org/trunk@40910 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 12:18:08 +00:00
Sergey Biryukov
01e2b8b1e2 I18N: Correct translator comment for response error message in WP_Community_Events::get_events().
Props Soean, tfirdaus.
Fixes #40939.

git-svn-id: https://develop.svn.wordpress.org/trunk@40909 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 12:06:06 +00:00
Sergey Biryukov
c40cbe75de Twenty Sixteen: Allow category display in post preview even when there is only one category.
Props lancewillett, davidakennedy.
Fixes #39531.

git-svn-id: https://develop.svn.wordpress.org/trunk@40908 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 12:05:09 +00:00
John Blackbourn
5d13bdd1ef General: Introduce a wp_is_mobile filter for controlling whether a request should be treated as coming from a mobile device.
Props PressLabs

Fixes #41023


git-svn-id: https://develop.svn.wordpress.org/trunk@40907 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 12:04:56 +00:00
John Blackbourn
b20ed14939 Database: Add documentation for the allowed utf8mb4_520 value when detecting features with wpdb::has_cap().
Props rcutmore

Fixes #41044


git-svn-id: https://develop.svn.wordpress.org/trunk@40906 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 11:59:19 +00:00
Sergey Biryukov
d4949e31be I18N: Add context for News blog URL in 'WordPress Events and News' dashboard widget.
Props zodiac1978.
Fixes #40929.

git-svn-id: https://develop.svn.wordpress.org/trunk@40905 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 11:51:39 +00:00
Dominik Schilling (ocean90)
93e549f03f Twenty Seventeen: Remove/merge unused variables in content-front-page.php.
#wceu2017

Props dingo_bastard, mariusvetrici.
Fixes #39771.

git-svn-id: https://develop.svn.wordpress.org/trunk@40904 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 10:19:06 +00:00
Boone Gorges
f239e62722 Simplify documentation for wp_dropdown_categories().
Props ArnaudBan.
Fixes #41058.

git-svn-id: https://develop.svn.wordpress.org/trunk@40903 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 09:38:30 +00:00
Adam Silverstein
b13ab6b4a3 Media: Disable the edit image->replace button when no item selected.
On the edit media screen, ensure that the 'replace' button is disabled until a media item is selected. Fix an issue where clicking the button with no item selected threw a JavaScript error and failed to work.

Props timmydcrawford, subrataemfluence, psiico.
Fixes #40589.



git-svn-id: https://develop.svn.wordpress.org/trunk@40902 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 09:37:53 +00:00
Pascal Birchler
e67238f480 Embeds: Update oEmbed endpoint URL for VideoPress.
Props NomNom99.
Fixes #41019.

git-svn-id: https://develop.svn.wordpress.org/trunk@40901 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-15 05:37:51 +00:00
Drew Jaynes
7ecfb17115 Docs: Include 'parent' as an acceptable entry for the $orderby argument in WP_Term_Query.
h/t kalor.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40900 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-13 03:10:29 +00:00
Drew Jaynes
5741c2f6c1 Docs: Clarify that get_the_author_meta() can also return an empty string.
h/t aurovrata.
See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@40899 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-13 02:32:15 +00:00
Drew Jaynes
9b90187611 Docs: Correct a typo in the sort_column argument description for wp_page_menu().
h/t spacegrrl.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40898 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-13 01:10:23 +00:00
Andrea Fercia
63731a6923 Accessibility: Avoid a keyboard trap on the permalink custom structure setting.
Using the `focus` event on the permalink custom structure field made impossible
to navigate through all the form fields using only the keyboard without actually
selecting the custom structure setting. Instead, using click and input preserves
the original functionality when using any kind of pointing or input device.

Also changes `attr()` to `prop()`` as recommended for a `checked` property.

Fixes #40982.


git-svn-id: https://develop.svn.wordpress.org/trunk@40897 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-12 14:08:34 +00:00
Weston Ruter
662824ceac Customize: Restore right border on footer actions.
Fixes regression introduced in [40511].

Props timmydcrawford.
See #32296.
Fixes #40978.


git-svn-id: https://develop.svn.wordpress.org/trunk@40896 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-12 00:16:03 +00:00
Sergey Biryukov
ef2789b737 Docs: Remove duplicate @return keyword in WP_Community_Events::get_request_args.
Props ketuchetan.
Fixes #40973.

git-svn-id: https://develop.svn.wordpress.org/trunk@40895 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-11 11:09:21 +00:00
Sergey Biryukov
03eeb7efa8 Docs: Add missing opening quote for 'home' in {$type}_template_hierarchy and {$type}_template filters documentation.
Props tmatsuur, truongwp.
Fixes #40962.

git-svn-id: https://develop.svn.wordpress.org/trunk@40894 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-10 22:47:59 +00:00
Weston Ruter
5b7fb84f03 Widgets: Add widget dedicated for HTML Code, taking over this role of the Text widget.
Props westonruter, timmydcrawford.
See #40951, #35243.
Fixes #40907.


git-svn-id: https://develop.svn.wordpress.org/trunk@40893 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-09 23:53:27 +00:00
Weston Ruter
d3226f6041 Media: Restrict appending loop parameter to Vimeo URLs specifically and not all external URLs in Video widget (via shortcode).
Fixes issue where Video widgets embedding external files fail to get recognized due to the presence of the `loop` param after the video filename, even though it has a recognized extension. Regardless, the `loop` param is only present to fix a Vimeo issue in ME.js 2.x.

Props timmydcrawford.
Amends [40640].
See #39686, #39994.
Fixes #40977.


git-svn-id: https://develop.svn.wordpress.org/trunk@40892 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-09 19:28:12 +00:00
Aaron Jorbin
774e82b540 About Page: update CSS with prefixes
Seconded by melchoyce.

See #40721.



git-svn-id: https://develop.svn.wordpress.org/trunk@40885 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-08 04:50:42 +00:00
Aaron Jorbin
c06573ec7f Bundled Themes - Bump themes in preparation for 4.8
Change version numbers in stylesheets, fix typo in Twenty Fourteen readme and update copyright dates for themes. Twentysixteen wasn't updated this cycle.

See #40745 for changes that helped push this along.
Fixes #40905.
Props davidakennedy, mrahmadawais, maedahbatool.



git-svn-id: https://develop.svn.wordpress.org/trunk@40883 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-08 04:39:42 +00:00
Sergey Biryukov
3048eb8bd3 Docs: Add missing closing quote for 'Restore' in post_row_actions and page_row_actions filters documentation.
See #26397.

git-svn-id: https://develop.svn.wordpress.org/trunk@40882 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-07 23:10:15 +00:00
Mel Choyce
5bf914bb96 About: Swap out images and videos for CDN versions, and add responsive images.
Props: joemcgill, pento.
See #40721. 


git-svn-id: https://develop.svn.wordpress.org/trunk@40881 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-07 22:06:16 +00:00
Dominik Schilling (ocean90)
abbfbca7a8 Upgrade: Add wp-includes/js/tinymce/plugins/wpembed to $_old_files.
See #39513.
Fixes #40942.

git-svn-id: https://develop.svn.wordpress.org/trunk@40879 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-07 21:31:32 +00:00
Andrea Fercia
4379d2ff69 Dashboard: Better titles for the Recent Drafts widget.
- changes "Drafts" to "Your Recent Drafts" to clarify displayed drafts are the ones from the current user
- clarifies and simplifies the "View all" link

Props soniakash, sudar, bhargavbhandari90, zachwtx, johnroper100, rcutmore.
Fixes #37595.


git-svn-id: https://develop.svn.wordpress.org/trunk@40877 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-05 11:59:51 +00:00
Adam Silverstein
99369b9f7b Media: Fix an issue selecting media when clicking item edges.
Adjust targeting of the click handler for media item selection so clicking edges of media items properly selects them.

Props circlecube, psiico.
Fixes #40578.



git-svn-id: https://develop.svn.wordpress.org/trunk@40874 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-05 00:48:19 +00:00
Ella Van Dorpe
3c1dfef4ba Trunk is now 4.9-alpha
git-svn-id: https://develop.svn.wordpress.org/trunk@40870 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 21:47:10 +00:00
Ella Van Dorpe
8e65f5bad1 Bump version after RC2
git-svn-id: https://develop.svn.wordpress.org/trunk@40868 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 21:21:29 +00:00
Ella Van Dorpe
a8d94fab61 Bump version for WordPress 4.8 RC2
git-svn-id: https://develop.svn.wordpress.org/trunk@40867 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 20:39:47 +00:00
Dominik Schilling (ocean90)
c6c16f5336 I18N: Improve translator comments for strings in the community events widget.
Props dimadin, iandunn.
Fixes #40865.

git-svn-id: https://develop.svn.wordpress.org/trunk@40866 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 09:48:41 +00:00
Dominik Schilling (ocean90)
e7e088143d About: Sync tagline from about page with credits and freedoms.
See #40721.

git-svn-id: https://develop.svn.wordpress.org/trunk@40865 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 09:23:31 +00:00
Dominik Schilling (ocean90)
7aa4dc493c Multisite: Revert indentation of the sample page content added in [40296].
Props swissspidy.
Fixes #40895.

git-svn-id: https://develop.svn.wordpress.org/trunk@40864 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 09:15:40 +00:00
Mel Choyce
7a7bcb82fc About: Finalize strings.
Props: bridgetwillard, jenblogs4u, michelleweber, flixos90, johnbillion, francina, voldemortensen, melchoyce.
See #40721.


git-svn-id: https://develop.svn.wordpress.org/trunk@40863 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-01 03:13:15 +00:00
Andrew Ozz
3cdc7e14af TinyMCE: Force urlencoding of commas in URLs added by plugins to prevent warnings about missing stylesheets.
Fixes #40893.

git-svn-id: https://develop.svn.wordpress.org/trunk@40862 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-31 22:03:02 +00:00
Mel Choyce
1f741fffb3 About: Add Link Boundary video and update poster image.
See #40721.


git-svn-id: https://develop.svn.wordpress.org/trunk@40861 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-31 18:01:45 +00:00
Andrew Ozz
09c0c12412 TinyMCE: update to 4.6.3. Fixes few more edge cases with link boundaries. Changelog: https://www.tinymce.com/docs/changelog/#version463-may302017
Fixes #40890.

git-svn-id: https://develop.svn.wordpress.org/trunk@40856 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-30 23:35:01 +00:00
Konstantin Obenland
fc1a96710b Twenty Sixteen: Add missing binary files
They slipped through the cracks when applying/creating patches.

See [40851], #36497.


git-svn-id: https://develop.svn.wordpress.org/trunk@40852 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-30 21:52:39 +00:00
Konstantin Obenland
65088c4176 Importing Twenty Sixteen, default theme for 2016.
Fixes #36497.


git-svn-id: https://develop.svn.wordpress.org/trunk@40851 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-30 21:20:20 +00:00
Gary Pendergast
034b3f4c77 Emoji: Fix the flag and emoji5 tests not working correctly.
Fixes the UN flag not being correctly compared to itself, introduced in [40837].

Replaces the bearded person check with a male fairy. Emoji 5 does not have gendered bearded people, so we needed to switch it out to use the ZWJ check for a broken render.

Props peterwilsoncc for the code and commit message.
Fixes #40858.




git-svn-id: https://develop.svn.wordpress.org/trunk@40850 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-29 03:20:11 +00:00
Mel Choyce
d79ef7e73e About: Introduce design and add link to Media Widgets API dev note.
Props: ryelle rclations melchoyce westonruter.
See #40721.


git-svn-id: https://develop.svn.wordpress.org/trunk@40849 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-27 15:03:08 +00:00
Andrew Ozz
43f2ae7292 TinyMCE: update to the TINY-1079 (latest) branch. Fixes several edge cases including the errors thrown when moving the caret with the arrow keys around nested <a><code> elements.
Fixes #40874 #40868.

git-svn-id: https://develop.svn.wordpress.org/trunk@40848 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-27 02:08:59 +00:00
Weston Ruter
289965b097 Widgets: Normalize YouTube and Vimeo URLs in video shortcode (primarily for Video widget) to work around ME.js 2.22 bug.
Props timmydcrawford, jnylen0, westonruter.
See #32417, #39994.
Fixes #40866.


git-svn-id: https://develop.svn.wordpress.org/trunk@40847 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-26 23:09:42 +00:00
Andrew Ozz
31c9647279 Bump version after RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@40846 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 20:33:40 +00:00
matveb
ea386a328b WordPress 4.8 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@40845 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 18:44:02 +00:00
John Blackbourn
05434d0c07 REST API: In the admin area, ensure the REST API endpoint URL is forced to https when necessary.
In this situation, a site which uses `http` on the front end but `https` in the admin area is more likely to have a working REST API endpoint URL when used in the admin area.

Props mohanjith, westonruter, jnylen0

Fixes #36451


git-svn-id: https://develop.svn.wordpress.org/trunk@40843 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 18:01:16 +00:00
Andrew Ozz
0aed06d7e1 About: Further polish for Under The Hood.
Props: melchoyce apmarshall obenland. General props for the About page: hedgefield reportermike.
See #40721.

git-svn-id: https://develop.svn.wordpress.org/trunk@40841 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 17:52:35 +00:00
Adam Silverstein
f7872f14ff Plugins: fix regression in search input field size.
Fix a formatting regression introduced in [40792] which attempted to resize the input for mobile, see #40130.

Props leemon, juhise, voldemortensen.
Fixes #40857. 



git-svn-id: https://develop.svn.wordpress.org/trunk@40840 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 15:21:21 +00:00
Konstantin Obenland
7bfc57f000 Default themes: Improve styles for 4.8 widgets
Mostly adds styles for lists and mediaelement.js instances within widgets.
Adds size classname to image widget so themes can customize their display.

Props Soean, obenland, celloexpressions, ocean90, karmatosed.
Fixes #40745.



git-svn-id: https://develop.svn.wordpress.org/trunk@40839 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 15:18:04 +00:00
Konstantin Obenland
ed40010daa About: Further polish for feature descriptions.
Also adds Under The Hood content.

Props apmarshall, azaozz, iandunn, bridgetwillard, melchoyce.
See #40721.



git-svn-id: https://develop.svn.wordpress.org/trunk@40838 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 15:10:03 +00:00
Peter Wilson
e0013072d1 Emoji: Add Emoji 5 support.
Updates Twemoji to 2.3.0 to include Emoji 5 support.

The pride flag test is replaced with a test for the English flag, a five character sub-devision locale. The UN flag test is retained as the most recent two character locale.

An Emoji 5 "bearded person" replaces both Emoji 4 tests.

Fixes #40858.



git-svn-id: https://develop.svn.wordpress.org/trunk@40837 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 07:17:57 +00:00
Weston Ruter
5439e18798 Widgets: Ensure that audio and video files appear in media library browser upon upload.
Props timmydcrawford.
Amends [40640].
See #32417, #39994, #39995.
Fixes #40803.


git-svn-id: https://develop.svn.wordpress.org/trunk@40836 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 03:19:09 +00:00
Weston Ruter
1e63cdcf38 Widgets: Supply missing descriptions for instance schema fields in media widgets.
Reuse translated strings from media templates.

Amends [40640].
See #32417.


git-svn-id: https://develop.svn.wordpress.org/trunk@40835 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 02:58:21 +00:00
Andrew Ozz
f26acaeb99 TinyMCE: update to 4.6.2. Changelog: https://www.tinymce.com/docs/changelog/#version462-may232017.
Fixes #40859 #40756.

git-svn-id: https://develop.svn.wordpress.org/trunk@40834 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-25 01:13:15 +00:00
Weston Ruter
6d02212d57 Widgets: Prevent multiple items from being selectable when first populating a media widget.
Amends [40640].
Props obenland, timmydcrawford.
See #32417.


git-svn-id: https://develop.svn.wordpress.org/trunk@40827 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-24 05:31:00 +00:00
Adam Silverstein
b83c9d4e7f Themes: improve browser history support on new themes page.
When closing the theme preview, restore the previously selected tab. Avoid an issue where duplicate entries in the history prevented navigation. When re-opening the preview, remove bound event handlers before re-adding them.

Props afercia.
Fixes #36613.


git-svn-id: https://develop.svn.wordpress.org/trunk@40824 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-23 20:32:00 +00:00
Andrea Fercia
4f83e56f58 Administration: Fix some HTML validation errors.
Fixes some minor HTML issues in the admin and, most notably, changes the rel
attribute used in the List Tables from `rel="permalink"` to `rel="bookmark"`.

Props mihai2u, pento, arena, topher1kenobe, michalzuber, stubgo.
Fixes #37004.


git-svn-id: https://develop.svn.wordpress.org/trunk@40823 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-23 17:57:42 +00:00
Sergey Biryukov
2b38449795 Administration: Update the docs for wp_check_browser_version().
Correct `update_url` key name, add missing `platform` key.

Props coffee2code.
Fixes #40839.

git-svn-id: https://develop.svn.wordpress.org/trunk@40822 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-23 00:16:43 +00:00
Weston Ruter
c1661ecbb3 Widgets: Further refine WP JS coding style in media widgets code.
Props afercia.
See #32417.


git-svn-id: https://develop.svn.wordpress.org/trunk@40821 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 22:04:03 +00:00
Weston Ruter
a13711a3da Post-4.8 Beta 2 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@40820 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 21:42:28 +00:00
Weston Ruter
787c1a3f49 WordPress 4.8 Beta 2 ([40807] again)
git-svn-id: https://develop.svn.wordpress.org/trunk@40819 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 21:13:42 +00:00
Andrea Fercia
181ecf1ec3 Themes: Improve the theme Custom Logo accessibility.
Uses the Site title as fallback value for the Custom Logo alt attribute when the original alt attribute is empty.

Props sami.keijonen, joedolson, sstoqnov, nobremarcos, gma992, LiamMcArthur, jjcomack.
Fixes #38768.


git-svn-id: https://develop.svn.wordpress.org/trunk@40817 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 20:28:43 +00:00
Andrea Fercia
9e969efb89 Widgets: Remove the title attributes used in the Tag cloud widget.
- improves accessibility using an aria-label attribute to match the information conveyed visually with the one exposed to assistive technologies
- adds an option in the widget to display the item counts, consistently with what other widgets already do (Archives, Categories)

Props adamsoucie, emirpprime, Samantha Miller., MikeLittle, rianrietveld, sami.keijonen, adamsilverstein, westonruter, afercia.
See #24766.
Fixes #35566.


git-svn-id: https://develop.svn.wordpress.org/trunk@40816 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 20:23:49 +00:00
James Nylen
5ea3c91d57 REST API: Fix changing parameters with set_param() for some requests.
Prior to this commit, `WP_Rest_Request::get_param()` traversed through the parameter order but `WP_Rest_Request::set_param()` did not. For JSON requests (and likely other situations as well), this meant that changing a parameter with `set_param()` would have no effect on `get_param()`.

Props TimothyBlynJacobs.
Fixes #40344.



git-svn-id: https://develop.svn.wordpress.org/trunk@40815 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 16:15:25 +00:00
Dominik Schilling (ocean90)
255bd917f2 About: Remove a stray quotation mark.
Props odysseygate.
See #40721.
Fixes #40837.

git-svn-id: https://develop.svn.wordpress.org/trunk@40814 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 15:01:58 +00:00
Weston Ruter
89c103f849 Media: Remove core embedding support for WMV and WMA files since MediaElement.js has discontinued supporting them.
Plugins may continue to add embedding support for these file formats by re-adding them via the `wp_video_extensions` and `wp_audio_extensions` filters while also implementing fallback rendering routines via the `wp_video_shortcode_override` and `wp_audio_shortcode_override` filters.

See #39994, #39995.
Fixes #40819.


git-svn-id: https://develop.svn.wordpress.org/trunk@40813 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 05:38:05 +00:00
Andrea Fercia
2c7e409150 Widgets: clarify some context information for translators.
Props Italian polyglots team.
Amends [40640].
See #32417, #39993, #39994, #39995.


git-svn-id: https://develop.svn.wordpress.org/trunk@40812 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-21 20:43:36 +00:00
Dominik Schilling (ocean90)
e7345b18eb Widgets: Remove unused JS variable to fix JSHint error introduced in [40640].
See #39994.

git-svn-id: https://develop.svn.wordpress.org/trunk@40811 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-20 09:44:41 +00:00
Weston Ruter
016dc58620 Widgets: Introduce isHostedVideo method on VideoWidgetControl to allow plugins to extend for recognizing services beyond YouTube and Vimeo.
Also update jshint configuration in Gruntfile to include the widget scripts among the JS files linted.

Props timmydcrawford.
See #39994.
Fixes #40808.


git-svn-id: https://develop.svn.wordpress.org/trunk@40810 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-20 04:17:33 +00:00
Mike Schroder
2a5f7a8901 Media: Decode HTML entities in author_name before sending to JS.
In `wp_prepare_attachment_for_js()`:
- Normalize behavior when author does not exist by returning '(no author)' for `authorName` in these cases.
- Decode HTML entities in `author_name`.
- Add tests for both of the above.

Props arshidkv12, ocean90, sloisel, mikeschroder.
Fixes #39955.

git-svn-id: https://develop.svn.wordpress.org/trunk@40809 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-20 02:23:00 +00:00
Weston Ruter
daab7c996e Revert [40807] unbumping from 4.8 Beta 2 back to Beta 1 due to aborted release.
git-svn-id: https://develop.svn.wordpress.org/trunk@40808 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 23:00:00 +00:00
Weston Ruter
9bb89011da WordPress 4.8 Beta 2
git-svn-id: https://develop.svn.wordpress.org/trunk@40807 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 22:01:02 +00:00
Weston Ruter
43ae1ccd57 Widgets: Revert [40251] pending more accessible solution for showing default widget titles rather than using placeholders.
See #39909.


git-svn-id: https://develop.svn.wordpress.org/trunk@40806 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:44:49 +00:00
James Nylen
ce38b9c90a REST API: Avoid sending blank Last-Modified headers with authenticated requests.
This commit adds a new `WP_REST_Server#remove_header` method and uses it to clear the `Last-Modified` header when the "no caching" headers are sent (by default for all authenticated REST API requests).  This matches the behavior of the `nocache_headers` function used in other parts of WordPress.

Previously, the REST API would send an empty `Last-Modified` header in this situation.  Under some server and browser configurations, this causes browsers to cache authenticated REST API requests, which is undesirable.

Props iv3rson76, zinigor, rmccue, jnylen0.
Fixes #40444.


git-svn-id: https://develop.svn.wordpress.org/trunk@40805 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:26:48 +00:00
Weston Ruter
cc5e4928ff Docs: Improve phpdoc for WP_Customize_Manager, WP_Customize_Control, WP_Customize_Setting, and WP_Customize_Selective_Refresh.
Props 4nickpick, sagarprajapati, ketuchetan, BharatKambariya, mrahmadawais, westonruter.
Fixes #39671.


git-svn-id: https://develop.svn.wordpress.org/trunk@40804 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:24:58 +00:00
Sergey Biryukov
bf2de6a56b Dashboard: Change the cache key for dashboard RSS widget; remove the unnecessary database upgrade routine.
Props iandunn, ocean90.
See #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40803 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 19:13:59 +00:00
Sergey Biryukov
dce1c91514 Dashboard: Append the current locale to dashboard RSS widget cache key in wp_dashboard_rss_control(), for consistency with the changes to wp_dashboard_cached_rss_widget() in [33183] and [33192].
See #32804, #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40802 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:59:58 +00:00
Andrew Ozz
33b0757fcf TinyMCE: fix selecting the link node after creating a link by pasting an URL.
Props iseulde.
Fixes #40818.

git-svn-id: https://develop.svn.wordpress.org/trunk@40801 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:54:42 +00:00
Joe McGill
11acb32acf Media: Ensure WP_Screen sets post type on wp-admin/upload.php.
The post type property is set to 'attachment' when on the upload screen.

Props postpostmodern.
Fixes #39509.


git-svn-id: https://develop.svn.wordpress.org/trunk@40800 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:28:58 +00:00
Andrea Fercia
99dde26730 Dashboard: Don't trigger an Events search when the search field is empty.
Fixes #40816.


git-svn-id: https://develop.svn.wordpress.org/trunk@40799 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 17:26:06 +00:00
Konstantin Obenland
cc214db09f About: Optimize strings for l10n
Uses html entities for quotes and adds translator comment for event links.

Props ocean90.
See #40721.



git-svn-id: https://develop.svn.wordpress.org/trunk@40798 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 16:44:20 +00:00
Andrea Fercia
9a5703979a Themes: Improve the theme installer Favorites and Feature Filter tabs alignment.
Props nitin kevadiya, darshan02, mp518.
Fixes #40315.


git-svn-id: https://develop.svn.wordpress.org/trunk@40797 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 16:17:41 +00:00
Konstantin Obenland
4bbc7e8cbf Docs: Improve inline docs for inlineEditPost.
Props jjcomack, rensw90.
Fixes #39823.


git-svn-id: https://develop.svn.wordpress.org/trunk@40796 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 15:44:10 +00:00
Konstantin Obenland
ec1fe1532b Twenty Seventeen: Remove uneccessary return statement
Props truongwp.
Fixes #40516.


git-svn-id: https://develop.svn.wordpress.org/trunk@40795 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 15:18:06 +00:00
Andrea Fercia
345bdb4fc8 Dashboard: Improve the Events widget spinner position after [40789].
Props iandunn.
Fixes #40735.


git-svn-id: https://develop.svn.wordpress.org/trunk@40794 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 14:43:45 +00:00
Dominik Schilling (ocean90)
83e1634d5e Dashboard: Use get_user_locale() for the news feed cache key.
Since the feed URL can be localized the cache key has to be built with the same locale as the current user is using.

Props iandunn.
Fixes #40417.

git-svn-id: https://develop.svn.wordpress.org/trunk@40793 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 14:35:03 +00:00
Adam Silverstein
1d0cffb593 Media: make search input full width on mobile.
Props abhishekfdd.
Fixes #40130.


git-svn-id: https://develop.svn.wordpress.org/trunk@40792 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 13:44:53 +00:00
Konstantin Obenland
6e1d22936c About: Let's get a headstart on 4.8 about strings
Strings have been reviewed and are ready for translation—design will come soon.

Props bridgetwillard, jenblogs4u, michelleweber, ryelle, melchoyce.
See #40721.



git-svn-id: https://develop.svn.wordpress.org/trunk@40791 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 11:54:06 +00:00
Andrew Ozz
b4d8b4db61 Dashboard: Improve the handling of locations determined by geolocating the IP address and by entering a city name. Fix couple of edge cases, and some names.
Props iandunn coreymckrill.
Fixes #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40790 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 05:48:01 +00:00
Andrew Ozz
4385a4ff2e Dashboard:
- Close the form after obtaining a valid location.
- Fix focusing the toggle button after closing the form.
- Fix aria attribute values.
- Fix positions in IE11.
- Some JS and CSS cleanup.

Props afercia, coreymckrill.
Fixes #40735.

git-svn-id: https://develop.svn.wordpress.org/trunk@40789 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 04:00:32 +00:00
Weston Ruter
022028ec28 Docs: Add missing @since tags and phpdoc descriptions to the Custom_Image_Header class.
Amends [27497].
Props tejas5989, riddhiehta02, westonruter.
See #21785.
Fixes #40231.


git-svn-id: https://develop.svn.wordpress.org/trunk@40788 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 03:52:07 +00:00
Andrew Ozz
eb5320247a Editor: When stripping paragraph tags, and there is a <br> at the beginning or the end, merge them and keep the paragraph, not the <br>.
Props rellect.
Fixes #37066.

git-svn-id: https://develop.svn.wordpress.org/trunk@40787 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 22:55:00 +00:00
Andrew Ozz
ee2ffd6ba2 TinyMCE: fix pasting while an image with caption is selected. The image and the caption should be replaced with the pasted content.
Fixes #40809.

git-svn-id: https://develop.svn.wordpress.org/trunk@40786 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 22:24:57 +00:00
Weston Ruter
1b702cf09c Widgets: Ensure title field for media widget will update with sanitized value after change event in addition to input event.
Aligns behavior of field with Text widget and other widgets whereby the server-sanitized title (via the `widget-update` request) is supplied into the field after the `change` event.

See #32417.
Fixes #40805.


git-svn-id: https://develop.svn.wordpress.org/trunk@40785 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 21:03:12 +00:00
Weston Ruter
5bfb77bc22 Widgets: Use "Add Audio" for button in Audio widget instead of generic "Add File".
Props juhise.
See #39995.
Fixes #40797.


git-svn-id: https://develop.svn.wordpress.org/trunk@40784 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 18:33:57 +00:00
Matias Ventura
379b84ce99 TinyMCE: Provide styles for link and code boundaries.
The new version of TinyMCE introduces a cursor-boundary feature for some formatting elements but, by default, it does not provide much in the way of styles. This tweaks their appearance in the WordPress custom skin to match the intended design of the feature.

Props joen.
Fixes #40767.


git-svn-id: https://develop.svn.wordpress.org/trunk@40783 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:51:53 +00:00
James Nylen
50f8eff5d1 REST API: Do not set X-WP-Deprecated* headers as often.
Only set these headers if (1) `WP_DEBUG` is enabled and (2) headers have not already been sent.

Previously, this code could generate warnings by trying to set a header after response data has already been sent.  This happens when code attached to the `shutdown` filter calls a deprecated function, for example.

Also, these headers are unlikely to be useful in the majority of cases; let's only send them if `WP_DEBUG` is enabled.

Props kraftbj, jnylen0, ocean90, rmccue.
Fixes #40787.


git-svn-id: https://develop.svn.wordpress.org/trunk@40782 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:48:38 +00:00
Konstantin Obenland
f8e0f14cf3 Dashboard: Combine methods to retreive IP
They're only used in one place, no reason to be so verbose about it.

See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40781 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:33:14 +00:00
Jeremy Felt
31db8d6cee Multisite: Handle both role change selections in site-users.php.
Previously, a role selected below the list table would not apply on save. This aligns the behavior with `wp-admin/users.php` and allows role changes from both selections, deferring to the bottom selection when both are populated.

Props desrosj.
Fixes #40113.


git-svn-id: https://develop.svn.wordpress.org/trunk@40780 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:07:23 +00:00
Andrea Fercia
746d3c23c4 Administration: Use consistent spacing for form elements in the Discussion Settings screen.
Props sagarjadhav.
Fixes #31594.


git-svn-id: https://develop.svn.wordpress.org/trunk@40779 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 15:54:55 +00:00
John Blackbourn
6da8500524 Login and Registration: Add some margin to notices on the login screen so multiple notices remain separated.
Fixes #39971


git-svn-id: https://develop.svn.wordpress.org/trunk@40778 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 15:39:30 +00:00
Konstantin Obenland
028d76ea70 Dashboard: Document request proxy for events.
Documents the reason why the request is proxied through WP, instead of being
made directly to api.wordpress.org.

Props iandunn, michelleweber.
See #40702.



git-svn-id: https://develop.svn.wordpress.org/trunk@40777 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 14:43:47 +00:00
Konstantin Obenland
0a15718b87 Dashboard: Properly localize data for events
Moves localization to script-loader and removes dependency for two strings.

Props dd32, iandunn.
See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40776 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 14:33:04 +00:00
Pascal Birchler
043a87446d Media: Correct a translatable string for MediaElement.js.
Adds the needed context to the string "None". Introduced in [38089].

Props leewillis77.
See #37394.
Fixes #40800.


git-svn-id: https://develop.svn.wordpress.org/trunk@40775 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 11:05:09 +00:00
obenland
16b7f7908f Dashboard: Always pass the IP when getting events
Allows the API to determine event locations more accurately.

Props iandunn.
See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40774 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 07:30:05 +00:00
Konstantin Obenland
b549350776 Upgrade: Use correct commit no. to trigger upgrade
Props iandunn.
See [40607], #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40773 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-17 22:02:02 +00:00
Weston Ruter
2dd4bc7388 Media: Trim whitespace in URLs provided for external embeds.
Also avoid showing error notice in media widget when URL field is empty.

Props timmydcrawford, westonruter.
Fixes #40771.


git-svn-id: https://develop.svn.wordpress.org/trunk@40772 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-17 01:58:16 +00:00
Weston Ruter
4dc737ca8e Customize: Run a partial's fallback behavior (full refresh) when selective refresh fails due to a script error.
This ensures that 3rd-party scripts that users paste into Text widgets will gracefully recover and result in the expected preview.

See #27355.
Fixes #40658.


git-svn-id: https://develop.svn.wordpress.org/trunk@40771 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-17 00:00:26 +00:00
Pascal Birchler
8b07508cae Media: Simplify upload error message construction.
git-svn-id: https://develop.svn.wordpress.org/trunk@40736 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 17:57:37 +00:00
Aaron D. Campbell
96c3a01019 Add nonce for updating file system credentials.
git-svn-id: https://develop.svn.wordpress.org/trunk@40723 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 14:47:08 +00:00
Dominik Schilling (ocean90)
eedf5b2a60 Customize: Igore invalid customization sessions.
git-svn-id: https://develop.svn.wordpress.org/trunk@40704 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 12:06:32 +00:00
Pascal Birchler
1a25b3f43e Adjust post meta checks
git-svn-id: https://develop.svn.wordpress.org/trunk@40692 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:45:18 +00:00
Pascal Birchler
8278c5ee9c Improve redirect handling
git-svn-id: https://develop.svn.wordpress.org/trunk@40689 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:37:34 +00:00
Pascal Birchler
4fa44333cb Whitelist post arguments in XML-RPC
git-svn-id: https://develop.svn.wordpress.org/trunk@40677 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:08:27 +00:00
Weston Ruter
77fe870bd5 Customize: Keep alive auto-drafts created for page/post stubs when parent changeset is updated, and delete when changeset is garbage-collected.
Props utkarshpatel, westonruter.
See #31089.
Fixes #39715.


git-svn-id: https://develop.svn.wordpress.org/trunk@40676 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 05:36:25 +00:00