Commit Graph

24168 Commits

Author SHA1 Message Date
Sergey Biryukov
2b1644b974 Docs: Add a @staticvar entry for $first_dropdown in WP_Widget_Categories::widget().
Props ajayghaghretiya1.
Fixes #41473.
Built from https://develop.svn.wordpress.org/trunk@41181


git-svn-id: http://core.svn.wordpress.org/trunk@41021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 14:25:42 +00:00
Sergey Biryukov
acb9773212 Users: After [41027], assign $author_posts_url outside of the condition to simplify the logic.
See #38085.
Built from https://develop.svn.wordpress.org/trunk@41180


git-svn-id: http://core.svn.wordpress.org/trunk@41020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 14:21:45 +00:00
Weston Ruter
18fd50d2b6 Media: Improve acceptance of YouTube /embed/ URLs when inserting in media modal.
Props timmydcrawford.
Fixes #41201.

Built from https://develop.svn.wordpress.org/trunk@41179


git-svn-id: http://core.svn.wordpress.org/trunk@41019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 02:36:46 +00:00
John Blackbourn
df808fc42d 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

Built from https://develop.svn.wordpress.org/trunk@41178


git-svn-id: http://core.svn.wordpress.org/trunk@41018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 01:15:52 +00:00
John Blackbourn
4f2ef5438f Build/Test Tools: More PHP 7.2 tweaks for Travis CI.
See #40109

Built from https://develop.svn.wordpress.org/trunk@41177


git-svn-id: http://core.svn.wordpress.org/trunk@41017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 21:32:40 +00:00
John Blackbourn
9ae6e6fb54 REST API: Add some missing assertions to various REST API tests.
See #41463

Built from https://develop.svn.wordpress.org/trunk@41176


git-svn-id: http://core.svn.wordpress.org/trunk@41016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 19:04:44 +00:00
Aaron Jorbin
89fa297113 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.

Built from https://develop.svn.wordpress.org/trunk@41175


git-svn-id: http://core.svn.wordpress.org/trunk@41015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 17:38:42 +00:00
John Blackbourn
219de8acd5 General: Avoid counting uncountable values when reading theme directories, and in some unit tests.
See #40109

Built from https://develop.svn.wordpress.org/trunk@41174


git-svn-id: http://core.svn.wordpress.org/trunk@41014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 17:00:44 +00:00
John Blackbourn
96183d09bd Formatting: Update the author description tests since the formatting change made in [41172].
See #40040

Built from https://develop.svn.wordpress.org/trunk@41173


git-svn-id: http://core.svn.wordpress.org/trunk@41013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 16:06:55 +00:00
John Blackbourn
01e64d9ed0 Formatting: Add formatting and texturization to author descriptions so they match the formatting of term descriptions.
Props henry.wright

Fixes #40040

Built from https://develop.svn.wordpress.org/trunk@41172


git-svn-id: http://core.svn.wordpress.org/trunk@41012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 15:10:42 +00:00
John Blackbourn
fb515a8a63 Users: Further fixes to entitiy decoding in the user email address change confirmation email, and the corresponding tests.
See #16470, #40015

Built from https://develop.svn.wordpress.org/trunk@41171


git-svn-id: http://core.svn.wordpress.org/trunk@41011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 14:59:43 +00:00
John Blackbourn
efa54e6cdb Users: Update some tests for admin email change confirmation emails after [41164].
See #40015, #39117

Built from https://develop.svn.wordpress.org/trunk@41170


git-svn-id: http://core.svn.wordpress.org/trunk@41010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 14:34:42 +00:00
John Blackbourn
2e767d2e1a Build/Test Tools: Clarify the error message when running the test suite without the WordPress Importer plugin present in the test suite.
See #41345

Built from https://develop.svn.wordpress.org/trunk@41169


git-svn-id: http://core.svn.wordpress.org/trunk@41009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 14:01:42 +00:00
Drew Jaynes
8c7f5367c0 Docs: Remove some more top-level @aacess tags from function DocBlocks.
See #414532.

