Weston Ruter
f1779f24ed
Code Editors: Update the current file highlight to use notice styling.
...
Improves color contrast and readability, and reuses a core design pattern.
Props kekkakokkers, monopine, Travel_girl, afercia, melchoyce, karmatosed.
Fixes #31604 .
Built from https://develop.svn.wordpress.org/trunk@41595
git-svn-id: http://core.svn.wordpress.org/trunk@41428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 21:46:47 +00:00
Konstantin Obenland
eea0e5f6f5
Widgets: Merge orphaned widgets on theme switch
...
Merges orphaned widgets into the inactive sidebar when switching themes.
Props bpayton.
See #39693 .
Built from https://develop.svn.wordpress.org/trunk@41594
git-svn-id: http://core.svn.wordpress.org/trunk@41427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 16:19:46 +00:00
Sergey Biryukov
9597082ec9
Twenty Seventeen: Add Docker Hub icon to supported social links.
...
Props xkon.
Fixes #41529 .
Built from https://develop.svn.wordpress.org/trunk@41593
git-svn-id: http://core.svn.wordpress.org/trunk@41426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 13:49:43 +00:00
Sergey Biryukov
01efcd51a6
Twenty Seventeen: Add Periscope icon to supported social links.
...
Props xkon.
Fixes #40959 .
Built from https://develop.svn.wordpress.org/trunk@41592
git-svn-id: http://core.svn.wordpress.org/trunk@41425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 13:14:45 +00:00
Sergey Biryukov
486ab09a0e
I18N: Add translator comments for placeholders in `WP_REST_Controller` strings.
...
Props ramiy.
Fixes #41667 .
Built from https://develop.svn.wordpress.org/trunk@41591
git-svn-id: http://core.svn.wordpress.org/trunk@41424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 10:27:43 +00:00
Weston Ruter
bb97df7b5f
Widgets: Introduce Gallery widget for displaying image galleries.
...
* Galleries are managed in the widget in the same way they are managed in the post editor, both using the media manager.
* Gallery widget is merged from the Core Media Widgets v0.2.0 feature plugin and it extends `WP_Widget_Media` in the same way as is done for image, audio, and video widgets.
* Model syncing logic is updated to support booleans and arrays (of integers).
* Placeholder areas in media widgets are now clickable shortcuts for selecting media.
* Image widget placeholder is updated to match gallery widget where clicking preview is shortcut for editing media.
Props westonruter, joemcgill, timmydcrawford, m1tk00, obenland, melchoyce.
See #32417 .
Fixes #41914 .
Built from https://develop.svn.wordpress.org/trunk@41590
git-svn-id: http://core.svn.wordpress.org/trunk@41423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-25 06:28:45 +00:00
Sergey Biryukov
4865841343
Posts, Post Types: Pass the `order` parameter to `get_{$adjacent}_post_sort` filter.
...
Props manchumahara.
Fixes #41924 .
Built from https://develop.svn.wordpress.org/trunk@41589
git-svn-id: http://core.svn.wordpress.org/trunk@41422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 23:01:44 +00:00
Sergey Biryukov
4a42f4e835
I18N: Replace code fragments in translatable strings for `rest_trash_not_supported` errors with a placeholder.
...
Props ramiy.
Fixes #41643 .
Built from https://develop.svn.wordpress.org/trunk@41588
git-svn-id: http://core.svn.wordpress.org/trunk@41421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 22:29:46 +00:00
Sergey Biryukov
982ba72da9
I18N: Replace method name in a translatable string in `WP_REST_Controller::register_routes()` with a placeholder.
...
Props ramiy.
Fixes #41667 .
Built from https://develop.svn.wordpress.org/trunk@41587
git-svn-id: http://core.svn.wordpress.org/trunk@41420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 22:04:46 +00:00
Andrea Fercia
d1948f623a
Accessibility: CodeMirror editing areas minor improvements.
...
- properly labels all the code editor areas (Theme/Plugin, Custom HTML widget, Additional CSS), whether CodeMirror is enabled or disabled
- adds `role="textbox"` and `aria-multiline="true"` to the CodeMirror editing area to allow assistive technologies properly identify it as a textarea
- standardizes the "keyboard trap" help text across the admin and keeps it as a list for better readability
- use the Help text elements as target for `aria-describedby`, to make screen readers read out the help text when focusing the editors
- fixes the `aria-expanded` attribute usage in the Customizer "Additional CSS" help toggle
- moves focus to the CodeMirror editing area when clicking on the associated label
- in the Plugin editor screen: changes a `<big>` element to `<h2>` for better semantics and consistency with the Theme editor screen
- also, removes a few textdomain leftovers, see `better-code-editing` and `default`
Props westonruter, melchoyce, afercia.
Fixes #41872 .
Built from https://develop.svn.wordpress.org/trunk@41586
git-svn-id: http://core.svn.wordpress.org/trunk@41419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 16:00:46 +00:00
Sergey Biryukov
0170c40e24
Plugins: Restore "Clear List" button functionality for recently active plugins.
...
Props obenland.
Fixes #41080 .
Built from https://develop.svn.wordpress.org/trunk@41585
git-svn-id: http://core.svn.wordpress.org/trunk@41418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 15:16:46 +00:00
Andrew Ozz
a5f8097899
Retire Press This and extract it to a plugin. First run.
...
Props kraftbj, azaozz.
See #41689 .
Built from https://develop.svn.wordpress.org/trunk@41584
git-svn-id: http://core.svn.wordpress.org/trunk@41417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 14:22:54 +00:00
Sergey Biryukov
400bc41731
I18N: Allow for post custom field name in `the_meta()` to be translated, e.g. to insert a non-breaking space before the colon.
...
Props audrasjb, johnbillion.
Fixes #41653 .
Built from https://develop.svn.wordpress.org/trunk@41583
git-svn-id: http://core.svn.wordpress.org/trunk@41416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-24 11:28:46 +00:00
Weston Ruter
58761c1ff2
Customize: Remove unnecessary call to `refresh()` a CodeMirror instance upon `focus` in Code Editor control.
...
This also fixes an issue with the cursor not being set in the expected location with an `inputStyle=contenteditable`.
Props afercia.
See #41897 .
Fixes #41900 .
Built from https://develop.svn.wordpress.org/trunk@41582
git-svn-id: http://core.svn.wordpress.org/trunk@41415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 18:46:49 +00:00
Sergey Biryukov
d379f839cf
Posts, Post Types: Pass `$post` parameter to `post_submitbox_start`, `attachment_submitbox_misc_actions`, `media_submitbox_misc_sections`, `audio_submitbox_misc_sections` filters.
...
Props sebastian.pisula, SergeyBiryukov.
Fixes #36206 .
Built from https://develop.svn.wordpress.org/trunk@41581
git-svn-id: http://core.svn.wordpress.org/trunk@41414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 17:07:46 +00:00
Sergey Biryukov
29fa55f71d
Twenty Sixteen: After [41343], add missing space to `if` condition in `twentysixteen_content_image_sizes_attr()`.
...
Fixes #38468 .
Built from https://develop.svn.wordpress.org/trunk@41580
git-svn-id: http://core.svn.wordpress.org/trunk@41413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 12:25:45 +00:00
Sergey Biryukov
fa5abb2474
I18N: Remove HTML tags from translatable strings in `wp-activate.php`.
...
Props ramiy.
Fixes #41645 .
Built from https://develop.svn.wordpress.org/trunk@41579
git-svn-id: http://core.svn.wordpress.org/trunk@41412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 12:21:47 +00:00
Sergey Biryukov
649eb34d2a
Login and Registration: Replace home URL in password reset email with the site name to avoid confusing the user with multiple links.
...
Props Presskopp, code-monkey.
Fixes #38328 .
Built from https://develop.svn.wordpress.org/trunk@41578
git-svn-id: http://core.svn.wordpress.org/trunk@41411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:44:46 +00:00
Sergey Biryukov
b844c63db0
Customize: Tweak "New Custom HTML Widget" pointer text to be a bit less informal and more inclusive.
...
Props birgire, mrasharirfan, danieltj.
Fixes #41798 .
Built from https://develop.svn.wordpress.org/trunk@41577
git-svn-id: http://core.svn.wordpress.org/trunk@41410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:26:46 +00:00
Sergey Biryukov
c28cc57f3b
Quick/Bulk Edit: Remove duplicate `inline-edit-{$screen->post_type}` CSS class from Quick Edit table rows.
...
Props ibachal.
Fixes #41906 .
Built from https://develop.svn.wordpress.org/trunk@41576
git-svn-id: http://core.svn.wordpress.org/trunk@41409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:02:46 +00:00
Sergey Biryukov
77f011704e
XML-RPC: Update the string in `test_parent_for_nonhierarchical()` to match the string added in [41574].
...
Props netweb.
Fixes #41637 .
Built from https://develop.svn.wordpress.org/trunk@41575
git-svn-id: http://core.svn.wordpress.org/trunk@41408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 08:20:49 +00:00
Sergey Biryukov
b8edb91f43
I18N: Merge two similar "Cannot set parent term" error strings.
...
Props ramiy.
Fixes #41637 .
Built from https://develop.svn.wordpress.org/trunk@41574
git-svn-id: http://core.svn.wordpress.org/trunk@41407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 22:08:46 +00:00
Sergey Biryukov
6fa2cea232
Docs: Add `@access private` entries for `_get_component_from_parsed_url_array()` and `_wp_translate_php_url_constant_to_key()`.
...
Props ajayghaghretiya1.
Fixes #41282 .
Built from https://develop.svn.wordpress.org/trunk@41573
git-svn-id: http://core.svn.wordpress.org/trunk@41406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 22:00:47 +00:00
Sergey Biryukov
bcb126292c
I18N: Merge two similar error strings.
...
Props ramiy.
Fixes #39172 .
Built from https://develop.svn.wordpress.org/trunk@41572
git-svn-id: http://core.svn.wordpress.org/trunk@41405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 20:55:45 +00:00
Andrew Ozz
58b769a057
Plupload: also delete `plupload.full.min.js` when updating.
...
See #41755 .
Built from https://develop.svn.wordpress.org/trunk@41571
git-svn-id: http://core.svn.wordpress.org/trunk@41404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 20:48:46 +00:00
Andrew Ozz
41ad3f294f
Plupload: minify and load `plupload.js` and `moxie.js` separately to make them easier to debug.
...
Props gmariani405, azaozz.
Fixes #41755 .
Built from https://develop.svn.wordpress.org/trunk@41570
git-svn-id: http://core.svn.wordpress.org/trunk@41403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 20:10:48 +00:00
Sergey Biryukov
b07cffe99a
Media: Improve the preview of transparent images in Attachment Details modal by using CSS3 to show a checkered background.
...
Props powerzilly, stevepuddick.
Fixes #41948 .
Built from https://develop.svn.wordpress.org/trunk@41569
git-svn-id: http://core.svn.wordpress.org/trunk@41402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 19:57:47 +00:00
Sergey Biryukov
7c4cdbff27
Admin CSS: Autoprefixer for [41329].
...
See #39662 .
Built from https://develop.svn.wordpress.org/trunk@41568
git-svn-id: http://core.svn.wordpress.org/trunk@41401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 19:51:47 +00:00
Sergey Biryukov
ba67e5f09c
Docs: Correct filename references in duplicate hook comments for `post_password_required` filter.
...
Props coffee2code.
Fixes #41959 .
Built from https://develop.svn.wordpress.org/trunk@41567
git-svn-id: http://core.svn.wordpress.org/trunk@41400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 18:34:45 +00:00
Sergey Biryukov
c2dcfa5278
Help/About: Tweak Help tabs on Users screen for consistency with Posts screen.
...
Props bnap00, Arena94.
Fixes #40553 .
Built from https://develop.svn.wordpress.org/trunk@41566
git-svn-id: http://core.svn.wordpress.org/trunk@41399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 18:31:48 +00:00
Sergey Biryukov
f69b784ec7
Embeds: Introduce `embed_thumbnail_id` filter for thumbnail image ID in the embed template.
...
Props ketuchetan, Dency, jontyravi, Ov3rfly.
Fixes #39759 .
Built from https://develop.svn.wordpress.org/trunk@41565
git-svn-id: http://core.svn.wordpress.org/trunk@41398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 17:35:48 +00:00
Sergey Biryukov
5046ef73c3
Docs: Correct description for `insert_user_meta` filter.
...
Props milana_cap, desrosj.
Fixes #41951 .
Built from https://develop.svn.wordpress.org/trunk@41564
git-svn-id: http://core.svn.wordpress.org/trunk@41397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 13:14:45 +00:00
Sergey Biryukov
4db08514ea
Taxonomy: Convert tag cloud in Tags meta box to a list (`<ul>`) for better semantics and accessibility.
...
An unordered list allows screen reader users to know in advance how many tags are within the list.
Props audrasjb, afercia.
Fixes #40187 .
Built from https://develop.svn.wordpress.org/trunk@41563
git-svn-id: http://core.svn.wordpress.org/trunk@41396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 11:28:44 +00:00
Sergey Biryukov
fff6cc8fc8
Docs: Change `$args` to `$r` in the DocBlock for `http_api_debug` filter to match the variable name.
...
Props bor0, ronakganatra.
Fixes #41379 .
Built from https://develop.svn.wordpress.org/trunk@41562
git-svn-id: http://core.svn.wordpress.org/trunk@41395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 09:33:47 +00:00
Weston Ruter
bf1eb1b505
Plugin Editor: Use `include_once` instead of `include` in `plugin_sandbox_scrape()` to fix unit tests broken with [41560].
...
See #39766 .
Built from https://develop.svn.wordpress.org/trunk@41561
git-svn-id: http://core.svn.wordpress.org/trunk@41394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 02:01:45 +00:00
Weston Ruter
aff467e1cb
Plugin Editor: Improve reliability of detecting PHP fatal errors when editing an active plugin.
...
* Invalidate PHP opcache after file is updated to ensure `include` will ''include'' the written changes.
* Define `WP_ADMIN` when activating plugin in sandbox so plugin code targeting admin will be loaded.
* Do actions that get triggered when loading the admin to ensure plugin code runs that could cause errors on plugin editor screen (and lock out access).
* Fix ability to re-activate a plugin after editing a PHP file other than the main plugin file, and ensure PHP fatal error will be displayed in such cases.
* Consolidate duplicated code into `plugin_sandbox_scrape()` and re-use in `activate_plugin()`.
* Show an error notice instead of a success notice when a file is updated but a plugin was deactivated due to a fatal error.
* Update style of warning when editing an active plugin to be styled as an actual warning notice.
See #12423 , #21622 .
Fixes #39766 .
Built from https://develop.svn.wordpress.org/trunk@41560
git-svn-id: http://core.svn.wordpress.org/trunk@41393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 01:36:48 +00:00
Adam Silverstein
415e9379f9
Revisions: correct a timezone display issue.
...
When preparing the data for the revisions screen, add ' +0000' to the gmt date string before passing it thru `strtotime`.
Props biranit, nacin, buley.
Fixes #25365 .
Built from https://develop.svn.wordpress.org/trunk@41559
git-svn-id: http://core.svn.wordpress.org/trunk@41392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 23:33:44 +00:00
Weston Ruter
f0b5c39bde
Customize: Introduce extensible code editor Customizer control for CodeMirror.
...
* Adds `WP_Customize_Code_Editor_Control` and `wp.customize.CodeEditorControl()`.
* Control respects user preference for syntax highlighting, showing a textarea when user opts out.
* Code editor control takes the ad hoc code for Additional CSS and makes it reusable and extensible, for Additional CSS in core and plugins to use (such as Jetpack).
* Replace `settings` arg in `wp_enqueue_code_editor()` with separate args for `codemirror`, `csslint`, `jshint`, and `htmlhint`.
* Prefix `codemirror` script and style handles with `wp-` to prevent collisions, as also the object is exported as `wp.CodeMirror` in JS.
* Reduce indent size in Customizer code editor instances and Custom HTML widget to use tab size of 2 instead of 4 to save on space.
See #12423 , #38707 , #35395 .
Fixes #41897 .
Built from https://develop.svn.wordpress.org/trunk@41558
git-svn-id: http://core.svn.wordpress.org/trunk@41391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 23:04:45 +00:00
Adam Silverstein
43eb51d4a6
Customizer: retain aspect ration when cropping media w/ shift+click/drag.
...
Enforce a 1:1 ratio when holding the shift key and dragging in the image cropping tool in the customizer context.
Props melchoyce, mikeschroder.
Fixes #40211 .
Built from https://develop.svn.wordpress.org/trunk@41557
git-svn-id: http://core.svn.wordpress.org/trunk@41390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 22:45:44 +00:00
Adam Silverstein
220d5aec74
Login: Password reset - add hide icon & confirm weak password checkbox.
...
Extends the password features added in 4.3 to the password reset flow.
Props johnbillion, manolis09, umesh.nevase, Nikschavan.
Built from https://develop.svn.wordpress.org/trunk@41556
git-svn-id: http://core.svn.wordpress.org/trunk@41389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 21:29:48 +00:00
Konstantin Obenland
27536e99c5
Widgets: Improved sidebar mapping on theme switch
...
Builds on efforts brought forward in #17979 .
This will send sidebars through three levels of mapping:
1. If both themes have only one sidebar, that gets mapped.
2. If both themes have sidebars with the same slug, they get mapped.
3. Sidebars that (even partially) match slugs from a similar kind of sidebar will get mapped.
Finally, if the theme has previously been active and we have a record of its
sidebar configuration then, any unmapped sidebar will be restored to its
previous state.
Props westonruter, obenland, alexvorn2, timmydcrawford.
See #39693 .
Built from https://develop.svn.wordpress.org/trunk@41555
git-svn-id: http://core.svn.wordpress.org/trunk@41388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 18:46:46 +00:00
Andrew Ozz
76296ef657
Remove SWFUpload,
...
- Refactor swfupload.js to output a simple upload form, and handlers.js.
- Delete the SWFUpload plugins directory and swfupload.swf.
- Remove flash cookies "hack" from async-upload.php.
See #41752 .
Built from https://develop.svn.wordpress.org/trunk@41554
git-svn-id: http://core.svn.wordpress.org/trunk@41387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 16:35:48 +00:00
Adam Silverstein
639d215300
REST API JS Client: Improve nonce handling, refresh stale nonce on sync.
...
Keep the nonce used for cookie based authentication fresh by pulling in and using any new nonce supplied in the response headers.
* Enable passing nonce to init so each api/endpoint can use a unique nonce.
* Store nonce for endpoint on endpointModel.
* New model helper `nonce()` retrieves a model's routeModel nonce.
* When a response header contains a nonce that doesn't match the stored nonce, replace it.
Fixes #40422 .
Built from https://develop.svn.wordpress.org/trunk@41553
git-svn-id: http://core.svn.wordpress.org/trunk@41386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 12:58:45 +00:00
John Blackbourn
9aeedde6ae
Multisite: Correct the docs for `maybe_add_existing_user_to_blog()`.
...
See #41017
Built from https://develop.svn.wordpress.org/trunk@41552
git-svn-id: http://core.svn.wordpress.org/trunk@41385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 12:28:44 +00:00
Sergey Biryukov
da3e29eeba
Docs: Use correct order of arguments in the DocBlock for `WP_Hook::has_filter()`.
...
Props munyagu.
Fixes #41941 .
Built from https://develop.svn.wordpress.org/trunk@41551
git-svn-id: http://core.svn.wordpress.org/trunk@41384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 10:00:48 +00:00
Weston Ruter
800ad7bd04
Customize: Let media control button labels better automatically reflect the specified MIME type.
...
Props Christian1012, celloexpressions, westonruter.
Fixes #38796 .
Built from https://develop.svn.wordpress.org/trunk@41550
git-svn-id: http://core.svn.wordpress.org/trunk@41383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-20 21:24:46 +00:00
Weston Ruter
379e0371dd
Widgets: Omit attributes from an Image widget's link when they are empty.
...
Props subrataemfluence, Nenad Obradovic, westonruter.
See #39993 .
Fixes #41919 .
Built from https://develop.svn.wordpress.org/trunk@41549
git-svn-id: http://core.svn.wordpress.org/trunk@41382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-20 19:45:46 +00:00
Sergey Biryukov
6918752529
Twenty Seventeen: Document the type of `$item` argument in `twentyseventeen_dropdown_icon_to_menu_link()` more accurately.
...
Props ndoublehwp.
Fixes #41923 .
Built from https://develop.svn.wordpress.org/trunk@41548
git-svn-id: http://core.svn.wordpress.org/trunk@41381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-20 18:15:46 +00:00
Weston Ruter
067970ca82
Widgets: Add Customizer preview support to the Category widget when navigating to a category via dropdown.
...
Switch to using a `form` that is submitted as opposed to making a direct JavaScript call to change the `window.location`. This ensures the Customizer is able to inject the customized state into the request.
Fixes #41671 .
Built from https://develop.svn.wordpress.org/trunk@41547
git-svn-id: http://core.svn.wordpress.org/trunk@41380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-20 03:16:46 +00:00
Dominik Schilling
f2589e222e
Taxonomy/Users: Use correct escaping function for URLs.
...
Built from https://develop.svn.wordpress.org/trunk@41522
git-svn-id: http://core.svn.wordpress.org/trunk@41355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 21:14:47 +00:00
Aaron Campbell
fc930d3dae
Database: Hardening to bring `wpdb::prepare()` inline with documentation.
...
`wpdb::prepare()` supports %s, %d, and %F as placeholders in the query string. Any other non-escaped % will be escaped.
Built from https://develop.svn.wordpress.org/trunk@41496
git-svn-id: http://core.svn.wordpress.org/trunk@41329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 17:56:45 +00:00
Aaron Campbell
5225e026ef
Database: Don’t trigger `_doing_it_wrong()` for null values in `wpdb::prepare()`.
...
While `wpdb::prepare()` does not support null values (see #12819 ) they still appear in the wild like in the WordPress Importer and other plugins.
Built from https://develop.svn.wordpress.org/trunk@41483
git-svn-id: http://core.svn.wordpress.org/trunk@41316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 16:06:45 +00:00
Aaron Campbell
70b2127909
Database: Hardening for `wpdb::prepare()`
...
Previously if you passed an array of values for placeholders, additional values could be passed as well. Now additional values will be ignored.
Built from https://develop.svn.wordpress.org/trunk@41470
git-svn-id: http://core.svn.wordpress.org/trunk@41303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 14:48:47 +00:00
John Blackbourn
69de73224f
Filesystem API: Ensure filenames are valid before attempting to unzip them to ensure malformed file paths don't cause issues.
...
Built from https://develop.svn.wordpress.org/trunk@41457
git-svn-id: http://core.svn.wordpress.org/trunk@41290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 14:36:47 +00:00
Aaron Campbell
1115a36cda
oEmbed: Add extra hardening around allowed HTML for improved sandboxing.
...
Built from https://develop.svn.wordpress.org/trunk@41448
git-svn-id: http://core.svn.wordpress.org/trunk@41281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 13:43:05 +00:00
John Blackbourn
e088205014
General: Add missing URL-encoding and add extra hardening to plugin and template names when they're displayed in the admin area.
...
Props kawauso, Mte90 for initial patches
Fixes #13377
Built from https://develop.svn.wordpress.org/trunk@41399
git-svn-id: http://core.svn.wordpress.org/trunk@41232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 10:11:43 +00:00
Dominik Schilling
9041e7a071
Taxonomy/Users: Provide a fallback for incorrect HTTP referrers.
...
Built from https://develop.svn.wordpress.org/trunk@41398
git-svn-id: http://core.svn.wordpress.org/trunk@41231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 09:13:44 +00:00
Dominik Schilling
12694b6b92
Customize: Ensure valid themes in the preview.
...
Built from https://develop.svn.wordpress.org/trunk@41397
git-svn-id: http://core.svn.wordpress.org/trunk@41230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:39:45 +00:00
Dominik Schilling
83853f9fd2
TinyMCE: Improve the previews for shortcodes.
...
Built from https://develop.svn.wordpress.org/trunk@41395
git-svn-id: http://core.svn.wordpress.org/trunk@41228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:19:45 +00:00
Dominik Schilling
c2ead9d046
Editor: Prevent adding `javascript:` and `data:` URLs through the inline link dialog.
...
Built from https://develop.svn.wordpress.org/trunk@41393
git-svn-id: http://core.svn.wordpress.org/trunk@41226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:01:45 +00:00
Weston Ruter
f6a26be345
Customize: Add notifications API to sections and panels.
...
* Adds a `notifications` property to instances of `wp.customize.Panel` and `wp.customize.Section`.
* Adds a `setupNotifications()` method to `Panel`, `Section`, and `Control`.
* Adds a `getNotificationsContainerElement()` method to the `Panel` and `Section` classes, like `Control` has.
* Replace hard-coded notification in header media section with a notification.
* Limit rendering notifications to panels and sections that are expanded, and to controls that have an expanded section.
See #34893 , #35210 , #38778 .
Fixes #38794 .
Built from https://develop.svn.wordpress.org/trunk@41390
git-svn-id: http://core.svn.wordpress.org/trunk@41223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 05:40:44 +00:00
Weston Ruter
d544ac92f0
Customize: Show notification error with "Your homepage displays" control when homepage and posts page are set to be the same (but not empty).
...
* Show global error notiafication when saving is blocked due to client-side setting invalidity.
* Refactor `wp.customize.Notifications#render()` to ensure a notification re-renders if its `message` or data changes but its `code` does not.
Props MatheusGimenez, sixhours, westonruter, karmatosed, aocean90, zoonini, michelleweber, melchoyce.
See #35210 .
Fixes #21492 .
Built from https://develop.svn.wordpress.org/trunk@41389
git-svn-id: http://core.svn.wordpress.org/trunk@41222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 00:46:45 +00:00
Weston Ruter
3abea17301
Customize: Add `wp_is_uuid()` validation function with optional second `$version=4` parameter to enforce v4 random UUIDs.
...
Props jonathanbardo.
Fixes #39778 .
Built from https://develop.svn.wordpress.org/trunk@41388
git-svn-id: http://core.svn.wordpress.org/trunk@41221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-18 23:04:44 +00:00
Weston Ruter
19e3d8bc41
Customize: Use `input` event instead of `keyup` or `propertychange` events when listening for changes in `wp.customize.Element` instances.
...
Ensures that a control's `Element` is updated in response to pasting into the field. Also fixes issue where inputs using "new" HTML5 types (like `url` and `number`) were not updating in the preview during keystrokes. The use of `input` was previously blocked due to needing to support IE9, but this is no longer a concern since IE<11 is no longer supported.
See #38845 , #28477 .
Fixes #35832 .
Built from https://develop.svn.wordpress.org/trunk@41387
git-svn-id: http://core.svn.wordpress.org/trunk@41220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-18 19:11:48 +00:00
Peter Wilson
10970701d7
Emoji: Invert value returned by UN test for accuracy.
...
The JavaScript testing for UN flag support was passing when it failed, and failing when it passes.
This inverts the result to take more traditional approach of returning the correct result.
Unprops Pento.
Fixes #41852 .
Built from https://develop.svn.wordpress.org/trunk@41386
git-svn-id: http://core.svn.wordpress.org/trunk@41219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-17 22:52:47 +00:00
Weston Ruter
c8eb741afd
Code Editor: Remove `scrollIntoView` of editor's cursor line upon focus to prevent jumping issues for editor scroll position.
...
See #41850 , #41879 .
Built from https://develop.svn.wordpress.org/trunk@41385
git-svn-id: http://core.svn.wordpress.org/trunk@41218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-17 03:58:44 +00:00
Weston Ruter
e5b3921ca4
Code Editor: Scroll the cursor line into view instead of the entire editor when focused.
...
See #41850 .
Fixes #41879 .
Built from https://develop.svn.wordpress.org/trunk@41384
git-svn-id: http://core.svn.wordpress.org/trunk@41217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-17 03:35:47 +00:00
Sergey Biryukov
2f701f7d0e
Media: Rename "Insert Media" window title to "Add Media" for consistency with the "Add Media" button.
...
Props danieltj.
Fixes #41704 .
Built from https://develop.svn.wordpress.org/trunk@41383
git-svn-id: http://core.svn.wordpress.org/trunk@41216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-16 11:03:45 +00:00
Sergey Biryukov
ca92da1dcc
Twenty Fifteen: Add missing comma in `ie.css`.
...
Props lalitpendhare.
Fixes #41890 .
Built from https://develop.svn.wordpress.org/trunk@41382
git-svn-id: http://core.svn.wordpress.org/trunk@41215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-16 05:12:48 +00:00
Adam Silverstein
6b3432b9a4
JSDocs: add the jsdoc folder to .gitignore and svn:ignore.
...
Props netweb.
Fixes #41682 .
Built from https://develop.svn.wordpress.org/trunk@41381
git-svn-id: http://core.svn.wordpress.org/trunk@41214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-15 20:14:47 +00:00
Felix Arntz
f2d9abd022
Multisite: Introduce `get_main_site_id()`.
...
This function can be used to easily get the main site ID of a given network via the optional `$network_id` parameter, which defaults to the current network. The existing `is_main_site()` now uses the new function internally and now accepts an optional `$network_id` parameter as well.
The main purpose of the new function at this point is to ensure that the `WP_Network::$blog_id` property is always set. Magic getters in the class have been adjusted to auto-fill the property when it is accessed and empty. Furthermore the function encapsulates logic that was previously part of `ms_load_current_site_and_network()` and has been replaced with a call to the function now.
Props spacedmonkey, jeremyfelt, johnjamesjacoby, flixos90.
Fixes #29684 .
Built from https://develop.svn.wordpress.org/trunk@41380
git-svn-id: http://core.svn.wordpress.org/trunk@41213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-15 11:15:52 +00:00
Adam Silverstein
938e93fe1f
wp.sanitize - fix namespace for calls to `stripTags`.
...
Fixes an `undefined` JavaScript error in PressThis since [41061].
Props afercia.
Fixes #41883 .
Built from https://develop.svn.wordpress.org/trunk@41379
git-svn-id: http://core.svn.wordpress.org/trunk@41212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-14 19:29:44 +00:00
Sergey Biryukov
1929ba612e
Taxonomy: Allow for adding custom list table views to taxonomy screens.
...
Props eventualo, mariovalney, riddhiehta02, llemurya.
Fixes #30829 .
Built from https://develop.svn.wordpress.org/trunk@41378
git-svn-id: http://core.svn.wordpress.org/trunk@41211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-13 15:20:44 +00:00
Boone Gorges
3f7bc21548
Taxonomy: Force a `DISTINCT` term query when result count matters.
...
Generally, duplicate terms returned by a term query are eliminated in PHP,
after the database query takes place. This technique doesn't work properly
when the query parameters specify the `number` of results, since the results
of a `SELECT ... LIMIT x...` query may be deduplicated to a count less than
`x`. In these cases, we force the original query to be `DISTINCT`.
Props elvishp2006.
Fixes #41796 .
Built from https://develop.svn.wordpress.org/trunk@41377
git-svn-id: http://core.svn.wordpress.org/trunk@41210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-13 14:48:45 +00:00
Weston Ruter
90bedf8f9d
Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion.
...
* Code editor is integrated into the Theme/Plugin Editor, Additional CSS in Customizer, and Custom HTML widget. Code editor is not yet integrated into the post editor, and it may not be until accessibility concerns are addressed.
* The CodeMirror component in the Custom HTML widget is integrated in a similar way to TinyMCE being integrated into the Text widget, adopting the same approach for integrating dynamic JavaScript-initialized fields.
* Linting is performed for JS, CSS, HTML, and JSON via JSHint, CSSLint, HTMLHint, and JSONLint respectively. Linting is not yet supported for PHP.
* When user lacks `unfiltered_html` the capability, the Custom HTML widget will report any Kses-invalid elements and attributes as errors via a custom Kses rule for HTMLHint.
* When linting errors are detected, the user will be prevented from saving the code until the errors are fixed, reducing instances of broken websites.
* The placeholder value is removed from Custom CSS in favor of a fleshed-out section description which now auto-expands when the CSS field is empty. See #39892 .
* The CodeMirror library is included as `wp.CodeMirror` to prevent conflicts with any existing `CodeMirror` global.
* An `wp.codeEditor.initialize()` API in JS is provided to convert a `textarea` into CodeMirror, with a `wp_enqueue_code_editor()` function in PHP to manage enqueueing the assets and settings needed to edit a given type of code.
* A user preference is added to manage whether or not "syntax highlighting" is enabled. The feature is opt-out, being enabled by default.
* Allowed file extensions in the theme and plugin editors have been updated to include formats which CodeMirror has modes for: `conf`, `css`, `diff`, `patch`, `html`, `htm`, `http`, `js`, `json`, `jsx`, `less`, `md`, `php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `scss`, `sass`, `sh`, `bash`, `sql`, `svg`, `xml`, `yml`, `yaml`, `txt`.
Props westonruter, georgestephanis, obenland, melchoyce, pixolin, mizejewski, michelleweber, afercia, grahamarmfield, samikeijonen, rianrietveld, iseulde.
See #38707 .
Fixes #12423 , #39892 .
Built from https://develop.svn.wordpress.org/trunk@41376
git-svn-id: http://core.svn.wordpress.org/trunk@41209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-13 06:08:47 +00:00
Adam Silverstein
f36cccde7e
Add `wp.hooks` - JavaScript actions and filters.
...
Add a JavaScript hooks library with an API that mirrors the WordPress Plugin API; provides similar functionality and API to PHP hooks.
Called via the global `wp.hooks`, eg: `wp.hooks.addAction()`, etc. Adds:
* `addAction( 'hook', 'vendor/plugin/function', callback, priority )`
* `addFilter( 'hook', 'vendor/plugin/function', callback, priority )`
* `removeAction( 'hook', 'vendor/plugin/function' )`
* `removeFilter( 'hook', 'vendor/plugin/function' )`
* `removeAllActions( 'hook' )`
* `removeAllFilters( 'hook' )`
* `doAction( 'hook', arg1, arg2, moreArgs, finalArg )`
* `applyFilters( 'hook', content, arg1, arg2, moreArgs, finalArg )`
* `doingAction( 'hook' )`
* `doingFilter( 'hook' )`
* `didAction( 'hook' )`
* `didFilter( 'hook' )`
* `hasAction( 'hook' )`
* `hasFilter( 'hook' )`
Props adamsilverstein, jnylen0, aduth, kadamwhite, youknowriad, schlessera, mikeschinkel, azaozz, vhauri, CaptainN, scribu, carldanley, chetanchauhan, mgibbs189, stephenharris, justnorris, koopersmith, gcorne, TV productions, atimmer.
Fixes #21170 .
Built from https://develop.svn.wordpress.org/trunk@41375
git-svn-id: http://core.svn.wordpress.org/trunk@41208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-12 12:54:45 +00:00
Weston Ruter
d8f445bf0f
Customize: Add global notifications area.
...
* Displays an error notification in the global area when a save attempt is rejected due to invalid settings. An error notification is also displayed when saving fails due to a network error or server error.
* Introduces `wp.customize.Notifications` subclass of `wp.customize.Values` to contain instances of `wp.customize.Notification` and manage their rendering into a container.
* Exposes the global notification area as `wp.customize.notifications` collection instance.
* Updates the `notifications` object on `Control` to use `Notifications` rather than `Values` and to re-use the rendering logic from the former. The old `Control#renderNotifications` method is deprecated.
* Allows notifications to be dismissed by instantiating them with a `dismissible` property.
* Allows `wp.customize.Notification` to be extended with custom templates and `render` functions.
* Triggers a `removed` event on `wp.customize.Values` instances _after_ a value has been removed from the collection.
Props delawski, westonruter, karmatosed, celloexpressions, Fab1en, melchoyce, Kelderic, afercia, adamsilverstein.
See #34893 , #39896 .
Fixes #35210 , #31582 , #37727 , #37269 .
Built from https://develop.svn.wordpress.org/trunk@41374
git-svn-id: http://core.svn.wordpress.org/trunk@41207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-12 07:03:46 +00:00
Jeremy Felt
560d705b00
Multisite: Update docs for `switch_to_blog()`.
...
As of [21403], autoload options are switched along with the cache key prefix.
Props stevepuddick.
Fixes #41815 .
Built from https://develop.svn.wordpress.org/trunk@41373
git-svn-id: http://core.svn.wordpress.org/trunk@41206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-12 03:34:48 +00:00
Weston Ruter
3853a250f9
Customize: Align behavior of `WP_Customize_Manager::save_changeset_post()` with `wp_insert_post()` by setting status to `future` if supplied status is `publish` but date is future.
...
Props dlh.
Fixes #41336 .
Built from https://develop.svn.wordpress.org/trunk@41372
git-svn-id: http://core.svn.wordpress.org/trunk@41205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 17:50:44 +00:00
Andrea Fercia
6fc55cad3a
Allow usage of `aria-current` in `paginate_links()`.
...
The `aria-current` attribute is a simple, effective way to help assistive
technology users orientate themselves within a list of items.
Props GrahamArmfield, palmiak.
Fixes #40833 .
Built from https://develop.svn.wordpress.org/trunk@41371
git-svn-id: http://core.svn.wordpress.org/trunk@41204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 14:29:44 +00:00
Adam Silverstein
10a51dbcfb
Docs: Add jsdoc.conf.json JSDOC configuration file.
...
Left this file off by mistake in [41351].
Fixes #41682 .
Built from https://develop.svn.wordpress.org/trunk@41370
git-svn-id: http://core.svn.wordpress.org/trunk@41203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 13:14:45 +00:00
Peter Wilson
06bd0b40f9
General: Remove error screen padding for Internet Explorer.
...
The inline styles added to the `wp_die()` handler since [18534] increase file size of the error screen enough to prevent Internet Explorer from displaying a generic error page.
Props rfair404.
Fixes #37551 .
Built from https://develop.svn.wordpress.org/trunk@41369
git-svn-id: http://core.svn.wordpress.org/trunk@41202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 05:31:42 +00:00
Weston Ruter
f54cc32a6d
Customize: Add rightward-facing back button to Themes section header to improve navigation (since the section slides in from the left).
...
Also serves to prototype for an upward-facing arrow in this location for a Publish Settings section.
Props melchoyce, westonruter.
See #39896 , #40278 , #21666 .
Built from https://develop.svn.wordpress.org/trunk@41368
git-svn-id: http://core.svn.wordpress.org/trunk@41201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 05:23:48 +00:00
John Blackbourn
88267bd891
Build/Test Tools: Convert more test skipping into hard failures.
...
See #41851
Built from https://develop.svn.wordpress.org/trunk@41367
git-svn-id: http://core.svn.wordpress.org/trunk@41200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 00:38:44 +00:00
John Blackbourn
152f5410ac
Docs: Clarify some terminology around meta capabilities, primitive capabilities, and roles.
...
See #41017
Built from https://develop.svn.wordpress.org/trunk@41366
git-svn-id: http://core.svn.wordpress.org/trunk@41199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 22:51:43 +00:00
John Blackbourn
f2a0b5267d
Login and Registration: Pass the user session token to the `set_auth_cookie` and `set_logged_in_cookie` filters.
...
This also adds some missing `@since` parameters for other uses of the token so that developers know when the token was first made available to various filters.
Fixes #41849
Built from https://develop.svn.wordpress.org/trunk@41365
git-svn-id: http://core.svn.wordpress.org/trunk@41198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 21:09:45 +00:00
Weston Ruter
203d220c6f
Customize: Re-use homepage settings help tab text from Reading Options admin screen in description for corresponding Customizer section.
...
Also remove "Static" reference in template name, missed in [41363].
See #41829 .
Built from https://develop.svn.wordpress.org/trunk@41364
git-svn-id: http://core.svn.wordpress.org/trunk@41197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 17:08:43 +00:00
Weston Ruter
a74e98d7be
Customize: Rename "Static front page" to just "Homepage".
...
Props danieltj, melchoyce.
Fixes #41828 .
Built from https://develop.svn.wordpress.org/trunk@41363
git-svn-id: http://core.svn.wordpress.org/trunk@41196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 16:20:44 +00:00
Andrea Fercia
317d36668b
Administration: Admin menu: Improve vertical spacing and alignment of menu items with counters.
...
Props pauldechov, JDTrower.
Fixes #41317 .
Built from https://develop.svn.wordpress.org/trunk@41362
git-svn-id: http://core.svn.wordpress.org/trunk@41195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 13:40:46 +00:00
Weston Ruter
84d2c51153
Widgets: Add shortcode support inside Text widgets.
...
* Used now in core to facilitate displaying inserted media. See #40854 .
* The `[embed]` shortcode is not supported because there is no post context for caching oEmbed responses. This depends on #34115 .
* Add `do_shortcode()` to the `widget_text_content` filter in the same way it is added for `the_content` at priority 11, with `shortcode_unautop()` called at priority 10 after `wpautop()`.
* For Text widget in legacy mode, manually apply `do_shortcode()` (and `shortcode_unautop()` if auto-paragraph checked) if the core-added `widget_text_content` filter remains, unless a plugin added `do_shortcode()` to `widget_text` to prevent applying shortcodes twice.
* Ensure that global `$post` is `null` while filters apply in the Text widget so shortcode handlers won't run with unexpected contexts.
Props westonruter, nacin, aaroncampbell.
See #40854 , #34115 .
Fixes #10457 .
Built from https://develop.svn.wordpress.org/trunk@41361
git-svn-id: http://core.svn.wordpress.org/trunk@41194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 06:33:44 +00:00
Weston Ruter
da3b644df4
Widgets: Prevent fatal error due to calling undefined `wp_json_encode()` when requesting the `load-scripts.php` endpoint.
...
Props Otto42.
Amends [41352].
Fixes #41610 .
Built from https://develop.svn.wordpress.org/trunk@41360
git-svn-id: http://core.svn.wordpress.org/trunk@41193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 20:44:44 +00:00
Andrea Fercia
d35be7a120
Administration: Admin menu: Use `aria-current` for the current active page.
...
The `aria-current` attribute is a simple, effective way to communicate to assistive
technologies which the current item within a set of items is. While the admin menu
structure isn't 100% ideal (the top-level item is repeated also as a sub-item)
adding `aria-current="page"` to the sub-items gives an important feedback to
assistive technologies users.
This change introduces `aria-current` for the first time in core. Worth noting
there are other places where it can be used to improve accessibility. These should
be addressed in separate tickets and patches.
Fixes #41589 .
Built from https://develop.svn.wordpress.org/trunk@41359
git-svn-id: http://core.svn.wordpress.org/trunk@41192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 14:50:43 +00:00
Sergey Biryukov
eeb147e349
Docs: Remove "being being" dittography from inline comments.
...
Props birgire.
Fixes #41841 .
Built from https://develop.svn.wordpress.org/trunk@41358
git-svn-id: http://core.svn.wordpress.org/trunk@41191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 14:49:44 +00:00
Sergey Biryukov
9da1dd552d
Twenty Fifteen: Remove "called called" dittography, missed in [41349].
...
Props birgire.
See #41841 , #41836 .
Built from https://develop.svn.wordpress.org/trunk@41357
git-svn-id: http://core.svn.wordpress.org/trunk@41190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 14:48:44 +00:00
Andrea Fercia
a4ae97437b
Administration: Thickbox: Fix conflicts with the Plugin details and native Thickbox modals.
...
The Plugin details modal custom implementation in the Plugins page conflicts with
other Thickbox instances added by plugins. Thickbox shows its age and has been
modified over time to suit core needs. However, WordPress should do its best to
not create conflicts with the native Thickbox styles and functionalities. Plugin
authors should be able to use `add_thickbox()` in any admin page as documented,
without having to worry about potential errors.
- fixes a JavaScript error when closing a native Thickbox modal in the Plugins page
- avoids to override the native Thickbox modal styles
- uses a CSS class to target the Plugin details modal and remove a pile of overqualified CSS selectors
Fixes #41417 .
Built from https://develop.svn.wordpress.org/trunk@41356
git-svn-id: http://core.svn.wordpress.org/trunk@41189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 14:14:43 +00:00
Sergey Biryukov
3d6c0dc45a
Docs: Remove "since since" and "one one" dittography from inline comments.
...
Fixes #41841 .
Built from https://develop.svn.wordpress.org/trunk@41355
git-svn-id: http://core.svn.wordpress.org/trunk@41188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 13:53:42 +00:00
Sergey Biryukov
deb9b82032
Docs: Remove "to to" dittography from inline comments.
...
Props birgire.
See #41841 .
Built from https://develop.svn.wordpress.org/trunk@41354
git-svn-id: http://core.svn.wordpress.org/trunk@41187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 13:49:43 +00:00
Sergey Biryukov
c70492e5d1
Docs: Remove "in in", "this this", and "containing containing" dittography from inline comments.
...
Props Presskopp.
Fixes #41841 .
Built from https://develop.svn.wordpress.org/trunk@41353
git-svn-id: http://core.svn.wordpress.org/trunk@41186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 13:19:45 +00:00
Weston Ruter
9b5d71bad0
Widgets: Add dirty state tracking for widgets on admin screen.
...
* Mark a widget as dirty when a field input triggers a `change` or `input` event; clear dirty state when widget is successfully saved.
* Disable Save button and re-label "Saved" when widget not dirty.
* Show AYS dialog when leaving widgets admin screen with unsaved changes.
* When widgets are dirty, expand all unsaved widgets at AYS check and focus on first one.
* Change "Close" link to "Done"; hide link when widget is dirty and reveal when saved.
* The "Done" link persistently appears in the Customizer even after making a change (when the widget is dirty) because changes are autosaved into the changeset.
* Prevent saving widget when form fails `checkValidity`.
* Fix frequency of triggering of `change` event on the rich Text widget's `textarea` limited now to when there are actual changes.
* Add a class of `widget-dirty` to widget containers when the widget has unsaved changes.
Props westonruter, timmydcrawford, melchoyce.
Fixes #41610 , #23120 .
Built from https://develop.svn.wordpress.org/trunk@41352
git-svn-id: http://core.svn.wordpress.org/trunk@41185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 19:11:43 +00:00
Adam Silverstein
8a23b80b56
Docs: JSDoc improvements for namespaces.
...
Improve JS parsing of our inline JSDocs by introducing `@namespace`, `@lends` and `@memberOf`. Helps set the way for showing our JavaScript documentation on developer.wordpress.org, see https://meta.trac.wordpress.org/ticket/3063 .
* Define all used namespaces using @namespace.
* Correctly specify in which namespace each class is using @memberOf.
* Define each usage of the extend function as a prototype assignment using @lends.
* Some comment blocks were moved to correct the parsing of certain definitions.
Props herregroen, atimmer, netweb, SergeyBiryukov.
Fixes #41682 .
Built from https://develop.svn.wordpress.org/trunk@41351
git-svn-id: http://core.svn.wordpress.org/trunk@41184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 18:42:49 +00:00
Sergey Biryukov
098fed18b7
Docs: Remove "the the" dittography from inline comments.
...
Props Presskopp.
Fixes #41835 .
Built from https://develop.svn.wordpress.org/trunk@41350
git-svn-id: http://core.svn.wordpress.org/trunk@41183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 18:21:42 +00:00
Sergey Biryukov
6bea951e7a
Bundled Themes: Remove "called called" and "can can" dittography.
...
Props johnpgreen.
Fixes #41836 .
Built from https://develop.svn.wordpress.org/trunk@41349
git-svn-id: http://core.svn.wordpress.org/trunk@41182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 18:13:43 +00:00
Felix Arntz
6ced176459
Multisite: Use `get_network()` in `populate_network()` to check whether a network with the given ID already exists.
...
When multisite is setup already, e.g. in a multi network environment, this change gives a performance benefit over the direct SQL query that was previously used. The SQL query remains in place for when setting up multisite initially as the network API is not available at that point.
Props spacedmonkey.
Fixes #41805 .
Built from https://develop.svn.wordpress.org/trunk@41348
git-svn-id: http://core.svn.wordpress.org/trunk@41181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 16:33:43 +00:00
John Blackbourn
2bd20bb0db
Embeds: Remove support for oEmbedded videos from Vine.
...
* Vine effectively shut down in December 2016.
* The oEmbed endpoint no longer works and returns a 404.
* Developer documentation for Vine has been removed.
Fixes #41817
Built from https://develop.svn.wordpress.org/trunk@41347
git-svn-id: http://core.svn.wordpress.org/trunk@41180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 15:01:44 +00:00
Pascal Birchler
078a63e049
Editor: In `_WP_Editors::wp_link_query`, allow filtering empty results.
...
Previously, it was not possible to hook into the `wp_link_query` filter to add custom entries when the
query returned no posts.
Props mitraval192, msebel.
Fixes #41825 .
Built from https://develop.svn.wordpress.org/trunk@41346
git-svn-id: http://core.svn.wordpress.org/trunk@41179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 14:03:44 +00:00
John Blackbourn
e061a432cc
Embeds: Add the `dnt` (Do Not Track) query parameter to all oEmbed provider URLs.
...
This means that, for those providers that support this somewhat de-facto standard, visitor tracking is disabled by default for all embeds.
Props norcross, joostdevalk
Fixes #41784
Built from https://develop.svn.wordpress.org/trunk@41345
git-svn-id: http://core.svn.wordpress.org/trunk@41178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 12:31:43 +00:00
Andrew Ozz
ffa304135e
Text widget: add the Add Media button and enable the `wpview` plugin to show embedded media previews in the editor.
...
Props westonruter, azaozz.
See #40854 .
Built from https://develop.svn.wordpress.org/trunk@41344
git-svn-id: http://core.svn.wordpress.org/trunk@41177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 10:57:43 +00:00
Sergey Biryukov
8cfe233137
Twenty Sixteen: Replace inline control structureв to improve code readability.
...
Fixes #38468 .
Built from https://develop.svn.wordpress.org/trunk@41343
git-svn-id: http://core.svn.wordpress.org/trunk@41176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 06:04:44 +00:00
Sergey Biryukov
6880400dd5
Twenty Seventeen: Correct the `@return` value for `twentyseventeen_post_thumbnail_sizes_attr()`.
...
Props truongwp.
Fixes #41830 .
Built from https://develop.svn.wordpress.org/trunk@41342
git-svn-id: http://core.svn.wordpress.org/trunk@41175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 04:27:44 +00:00
Sergey Biryukov
15c38a8068
Twenty Sixteen: Correct the `@return` value for `twentysixteen_post_thumbnail_sizes_attr()`.
...
Props truongwp.
See #41830 .
Built from https://develop.svn.wordpress.org/trunk@41341
git-svn-id: http://core.svn.wordpress.org/trunk@41174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 04:26:45 +00:00
Konstantin Obenland
a1688f0d2a
Widgets: Improve _doing_it_wrong message.
...
Adds more context to help sending developers on the path to success.
Props ramiy.
Fixes 41743.
Built from https://develop.svn.wordpress.org/trunk@41340
git-svn-id: http://core.svn.wordpress.org/trunk@41173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-06 21:32:43 +00:00
Weston Ruter
d031a9c3fe
Widgets: Use `word-wrap: break-word` for available widget descriptions.
...
Props metodiew.
Fixes #36207 .
Built from https://develop.svn.wordpress.org/trunk@41339
git-svn-id: http://core.svn.wordpress.org/trunk@41172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-06 18:28:43 +00:00
Weston Ruter
0391928790
Customize: Do not show `cursor: not-allowed` on audio/video track titles within playlists in preview.
...
Props scott.deluzio, mitraval192, westonruter.
See #31517 .
Fixes #41489 .
Built from https://develop.svn.wordpress.org/trunk@41338
git-svn-id: http://core.svn.wordpress.org/trunk@41171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-06 18:00:43 +00:00
Andrea Fercia
4c60dfa69b
Themes: Prevent the Themes search field default action after [40572].
...
Props boonebgorges.
Fixes #41803 .
Built from https://develop.svn.wordpress.org/trunk@41337
git-svn-id: http://core.svn.wordpress.org/trunk@41170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-05 17:26:45 +00:00
Dominik Schilling
401808ea96
I18N: Allow numbers in locales during installation.
...
The current regex was a bit to strict for locales like `pt_PT_ao90` which were already supported by `wp_get_installed_translations()`.
Fixes #41794 .
Built from https://develop.svn.wordpress.org/trunk@41335
git-svn-id: http://core.svn.wordpress.org/trunk@41166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 19:30:43 +00:00
Adam Silverstein
ba0970ab28
WP-API JS Client: Add helpers to get a model or collection by route.
...
Add two new helper functions, `wp.api.getModelByRoute` and `wp.api.getCollectionByRoute`. Passed a route, they return the matching model or collection, or `undefined` if none is found.
Also adds tests to verify these functions work as expected.
Props rcutmore.
Fixes #41111 .
Built from https://develop.svn.wordpress.org/trunk@41334
git-svn-id: http://core.svn.wordpress.org/trunk@41165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 16:01:43 +00:00
John Blackbourn
f66864af2e
Multisite: More specificity for the `get_sites()` documentation.
...
See #41789
Built from https://develop.svn.wordpress.org/trunk@41333
git-svn-id: http://core.svn.wordpress.org/trunk@41164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 11:17:43 +00:00
Andrew Ozz
a93298f0c7
Plupload: remove the reinstated `plupload.js` from the list of old files.
...
Props afercia.
See #41755 .
Built from https://develop.svn.wordpress.org/trunk@41332
git-svn-id: http://core.svn.wordpress.org/trunk@41163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 10:22:47 +00:00
Dominik Schilling
2526eb2d86
Multisite: Clarify return type of `get_sites()` when 'count' is passed as a query var.
...
Fixes #41789 .
Built from https://develop.svn.wordpress.org/trunk@41331
git-svn-id: http://core.svn.wordpress.org/trunk@41162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 08:16:44 +00:00
Andrea Fercia
c3cf5cb324
Docs: Update media-audiovideo.js after [41239].
...
Fixes #41602 .
Built from https://develop.svn.wordpress.org/trunk@41330
git-svn-id: http://core.svn.wordpress.org/trunk@41161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-03 16:16:43 +00:00
Andrea Fercia
b43ddef0bc
Accessibility: Improve the color picker UI accessibility, interaction, and generated markup.
...
- Refactors the UI controls around the Iris color picker to output valid and semantic markup
- Simplifies the way elements visibility gets toggled
- Properly associates the visually hidden label with the color input field
- Makes the toggle button a real button
- Adds `aria-expanded` to the toggle button
- Keeps focus on the toggle button instead of moving it to the color input field
- Adds `aria-label` attributes to give better context to some controls
- Removes a redundant title attribute
- Keeps the toggle button text to "Select Color" instead of changing it to "Current Color" when a color is selected
- Slightly improves the responsive view
- CSS clean-up
Fixes #39662 .
Built from https://develop.svn.wordpress.org/trunk@41329
git-svn-id: http://core.svn.wordpress.org/trunk@41160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-03 16:02:46 +00:00
Andrew Ozz
e38ec0f485
Plupload:
...
- Update to 2.1.9.
- Include the non-minified plupload.js and moxie.js.
- Remove support for Flash and Silverlight, the available runtime options are `html5` and `html4`.
- Delete plupload.flash.swf and plupload.silverlight.xap.
Fixes #41755 .
Built from https://develop.svn.wordpress.org/trunk@41328
git-svn-id: http://core.svn.wordpress.org/trunk@41159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-01 12:28:46 +00:00
Konstantin Obenland
564e13cf30
Widgets: Add nudge for registered widgets
...
Informs developers that widgets need to be registered before they can be
displayed through `the_widget()`. Previously it would fail with an ambiguous
undefined index notice.
Props SeBsZ, mrasharirfan.
Fixes #41743 .
Built from https://develop.svn.wordpress.org/trunk@41327
git-svn-id: http://core.svn.wordpress.org/trunk@41158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-01 08:50:47 +00:00
Dominik Schilling
fff02086dd
Taxonomy: Remove unused global imports for `$wpdb` in `get_terms()` and `wp_get_object_terms()`.
...
Also remove incorrect `@global` tags for `$wpdb` and `$wp_filter`.
Fixes #41768 .
Built from https://develop.svn.wordpress.org/trunk@41326
git-svn-id: http://core.svn.wordpress.org/trunk@41157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-31 12:26:42 +00:00
Sergey Biryukov
320c289ec0
Media: Set correct value for "Link Rel" field in Image Details modal.
...
Props hazemnoor.
Fixes #41764 .
Built from https://develop.svn.wordpress.org/trunk@41325
git-svn-id: http://core.svn.wordpress.org/trunk@41156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-31 11:17:45 +00:00
Felix Arntz
70daaadc6a
Multisite: Remove an unnecessary if clause wrapping the `added_existing_user` filter.
...
This was accidentally introduced in [41125]. Since the `added_existing_user` filter has historically accepted either `true` or a `WP_Error` object, the clause is not necessary here. The doc block has been adjusted to account for the new possible `WP_Error` condition.
Fixes #41101 .
Built from https://develop.svn.wordpress.org/trunk@41324
git-svn-id: http://core.svn.wordpress.org/trunk@41155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-30 19:53:45 +00:00
Joe McGill
682ec35fbc
Media: Ensure 'media_handle_upload()' returns 'WP_Error' on failure.
...
This fixes an issue where failures when inserting the attachment post via
`wp_insert_attachment()` would result in a return value of `0` instead of a
`WP_Error` object, as documented. This is addressed by passing `true` as the
fourth param (added in WP 4.7.0) when calling `wp_insert_attachment()`.
Props mrasharirfan, flixos90.
Fixes #41726 .
Built from https://develop.svn.wordpress.org/trunk@41323
git-svn-id: http://core.svn.wordpress.org/trunk@41154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-30 15:04:48 +00:00
John Blackbourn
d611184f4f
Docs: Clarify descriptions and parameter types for various user capability checking functions.
...
See #41017
Built from https://develop.svn.wordpress.org/trunk@41322
git-svn-id: http://core.svn.wordpress.org/trunk@41153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-29 16:43:47 +00:00
Weston Ruter
1afaf8c605
Customize: Prevent potential cache corruption when finding a secondary changeset post by UUID.
...
Props dlh.
Fixes #41738 .
Built from https://develop.svn.wordpress.org/trunk@41321
git-svn-id: http://core.svn.wordpress.org/trunk@41152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-29 04:10:46 +00:00
Weston Ruter
a979e17e2b
Media: Upgrade MediaElement.js to `4.2.5-74e01a40` fixing missing `mejs.MediaElement` reference.
...
ALso fixes:
* Accessibility for volume control
* Progress bar tooltip positioning and dimensions correctly set for media with long duration
* Better codec checking
* Minor CSS fix to avoid flickering effect on volume control
Props rafa8626.
See #39686 .
Fixes #41640 .
Built from https://develop.svn.wordpress.org/trunk@41320
git-svn-id: http://core.svn.wordpress.org/trunk@41151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-28 19:29:47 +00:00
Andrew Ozz
c56801657a
TinyMCE: fix cases where an additional empty link is created while updating an image with a link.
...
Props spocke.
Fixes #41259 .
Built from https://develop.svn.wordpress.org/trunk@41319
git-svn-id: http://core.svn.wordpress.org/trunk@41150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-26 16:34:46 +00:00
Sergey Biryukov
98995d46d1
Formatting: In `sanitize_title_with_dashes()`, convert forward slash to hyphen on save.
...
Props corvidism, jtsternberg, GhostToast, alxndr.
Fixes #10792 .
Built from https://develop.svn.wordpress.org/trunk@41318
git-svn-id: http://core.svn.wordpress.org/trunk@41149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 23:28:45 +00:00
Sergey Biryukov
00c88acb5e
Docs: Correct description for `view_mode_post_types` filter added in [35357].
...
Props birgire.
Fixes #41730 .
Built from https://develop.svn.wordpress.org/trunk@41317
git-svn-id: http://core.svn.wordpress.org/trunk@41148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 19:27:45 +00:00
iandunn
476377f64d
Dashboard: Discontinue nonessential logging of Events API requests.
...
These log entries are only useful when troubleshooting unexpected results from the API, which is not common. The vast majority of users are better served by not having their logs cluttered with noise.
For the rare situations where troubleshooting is necessary, it can be achieved by a plugin (see #41217 for an example).
Props Howdy_McGee, dd32.
Fixes #41217 .
Built from https://develop.svn.wordpress.org/trunk@41316
git-svn-id: http://core.svn.wordpress.org/trunk@41147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 18:12:44 +00:00
Joe McGill
bbb8d48086
Media: Prime post caches in 'wp_make_content_images_responsive()'.
...
In [38296] we replaced `get_post_meta()` with `wp_get_attachment_metadata()`
so that attachment metadata could be consistently filtered. However, this
results in extra post queries which were previously avoided.
This uses `_prime_post_caches()` instead of `update_meta_cache()` to improve
post caching before looping through all images to retrieve attachment metadata.
Props dlh.
Fixes #40490 .
Built from https://develop.svn.wordpress.org/trunk@41315
git-svn-id: http://core.svn.wordpress.org/trunk@41146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 16:16:46 +00:00
Scott Taylor
10177e7fbb
Docs: improve JS docs for `comment-reply.js`
...
Props andizer, ireneyoast.
Fixes #41548 .
Built from https://develop.svn.wordpress.org/trunk@41314
git-svn-id: http://core.svn.wordpress.org/trunk@41145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:58:44 +00:00
Scott Taylor
4557e0d292
Docs: improve JS docs for `bookmarklet.js`
...
Props andizer, ireneyoast.
Fixes #41547 .
Built from https://develop.svn.wordpress.org/trunk@41313
git-svn-id: http://core.svn.wordpress.org/trunk@41144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:55:45 +00:00
Sergey Biryukov
33f0b56134
Widgets: Remove a duplicate `require_once()` for `class-wp-widget-meta.php` added in [40640].
...
Props thingsym.
Fixes #41723 .
Built from https://develop.svn.wordpress.org/trunk@41312
git-svn-id: http://core.svn.wordpress.org/trunk@41143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:53:27 +00:00
Scott Taylor
55a180f063
Docs: improve JS docs for `tags.js`
...
Props atimmer, jipmoors.
Fixes #41069 .
Built from https://develop.svn.wordpress.org/trunk@41311
git-svn-id: http://core.svn.wordpress.org/trunk@41142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:52:44 +00:00
Scott Taylor
412d5e60be
Docs: improve JS docs for `editor-expand.js`
...
Props IreneYoast, terwdan.
Fixes #41068 .
Built from https://develop.svn.wordpress.org/trunk@41310
git-svn-id: http://core.svn.wordpress.org/trunk@41141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:48:45 +00:00
Mel Choyce
f10a6f8863
Widgets: Add grey background behind image widgets.
...
When an image in the image widget isn't full-width, it looks like it's floating. This adds a grey background behind images to help ground them in the widget.
Props mrasharirfan.
Fixes #41630 .
Built from https://develop.svn.wordpress.org/trunk@41309
git-svn-id: http://core.svn.wordpress.org/trunk@41140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-23 17:15:42 +00:00
Drew Jaynes
fabca552aa
Docs: Clarify the expected usage of the `$args` parameter as an array in the DocBlock for `apply_filters_deprecated()`, including an example.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@41308
git-svn-id: http://core.svn.wordpress.org/trunk@41139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-23 15:52:46 +00:00
John Blackbourn
9db227ac07
Build/Test tools: Use the latest in the 4.x and 6.x branches of PHPUnit when running tests on Travis.
...
Props netweb, ayeshrajans
Fixes #41472
Built from https://develop.svn.wordpress.org/trunk@41294
git-svn-id: http://core.svn.wordpress.org/trunk@41134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 16:09:43 +00:00
John Blackbourn
ed21c69ca9
Build/Test tools: Remove usage of `DOING_AJAX` from the test suite, so all tests that expect either an Ajax request or a
...
non-Ajax request can operate without being skipped.
Props Mte90
Fixes #41561
Built from https://develop.svn.wordpress.org/trunk@41293
git-svn-id: http://core.svn.wordpress.org/trunk@41133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 15:08:43 +00:00
John Blackbourn
76e864854f
Widgets: Correctly strip slashes from widget and sidebar names to allow namespaced widgets to function correctly.
...
Fixes #27770
Props jdgrimes
Built from https://develop.svn.wordpress.org/trunk@41292
git-svn-id: http://core.svn.wordpress.org/trunk@41132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 14:52:44 +00:00
John Blackbourn
2cde37040d
Login and Registration: Introduce a `login_link_separator` filter to allow the separator between links in the footer of the
...
login screen to be filtered.
Props henry.wright
Fixes #40802
Built from https://develop.svn.wordpress.org/trunk@41291
git-svn-id: http://core.svn.wordpress.org/trunk@41131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 14:23:47 +00:00
John Blackbourn
c7a79b0e6a
Plugins: Introduce singular capabilities for activating and deactivating individual plugins.
...
This introduces the following meta capabilities:
* `activate_plugin`
* `deactivate_plugin`
* `deactivate_plugins`
The singular `activate_plugin` and `deactivate_plugin` capabilities are used along with the corresponding plugin name when
determining whether or not a user can activate or deactivate an individual plugin.
The plural `deactivate_plugins` capability is used in place of the existing `activate_plugins` capability when determining
whether a user can deactivate plugins.
Each of these new meta capabilities map to the existing `activate_plugins` primitive capability, which means there is no
change in existing behaviour, but plugins can now filter the capabilities required to activate and deactivate individual
plugins.
Fixes #38652
Built from https://develop.svn.wordpress.org/trunk@41290
git-svn-id: http://core.svn.wordpress.org/trunk@41130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 14:02:44 +00:00
John Blackbourn
28eda6f4bc
General: Improve terminology used when referring to installations of WordPress and its extensions.
...
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.
This change fixes the usage in user-facing text and in developer documentation.
Fixes #41620
Built from https://develop.svn.wordpress.org/trunk@41289
git-svn-id: http://core.svn.wordpress.org/trunk@41129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:52:48 +00:00
John Blackbourn
9891448a42
Media: Rename several attachment related parameters from `$post_id` to `$attachment_id` for clarity, and improve related
...
documentation.
See #41017
Built from https://develop.svn.wordpress.org/trunk@41288
git-svn-id: http://core.svn.wordpress.org/trunk@41128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:12:44 +00:00
Boone Gorges
c080c0a2ea
Introduce `paged` argument to `WP_Comment_Query`.
...
Using `paged` with `number` allows developers to request
paginated comment results without having to do a manual offset
calculation.
Props AdamWills.
Fixes #38268 .
Built from https://develop.svn.wordpress.org/trunk@41287
git-svn-id: http://core.svn.wordpress.org/trunk@41127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-21 15:35:46 +00:00
Drew Jaynes
1770cc7b87
Docs: Fix a typo in the DocBlock description for `add_shortcode()` introduced in [41281].
...
Props grapplerulrich.
See #37222 .
Built from https://develop.svn.wordpress.org/trunk@41286
git-svn-id: http://core.svn.wordpress.org/trunk@41126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 20:38:42 +00:00
Drew Jaynes
0eecbf8baf
Docs: Clarify that `get_comments_number()` can return either a numeric string (for compatibility reasons) or 0 if the post doesn't exist.
...
Also update the hook doc for the `get_comments_number` filter to reflect the mixed type for `$count`.
Props kiranpotphode for the initial patch.
Fixes #38369 .
Built from https://develop.svn.wordpress.org/trunk@41285
git-svn-id: http://core.svn.wordpress.org/trunk@41125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 20:13:47 +00:00
Drew Jaynes
f94c77661d
Docs: Improve the return description for `get_post_format_slugs()` to note that the array contains slugs as both keys and values.
...
Props danielbachhuber.
Fixes #38611 .
Built from https://develop.svn.wordpress.org/trunk@41284
git-svn-id: http://core.svn.wordpress.org/trunk@41124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 20:03:54 +00:00
Drew Jaynes
15373a020d
Docs: Clarify that the second parameter passed to a shortcode callback is the shortcode content or null, rather than the content the shortcode was found in.
...
See #37222 .
Built from https://develop.svn.wordpress.org/trunk@41283
git-svn-id: http://core.svn.wordpress.org/trunk@41123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:56:45 +00:00
Drew Jaynes
b2b6f48127
Shortcodes: Rename the `$func` parameter for `add_shortcode()` to `$callback` to improve clarity.
...
See #37222 . See #41017 .
Built from https://develop.svn.wordpress.org/trunk@41282
git-svn-id: http://core.svn.wordpress.org/trunk@41122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:48:45 +00:00
Drew Jaynes
33997cc66c
Docs: Improve documentation for `add_shortcode()` by:
...
* Removing inline examples already listed in the Code Reference
* Improving the summary and description to explain how tag conflicts are handled
* Supplement the docs for the `$func` parameter by describing the three arguments passed to a shortcode callback.
Props grapplerulrich for the initial patch.
Fixes #37222 .
Built from https://develop.svn.wordpress.org/trunk@41281
git-svn-id: http://core.svn.wordpress.org/trunk@41121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:44:42 +00:00
Drew Jaynes
abf8e91521
Docs: Add a note to the `register_taxonomy()` DocBlock that the object types defined in `$object_type` when modifying an already-registered taxonomy will be overwritten.
...
Props danielbachhuber and BjornW for the initial patches.
Fixes #34413 .
Built from https://develop.svn.wordpress.org/trunk@41280
git-svn-id: http://core.svn.wordpress.org/trunk@41120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:23:47 +00:00
John Blackbourn
bc15cff6f4
Build/Test tools: Revert [41278] because the PHP 5.2 environment on Travis doesn't support OpenSSL, hence the tests fail.
...
See #41676
Built from https://develop.svn.wordpress.org/trunk@41279
git-svn-id: http://core.svn.wordpress.org/trunk@41119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 12:59:43 +00:00
John Blackbourn
33570415d1
Build/Test tools: Don't skip tests which rely on OpenSSL when the `openssl` extension isn't loaded.
...
See #41676
Built from https://develop.svn.wordpress.org/trunk@41278
git-svn-id: http://core.svn.wordpress.org/trunk@41118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 12:31:43 +00:00
Pascal Birchler
eccf27c514
Build/Test Tools: Remove unneeded commas to fix JSHint error introduced
...
in [41271].
See #30666 .
Built from https://develop.svn.wordpress.org/trunk@41277
git-svn-id: http://core.svn.wordpress.org/trunk@41117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 09:13:44 +00:00
Drew Jaynes
ffa7e7d4ab
Docs: Improve the usefulness and accuracy of the file header for wp-cron.php.
...
Props stevenlinx for the initial patch.
Fixes #31401 .
Built from https://develop.svn.wordpress.org/trunk@41276
git-svn-id: http://core.svn.wordpress.org/trunk@41116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 04:37:45 +00:00
Drew Jaynes
78da113bd0
Docs: Add a missing return description for the deprecated `get_screen_icon()` function.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@41275
git-svn-id: http://core.svn.wordpress.org/trunk@41115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 04:04:44 +00:00
Drew Jaynes
510fb1fe85
Administration: Explicitly deprecate `screen_icon()` and `get_screen_icon()`, which were soft-deprecated in [26537] for 3.8.0.
...
Props ippei-sumida for the initial patch.
Fixes #41153 .
Built from https://develop.svn.wordpress.org/trunk@41274
git-svn-id: http://core.svn.wordpress.org/trunk@41114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 04:03:45 +00:00
Drew Jaynes
a1ceeba8ac
Docs: Explicitly deprecate the `add_tab()`, `remove_tab()`, and `print_tab_image()` methods for `WP_Customize_Image_Control`, originally soft-deprecated in 4.1.
...
Props jrf.
See #41121 .
Built from https://develop.svn.wordpress.org/trunk@41273
git-svn-id: http://core.svn.wordpress.org/trunk@41113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 03:38:46 +00:00
Drew Jaynes
d2b78649a2
Docs: Document user object parameters for a variety of functions in wp-includes/user.php as `WP_User` type instead of the more generic `object` type.
...
Props sebastianpisula.
Fixes #40945 .
Built from https://develop.svn.wordpress.org/trunk@41272
git-svn-id: http://core.svn.wordpress.org/trunk@41112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 20:19:44 +00:00
Aaron Jorbin
7f7d4ef451
Build/Test Tools: Add banner to minified CSS files
...
Patches occasionally come in on generated files. We should be kind to new contributors and give them a hint that these files are auto generated.
Props drewapicture, samuelsidler, netweb, valendesigns, kpdesign, nacin, jorbin
Fixes #30666
Built from https://develop.svn.wordpress.org/trunk@41271
git-svn-id: http://core.svn.wordpress.org/trunk@41111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 20:10:47 +00:00
John Blackbourn
2916cd9417
Media: bring the capability check in `wp_ajax_crop_image()` inline with those in `wp_ajax_imgedit_preview()` and `wp_ajax_image_editor()`.
...
This change means that a user can crop an image if they have the ability to edit its attachment post, without requiring the ability to access the Customizer.
Fixes #40193
Built from https://develop.svn.wordpress.org/trunk@41270
git-svn-id: http://core.svn.wordpress.org/trunk@41110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 13:30:43 +00:00
Felix Arntz
755a926b65
Multisite: Use correct capability for the Updates page in the network admin.
...
A user should not be required to have the `update_core` capability to access the Updates page. Having one of the update capabilities for core, plugins, themes and languages should be sufficient.
Fixes #41538 .
Built from https://develop.svn.wordpress.org/trunk@41269
git-svn-id: http://core.svn.wordpress.org/trunk@41109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 10:39:44 +00:00
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
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
Drew Jaynes
dfab72aa35
Docs: Default for the `orderby` argument in `wp_list_categories()` is actually 'name', not 'ID'.
...
Props uicestone.
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@41033
git-svn-id: http://core.svn.wordpress.org/trunk@40883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 22:06:39 +00:00
Sergey Biryukov
581707de6c
Docs: Add a `@global` entry for `$allowed_files` in `get_file_description()`.
...
Props div33, ajayghaghretiya1.
Fixes #41294 .
Built from https://develop.svn.wordpress.org/trunk@41032
git-svn-id: http://core.svn.wordpress.org/trunk@40882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 21:40:40 +00:00
Sergey Biryukov
058c2c5ca4
Docs: Fix typo in `wp_suspend_cache_invalidation()` description.
...
Props euthelup, milana_cap.
Fixes #41301 .
Built from https://develop.svn.wordpress.org/trunk@41031
git-svn-id: http://core.svn.wordpress.org/trunk@40881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 21:26:44 +00:00
Sergey Biryukov
86f9360280
Docs: Add a `@global` entry for `$wpdb` in `display_setup_form()`.
...
Props mitraval192.
Fixes #41300 .
Built from https://develop.svn.wordpress.org/trunk@41030
git-svn-id: http://core.svn.wordpress.org/trunk@40880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 21:03:42 +00:00
Peter Westwood
f3326b10af
Tests: Rename this file to match our coding standards.
...
Built from https://develop.svn.wordpress.org/trunk@41029
git-svn-id: http://core.svn.wordpress.org/trunk@40879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 20:56:45 +00:00
Weston Ruter
37cbe7add1
Widgets: Enqueue assets needed by media and text widgets in their `_register_one()` methods.
...
The `WP_Widget::_register_one()` method is more guaranteed to be called as opposed to its wrapper `WP_Widget::_register()` which plugins may bypass for performance reasons.
Amends [40631], [40640].
See #35243 , #32417 .
Fixes #41021 .
Built from https://develop.svn.wordpress.org/trunk@41028
git-svn-id: http://core.svn.wordpress.org/trunk@40878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 22:47:43 +00:00
Sergey Biryukov
6724151d41
Users: Add a "View" link to users listed on the Users screen that points to the user's author archive.
...
Props ryanplas, johnjamesjacoby, viralsampat, Girishpanchal, xkon.
Fixes #38085 .
Built from https://develop.svn.wordpress.org/trunk@41027
git-svn-id: http://core.svn.wordpress.org/trunk@40877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 13:30:44 +00:00
Sergey Biryukov
a545745a54
Shortcodes: Allow using single quotes for empty value attributes.
...
Props enrico.sorcinelli.
Fixes #37304 .
Built from https://develop.svn.wordpress.org/trunk@41026
git-svn-id: http://core.svn.wordpress.org/trunk@40876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 00:54:41 +00:00
Sergey Biryukov
f75e623eae
Comments: In `WP_Comments_List_Table::extra_tablenav()`, save the state of `::has_items()` to a static variable, so that the value is consistent between top and bottom navigation.
...
This prevents "Empty Spam" and "Empty Trash" buttons from disappearing if there's only one page of comments in Spam/Trash.
Fixes #40975 .
Built from https://develop.svn.wordpress.org/trunk@41022
git-svn-id: http://core.svn.wordpress.org/trunk@40872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 23:05:40 +00:00
Adam Silverstein
5cfbf0519b
Media: library grid view - improve browser history support.
...
Set view state properly when navigating history using the browser back/next button in the media library (grid view). Correctly handle navigating, search, image detail view and image edit mode. Also handle bookmarking/reloading.
Props kucrut, joemcgill, afercia.
Fixes #31846 .
Built from https://develop.svn.wordpress.org/trunk@41021
git-svn-id: http://core.svn.wordpress.org/trunk@40871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 19:08:41 +00:00
Weston Ruter
1af3aa0000
Customize: Restrict click target of menu deletion, moving to button from its container.
...
Props westonruter, afercia.
Fixes #40981 .
Built from https://develop.svn.wordpress.org/trunk@41020
git-svn-id: http://core.svn.wordpress.org/trunk@40870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 18:40:44 +00:00
Andrea Fercia
b8e2496645
Administration: in `WP_List_Table->pagination()`, properly concatenate CSS classes for the pagination links when `infinite_scroll` is set to true.
...
Props SGr33n.
See #19815 .
Fixes #40003 .
Built from https://develop.svn.wordpress.org/trunk@41019
git-svn-id: http://core.svn.wordpress.org/trunk@40869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-09 11:12:43 +00:00
Adam Silverstein
f858551592
Date/Time: Add unit tests for the `human_time_diff` function.
...
Verify that `human_time_diff` works as expected for minute, hour and day intervals. Test that rounding works as expected when the time difference is near the rounding margin.
Props SGr33n.
Fixes #38773 .
Built from https://develop.svn.wordpress.org/trunk@41018
git-svn-id: http://core.svn.wordpress.org/trunk@40868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-07 17:08:45 +00:00
Sergey Biryukov
96ceffa552
Media: Use a filename instead of a URL in image header tests to avoid triggering an outbound HTTP request causing an ImageMagick exception on some configurations.
...
Props danielbachhuber.
Fixes #41216 .
Built from https://develop.svn.wordpress.org/trunk@41017
git-svn-id: http://core.svn.wordpress.org/trunk@40867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-07 00:07:40 +00:00
Sergey Biryukov
452871e0c3
Media: Correct the order of arguments passed to assertions in `Tests_Image_Header`.
...
Props danielbachhuber.
See #41216 .
Built from https://develop.svn.wordpress.org/trunk@41016
git-svn-id: http://core.svn.wordpress.org/trunk@40866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 23:58:41 +00:00
Sergey Biryukov
6b0c0592de
Docs: Update the DocBlock for `_WP_Editors::wp_fullscreen_html()` after [32677].
...
See #30949 .
Built from https://develop.svn.wordpress.org/trunk@41015
git-svn-id: http://core.svn.wordpress.org/trunk@40865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 23:44:40 +00:00
Sergey Biryukov
6dc56c4558
Docs: Update the list of static variables in `wptexturize()` DocBlock after [32863].
...
Props ajayghaghretiya1.
Fixes #41260 .
Built from https://develop.svn.wordpress.org/trunk@41014
git-svn-id: http://core.svn.wordpress.org/trunk@40864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 21:02:42 +00:00
Drew Jaynes
fdaf531325
Options: Pass `$default` as a new parameter to the `pre_option_{$option}` and `pre_site_option_{$option}` filters.
...
This change standardizes some language in the parameter descriptions between the two hook docs in an effort to reduce confusion between the `$pre_option` pseudo-parameters and the new `$default` ones. `$pre_option` is the truthy value used to short-circuit the `get_*option()` call, `$default` is the value passed to the `get_*option()` returned in the event that 1) a short circuit isn't performed, 2) the option doesn't exist.
Props sc0ttkclark.
Fixes #41254 .
Built from https://develop.svn.wordpress.org/trunk@41013
git-svn-id: http://core.svn.wordpress.org/trunk@40863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 15:12:44 +00:00
Weston Ruter
6b907d8437
Customize: Prevent edge case fatal error when attempting to save changes to a changeset that had previously been corrupted.
...
Check return value of `WP_Customize_Manager::get_changeset_post_data()` and return if error instead of assuming it is an array.
Amends [38810].
See #30937 .
Fixes #41252 .
Built from https://develop.svn.wordpress.org/trunk@41012
git-svn-id: http://core.svn.wordpress.org/trunk@40862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 07:05:43 +00:00
Ryan McCue
51ba397e29
REST API: Fix brittle search test.
...
This was previously searching for the user ID, which isn't really what it was meant to do. As a result, the test can break if that number appears in any other user information.
Built from https://develop.svn.wordpress.org/trunk@41011
git-svn-id: http://core.svn.wordpress.org/trunk@40861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 01:35:41 +00:00
Joe McGill
37b500c4bd
Sanity check $uploaderToggler in wp.media.view.UploaderInline.
...
This ensures `$uploaderToggler` exists before checking length so any views
extending or scripts accessing this view, won't encounter errors that stop execution.
Props Blackbam, yahil.
Fixes #41231 .
Built from https://develop.svn.wordpress.org/trunk@41009
git-svn-id: http://core.svn.wordpress.org/trunk@40859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 00:41:41 +00:00
Sergey Biryukov
d8c50c7a12
Menus: Make sure `current-menu-parent` and `current-menu-ancestor` classes are properly set for parent items of post type archive submenu items.
...
Props mrwweb, ajoah, welcher.
Fixes #39800 .
Built from https://develop.svn.wordpress.org/trunk@41008
git-svn-id: http://core.svn.wordpress.org/trunk@40858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 21:31:44 +00:00
Sergey Biryukov
2ca39ce60d
Docs: Add a `@global` entry for `$tinymce_version` in `_WP_Editors::default_settings()`.
...
Props tejas5989.
Fixes #41244 .
Built from https://develop.svn.wordpress.org/trunk@41007
git-svn-id: http://core.svn.wordpress.org/trunk@40857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 18:55:44 +00:00
James Nylen
1ef845b268
Ensure that `wp-api.js` test fixtures do not change with `WP_TESTS_*` constants.
...
Previously, changing these constants in `wp-tests-config` would cause PHPUnit to regenerate `wp-api-generated.js` with different values.
This commit uses the existing mechanism to also "freeze" all values that would change as a result of changing these constants.
Fixes #41123 .
Built from https://develop.svn.wordpress.org/trunk@41006
git-svn-id: http://core.svn.wordpress.org/trunk@40856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:30:42 +00:00
Sergey Biryukov
30bad141ad
Docs: Add a `@global` entry for `$wpdb` in `WP_Network_Query::get_network_ids()`.
...
Props afzalmultani.
Fixes #41238 .
Built from https://develop.svn.wordpress.org/trunk@41005
git-svn-id: http://core.svn.wordpress.org/trunk@40855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:23:42 +00:00
Sergey Biryukov
98458cb6e3
Docs: Add a `@global` entry for `$wp_post_statuses` in `WP_Customize_Nav_Menus::make_auto_draft_status_previewable()`.
...
Props afzalmultani.
See #41238 .
Built from https://develop.svn.wordpress.org/trunk@41004
git-svn-id: http://core.svn.wordpress.org/trunk@40854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:21:41 +00:00
Sergey Biryukov
b916e8c727
Docs: Add a `@global` entry for `$wp` in `redirect_canonical()`.
...
Props afzalmultani.
See #41238 .
Built from https://develop.svn.wordpress.org/trunk@41003
git-svn-id: http://core.svn.wordpress.org/trunk@40853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:19:43 +00:00
Sergey Biryukov
dbba2af814
Docs: Add a `@global` entry for `$wp_widget_factory` in `WP_Customize_Widgets::get_selective_refreshable_widgets()`.
...
Props jankimoradiya.
Fixes #41243 .
Built from https://develop.svn.wordpress.org/trunk@41002
git-svn-id: http://core.svn.wordpress.org/trunk@40852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 08:23:41 +00:00
Weston Ruter
7b28ff2f2a
Customize: Fix logic to re-expand a newly inserted nav menu section after placeholder section is replaced.
...
Fixes todo from Menu Customizer feature plugin: https://github.com/voldemortensen/menu-customizer/commit/0f4ea4e#diff-daa55fade2253f26ccbe02f71058841cR2330
Amends [32806].
Props greuben.
See #32576 .
Fixes #40997 .
Built from https://develop.svn.wordpress.org/trunk@41001
git-svn-id: http://core.svn.wordpress.org/trunk@40851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 00:44:41 +00:00
Weston Ruter
046fb8a987
Widgets: Let Custom HTML widget be "wide" as the Text widget is.
...
Also update `WP_Customize_Widgets::$core_widget_id_bases` with the new list of core widgets.
Props obenland, westonruter.
See #40907 , #40951 .
Built from https://develop.svn.wordpress.org/trunk@41000
git-svn-id: http://core.svn.wordpress.org/trunk@40850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 21:01:41 +00:00
Boone Gorges
fa2f4b047a
Avoid PHP notices when checking termmeta capabilities against a non-existent term.
...
Previously, checks like `current_user_can( 'edit_term_meta', $term_id )`
returned the proper value, but generated a PHP notice due to the fact
that `get_term( $term_id )` could, in certain instances, return
`WP_Error` objects.
Props caercam.
Fixes #40891 .
Built from https://develop.svn.wordpress.org/trunk@40999
git-svn-id: http://core.svn.wordpress.org/trunk@40849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 19:59:40 +00:00
Drew Jaynes
64cb817527
Docs: Add a missing return notation and to the DocBlock for `WP_Session_Tokens::get_instance()`.
...
Also adds an inline reference to the `session_token_manager` hook in the description.
Props Shelob9 for the initial patch.
Fixes #40102 .
Built from https://develop.svn.wordpress.org/trunk@40998
git-svn-id: http://core.svn.wordpress.org/trunk@40848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 17:16:42 +00:00
Sergey Biryukov
c6ab84c4c4
General: Always use colon instead of a semicolon in `switch()` control structures.
...
Props jrf.
Fixes #41234 .
Built from https://develop.svn.wordpress.org/trunk@40997
git-svn-id: http://core.svn.wordpress.org/trunk@40847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 09:52:41 +00:00
Andrew Ozz
8c47285f4e
TinyMCE: fix adding the `<!-- more -->` tag when the editor is inline.
...
Props iseulde.
Fixes #41230 .
Built from https://develop.svn.wordpress.org/trunk@40996
git-svn-id: http://core.svn.wordpress.org/trunk@40846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-03 21:41:41 +00:00
Andrew Ozz
dcc372e098
Customizer: improve setting the TinyMCE modals z-index.
...
Props westonruter, greuben.
See #41158 .
Built from https://develop.svn.wordpress.org/trunk@40995
git-svn-id: http://core.svn.wordpress.org/trunk@40845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-03 21:18:44 +00:00
Boone Gorges
dc35b759be
Introduce `wp_get_object_terms_args` filter.
...
This filter allows developers to modify the arguments passed to
`wp_get_object_terms()` before the query is run.
Props enrico.sorcinelli.
Fixes #35925 .
Built from https://develop.svn.wordpress.org/trunk@40994
git-svn-id: http://core.svn.wordpress.org/trunk@40844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-02 18:29:42 +00:00
Peter Wilson
2b25a87d1b
Capabilities: Prevent users having the `do_not_allow` capability.
...
Meta capabilities use the capability `do_not_allow` to indicate a user should be blocked from performing a particular action. This ensures users can not have the capability as it would cause unexpected behaviour.
Props johnbillion.
Fixes #41059 .
Built from https://develop.svn.wordpress.org/trunk@40993
git-svn-id: http://core.svn.wordpress.org/trunk@40843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-02 05:16:45 +00:00
Sergey Biryukov
6fda2e67b0
Docs: Add a `@global` entry for `$wp_filter` in `wp_start_object_cache()`.
...
Props bhaveshkhadodara.
Fixes #41222 .
Built from https://develop.svn.wordpress.org/trunk@40992
git-svn-id: http://core.svn.wordpress.org/trunk@40842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 22:13:41 +00:00
Andrew Ozz
65f1051697
TinyMCE: respect the `Disable the visual editor when writing` user setting and don't output the TinyMCE components when using `wp_enqueue_editor()`.
...
Fixes #40960 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40991
git-svn-id: http://core.svn.wordpress.org/trunk@40841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 21:31:47 +00:00
Andrew Ozz
16167ffe41
Text widget: bump the TinyMCE modals z-index to 500001 so they show in the Customizer.
...
Props greuben.
Fixes #41158 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40990
git-svn-id: http://core.svn.wordpress.org/trunk@40840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 20:33:41 +00:00
Drew Jaynes
5c075e5af7
Docs: Remove a few more superfluous `@package WordPress` and `@subpackage` notations outside of file headers missed in [40988].
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40989
git-svn-id: http://core.svn.wordpress.org/trunk@40839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 17:11:41 +00:00
Drew Jaynes
1d95dcfa2c
Docs: Remove superfluous `@package WordPress` and `@subpackage` notations used outside of file headers in a variety of core files.
...
Per the inline documentation standards for PHP, there should only be one `@package` and/or `@subpackage` notation per file, and only in the file header.
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40988
git-svn-id: http://core.svn.wordpress.org/trunk@40838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:58:42 +00:00
Drew Jaynes
ae017f435a
Docs: Convert an `@uses` tag in the class DocBlock for `Walker_Nav_Menu_Edit` to `@see`.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40987
git-svn-id: http://core.svn.wordpress.org/trunk@40837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:49:40 +00:00
Drew Jaynes
bd2173f42c
Docs: Remove an unnecessary `@package` tag from the DocBlock for `post_preview()`.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40986
git-svn-id: http://core.svn.wordpress.org/trunk@40836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:39:41 +00:00
Drew Jaynes
ba40430e89
Docs: Add a valid return type for `post_preview()` and improve the DocBlock summary.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40985
git-svn-id: http://core.svn.wordpress.org/trunk@40835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:37:42 +00:00
Boone Gorges
26fcea496d
Introduce `most_used` taxonomy label, for text on 'Most Used' metabox tab.
...
Props mdifelice, jlambe.
Fixes #41150 .
Built from https://develop.svn.wordpress.org/trunk@40984
git-svn-id: http://core.svn.wordpress.org/trunk@40834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:46:41 +00:00
Drew Jaynes
5fa2de51ef
General: Ensure `$description` gets initialized in `get_the_archive_description()` if the post type archive conditional is true and the description isn't set.
...
Props henrywright.
See #38487 .
Built from https://develop.svn.wordpress.org/trunk@40983
git-svn-id: http://core.svn.wordpress.org/trunk@40833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:23:41 +00:00
Boone Gorges
cb81009729
Allow user searches to match the `display_name` field.
...
Props bcole808, pcarvalho.
Fixes #39643 .
Built from https://develop.svn.wordpress.org/trunk@40982
git-svn-id: http://core.svn.wordpress.org/trunk@40832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:22:41 +00:00
Boone Gorges
6995731f12
Allow metadata to be updated via `wp_update_comment()`.
...
Passing an array of `comment_meta` into `wp_update_comment()` will
now update corresponding metadata. Similar functionality already
exists in `wp_insert_comment()`.
Props dshanske, kraftbj.
Fixes #36784 .
Built from https://develop.svn.wordpress.org/trunk@40981
git-svn-id: http://core.svn.wordpress.org/trunk@40831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 13:36:41 +00:00
Boone Gorges
def98d511a
Users: Allow data to be filtered before updating or creating a user.
...
Props DaveFX.
Fixes #40545 .
Built from https://develop.svn.wordpress.org/trunk@40980
git-svn-id: http://core.svn.wordpress.org/trunk@40830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 13:30:42 +00:00
Boone Gorges
ed9d4b9408
Taxonomy: Ignore cached term value when it doesn't match the queried taxonomy.
...
When a cache entry is found that matches the requested `$term_id`, but
doesn't match an explicitly provided `$taxonomy`, that cache entry
should be ignored.
Props GunGeekATX.
Fixes #40671 .
Built from https://develop.svn.wordpress.org/trunk@40979
git-svn-id: http://core.svn.wordpress.org/trunk@40829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 11:46:41 +00:00
Boone Gorges
848bcf3b28
Introduce `$comment_count` param for `WP_Query`.
...
This parameter allows querying for posts with a specific value of
`comment_count`. It is also possible to query for posts that match
a `comment_count` comparison by passing an array with 'value' and
'compare' operators (eg `array( 'compare' => '>', 'value' => 5 )`).
Props ramon fincken.
Fixes #28399 .
Built from https://develop.svn.wordpress.org/trunk@40978
git-svn-id: http://core.svn.wordpress.org/trunk@40828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 11:25:44 +00:00
Drew Jaynes
d6f7788935
Remove an unnecessary initialization of `$description` due to the else condition in `get_the_archive_description()`.
...
See [40976]. See #38487 .
Built from https://develop.svn.wordpress.org/trunk@40977
git-svn-id: http://core.svn.wordpress.org/trunk@40827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 05:19:41 +00:00
Drew Jaynes
f6b5c794bf
General: Add support for the post type archive description to `get_the_archive_description()`, and thereby also `the_archive_description()`.
...
Props henrywright.
Fixes #38487 .
Built from https://develop.svn.wordpress.org/trunk@40976
git-svn-id: http://core.svn.wordpress.org/trunk@40826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 05:15:46 +00:00
Drew Jaynes
0fe9fb4a16
Link Template: Clarify documentation for the `$id` parameter in `get_post_permalink()`, `get_edit_post_link()`, `edit_post_link()`, and `get_delete_post_link()`, to reflect that either a post ID or `WP_Post` object is accepted.
...
Separately, use `$post` for checking the post status and retrieving the page_uri in `get_post_permalink()` instead of referencing back to the original `$id` parameter.
Props GunGeekATX for the initial patch.
Fixes #40780 .
Built from https://develop.svn.wordpress.org/trunk@40975
git-svn-id: http://core.svn.wordpress.org/trunk@40825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 03:29:42 +00:00
Drew Jaynes
903d23be34
Users: Introduce the `manage_users_extra_tablenav` action, fired immediately outside the closing "actions" div in the Users list table tablenav.
...
A similar `manage_posts_extra_tablenav` hook fires in the same location and context in the Posts list table tablenav.
Props GunGeekATX, adamsilverstein.
Fixes #36990 .
Built from https://develop.svn.wordpress.org/trunk@40974
git-svn-id: http://core.svn.wordpress.org/trunk@40824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 03:02:41 +00:00
Drew Jaynes
25370ba481
Docs: Add a `@property-read` notation for the read-only `WP_Term::$data` property.
...
See [35269], #34348 and #41017 .
Built from https://develop.svn.wordpress.org/trunk@40973
git-svn-id: http://core.svn.wordpress.org/trunk@40823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 17:04:40 +00:00
Drew Jaynes
4b0e64aa8c
Docs: Add missing `@since`, `@access`, and `@global` notations to the DocBlock for `WP_Query::parse_search_order()`.
...
Props dixitadusara.
Fixes #41045 .
Built from https://develop.svn.wordpress.org/trunk@40972
git-svn-id: http://core.svn.wordpress.org/trunk@40822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 16:08:44 +00:00
Drew Jaynes
66e6776a5e
Docs: Add full parameter and return documentation for `WP_Text_Diff_Renderer_Table::interleave_changed_lines()`.
...
Props coffee2code.
Fixes #38520 .
Built from https://develop.svn.wordpress.org/trunk@40971
git-svn-id: http://core.svn.wordpress.org/trunk@40821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 05:29:41 +00:00
Drew Jaynes
b13aa27cf4
Docs: Use third-person singular verbs in the summaries for `wp_unschedule_hook()` and `wp_clear_scheduled_hook()`.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40970
git-svn-id: http://core.svn.wordpress.org/trunk@40820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:54:41 +00:00
Drew Jaynes
36759db92e
Docs: Clarify accepted types and values for `$menu` parameters in several contexts:
...
* `wp_nav_menu()`
* `wp_get_nav_menu_object()` and its filter `wp_get_nav_menu_object`
* `is_nav_menu()`
* `wp_delete_nav_menu()`
* `wp_get_nav_menu_items()`
Props dimadin.
Fixes #38166 .
Built from https://develop.svn.wordpress.org/trunk@40969
git-svn-id: http://core.svn.wordpress.org/trunk@40819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:49:40 +00:00
Drew Jaynes
7001a3cce6
Tests: Add `@method` notations to factor class DocBlocks as a way to indicate expected return types from factory methods for the benefit of IDEs.
...
Props jdgrimes.
Fixes #37867 .
Built from https://develop.svn.wordpress.org/trunk@40968
git-svn-id: http://core.svn.wordpress.org/trunk@40818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:36:41 +00:00
Drew Jaynes
d829ec4cf2
Docs: Provide best practice guidance for achieving parity between `$menu_slug` values supplied when adding menu and submenu pages, and later trying to compare those initial values against sanitized screen IDs derived from `$menu_slug`.
...
At the heart of the matter, the `$menu_slug` parameter in `add_menu_page()` and `add_submenu_page()` is not sanitized with `sanitize_key()`. When the screen object is later built for the admin page, the screen ID is derived from that `$menu_slug` value, though passed through `sanitize_key()`, which can produce unexpected results in comparison check.
Changing the sanitization code to provide actual parity is out of the question at this juncture, so updating the docs to describe how to avoid this edge case is the next best option.
Props GregRoss.
Fixes #35305 .
Built from https://develop.svn.wordpress.org/trunk@40967
git-svn-id: http://core.svn.wordpress.org/trunk@40817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:18:43 +00:00
Drew Jaynes
af5b2ca7f5
Docs: Add more useful summaries to the DocBlocks for boolean `$is_*` properties in `WP_Query`.
...
Props megane9988 for the initial patch.
Fixes #34726 .
Built from https://develop.svn.wordpress.org/trunk@40966
git-svn-id: http://core.svn.wordpress.org/trunk@40816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 03:44:46 +00:00
Sergey Biryukov
641a4b643f
Cron API: Introduce `wp_unschedule_hook()` to clear all events attached to a hook.
...
This complements `wp_clear_scheduled_hook()`, which only clears events attached with specific arguments.
Props arena, mordauk, jrf.
Fixes #18997 .
Built from https://develop.svn.wordpress.org/trunk@40965
git-svn-id: http://core.svn.wordpress.org/trunk@40815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 00:22:44 +00:00
Drew Jaynes
1fb8cbe8de
Docs: Don't reference non-existent hooks inline in the DocBlock descriptions for the following template functions:
...
* `get_index_template()`
* `get_404_template()`
* `get_author_template()`
* `get_category_template()`
* `get_tag_template()`
* `get_taxonomy_template()`
* `get_date_template()`
* `get_home_template()`
* `get_front_page_template()`
* `get_page_template()`
* `get_search_template()`
* `get_single_template()`
* `get_embed_template()`
* `get_singular_template()`
* `get_attachment_template()`
As mentioned when these dynamic hook references were originally fixed in [33274], we can't link to non-existent hooks inline because the Code Reference auto-linker won't pick up on the dynamic-ness of the hook, it'll just try to link to a hook reference that doesn't exist. In these cases, we need to be generic and provide context for the value of `$type`.
See [38418] for where the original fix was reversed. See this changeset for reversing the reversal.
Props donutz, milana_cap.
Fixes #41198 .
Built from https://develop.svn.wordpress.org/trunk@40964
git-svn-id: http://core.svn.wordpress.org/trunk@40814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 16:05:41 +00:00
Drew Jaynes
8ccc74c054
Docs: Don't reference non-existent hooks inline in the DocBlock description for `get_archive_template()`.
...
Also removes extra curly braces from the dynamic hook references added in [40962] to aid future re-parsing.
See #41198 .
Built from https://develop.svn.wordpress.org/trunk@40963
git-svn-id: http://core.svn.wordpress.org/trunk@40813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 15:47:40 +00:00
Drew Jaynes
1e32ebe87d
Docs: Don't reference non-existent hooks inline in the DocBlock description for `get_post_type_archive_template()`.
...
Props milana_cap.
See #41198 .
Built from https://develop.svn.wordpress.org/trunk@40962
git-svn-id: http://core.svn.wordpress.org/trunk@40812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 15:39:40 +00:00
James Nylen
8f6088ba6e
REST API: Add a filter to allow modifying the response *after* embedded data is added.
...
Fixes #38964 .
Built from https://develop.svn.wordpress.org/trunk@40961
git-svn-id: http://core.svn.wordpress.org/trunk@40811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 13:17:43 +00:00
Sergey Biryukov
165807d39f
Administration: In `WP_List_Table::comments_bubble()`, replace the mdash with its HTML entity for consistency with the similar code in other list tables.
...
Props afercia.
See #40659 , #32152 .
Built from https://develop.svn.wordpress.org/trunk@40960
git-svn-id: http://core.svn.wordpress.org/trunk@40810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 00:04:43 +00:00
Sergey Biryukov
11bae4ded3
Docs: Add a `@global` entry for `$post` variable in `wp_post_preview_js()`.
...
Props avinapatel.
Fixes #41194 .
Built from https://develop.svn.wordpress.org/trunk@40959
git-svn-id: http://core.svn.wordpress.org/trunk@40809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-28 12:55:43 +00:00
Sergey Biryukov
c6289b7440
Docs: Add missing backtick character in `export_wp()` DocBlock.
...
Props pbiron.
Fixes #41178 .
Built from https://develop.svn.wordpress.org/trunk@40958
git-svn-id: http://core.svn.wordpress.org/trunk@40808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:58:41 +00:00
Sergey Biryukov
01a6f4d38e
Administration: In taxonomy list tables, display a dash instead of a blank space and add "No description" as a screen reader text when the term description is blank.
...
Props pratikgandhi, yahil.
Fixes #40659 .
Built from https://develop.svn.wordpress.org/trunk@40957
git-svn-id: http://core.svn.wordpress.org/trunk@40807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:34:41 +00:00
Sergey Biryukov
25e94961b4
Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.
...
Props Girishpanchal, yahil.
Fixes #40628 .
Built from https://develop.svn.wordpress.org/trunk@40956
git-svn-id: http://core.svn.wordpress.org/trunk@40806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:27:39 +00:00
Sergey Biryukov
d08982bdbc
Docs: Remove inaccurate parts of `get_header`, `get_footer`, and `get_sidebar` hooks documentation.
...
These sentences suggested that the hooks allow a specific template file to be used in place of the default file, which is not the case.
Props desrosj.
Fixes #40892 .
Built from https://develop.svn.wordpress.org/trunk@40955
git-svn-id: http://core.svn.wordpress.org/trunk@40805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 20:56:42 +00:00
Sergey Biryukov
62947553c5
Login and Registration: Prevent the `enable_login_autofocus` filter DocBlock from spilling into JS code.
...
Props chris@vendiadvertising.com .
Fixes #41176 .
Built from https://develop.svn.wordpress.org/trunk@40954
git-svn-id: http://core.svn.wordpress.org/trunk@40804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 20:37:42 +00:00
Felix Arntz
5650910c50
Multisite: Remove full stops from radio and checkbox labels in the Network Settings screen.
...
This change brings consistency with the regular site administration panel settings pages: Radio and checkbox labels do not use full stops there, so those in the network administration panel should not either.
Props Ankit K Gupta.
Fixes #39319 .
Built from https://develop.svn.wordpress.org/trunk@40953
git-svn-id: http://core.svn.wordpress.org/trunk@40803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 19:20:40 +00:00
Drew Jaynes
78dba2fefd
Docs: List out accepted values for the `$field` parameter in `get_the_author_meta()`.
...
Props choongsavvii.
Fixes #38258 .
Built from https://develop.svn.wordpress.org/trunk@40952
git-svn-id: http://core.svn.wordpress.org/trunk@40802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 18:24:40 +00:00
Drew Jaynes
faab7f4533
Docs: Improve and clarify the DocBlock summary for `wpmu_log_new_registrations()`.
...
Props daymobrew.
Fixes #39922 .
Built from https://develop.svn.wordpress.org/trunk@40951
git-svn-id: http://core.svn.wordpress.org/trunk@40801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 18:05:41 +00:00
Drew Jaynes
474711aac1
Docs: Adjust notation for the `$context` parameter in the DocBlocks for the `wp_kses_allowed_html()` function and its associated `wp_kses_allowed_html` filter.
...
`$context|$allowedtags` can be either a string or array.
Props bor0.
Fixes #40575 .
Built from https://develop.svn.wordpress.org/trunk@40950
git-svn-id: http://core.svn.wordpress.org/trunk@40800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:16:40 +00:00
Drew Jaynes
75acd01f98
Docs: Notate `format_for_editor()` as the replacement function in the DocBlock for the deprecated `wp_richedit_pre()`.
...
Props rabmalin.
See #41121 . Fixes #40709 .
Built from https://develop.svn.wordpress.org/trunk@40949
git-svn-id: http://core.svn.wordpress.org/trunk@40799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:10:41 +00:00
Drew Jaynes
07f01a2e10
Docs: Replace a variety of http links referenced in inline docs with their https counterparts (where possible).
...
Props johnpgreen.
Fixes #40732 .
Built from https://develop.svn.wordpress.org/trunk@40948
git-svn-id: http://core.svn.wordpress.org/trunk@40798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:06:41 +00:00
Drew Jaynes
97ef1ca74b
Docs: Add missing deprecation, introduction, and summary information to the DocBlock for `WP_Admin_Bar::recursive_render()`.
...
Props coffee2code.
Fixes #40840 .
Built from https://develop.svn.wordpress.org/trunk@40947
git-svn-id: http://core.svn.wordpress.org/trunk@40797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:58:41 +00:00
Drew Jaynes
3a3e133aaf
Docs: Clarify that the `$post` parameters for the `get_the_modified_date` and `get_the_modified_time` filters can also be of type `null`.
...
Props dlh.
Fixes #40845 .
Built from https://develop.svn.wordpress.org/trunk@40946
git-svn-id: http://core.svn.wordpress.org/trunk@40796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:50:40 +00:00
Drew Jaynes
30719312fb
Docs: Add a clarification to the description about what the `$output` parameter in the `embed_html` filter doc represents.
...
Props musus.
Fixes #37752 .
Built from https://develop.svn.wordpress.org/trunk@40945
git-svn-id: http://core.svn.wordpress.org/trunk@40795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:46:39 +00:00
Drew Jaynes
22f76adc8c
Docs: Add full documentation for members in the labels object returned by get_taxonomy_labels().
...
Props truongwp.
Fixes #41108 .
Built from https://develop.svn.wordpress.org/trunk@40944
git-svn-id: http://core.svn.wordpress.org/trunk@40794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:42:43 +00:00
Drew Jaynes
f6bf00d378
Docs: Add a note to the DocBlock for `wp_signon()` mentioning that it doesn't handle setting the current user.
...
Also outlines the conditions that must be met for is_user_logged_in() to work with it.
Part props SergeyBiryukov.
Fixes #28116 .
Built from https://develop.svn.wordpress.org/trunk@40943
git-svn-id: http://core.svn.wordpress.org/trunk@40793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 20:08:40 +00:00
Drew Jaynes
de7499f88f
Docs: Add full documentation for arguments accepted by `wp_get_nav_menu_items()`.
...
Also provide differentiation between arguments as passed to `get_posts()` vs used for ordering outputted menu items.
By and large, arguments in the `$args` array are intended to directly affect how nav_menu_item posts are retrieved. When the default ARRAY_A is used for 'output', the 'order' and 'orderby' arguments are essentially ignored, instead giving preference to a hard-coded order of 'ASC' and an orderby value derived from the non-get_posts() argument 'output_key'.
Fixes #15533 .
Built from https://develop.svn.wordpress.org/trunk@40942
git-svn-id: http://core.svn.wordpress.org/trunk@40792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 19:37:39 +00:00
Weston Ruter
b7ca48fff0
Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).
...
Amends [40640], [40631].
Props westonruter, afercia.
See #35243 , #32417 .
Fixes #40986 .
Built from https://develop.svn.wordpress.org/trunk@40941
git-svn-id: http://core.svn.wordpress.org/trunk@40791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 18:48:41 +00:00
John Blackbourn
a507248146
Users: Use more appropriate HTTP status codes for errors relating to user management.
...
Also re-uses one error message string.
Props tuanmh
Fixes #40230
Built from https://develop.svn.wordpress.org/trunk@40940
git-svn-id: http://core.svn.wordpress.org/trunk@40790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 18:46:44 +00:00
Weston Ruter
46551a898a
Widgets: Forcibly limit Video widget to only accept oEmbed URLs from YouTube and Vimeo (for now).
...
Amends [40640].
Props timmydcrawford.
See #34115 , #39994 .
Fixes #40935 .
Built from https://develop.svn.wordpress.org/trunk@40939
git-svn-id: http://core.svn.wordpress.org/trunk@40789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:24:41 +00:00
Drew Jaynes
ae690a3fdf
Scripts: Correctly reference `WP_Scripts::print_extra_script()` as the replacement for the deprecated `WP_Scripts::print_scripts_l10n()` method, rather than a nonexistent global print_extra_script() function.
...
Props fergbrain.
See #41121 .
Built from https://develop.svn.wordpress.org/trunk@40938
git-svn-id: http://core.svn.wordpress.org/trunk@40788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:20:41 +00:00
Drew Jaynes
4c60260c29
Docs: Fix alignment of the `$output` parameter in the hook doc for the `do_shortcode_tag` filter.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40937
git-svn-id: http://core.svn.wordpress.org/trunk@40787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:06:22 +00:00
Peter Wilson
cc82d38f47
Emoji: Fix typo in `browserSupportsEmoji()` comment.
...
Fairies not Faries, introduced in [40850].
Fixes #41157 .
Built from https://develop.svn.wordpress.org/trunk@40936
git-svn-id: http://core.svn.wordpress.org/trunk@40786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:05:42 +00:00
Weston Ruter
980f342ad6
Customize: Ensure `header_image_data` setting exists before attempting to use it.
...
Amends [27497].
Props Collizo4sky.
Fixes #41007 .
Built from https://develop.svn.wordpress.org/trunk@40935
git-svn-id: http://core.svn.wordpress.org/trunk@40785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:04:42 +00:00
Sergey Biryukov
332884f8dc
Docs: Add a missing quote in `user-agent` argument description in `WP_Http::request()`.
...
Props ixkaito.
Fixes #41154 .
Built from https://develop.svn.wordpress.org/trunk@40934
git-svn-id: http://core.svn.wordpress.org/trunk@40784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:00:42 +00:00
Drew Jaynes
82ed0bdd11
Docs: Improve description wording for `get_template_part()` in regard to overloading by child themes.
...
Also, update the summary to use a third-person singular verb.
Props ixmati.
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40933
git-svn-id: http://core.svn.wordpress.org/trunk@40783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:56:40 +00:00
Drew Jaynes
6146ba0b33
Docs: Clarify the description for `esc_html__()` to note that the original text will be escaped on return if there is no translation, or the text domain isn't loaded.
...
Props brianlayman.
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40932
git-svn-id: http://core.svn.wordpress.org/trunk@40782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:41:41 +00:00
Drew Jaynes
c5da335097
Docs: Fix a typo in the description for the `get_previous_post_link()` `$link` parameter. The default value is '%title', not '%title%'.
...
Props kmgalanakis.
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40931
git-svn-id: http://core.svn.wordpress.org/trunk@40781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:20:43 +00:00
Drew Jaynes
fafa1dfa07
Docs: Add more complete documentation about expected values in the `$meta` parameter for `wpmu_create_blog()`.
...
See #41017 .
Built from https://develop.svn.wordpress.org/trunk@40930
git-svn-id: http://core.svn.wordpress.org/trunk@40780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 05:48:45 +00:00
Drew Jaynes
acea6cbad8
Improve the usefulness of several `_deprecated_function()` calls by passing known replacement functions, methods, or hooks.
...
Props jrf.
See #41121 .
Built from https://develop.svn.wordpress.org/trunk@40929
git-svn-id: http://core.svn.wordpress.org/trunk@40779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 00:05:44 +00:00