Commit Graph

37000 Commits

Author SHA1 Message Date
John Blackbourn
6a77621be4 Docs: Correct and improve the documentation for the send_confirmation_on_profile_email() function and the new_user_email_content filter.
See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41209 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-02 20:42:17 +00:00
John Blackbourn
43d241f0c4 Docs: Correct and improve the documentation for the update_option_new_admin_email() function and the new_admin_email_content filter.
See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41208 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-02 20:03:29 +00:00
James Nylen
2adead72ca Remove unnecessary semicolon
See #40919.


git-svn-id: https://develop.svn.wordpress.org/trunk@41207 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-02 17:15:24 +00:00
James Nylen
1c28b4a3c8 REST API: Allow overriding jQuery.ajax calls from within wp-admin
There are now 3 places where we call out to the REST API from within wp-admin.  This commit introduces a small library to allow overriding these calls, centralize nonce-passing logic, and eliminate the need to pass a full REST URL down to client code (this last feature is not yet used and will be explored in a separate ticket).

Fixes #40919.


git-svn-id: https://develop.svn.wordpress.org/trunk@41206 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-02 16:44:05 +00:00
Weston Ruter
9c1005410f Customize: Introduce settings_previewed arg and getter on WP_Customize_Manager which controls whether WP_Customize_Setting::preview() should be called on settings.
The `settings_previewed` property eliminates the need for the Customizer components from having to look at global `doing_ajax` state. This is in particular needed when saving settings, as some settings will short-circuit the update operation if they detect no changes are introduced. This is also needed for low-level integrations with the Customizer, such as in REST API endpoints under development.

Props stubgo, westonruter, utkarshpatel for testing.
See #38900.
Fixes #39221.


git-svn-id: https://develop.svn.wordpress.org/trunk@41205 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-02 05:34:32 +00:00
Weston Ruter
57e57505ba Customize: For selective refresh of nav menus, prevent preg_replace() from dropping backslashes in JSON replaced into the data-customize-partial-placement-context HTML attribute.
Props dlh, westonruter.
Fixes #41488.


git-svn-id: https://develop.svn.wordpress.org/trunk@41204 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-02 05:10:05 +00:00
Drew Jaynes
bce1b14c9a Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context.
Props sathyapulse.
Fixes #41509.


git-svn-id: https://develop.svn.wordpress.org/trunk@41200 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-01 20:43:25 +00:00
John Blackbourn
be97d71a94 Formatting: Add the $number and $decimals arguments to the number_format_i18n filter.
Props alpipego

Fixes #41505


git-svn-id: https://develop.svn.wordpress.org/trunk@41199 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-01 14:37:39 +00:00
Weston Ruter
a0748817c6 Media: Upgrade MediaElement.js from 2.22.0 to 4.2.3.
Props rafa8626, grosbouff, westonruter, azaozz, Plastikschnitzer for testing.
See #39686.


git-svn-id: https://develop.svn.wordpress.org/trunk@41198 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-01 04:42:58 +00:00
Andrea Fercia
0ac2a97aad Menus: Improve the responsive view for the Menu Name field and Save button.
Props punit5658.
Fixes #41499.


git-svn-id: https://develop.svn.wordpress.org/trunk@41197 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-31 21:21:02 +00:00
Scott Taylor
a8aaaa4bca Media: update the getID3 library to version 1.9.14 to avoid fatal errors in PHP7.
Props MyThemeShop for the initial patch.
Fixes #41496.


git-svn-id: https://develop.svn.wordpress.org/trunk@41196 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-31 19:49:31 +00:00
Drew Jaynes
83abe4dbfc Docs: Use a third-person singular verb in the DocBlock summary for WP_Importer::stop_the_insanity().
Also add a missing `@since` tag. Introduced in 3.0.0, see [14760].

See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41195 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:45:50 +00:00
Drew Jaynes
8e453de898 Docs: Add a missing description for the $wpdb global notation in the DocBlock for WP_Importer::stop_the_insanity().
Props tejas5989.
Fixes #41447.