Built from https://develop.svn.wordpress.org/trunk@41168


git-svn-id: http://core.svn.wordpress.org/trunk@41008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 08:19:43 +00:00
John Blackbourn
6a16d726ef Options, Meta APIs: Fix a typo introduced in [41164].
See #39117

Built from https://develop.svn.wordpress.org/trunk@41167


git-svn-id: http://core.svn.wordpress.org/trunk@41007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 03:12:44 +00:00
John Blackbourn
ff20054573 Users: Add the new email address to the email address change notification email.
Fixes #39112

Built from https://develop.svn.wordpress.org/trunk@41166


git-svn-id: http://core.svn.wordpress.org/trunk@41006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:57:43 +00:00
John Blackbourn
30d5450508 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

Built from https://develop.svn.wordpress.org/trunk@41165


git-svn-id: http://core.svn.wordpress.org/trunk@41005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:55:43 +00:00
John Blackbourn
b9b4776800 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

Built from https://develop.svn.wordpress.org/trunk@41164


git-svn-id: http://core.svn.wordpress.org/trunk@41004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:24:42 +00:00
John Blackbourn
62fe4be994 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

Built from https://develop.svn.wordpress.org/trunk@41163


git-svn-id: http://core.svn.wordpress.org/trunk@41003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:10:42 +00:00
Drew Jaynes
0860bb2771 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.

Built from https://develop.svn.wordpress.org/trunk@41162


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:41:44 +00:00
Drew Jaynes
1a28ec87e1 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.

Built from https://develop.svn.wordpress.org/trunk@41161


git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
John Blackbourn
32128ffd45 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

Built from https://develop.svn.wordpress.org/trunk@41160


git-svn-id: http://core.svn.wordpress.org/trunk@41000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 23:28:46 +00:00
John Blackbourn
be94fa5483 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

Built from https://develop.svn.wordpress.org/trunk@41159


git-svn-id: http://core.svn.wordpress.org/trunk@40999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 16:45:44 +00:00
John Blackbourn
6b22dbe59a Login and Registration: Introduce a username_exists filter, which allows for control over registration of usernames.
Props shamim51

Fixes #39320

Built from https://develop.svn.wordpress.org/trunk@41158


git-svn-id: http://core.svn.wordpress.org/trunk@40998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 16:25:40 +00:00
Sergey Biryukov
c7feb8387a 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.
Built from https://develop.svn.wordpress.org/trunk@41157


git-svn-id: http://core.svn.wordpress.org/trunk@40997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 13:39:44 +00:00
Sergey Biryukov
7d2b400876 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.
Built from https://develop.svn.wordpress.org/trunk@41156


git-svn-id: http://core.svn.wordpress.org/trunk@40996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 13:22:44 +00:00
Gary Pendergast
a89f1e469b 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.


Built from https://develop.svn.wordpress.org/trunk@41154


git-svn-id: http://core.svn.wordpress.org/trunk@40994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 03:53:42 +00:00
John Blackbourn
b6ca2d77a8 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

Built from https://develop.svn.wordpress.org/trunk@41153


git-svn-id: http://core.svn.wordpress.org/trunk@40993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 00:54:43 +00:00
Sergey Biryukov
760d2b3771 I18N: Use a consistent context for Visual and Text editor tab labels.
Props pedromendonca.
Fixes #41438.
Built from https://develop.svn.wordpress.org/trunk@41152


git-svn-id: http://core.svn.wordpress.org/trunk@40992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 22:58:41 +00:00
Sergey Biryukov
4e4df0e6c9 Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.8.0 entries.
See #41017.
Built from https://develop.svn.wordpress.org/trunk@41151


git-svn-id: http://core.svn.wordpress.org/trunk@40991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 22:48:42 +00:00
John Blackbourn
2dfea4210b 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

Built from https://develop.svn.wordpress.org/trunk@41150


