Felix Arntz
f6ebc1a80c
Role/Capability: Introduce capabilities dedicated to installing and updating language files.
...
The new meta capabilities are called `install_languages` and `update_languages`. Prior to this change, there were no proper capability checks applied. Instead only the filesystem and related constants were checked, and for actual permissions a rather vague fallback was used where a user needed to have at least one of the other updating capabilities. In addition to being generally more verbose, the new capabilities make it possible for example to allow a user to update languages, but nothing else. By default they fall back to the original way of how they were handled.
Props johnbillion, flixos90.
Fixes #39677 .
Built from https://develop.svn.wordpress.org/trunk@41268
git-svn-id: http://core.svn.wordpress.org/trunk@41108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 18:31:44 +00:00
Felix Arntz
c14e0a0527
Post Thumbnails: Pass post ID to post_thumbnail_size
filter.
...
In addition to the enhancement, tests for the filter usage including the new parameter have been added.
Props NathanAtmoz.
Fixes #39030 .
Built from https://develop.svn.wordpress.org/trunk@41267
git-svn-id: http://core.svn.wordpress.org/trunk@41107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 18:19:44 +00:00
Konstantin Obenland
7414759f92
Widgets: Add tests for retrieve_widgets()
.
...
Helps with maintaining back compat when making changes in the future.
See #39693 .
Built from https://develop.svn.wordpress.org/trunk@41266
git-svn-id: http://core.svn.wordpress.org/trunk@41106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 15:04:43 +00:00
Adam Silverstein
a806e2d3b3
Docs: Improve JavaScript documentation in autosave.js.
...
Add and improve JSDOC blocks.
Props carolinegeven.
Fixes #41203 .
Built from https://develop.svn.wordpress.org/trunk@41265
git-svn-id: http://core.svn.wordpress.org/trunk@41105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 14:24:45 +00:00
Adam Silverstein
d856eda571
Docs: Improve JavaScript documentation in color-picker.js.
...
Add and improve JSDOC blocks.
Props carolinegeven, jjcomack, jipmoors.
Fixes #41063 .
Built from https://develop.svn.wordpress.org/trunk@41264
git-svn-id: http://core.svn.wordpress.org/trunk@41104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 13:10:44 +00:00
Gary Pendergast
61d683989f
Tests: Rename ignored tests in multisite.xml
.
...
For bonus :yolo: :friday:, this repeats [41262] for `multisite.xml`, which duplicates the ignored file list from `phpunit.xml.dist`.
See #41658 .
Built from https://develop.svn.wordpress.org/trunk@41263
git-svn-id: http://core.svn.wordpress.org/trunk@41103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 11:00:45 +00:00
Gary Pendergast
190012c409
Tests: Rename ignored tests in phpunit.xml.dist
.
...
Some of the files renamed in [41261] are listed in `phpunit.xml.dist`, as they need to be ignore in PHP 5.2.
This followup commit changes `phpunit.xml.dist` to match their new names.
See #41658 .
Built from https://develop.svn.wordpress.org/trunk@41262
git-svn-id: http://core.svn.wordpress.org/trunk@41102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 10:27:43 +00:00
Gary Pendergast
01be3075b6
Tests: Rename tests with underscore in the name
...
There were a handful of files with an underscore in the name, which violated our naming scheme, and caused problems for anyone how enforced the scheme on their own systems.
This commit renames all of the files to the correct camelCase scheme.
Fixes #41658 .
Built from https://develop.svn.wordpress.org/trunk@41261
git-svn-id: http://core.svn.wordpress.org/trunk@41101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 09:58:46 +00:00
Weston Ruter
667f377cd0
Widgets: Prevent visual Text widget from decoding encoded HTML.
...
Also apply `the_editor_content` filters on widget `text` with `format_for_editor()` as is done for the post editor.
Amends [40631].
Props westonruter, azaozz.
See #35243 .
Fixes #41596 .
Built from https://develop.svn.wordpress.org/trunk@41260
git-svn-id: http://core.svn.wordpress.org/trunk@41100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-17 23:37:43 +00:00
Andrew Ozz
b1d28c5e90
TinyMCE: Add the default link
plugin without enabling it. This makes it easy for WordPress plugins to use it at places where wplink
is not suitable, for example when initializing the editor from JS.
...
Props turtlepod.
Fixes #41590 .
Built from https://develop.svn.wordpress.org/trunk@41259
git-svn-id: http://core.svn.wordpress.org/trunk@41099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-17 21:04:45 +00:00
Drew Jaynes
d5e3ea444d
Filesystem: Introduce the pre_move_uploaded_file
filter.
...
Passing a non-null value to the filter will prevent the uploaded file from being moved to the uploads directory for any of the functions leveraging `_wp_handle_upload()`, such as `wp_handle_upload()` or `wp_handle_sideload()`.
Error reporting related to the file being moved will also be skipped.
Props ryan, Mte90.
Fixes #24603 .
Built from https://develop.svn.wordpress.org/trunk@41258
git-svn-id: http://core.svn.wordpress.org/trunk@41098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-16 21:59:43 +00:00
Drew Jaynes
e80cf1d861
Canonical: Check first before attempting to include a 'path' value in the URL in strip_fragment_from_url()
.
...
Props Mte90.
Fixes #40542 .
Built from https://develop.svn.wordpress.org/trunk@41257
git-svn-id: http://core.svn.wordpress.org/trunk@41097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-16 21:11:43 +00:00
Weston Ruter
ea92bb5f10
Customize: Harden color control's logic for obtaining default value to prevent JS error when non-string default supplied.
...
Props andreagobetti, yonivh for testing.
Fixes #37174 .
Built from https://develop.svn.wordpress.org/trunk@41256
git-svn-id: http://core.svn.wordpress.org/trunk@41096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-16 19:04:47 +00:00
John Blackbourn
e06146a9b5
Options, Meta APIs: Update the multisite unit tests after [41254], [41164], and [41163].
...
This moves some more previously Multisite-only tests into the main test suite, and makes small adjustments to their assertions.
See #39118 , #16470 , #39117
Built from https://develop.svn.wordpress.org/trunk@41255
git-svn-id: http://core.svn.wordpress.org/trunk@41095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-15 09:16:43 +00:00
John Blackbourn
b52e37f9bf
Options, Meta APIs: Require a confirmation link in an email to be clicked when an admin attempts to change the site admin 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 site.
Props MatheusGimenez, johnbillion
Fixes #39118
Built from https://develop.svn.wordpress.org/trunk@41254
git-svn-id: http://core.svn.wordpress.org/trunk@41094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 20:13:43 +00:00
John Blackbourn
b51f60de6d
Users: Display the "Your email address has not been updated yet" message when a user changes their profile email address from within network admin.
...
This ensures continuity with the regular profile editing screen and the user admin profile editing screen.
Fixes #41635
Built from https://develop.svn.wordpress.org/trunk@41253
git-svn-id: http://core.svn.wordpress.org/trunk@41093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 19:42:43 +00:00
Weston Ruter
75ad3494a8
Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover.
...
Props timmydcrawford, westonruter.
See #39993 .
Fixes #41274 .
Built from https://develop.svn.wordpress.org/trunk@41252
git-svn-id: http://core.svn.wordpress.org/trunk@41092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 17:56:42 +00:00
Weston Ruter
ae47e05f74
Widgets: Suppress PHP warnings raised by DOMDocument::loadHTML()
in WP_Widget_Text::is_legacy_instance()
which could appear in Text widget forms.
...
Also explicitly use HTML5 doctype when parsing Text widget contents in legacy mode detection.
Amends [41050].
See #40951 .
Fixes #41622 .
Built from https://develop.svn.wordpress.org/trunk@41251
git-svn-id: http://core.svn.wordpress.org/trunk@41091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 05:59:42 +00:00
Peter Wilson
d8bf666313
Emoji: Update Twemoji to 2.5.0.
...
Twemoji 2.3.0 has a rendering issue in Safari, emoji can sometimes be followed by U+FEOF (which is just a flag meaning "render the preceding character as emoji).
Twemoji wasn't catching this character correctly, and Safari rendered it incorrectly.
Twemoji 2.5.0 resolves this issue.
Fixes #41584 .
Built from https://develop.svn.wordpress.org/trunk@41250
git-svn-id: http://core.svn.wordpress.org/trunk@41090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 02:04:45 +00:00
Weston Ruter
18613c0010
Widgets: Add missing open
class for expanded widgets in Customizer; utilize open
class for expansion detection in Text and Media widgets.
...
Fixes #41625 .
Built from https://develop.svn.wordpress.org/trunk@41249
git-svn-id: http://core.svn.wordpress.org/trunk@41089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 06:25:43 +00:00
Weston Ruter
5c755f652b
Customize: Prevent attachment deletions from silently failing in media modals opened for Media widgets.
...
Amends [40640].
See #32417 .
Fixes #41609 .
Built from https://develop.svn.wordpress.org/trunk@41248
git-svn-id: http://core.svn.wordpress.org/trunk@41088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 06:11:43 +00:00
Weston Ruter
e956aa4176
Customize: Prevent wide widgets from being displayed as wide when Customizer is displayed in mobile breakpoint.
...
Fixes #41624 .
Built from https://develop.svn.wordpress.org/trunk@41247
git-svn-id: http://core.svn.wordpress.org/trunk@41087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:55:43 +00:00
Weston Ruter
a5d3688157
Customize: Update selector to add max-height
/max-width
for wide widgets to account for JS-driven Text widget and Media widgets.
...
Fixes #41623 .
Built from https://develop.svn.wordpress.org/trunk@41246
git-svn-id: http://core.svn.wordpress.org/trunk@41086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:42:42 +00:00
Weston Ruter
9c3cdaf3fb
Widgets: Fix extensibility of Text widgets so that JS logic will initialize on subclassed widgets.
...
Amends [40631].
See #35243 .
Fixes #41540 .
Built from https://develop.svn.wordpress.org/trunk@41245
git-svn-id: http://core.svn.wordpress.org/trunk@41085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:25:46 +00:00
Weston Ruter
300894da61
Customize: Prevent _delete_option_fresh_site()
from hitting DB if fresh_site
flag already cleared.
...
Amends [38991].
Props dlh, westonruter.
Fixes #41039 .
Built from https://develop.svn.wordpress.org/trunk@41244
git-svn-id: http://core.svn.wordpress.org/trunk@41084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 00:57:43 +00:00
Weston Ruter
6428de97a7
Customize: Fix PHP warning raised when deleting a setting from changeset via passing null
as params in WP_Customize_Manager::save_changeset_post()
.
...
Props dlh.
Fixes #41621 .
Built from https://develop.svn.wordpress.org/trunk@41243
git-svn-id: http://core.svn.wordpress.org/trunk@41083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 21:21:48 +00:00
Felix Arntz
473e1ba73b
Multisite: Remove references to $wpdb->siteid
and use get_current_network_id()
instead.
...
Props sathyapulse, spacedmonkey.
Fixes #41507 .
Built from https://develop.svn.wordpress.org/trunk@41242
git-svn-id: http://core.svn.wordpress.org/trunk@41082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 13:11:43 +00:00
Felix Arntz
820d3973a3
Multisite: Rename internal $site_id
variables referencing networks to $network_id
.
...
This change improves code clarity by using the current naming conventions for networks.
Props lemacarl.
Fixes #41510 .
Built from https://develop.svn.wordpress.org/trunk@41241
git-svn-id: http://core.svn.wordpress.org/trunk@41081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 12:48:47 +00:00
Weston Ruter
f0ee106d86
Media: Upgrade MediaElement.js from 4.2.3 to 4.2.5.
...
Props rafa8626.
See #39686 .
Built from https://develop.svn.wordpress.org/trunk@41240
git-svn-id: http://core.svn.wordpress.org/trunk@41080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 06:20:44 +00:00
Adam Silverstein
f42a3a2440
Docs: Improve JavaScript documentation in audiovideo.manifest.js.
...
Add and improve JSDOC blocks.
Props nicollle, manuelaugustin.
Fixes #41602 .
Built from https://develop.svn.wordpress.org/trunk@41239
git-svn-id: http://core.svn.wordpress.org/trunk@41079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-11 20:37:45 +00:00
James Nylen
fce0b2dcd9
REST API: Always call rest_get_server()
instead of accessing the $wp_rest_server
global.
...
This is a consistency improvement and also a bug fix for fairly obscure cases involving modified WP load order.
Fixes #41555 .
Built from https://develop.svn.wordpress.org/trunk@41238
git-svn-id: http://core.svn.wordpress.org/trunk@41078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-10 01:38:43 +00:00
Konstantin Obenland
e183d59acb
Map nav menu locations on theme switch
...
This will send nav menu locations through three levels of mapping:
1. If both themes have only one location, that gets mapped.
2. If both themes have locations with the same slug, they get mapped.
3. Locations that (even partially) match slugs from a similar kind of menu location will get mapped.
Menu locations are mapped for Live Previews in the Customizer and during theme switches.
Props westonruter, obenland, welcher, melchoyce.
Fixes #39692 .
Built from https://develop.svn.wordpress.org/trunk@41237
git-svn-id: http://core.svn.wordpress.org/trunk@41077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-09 21:04:47 +00:00
Sergey Biryukov
5fe8d31118
Link Template: Allow the type
argument to be passed through get_the_comments_pagination()
as long as its value isn't array
.
...
See [30820] for `get_the_posts_pagination().
Props jainnidhi, poena.
Fixes #39792 .
Built from https://develop.svn.wordpress.org/trunk@41236
git-svn-id: http://core.svn.wordpress.org/trunk@41076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-09 04:07:43 +00:00
Sergey Biryukov
dd330359eb
Docs: Correct @param
type for $term_id
in get_term_children()
.
...
Props Soean, wido.
Fixes #41585 .
Built from https://develop.svn.wordpress.org/trunk@41235
git-svn-id: http://core.svn.wordpress.org/trunk@41075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-08 20:53:46 +00:00
Sergey Biryukov
187b4ad48b
Media: Pass shortcode attributes to wp_audio_shortcode_class
and wp_video_shortcode_class
filters.
...
Props sathyapulse.
Fixes #37329 .
Built from https://develop.svn.wordpress.org/trunk@41234
git-svn-id: http://core.svn.wordpress.org/trunk@41074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-05 16:42:45 +00:00
Drew Jaynes
1a123e432f
External Libraries: Update jQuery Form (unused in core) to the latest version, 4.2.1.
...
Fixes #41565 .
Built from https://develop.svn.wordpress.org/trunk@41233
git-svn-id: http://core.svn.wordpress.org/trunk@41073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-05 13:00:47 +00:00
John Blackbourn
41f71598f7
Formatting: Introduce get_the_post_type_description()
to allow post type archive descriptions to be formatted the same as author and term archives.
...
Props henry.wright
Fixes #40040
Built from https://develop.svn.wordpress.org/trunk@41232
git-svn-id: http://core.svn.wordpress.org/trunk@41072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 23:01:44 +00:00
John Blackbourn
c96b33e3a5
Plugins: Correct and improve docblocks for the various plugin_action_links
filters on the Plugins screen.
...
This also adds a changelog for the removal of the Edit links in [41160].
See #41017
Fixes #38169
Built from https://develop.svn.wordpress.org/trunk@41231
git-svn-id: http://core.svn.wordpress.org/trunk@41071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 22:15:45 +00:00
John Blackbourn
c26b735c8a
Multisite: Clarify descriptions of the wpmu_signup_blog_notification()
and wpmu_signup_user_notification()
functions.
...
See #41017
Built from https://develop.svn.wordpress.org/trunk@41230
git-svn-id: http://core.svn.wordpress.org/trunk@41070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 14:21:43 +00:00
John Blackbourn
5062d7d134
Media: Move the Tests_Media::test_video_shortcode_body()
method so it runs before other tests in the class that depend on it.
...
The following tests were never executed as they have `@depends` annotations which means they get skipped because the `test_video_shortcode_body()` test has not run by the time they run. Re-ordering the test methods fixes this.
* `test_wp_video_shortcode_with_empty_params()`
* `test_wp_video_shortcode_with_bad_attr()`
* `test_wp_video_shortcode_attributes()`
* `test_wp_video_shortcode_youtube_remove_feature()`
* `test_wp_video_shortcode_youtube_force_ssl()`
* `test_wp_video_shortcode_vimeo_force_ssl_remove_query_args()`
* `test_wp_video_shortcode_vimeo_adds_loop()`
* `test_wp_video_shortcode_vimeo_force_adds_loop_true()`
See #35367
Built from https://develop.svn.wordpress.org/trunk@41229
git-svn-id: http://core.svn.wordpress.org/trunk@41069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 14:06:43 +00:00
John Blackbourn
22779110c4
REST API: Populate some missing tests from test cases which extend the controller test case.
...
See #41463
Built from https://develop.svn.wordpress.org/trunk@41228
git-svn-id: http://core.svn.wordpress.org/trunk@41068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 13:56:46 +00:00
Andrea Fercia
a029f83fb5
Menus: Visually hide the menu item edit link text in a consistent way.
...
Fixes a visual glitch visible on Ubuntu. WordPress uses system fonts and they have
different metrics across operating systems. Uses screen-reader-text as a more
solid way to visually hide text.
Props punit5658, afercia.
Fixes #41497 .
Built from https://develop.svn.wordpress.org/trunk@41227
git-svn-id: http://core.svn.wordpress.org/trunk@41067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 22:12:43 +00:00
Felix Arntz
1d0478d4b1
REST API: Allow site administrators to edit user roles in multisite.
...
While site administrators cannot generally edit users in multisite, they have always been able to change the roles of users on their site. In the REST API however, this has not been possible so far. This changeset brings parity with how it is handled in the administration panel: A REST request to edit only a user's roles succeeds correctly, while a REST request to edit any further details of a user fails.
Props jnylen0.
Fixes #40263 .
Built from https://develop.svn.wordpress.org/trunk@41226
git-svn-id: http://core.svn.wordpress.org/trunk@41066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 21:59:44 +00:00
Felix Arntz
7e2ca92e69
Multisite: Introduce a can_add_user_to_blog
filter to prevent adding a user to a site.
...
Under certain circumstances, it can be necessary that a user should not be added to a site, beyond the restrictions that WordPress core applies. With the new `can_add_user_to_blog` filter, plugin developers can run custom checks and return an error in case of a failure, that will prevent the user from being added.
The user-facing parts and the REST API route that interact with `add_user_to_blog()` have been adjusted accordingly to provide appropriate error feedback when a user could not be added to a site. Furthermore, two existing error feedback messages in the site admin's "New User" screen have been adjusted to properly show inside an error notice instead of a success notice.
Props jmdodd.
Fixes #41101 .
Built from https://develop.svn.wordpress.org/trunk@41225
git-svn-id: http://core.svn.wordpress.org/trunk@41065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 21:41:45 +00:00
Andrea Fercia
19aab9d3d6
REST API: Make jshint happy again after [41222].
...
See #40919 .
Built from https://develop.svn.wordpress.org/trunk@41224
git-svn-id: http://core.svn.wordpress.org/trunk@41064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 20:36:42 +00:00
James Nylen
0ef4d4289f
REST API: Exclude numeric parameters from regex parsing
...
The list of endpoint parameters should only include explicitly named and requested parameters.
Props flixos90, rmccue, jnylen0.
Fixes #40704 .
Built from https://develop.svn.wordpress.org/trunk@41223
git-svn-id: http://core.svn.wordpress.org/trunk@41063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 19:55:43 +00:00
James Nylen
17c48865db
REST API: Add QUnit tests for api-request.js
...
These should have been included in [41206].
See #40919 .
Built from https://develop.svn.wordpress.org/trunk@41222
git-svn-id: http://core.svn.wordpress.org/trunk@41062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 19:47:45 +00:00
John Blackbourn
4981452aba
General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs.
...
See #38462 , #41017
Built from https://develop.svn.wordpress.org/trunk@41221
git-svn-id: http://core.svn.wordpress.org/trunk@41061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 16:13:44 +00:00
John Blackbourn
38f91be819
General: Fix a typo introduced in [41219].
...
See #38462
Built from https://develop.svn.wordpress.org/trunk@41220
git-svn-id: http://core.svn.wordpress.org/trunk@41060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:46:44 +00:00
John Blackbourn
b140e8f574
General: Fix various instances of incorrect filter docs and incorrect filter and action parameters.
...
Props keesiemeijer for identifying the issues
See #38462
Built from https://develop.svn.wordpress.org/trunk@41219
git-svn-id: http://core.svn.wordpress.org/trunk@41059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:43:43 +00:00
Drew Jaynes
8e71c49a12
Docs: Add missing documentation for the $data
parameter for WP_Http::browser_redirect_compatibility()
.
...
Props ronakganatra for the initial patch.
Fixes #41380 .
Built from https://develop.svn.wordpress.org/trunk@41218
git-svn-id: http://core.svn.wordpress.org/trunk@41058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:24:44 +00:00
John Blackbourn
375f495231
General: Add missing parameters to instances of the the_permalink
filter.
...
This ensures every instance of this filter receives the same parameters.
Props keesiemeijer for identifying the issue
See #38462
Built from https://develop.svn.wordpress.org/trunk@41217
git-svn-id: http://core.svn.wordpress.org/trunk@41057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:59:44 +00:00
John Blackbourn
4cdbe950e9
Docs: Add a missing docblock for the the_content_rss
filter.
...
See #38462 , #41017
Built from https://develop.svn.wordpress.org/trunk@41216
git-svn-id: http://core.svn.wordpress.org/trunk@41056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:46:43 +00:00
John Blackbourn
d510413811
Docs: Fix various filter documentation.
...
See #38462 , #41017
Built from https://develop.svn.wordpress.org/trunk@41215
git-svn-id: http://core.svn.wordpress.org/trunk@41055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:34:44 +00:00
John Blackbourn
763ac66754
Networks and Sites: Display an indicator for the active theme or child theme when viewing a site's themes within Network Admin.
...
Props palmiak, euthelup
Fixes #41168
Built from https://develop.svn.wordpress.org/trunk@41214
git-svn-id: http://core.svn.wordpress.org/trunk@41054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 13:49:43 +00:00
John Blackbourn
dee0e3a67b
Users: Switch to using array style filters for the newly introduced filters in wp_password_change_notification()
and wp_new_user_notification()
.
...
This introduces three new filters, replacing those that were introduced in [41153]:
* `wp_password_change_notification_email`
* `wp_new_user_notification_email_admin`
* `wp_new_user_notification_email`
Props pbearne
Fixes #38068
Built from https://develop.svn.wordpress.org/trunk@41213
git-svn-id: http://core.svn.wordpress.org/trunk@41053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 13:21:46 +00:00
John Blackbourn
c184d766e9
Docs: Correct and improve the documentation for the send_confirmation_on_profile_email()
function and the new_user_email_content
filter.
...
See #41017
Built from https://develop.svn.wordpress.org/trunk@41209
git-svn-id: http://core.svn.wordpress.org/trunk@41049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 20:43:44 +00:00
John Blackbourn
e0c397bdfa
Docs: Correct and improve the documentation for the update_option_new_admin_email()
function and the new_admin_email_content
filter.
...
See #41017
Built from https://develop.svn.wordpress.org/trunk@41208
git-svn-id: http://core.svn.wordpress.org/trunk@41048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 20:04:43 +00:00
James Nylen
e77ac0c6eb
Remove unnecessary semicolon
...
See #40919 .
Built from https://develop.svn.wordpress.org/trunk@41207
git-svn-id: http://core.svn.wordpress.org/trunk@41047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 17:16:44 +00:00
James Nylen
c91b130b53
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 .
Built from https://develop.svn.wordpress.org/trunk@41206
git-svn-id: http://core.svn.wordpress.org/trunk@41046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 16:45:44 +00:00
Weston Ruter
a193916f46
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 .
Built from https://develop.svn.wordpress.org/trunk@41205
git-svn-id: http://core.svn.wordpress.org/trunk@41045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 05:35:41 +00:00
Weston Ruter
eb658592df
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 .
Built from https://develop.svn.wordpress.org/trunk@41204
git-svn-id: http://core.svn.wordpress.org/trunk@41044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 05:11:44 +00:00
Drew Jaynes
0401cee8b3
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 .
Built from https://develop.svn.wordpress.org/trunk@41200
git-svn-id: http://core.svn.wordpress.org/trunk@41040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 20:44:43 +00:00
John Blackbourn
ed60c36fb8
Formatting: Add the $number
and $decimals
arguments to the number_format_i18n
filter.
...
Props alpipego
Fixes #41505
Built from https://develop.svn.wordpress.org/trunk@41199
git-svn-id: http://core.svn.wordpress.org/trunk@41039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 14:38:48 +00:00
Weston Ruter
7af3b92736
Media: Upgrade MediaElement.js from 2.22.0 to 4.2.3.
...
Props rafa8626, grosbouff, westonruter, azaozz, Plastikschnitzer for testing.
See #39686 .
Built from https://develop.svn.wordpress.org/trunk@41198
git-svn-id: http://core.svn.wordpress.org/trunk@41038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 04:43:51 +00:00
Andrea Fercia
59279ab349
Menus: Improve the responsive view for the Menu Name field and Save button.
...
Props punit5658.
Fixes #41499 .
Built from https://develop.svn.wordpress.org/trunk@41197
git-svn-id: http://core.svn.wordpress.org/trunk@41037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-31 21:22:44 +00:00
Scott Taylor
6bcf4d6f63
Media: update the getID3
library to version 1.9.14
to avoid fatal errors in PHP7.
...
Props MyThemeShop for the initial patch.
Fixes #41496 .
Built from https://develop.svn.wordpress.org/trunk@41196
git-svn-id: http://core.svn.wordpress.org/trunk@41036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-31 19:50:45 +00:00
Drew Jaynes
82d0a53e77
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 .
Built from https://develop.svn.wordpress.org/trunk@41195
git-svn-id: http://core.svn.wordpress.org/trunk@41035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:46:43 +00:00
Drew Jaynes
4835f7e817
Docs: Add a missing description for the $wpdb
global notation in the DocBlock for WP_Importer::stop_the_insanity()
.
...
Props tejas5989.
Fixes #41447 .
Built from https://develop.svn.wordpress.org/trunk@41194
git-svn-id: http://core.svn.wordpress.org/trunk@41034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:43:42 +00:00
Drew Jaynes
8fd5ec4e62
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 .
Built from https://develop.svn.wordpress.org/trunk@41193
git-svn-id: http://core.svn.wordpress.org/trunk@41033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:34:42 +00:00
Drew Jaynes
6ce9846893
Docs: Document use of the $wpdb
and $wp_customize
globals in _wp_customize_publish_changeset()
.
...
Props sagarladani for the initial patch.
Fixes #41479 .
Built from https://develop.svn.wordpress.org/trunk@41192
git-svn-id: http://core.svn.wordpress.org/trunk@41032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:31:42 +00:00
Boone Gorges
42ac7e7e13
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 .
Built from https://develop.svn.wordpress.org/trunk@41191
git-svn-id: http://core.svn.wordpress.org/trunk@41031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:10:44 +00:00
Boone Gorges
c657a2c060
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 .
Built from https://develop.svn.wordpress.org/trunk@41190
git-svn-id: http://core.svn.wordpress.org/trunk@41030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:56:41 +00:00
Sergey Biryukov
e412ea2e6b
Docs: Replace HTTP links to stackoverflow.com in DocBlocks with HTTPS.
...
Update the Nginx "Missing (disappearing) HTTP Headers" link.
Props johnpgreen.
Fixes #41331 .
Built from https://develop.svn.wordpress.org/trunk@41189
git-svn-id: http://core.svn.wordpress.org/trunk@41029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:52:44 +00:00
Boone Gorges
f1fb17fbb5
Ensure that an assertion takes place in Tests_Comment_Query::test_comment_query_should_be_cached()
.
...
Missed during [37608]. See #36906 .
Fixes #41357 .
Built from https://develop.svn.wordpress.org/trunk@41188
git-svn-id: http://core.svn.wordpress.org/trunk@41028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:43:42 +00:00
Sergey Biryukov
3d26fab9f6
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 .
Built from https://develop.svn.wordpress.org/trunk@41187
git-svn-id: http://core.svn.wordpress.org/trunk@41027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:41:42 +00:00
Drew Jaynes
7f5e00ba29
Docs: Remove an unrelated description about post meta from the DocBlock for add_user_meta().
...
Clean up syntax.
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@41186
git-svn-id: http://core.svn.wordpress.org/trunk@41026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:32:45 +00:00
Sergey Biryukov
a6e0b16749
Tests: Fully reset MockPHPMailer between tests.
...
Props pessoft.
Fixes #41485 .
Built from https://develop.svn.wordpress.org/trunk@41185
git-svn-id: http://core.svn.wordpress.org/trunk@41025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-29 20:53:42 +00:00
Sergey Biryukov
6a74b306da
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 .
Built from https://develop.svn.wordpress.org/trunk@41184
git-svn-id: http://core.svn.wordpress.org/trunk@41024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-29 20:35:45 +00:00
Pascal Birchler
66a3b24b72
Permalinks: Remove unnecessary semicolon after [41182].
...
See #29872 .
Built from https://develop.svn.wordpress.org/trunk@41183
git-svn-id: http://core.svn.wordpress.org/trunk@41023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 17:55:46 +00:00
Pascal Birchler
fd07b2254d
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 .
Built from https://develop.svn.wordpress.org/trunk@41182
git-svn-id: http://core.svn.wordpress.org/trunk@41022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 17:43:45 +00:00
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