Commit Graph

37225 Commits

Author SHA1 Message Date
Sergey Biryukov
1bdd506f4d Docs: Add a @staticvar entry for $first_dropdown in WP_Widget_Categories::widget().
Props ajayghaghretiya1.
Fixes #41473.

git-svn-id: https://develop.svn.wordpress.org/trunk@41181 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-28 14:24:53 +00:00
Sergey Biryukov
96d944bcfc Users: After [41027], assign $author_posts_url outside of the condition to simplify the logic.
See #38085.

git-svn-id: https://develop.svn.wordpress.org/trunk@41180 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-28 14:20:22 +00:00
Weston Ruter
43fc92e4a9 Media: Improve acceptance of YouTube /embed/ URLs when inserting in media modal.
Props timmydcrawford.
Fixes #41201.


git-svn-id: https://develop.svn.wordpress.org/trunk@41179 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-28 02:35:56 +00:00
John Blackbourn
e2cd1a0f46 General: Move the __autoload() compat function into its own file to prevent deprecated notices being thrown by the compiler in PHP 7.2.
The `__autoload()` function is deprecated in PHP 7.2, which means WordPress' own `__autoload()` compat function for PHP 5.2 needs to be moved into a separate file to prevent the PHP 7.2 compiler from complaining.

Props ayeshrajans

See #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@41178 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-28 01:14:03 +00:00
John Blackbourn
9f3bcacd71 Build/Test Tools: More PHP 7.2 tweaks for Travis CI.
See #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@41177 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 21:31:40 +00:00
John Blackbourn
3304df16d8 REST API: Add some missing assertions to various REST API tests.
See #41463


git-svn-id: https://develop.svn.wordpress.org/trunk@41176 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 19:03:45 +00:00
Aaron Jorbin
cc134ea791 Build/Test Tools: Add PHP 7.2 to test matrix
PHP has branched 7.2 and master is now 7.3. This change ensures that 7.2 is tested. As 7.2 is still in development and is not ready for production, failures are allowed.

See #40109.


git-svn-id: https://develop.svn.wordpress.org/trunk@41175 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 17:37:57 +00:00
John Blackbourn
e0dd90123d General: Avoid counting uncountable values when reading theme directories, and in some unit tests.
See #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@41174 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 16:59:36 +00:00
John Blackbourn
c880ed1c97 Formatting: Update the author description tests since the formatting change made in [41172].
See #40040


git-svn-id: https://develop.svn.wordpress.org/trunk@41173 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 16:05:19 +00:00
John Blackbourn
9897984f24 Formatting: Add formatting and texturization to author descriptions so they match the formatting of term descriptions.
Props henry.wright

Fixes #40040


git-svn-id: https://develop.svn.wordpress.org/trunk@41172 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 15:09:19 +00:00
John Blackbourn
1071986cb9 Users: Further fixes to entitiy decoding in the user email address change confirmation email, and the corresponding tests.
See #16470, #40015


git-svn-id: https://develop.svn.wordpress.org/trunk@41171 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 14:58:06 +00:00
John Blackbourn
b59d96d978 Users: Update some tests for admin email change confirmation emails after [41164].
See #40015, #39117


git-svn-id: https://develop.svn.wordpress.org/trunk@41170 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 14:33:31 +00:00
John Blackbourn
8fe419340a Build/Test Tools: Clarify the error message when running the test suite without the WordPress Importer plugin present in the test suite.
See #41345


git-svn-id: https://develop.svn.wordpress.org/trunk@41169 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 14:00:16 +00:00
Drew Jaynes
a91dd56c22 Docs: Remove some more top-level @aacess tags from function DocBlocks.
See #414532.


git-svn-id: https://develop.svn.wordpress.org/trunk@41168 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 08:18:25 +00:00
John Blackbourn
5d23532956 Options, Meta APIs: Fix a typo introduced in [41164].
See #39117


git-svn-id: https://develop.svn.wordpress.org/trunk@41167 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 03:11:10 +00:00
John Blackbourn
859a5c938d Users: Add the new email address to the email address change notification email.
Fixes #39112


git-svn-id: https://develop.svn.wordpress.org/trunk@41166 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 02:56:46 +00:00
John Blackbourn
b0e4f9d0a7 Users: Re-add entity decoding to the site name before it's used in the email address change confirmation email.
This was accidentally removed in [41163].

See #40015, #16470


git-svn-id: https://develop.svn.wordpress.org/trunk@41165 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 02:54:09 +00:00
John Blackbourn
620eed0cc2 Options, Meta APIs: Send a notification to the old admin email address when the site admin email or network admin email address is changed.
This reduces the chances of a site compromise going unnoticed, in the same way that the same notifications for user account email address changes reduces the chances of a user account compromise going unnoticed.

Props MatheusGimenez, johnbillion

Fixes #39117


git-svn-id: https://develop.svn.wordpress.org/trunk@41164 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 02:23:26 +00:00
John Blackbourn
34ee8c9d28 Users: Require a confirmation link in an email to be clicked when a user attempts to change their email address.
This adds this previously Multisite-only functionality to single site installations too. This change prevents accidental or erroneous email address changes from potentially locking users out of their account.

Props rodrigosprimo, tharsheblows, johnbillion

Fixes #16470


git-svn-id: https://develop.svn.wordpress.org/trunk@41163 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 02:09:51 +00:00
Drew Jaynes
b4d81bd654 Docs: Remove @access notations from method DocBlocks in wp-includes/* 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@41162 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 00:40:27 +00:00
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
Gary Pendergast
7fc914baa2 REST API: Update the fixture data for wp-api.js tests.
[41139] changed how the REST API URL is generated, but included an incorrect version of `wp-api-generated.js`.

This updates the generator to create the correct `wp-api-generated.js`, and updates ``wp-api-generated.js`.

See #40886.



git-svn-id: https://develop.svn.wordpress.org/trunk@41154 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-26 03:52:41 +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
cf84ec6a30 Tests: Fix typo in Tests_Functions_AllowedProtocols::data_example_urls().
Props redrambles.
Fixes #41415.

git-svn-id: https://develop.svn.wordpress.org/trunk@41124 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-24 10:02:52 +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