git-svn-id: http://core.svn.wordpress.org/trunk@40990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 17:43:42 +00:00
Andrea Fercia
de31d6f81c 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.

Built from https://develop.svn.wordpress.org/trunk@41149


git-svn-id: http://core.svn.wordpress.org/trunk@40989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 16:13:45 +00:00
Andrea Fercia
ac82a26fc5 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.

Built from https://develop.svn.wordpress.org/trunk@41148


git-svn-id: http://core.svn.wordpress.org/trunk@40988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 16:05:44 +00:00
Sergey Biryukov
c957321007 Docs: Correct @global entry for $cat_id in WP_Links_List_Table::column_categories().
Props tejas5989.
Fixes #41436.
Built from https://develop.svn.wordpress.org/trunk@41147


git-svn-id: http://core.svn.wordpress.org/trunk@40987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 13:19:42 +00:00
Sergey Biryukov
37a04795b2 Docs: Add a @global entry for $wpdb in _get_cron_lock.
Props tejas5989.
Fixes #41433.
Built from https://develop.svn.wordpress.org/trunk@41146


git-svn-id: http://core.svn.wordpress.org/trunk@40986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 12:56:43 +00:00
Sergey Biryukov
0a24e8d1cd Docs: Add @access entry for WP_Comment_Query::fill_descendants().
Props umangvaghela123.
Fixes #41435.
Built from https://develop.svn.wordpress.org/trunk@41145


git-svn-id: http://core.svn.wordpress.org/trunk@40985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 12:54:45 +00:00
Weston Ruter
4042c0b416 TinyMCE: Fix styling of selected state for linked images containing captions.
Props azaozz.
Fixes #41408.

Built from https://develop.svn.wordpress.org/trunk@41141


git-svn-id: http://core.svn.wordpress.org/trunk@40981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 02:19:42 +00:00
Gary Pendergast
7819daefd2 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.


Built from https://develop.svn.wordpress.org/trunk@41139


git-svn-id: http://core.svn.wordpress.org/trunk@40979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:50:43 +00:00
John Blackbourn
b4c2f16d01 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

Built from https://develop.svn.wordpress.org/trunk@41138


git-svn-id: http://core.svn.wordpress.org/trunk@40978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:24:43 +00:00
Weston Ruter
8648fc0bff Customize: Update Text widget starter content to utilize visual mode.
Amends [38991].
Props dlh, westonruter.
See #35243, #38114.
Fixes #41410.

Built from https://develop.svn.wordpress.org/trunk@41136


git-svn-id: http://core.svn.wordpress.org/trunk@40976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:25:44 +00:00
Weston Ruter
4886abf23e 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.

Built from https://develop.svn.wordpress.org/trunk@41134


git-svn-id: http://core.svn.wordpress.org/trunk@40974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:11:43 +00:00
Weston Ruter
ddca4ceff1 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.

Built from https://develop.svn.wordpress.org/trunk@41132


git-svn-id: http://core.svn.wordpress.org/trunk@40972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:46:42 +00:00
John Blackbourn
d8151e9dd1 Networks and Sites: Introduce an AYS when bulk deleting sites from the Sites screen in Network Admin.
Props flixos90, MaximeCulea

Fixes #41177

Built from https://develop.svn.wordpress.org/trunk@41131


git-svn-id: http://core.svn.wordpress.org/trunk@40971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:41:42 +00:00
John Blackbourn
06e6edbd61 Comments: Ensure the correct comment ID is passed to the get_comment_author_url filter.
Props dominik.schwind

Fixes #41334

Built from https://develop.svn.wordpress.org/trunk@41127


git-svn-id: http://core.svn.wordpress.org/trunk@40967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:03:45 +00:00
Sergey Biryukov
8c55e79bef Docs: Correct @access entry for ::load() in WP_Image_Editor, WP_Image_Editor_GD, and WP_Image_Editor_Imagick.
Props upadalavipul.
Fixes #41423.
Built from https://develop.svn.wordpress.org/trunk@41125