git-svn-id: https://develop.svn.wordpress.org/trunk@41194 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:42:17 +00:00
Drew Jaynes
2bec067616 Docs: Use a third-person singular verb in the summary for _wp_customize_publish_changeset().
Also adding missing `@since` and `@access` tags. Introduced in 4.7, see [38810].

See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41193 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:33:19 +00:00
Drew Jaynes
51319d3394 Docs: Document use of the $wpdb and $wp_customize globals in _wp_customize_publish_changeset().
Props sagarladani for the initial patch.
Fixes #41479.


git-svn-id: https://develop.svn.wordpress.org/trunk@41192 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:30:34 +00:00
Boone Gorges
d7ce3e77e9 Taxonomy: Introduce pre_term_link filter.
This filter allows developers to filter the taxonomy permalink
structure before a term's permalink is generated. It parallels
the 'pre_post_link' filter for the 'post' post type.

Props nikeo.
Fixes #39601.

git-svn-id: https://develop.svn.wordpress.org/trunk@41191 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:09:31 +00:00
Boone Gorges
37a8fe8b9b Comments: Ignore the 'fields' parameter in the comment query cache.
`WP_Comment_Query` always queries runs an ID query, and so is unaffected
by the 'fields' parameter. As such, 'fields' can be ignored when building
a cache key for the results of the ID query.

Props spacedmonkey.
Fixes #41348.

git-svn-id: https://develop.svn.wordpress.org/trunk@41190 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 14:55:17 +00:00
Sergey Biryukov
56ba8d18f9 Docs: Replace HTTP links to stackoverflow.com in DocBlocks with HTTPS.
Update the Nginx "Missing (disappearing) HTTP Headers" link.

Props johnpgreen.
Fixes #41331.

git-svn-id: https://develop.svn.wordpress.org/trunk@41189 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 14:51:44 +00:00
Boone Gorges
a42a7970d9 Ensure that an assertion takes place in Tests_Comment_Query::test_comment_query_should_be_cached().
Missed during [37608]. See #36906.

Fixes #41357.

git-svn-id: https://develop.svn.wordpress.org/trunk@41188 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 14:42:56 +00:00
Sergey Biryukov
ddc6fafd06 Post Formats: In bulk_edit_posts(), set post format before the post is updated, for consistency with edit_post().
This makes sure that plugins hooked to `save_post` get the right post format.

Props Chouby, SergeyBiryukov.
Fixes #41396.

git-svn-id: https://develop.svn.wordpress.org/trunk@41187 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 14:40:42 +00:00
Drew Jaynes
b22e409f81 Docs: Remove an unrelated description about post meta from the DocBlock for add_user_meta().
Clean up syntax.

See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41186 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 14:32:00 +00:00
Sergey Biryukov
37ce2ffe85 Tests: Fully reset MockPHPMailer between tests.
Props pessoft.
Fixes #41485.

git-svn-id: https://develop.svn.wordpress.org/trunk@41185 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-29 20:52:45 +00:00
Sergey Biryukov
bf39951441 Plugins: In wp_star_rating(), use explicit type casting for $rating to avoid a "non-numeric value encountered" warning in PHP 7.1.
Clarify in the function DocBlock that `$rating` can be a float.

Props afragen.
Fixes #41484.

git-svn-id: https://develop.svn.wordpress.org/trunk@41184 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-29 20:34:26 +00:00
Pascal Birchler
5cb91857ab Permalinks: Remove unnecessary semicolon after [41182].
See #29872.


git-svn-id: https://develop.svn.wordpress.org/trunk@41183 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-28 17:54:11 +00:00
Pascal Birchler
bc2d1f044f Permalinks: Add buttons for the available structure tags to the admin UI.
Often times, it can be confusing to set a custom permalink structure. One has to double-check the documentation, make 
sure to correctly insert the structure tag, and hope not to break their site.

With this addition, the available structure tags are being displayed as a list of easily clickable buttons that can be 
used to insert tags to the custom structure input field and to remove them again.

Props kpdesign, swissspidy, joedolson, afercia.
Fixes #29872.


git-svn-id: https://develop.svn.wordpress.org/trunk@41182 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-28 17:43:00 +00:00
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