git-svn-id: http://core.svn.wordpress.org/trunk@40965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 14:11:44 +00:00
Sergey Biryukov
bed4804424 Tests: Fix typo in Tests_Functions_AllowedProtocols::data_example_urls().
Props redrambles.
Fixes #41415.
Built from https://develop.svn.wordpress.org/trunk@41124


git-svn-id: http://core.svn.wordpress.org/trunk@40964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 10:03:44 +00:00
Sergey Biryukov
00b91b3003 Docs: Add a @global entry for $wpdb in WP_Comment_Query::fill_descendants().
Props jontyravi.
Fixes #41412.
Built from https://develop.svn.wordpress.org/trunk@41123


git-svn-id: http://core.svn.wordpress.org/trunk@40963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 10:40:45 +00:00
John Blackbourn
2d464d4286 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

Built from https://develop.svn.wordpress.org/trunk@41122


git-svn-id: http://core.svn.wordpress.org/trunk@40962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 01:14:43 +00:00
John Blackbourn
1d71fa865c 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

Built from https://develop.svn.wordpress.org/trunk@41121


git-svn-id: http://core.svn.wordpress.org/trunk@40961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 01:06:42 +00:00
John Blackbourn
2efb81d453 Administration: Send an appropriate HTTP response status code when an invalid action is passed to admin-ajax.php.
Props ryanrolds, ayeshrajans

Fixes #41269

Built from https://develop.svn.wordpress.org/trunk@41120


git-svn-id: http://core.svn.wordpress.org/trunk@40960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 00:21:42 +00:00
John Blackbourn
a4a0f65a8a Docs: Correct some inline docs for the Ajax test case.
See #41017

Built from https://develop.svn.wordpress.org/trunk@41119


git-svn-id: http://core.svn.wordpress.org/trunk@40959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 00:02:46 +00:00
Weston Ruter
f3ec3c36a0 Widgets: Fix typo in phpunit test for Custom HTML widget in [41116].
Fixed was applied in 4.8 branch via [41117].
See #41392.

Built from https://develop.svn.wordpress.org/trunk@41118


git-svn-id: http://core.svn.wordpress.org/trunk@40958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 21:22:42 +00:00
Weston Ruter
f283e9d81f 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.

Built from https://develop.svn.wordpress.org/trunk@41116


git-svn-id: http://core.svn.wordpress.org/trunk@40956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 21:02:43 +00:00
Weston Ruter
048ac7df67 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.

Built from https://develop.svn.wordpress.org/trunk@41115


git-svn-id: http://core.svn.wordpress.org/trunk@40955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 18:13:45 +00:00
Sergey Biryukov
e8e68a50f8 Docs: Correct $term_id parameter description in wp_xmlrpc_server::get_term_custom_fields() and ::set_term_custom_fields().
Props upadalavipul.
Fixes #41397.
Built from https://develop.svn.wordpress.org/trunk@41114


git-svn-id: http://core.svn.wordpress.org/trunk@40954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 13:40:43 +00:00
Sergey Biryukov
118dba300e Docs: Add @staticvar entries for $cache and $tested_paths in wp_upload_dir().
Props ajayghaghretiya1.
Fixes #41395.
Built from https://develop.svn.wordpress.org/trunk@41113


git-svn-id: http://core.svn.wordpress.org/trunk@40953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 10:15:44 +00:00
K. Adam White
6aaba32b36 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.

Built from https://develop.svn.wordpress.org/trunk@41112


git-svn-id: http://core.svn.wordpress.org/trunk@40952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 20:26:45 +00:00
Sergey Biryukov
970afde4c0 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.
Built from https://develop.svn.wordpress.org/trunk@41111


git-svn-id: http://core.svn.wordpress.org/trunk@40951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 14:02:44 +00:00
Sergey Biryukov
4653f8bcfa 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.
Built from https://develop.svn.wordpress.org/trunk@41110


git-svn-id: http://core.svn.wordpress.org/trunk@40950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:47:43 +00:00
Sergey Biryukov
3946198df8 Docs: Add @staticvar entries for get_html_split_regex() and _get_wptexturize_split_regex().
Props ajayghaghretiya1.
Fixes #41385.
Built from https://develop.svn.wordpress.org/trunk@41109


git-svn-id: http://core.svn.wordpress.org/trunk@40949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:38:44 +00:00
Sergey Biryukov
24f6903c4d Docs: Add @access entries for WP_Upgrader_Skin::set_upgrader(), ::request_filesystem_credentials(), and ::decrement_update_count().
See #41383.
Built from https://develop.svn.wordpress.org/trunk@41108


git-svn-id: http://core.svn.wordpress.org/trunk@40948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:35:43 +00:00
Sergey Biryukov
8728f8ae1e Docs: Add @access entry for Automatic_Upgrader_Skin::request_filesystem_credentials().
Props rushabh4486.
Fixes #41383.
Built from https://develop.svn.wordpress.org/trunk@41107


git-svn-id: http://core.svn.wordpress.org/trunk@40947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:33:43 +00:00
Sergey Biryukov
f8155cedb2 Docs: Add @access entries for Bulk_Upgrader_Skin::before() and ::after().
Props rushabh4486.
Fixes #41384.
Built from https://develop.svn.wordpress.org/trunk@41106


git-svn-id: http://core.svn.wordpress.org/trunk@40946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:25:42 +00:00
Sergey Biryukov
54b8dafd62 Docs: Change @version entry for WP_Http::buildCookieHeader() to @since.
See #41381.
Built from https://develop.svn.wordpress.org/trunk@41105


git-svn-id: http://core.svn.wordpress.org/trunk@40945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:15:43 +00:00
Sergey Biryukov
2026da9512 Docs: Add @access entries for WP_Http::block_request(), ::handle_redirects(), and ::is_ip_address().
Props ronakganatra.
Fixes #41381.
Built from https://develop.svn.wordpress.org/trunk@41104


git-svn-id: http://core.svn.wordpress.org/trunk@40944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:14:44 +00:00
Sergey Biryukov
47bf429c0b Docs: Add @access entries for before() and after() methods in Bulk_Plugin_Upgrader_Skin and Bulk_Theme_Upgrader_Skin.
See #41365.
Built from https://develop.svn.wordpress.org/trunk@41103


git-svn-id: http://core.svn.wordpress.org/trunk@40943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 12:09:43 +00:00
Sergey Biryukov
90372258a0 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.
Built from https://develop.svn.wordpress.org/trunk@41102


git-svn-id: http://core.svn.wordpress.org/trunk@40942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 12:06:43 +00:00
Sergey Biryukov
27c38e9b6f Docs: Add @access entries for feedback() and error() methods in WP_Upgrader_Skin, Bulk_Upgrader_Skin, and Language_Pack_Upgrader_Skin.
See #41365.
Built from https://develop.svn.wordpress.org/trunk@41101


git-svn-id: http://core.svn.wordpress.org/trunk@40941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 12:00:43 +00:00
Sergey Biryukov
5734818e35 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.
Built from https://develop.svn.wordpress.org/trunk@41100


git-svn-id: http://core.svn.wordpress.org/trunk@40940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 11:54:43 +00:00
Sergey Biryukov
feeab7ef05 Docs: Correct @access entry for Custom_Image_Header::default_headers.
Props rushabh4486.
Fixes #41378.
Built from https://develop.svn.wordpress.org/trunk@41099


git-svn-id: http://core.svn.wordpress.org/trunk@40939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 11:48:45 +00:00
James Nylen
f48ed236ff About page: Add a privacy policy.
Props MattyRob, johnbillion, swissspidy.
Fixes #40794.

Built from https://develop.svn.wordpress.org/trunk@41096


git-svn-id: http://core.svn.wordpress.org/trunk@40936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 21:42:42 +00:00
Weston Ruter
8b3d2e0876 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.

Built from https://develop.svn.wordpress.org/trunk@41094


git-svn-id: http://core.svn.wordpress.org/trunk@40934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 20:49:45 +00:00
Andrew Ozz
a798266ba3 TinyMCE: remove unused code from the wpeditimage plugin.
Fixes #41369.
Built from https://develop.svn.wordpress.org/trunk@41092


git-svn-id: http://core.svn.wordpress.org/trunk@40932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 13:41:46 +00:00
Sergey Biryukov
9ed31682db Docs: Add @access entry for Automatic_Upgrader_Skin::feedback().
Props akbarhusen.
Fixes #41365.
Built from https://develop.svn.wordpress.org/trunk@41091


git-svn-id: http://core.svn.wordpress.org/trunk@40931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 11:14:45 +00:00
James Nylen
793dd51f88 Tests: Be more helpful when the wordpress-importer plugin is missing.
Link to some documentation that explains the problem and how to resolve it.

Props enrico.sorcinelli.
Fixes #41345.

Built from https://develop.svn.wordpress.org/trunk@41090


git-svn-id: http://core.svn.wordpress.org/trunk@40930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 10:38:47 +00:00
Weston Ruter
9330e39b3d Widgets: Check for existence of wp.customize.state before attempting to access in Text widget.
Amends [40631].
See #35243.
Fixes #41361 for trunk.

Built from https://develop.svn.wordpress.org/trunk@41088


git-svn-id: http://core.svn.wordpress.org/trunk@40928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:36:42 +00:00
Weston Ruter
1a005d853f 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.

Built from https://develop.svn.wordpress.org/trunk@41086


git-svn-id: http://core.svn.wordpress.org/trunk@40926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:11:44 +00:00
James Nylen
bcdbe8a0bf Build: Switch PHP 5.2 and 5.3 to Travis' Ubuntu precise image
Starting today, Travis will begin switching the default image to `trusty`, which does not support PHP 5.2 or 5.3.

This is not a full fix, because Travis will be dropping `precise` support entirely in September (https://github.com/travis-ci/travis-ci/issues/8072).  However, it buys us some time until then.

Props netweb.
Fixes #41292 for trunk.

Built from https://develop.svn.wordpress.org/trunk@41072


git-svn-id: http://core.svn.wordpress.org/trunk@40924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 08:25:46 +00:00
Weston Ruter
770fb1b35c 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.

Built from https://develop.svn.wordpress.org/trunk@41070


git-svn-id: http://core.svn.wordpress.org/trunk@40922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 04:17:43 +00:00
Felix Arntz
21f6d256b5 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.

Built from https://develop.svn.wordpress.org/trunk@41065


git-svn-id: http://core.svn.wordpress.org/trunk@40917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-17 20:53:45 +00:00
Felix Arntz
c939425137 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.

Built from https://develop.svn.wordpress.org/trunk@41064


git-svn-id: http://core.svn.wordpress.org/trunk@40916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-17 20:23:43 +00:00
Felix Arntz
d4607c17b7 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.

Built from https://develop.svn.wordpress.org/trunk@41063


git-svn-id: http://core.svn.wordpress.org/trunk@40915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-17 20:16:47 +00:00
Aaron Jorbin
50cb2c5e28 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.



Built from https://develop.svn.wordpress.org/trunk@41062


git-svn-id: http://core.svn.wordpress.org/trunk@40912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-16 01:15:46 +00:00
Adam Silverstein
499e2a0ff9 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.

Built from https://develop.svn.wordpress.org/trunk@41061


git-svn-id: http://core.svn.wordpress.org/trunk@40911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-15 15:48:46 +00:00
Felix Arntz
6625f0c551 Multisite: Introduce a self_admin_url filter to adjust the URL to an administration panel.
Props j.hoffmann.
Fixes #37446.

Built from https://develop.svn.wordpress.org/trunk@41060


git-svn-id: http://core.svn.wordpress.org/trunk@40910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 23:01:42 +00:00
Felix Arntz
af50e8eb2c 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.

Built from https://develop.svn.wordpress.org/trunk@41059


git-svn-id: http://core.svn.wordpress.org/trunk@40909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 21:25:44 +00:00
Felix Arntz
df8506f523 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.

Built from https://develop.svn.wordpress.org/trunk@41058


git-svn-id: http://core.svn.wordpress.org/trunk@40908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 21:08:43 +00:00
Weston Ruter
8db1f562e6 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.

Built from https://develop.svn.wordpress.org/trunk@41050


git-svn-id: http://core.svn.wordpress.org/trunk@40900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 17:09:43 +00:00
Weston Ruter
93637a5729 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.

Built from https://develop.svn.wordpress.org/trunk@41047


git-svn-id: http://core.svn.wordpress.org/trunk@40897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 16:05:43 +00:00
Gary Pendergast
ecec228c50 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.


Built from https://develop.svn.wordpress.org/trunk@41046


git-svn-id: http://core.svn.wordpress.org/trunk@40896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 12:45:44 +00:00
Gary Pendergast
0fcd27ec31 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.


Built from https://develop.svn.wordpress.org/trunk@41045


git-svn-id: http://core.svn.wordpress.org/trunk@40895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 11:50:43 +00:00
Gary Pendergast
b13bab3e53 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.


Built from https://develop.svn.wordpress.org/trunk@41043


git-svn-id: http://core.svn.wordpress.org/trunk@40893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 05:47:49 +00:00
Drew Jaynes
beb67c9512 Docs: Improve the DocBlock summary for WP_Query::parse_orderby().
See #41017.

Built from https://develop.svn.wordpress.org/trunk@41042


git-svn-id: http://core.svn.wordpress.org/trunk@40892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 15:44:41 +00:00
Drew Jaynes
e1a227cf11 Docs: Document usage of the $wpdb global in WP_Query::parse_search() and WP_Query::parse_orderby().
Props avinapatel.
Fixes #41313.

Built from https://develop.svn.wordpress.org/trunk@41041


git-svn-id: http://core.svn.wordpress.org/trunk@40891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 15:42:44 +00:00
Sergey Biryukov
e42553dbea Docs: Add a @global entry for $tinymce_version in _WP_Editors::editor_js().
Props jontyravi.
Fixes #41311.
Built from https://develop.svn.wordpress.org/trunk@41040


git-svn-id: http://core.svn.wordpress.org/trunk@40890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 14:33:40 +00:00
Sergey Biryukov
8cfdf4dd3a Docs: Add a @global entry for $wpdb in is_user_member_of_blog().
Props ajayghaghretiya1.
Fixes #41308.
Built from https://develop.svn.wordpress.org/trunk@41039


git-svn-id: http://core.svn.wordpress.org/trunk@40889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 13:54:41 +00:00
Boone Gorges
65e2935636 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.
Built from https://develop.svn.wordpress.org/trunk@41037


git-svn-id: http://core.svn.wordpress.org/trunk@40887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 13:41:44 +00:00
Sergey Biryukov
3b9e61cdb1 Docs: Add missing @since tags for WP_Post properties and methods.
Props keesiemeijer.
Fixes #41306.
Built from https://develop.svn.wordpress.org/trunk@41036


git-svn-id: http://core.svn.wordpress.org/trunk@40886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 12:08:41 +00:00
Weston Ruter
2ca21c444e 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.

Built from https://develop.svn.wordpress.org/trunk@41035


git-svn-id: http://core.svn.wordpress.org/trunk@40885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 22:51:40 +00:00
Drew Jaynes
597eeb9bb8 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.

Built from https://develop.svn.wordpress.org/trunk@41034


git-svn-id: http://core.svn.wordpress.org/trunk@40884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 22:21:41 +00:00