Commit Graph

39911 Commits

Author SHA1 Message Date
Sergey Biryukov
6da93732e7 Docs: Add missing description for $current_screen global.
Props mukesh27.
Fixes #45604. See #47110.
Built from https://develop.svn.wordpress.org/trunk@45740


git-svn-id: http://core.svn.wordpress.org/trunk@45551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 02:03:55 +00:00
Sergey Biryukov
7f7480cb2a Docs: Add missing description for $wp_query and $wp_the_query globals.
Props mukesh27.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45739


git-svn-id: http://core.svn.wordpress.org/trunk@45550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:59:56 +00:00
Sergey Biryukov
77a31e6875 Docs: Add missing description for $wp_locale_switcher global.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45738


git-svn-id: http://core.svn.wordpress.org/trunk@45549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:47:55 +00:00
Sergey Biryukov
e0311b76c7 Docs: Add missing description for $wp_locale global.
Props mukesh27.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45737


git-svn-id: http://core.svn.wordpress.org/trunk@45548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:46:55 +00:00
Sergey Biryukov
ea606165a5 Docs: Add missing description for $wp global.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45736


git-svn-id: http://core.svn.wordpress.org/trunk@45547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:28:55 +00:00
Sergey Biryukov
b1e34ccc1f Docs: Add missing description for $wp_rewrite global.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45735


git-svn-id: http://core.svn.wordpress.org/trunk@45546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:19:56 +00:00
Sergey Biryukov
29b072e706 Docs: Add missing description for $wpdb, $wp_db_version, and $wp_current_db_version globals.
Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604.
Built from https://develop.svn.wordpress.org/trunk@45734


git-svn-id: http://core.svn.wordpress.org/trunk@45545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:12:56 +00:00
Sergey Biryukov
702ee129ad Docs: Fix typo in a comment in WP_Site_Health::get_test_theme_version().
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45733


git-svn-id: http://core.svn.wordpress.org/trunk@45544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 00:48:56 +00:00
Sergey Biryukov
fd83290995 Site Health: If WP_DEFAULT_THEME doesn't exist, use WP_Theme::get_core_default_theme() as a fallback.
Props ajayghaghretiya1, juliobox, SergeyBiryukov.
Fixes #47299.
Built from https://develop.svn.wordpress.org/trunk@45732


git-svn-id: http://core.svn.wordpress.org/trunk@45543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 00:02:55 +00:00
Sergey Biryukov
7dbc4d28e5 Script Loader: Send a 400 Bad Request status code in load-scripts.php and load-styles.php if the required load[] parameter is not set.
Props compilenix.
Fixes #44108.
Built from https://develop.svn.wordpress.org/trunk@45731


git-svn-id: http://core.svn.wordpress.org/trunk@45542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 22:17:57 +00:00
Aaron Jorbin
c377191858 PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax
PHP used to allow both square brackets and curly braces to be used interchangeably for accessing array elements and string offsets. The curly bracket syntax is only allowed in a limited set of cases and can be confusing for people not used to it.
PHP 7.4 will deprecate the curly brace syntax for accessing array elements and string offsets and it is expected that support will be completely removed in PHP 8.0.
Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

See #47751.
Props jrf.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 20:21:55 +00:00
Andrea Fercia
b853e21bf9 Accessibility: Improve the differences between revisions.
Color alone is not sufficient to visually communicate differences.

- adds `plus` and `minus` icons to the changed lines
- adds visually hidden text: `Added`, `Deleted`, and `Unchanged` to clarify the differences to assistive technologies users

Props birgire, audrasjb, kjellr, adamsilverstein.
Fixes #43532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 15:46:54 +00:00
Andrea Fercia
cbd6b7b5bc Accessibility: Remove title attributes from the Meta widget.
- removes the `Powered by WordPress, state-of-the-art semantic personal publishing platform.` title attribute
- removes the title attribute from the abbreviations: contrary to a common belief, title attributes on abbreviations are only available to a minority of users, see https://developer.paciellogroup.com/blog/2019/03/short-note-the-abbreviation-appreciation-society/
- changes the term `RSS` to `feed`, as `RSS` is a technical term not all users are supposed to be familiar with
- improves the `widget_meta_poweredby` filter documentation

Props nishitlangaliya, chetan200891, audrasjb.
See #46980, #24766.
Fixes #46978.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 13:28:57 +00:00
Andrea Fercia
7b45746001 Menus: Fix the Custom Links text fallback.
When adding a Custom Link and leaving the "Link Text" field empty, WordPress used to set a default fallback text: "Menu Item".

The changes in [36379] broke this behavior making the fallback text: ` (Pending)`, with a leading space.

Pending major refactoring of the Menus page (which is going to use a block-based user interface) this change just restores the original behavior by adding the fallback text to the related AJAX response.

Props christophherr, Fencer04, thakkarhardik, backermann1978, audrasjb.
Fixes #38415.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 12:19:56 +00:00
Andrea Fercia
2d60076e77 Accessibility: Improve the way emojis are announced by screen readers.
Adds an ARIA `role="img"` to the emojis markup in the front end. While the ARIA role is technically redundant, it helps Safari and VoiceOver to properly announce the emojis as "image". Without the role, they announce a generic "group" role.
Tested with Safari 12.1.1 / VoiceOver 9.

Props pento.
See #37486.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 11:53:56 +00:00
Andrea Fercia
9228eeb47b Accessibility: Fix the alt attribute of the Gallery images within the Classic Editor.
Passes the images `alt` attribute value to the Gallery template used within the Classic Editor.

Props yarnboy, wpboss.
Fixes #47687.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 11:36:53 +00:00
Sergey Biryukov
76f482de43 Posts, Post Types: Check the result of wp_update_post() in wp_trash_post() and wp_untrash_post().
Props abhijitrakas, manzoorwani.jk, siliconforks.
Fixes #47773.
Built from https://develop.svn.wordpress.org/trunk@45724


git-svn-id: http://core.svn.wordpress.org/trunk@45535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 03:47:54 +00:00
Sergey Biryukov
c26f1c5d90 Taxonomy: Fix deprecated calls to get_terms().
The taxonomy should be passed as part of `$args`, rather than as its own argument.

Props sgastard, mukesh27, SergeyBiryukov.
Fixes #47819.
Built from https://develop.svn.wordpress.org/trunk@45723


git-svn-id: http://core.svn.wordpress.org/trunk@45534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 03:35:56 +00:00
Andrea Fercia
60431f3c53 Customize: Make the color picker close when clicking on the empty area on the right.
Props monikarao.
Fixes #47693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-02 17:09:57 +00:00
Sergey Biryukov
ad46ef7c06 Twenty Thirteen: Make twentythirteen_author_bio_template() use author templates if exist, fall back to regular template hierarchy otherwise.
See #32096.
Built from https://develop.svn.wordpress.org/trunk@45721


git-svn-id: http://core.svn.wordpress.org/trunk@45532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-02 03:09:55 +00:00
Sergey Biryukov
b900e22629 Twenty Fifteen: Make twentyfifteen_author_bio_template() use author templates if exist, fall back to regular template hierarchy otherwise.
See #32096.
Built from https://develop.svn.wordpress.org/trunk@45720


git-svn-id: http://core.svn.wordpress.org/trunk@45531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-02 03:08:55 +00:00
Sergey Biryukov
e2ea3f7f30 Twenty Thirteen: Prevent author-bio.php partial template from interfering with rendering an author archive of a user with the bio username.
Props rclations, ianbelanger, lordlod, SergeyBiryukov.
Fixes #32096.
Built from https://develop.svn.wordpress.org/trunk@45719


git-svn-id: http://core.svn.wordpress.org/trunk@45530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-02 02:34:52 +00:00
Sergey Biryukov
97f28973da Twenty Fifteen: Prevent author-bio.php partial template from interfering with rendering an author archive of a user with the bio username.
Props rclations, ianbelanger, lordlod, SergeyBiryukov.
See #32096.
Built from https://develop.svn.wordpress.org/trunk@45718


git-svn-id: http://core.svn.wordpress.org/trunk@45529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-02 02:33:57 +00:00
Sergey Biryukov
f6770efd94 Users: Clean user cache in check_password_reset_key() tests.
Props davidbaumwald, spacedmonkey.
See #45845.
Built from https://develop.svn.wordpress.org/trunk@45717


git-svn-id: http://core.svn.wordpress.org/trunk@45528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 19:54:55 +00:00
Sergey Biryukov
65420d3c7a Users: Replace raw SQL query in check_password_reset_key() with get_user_by().
Props davidbaumwald, iworks, spacedmonkey.
Fixes #45845.
Built from https://develop.svn.wordpress.org/trunk@45716


git-svn-id: http://core.svn.wordpress.org/trunk@45527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 19:19:55 +00:00
Sergey Biryukov
ee5e044a2a Users: Use clean_user_cache() in wp_insert_user(), wp_update_user(), wp_set_password(), add_user_to_blog().
Props spacedmonkey.
Fixes #47021.
Built from https://develop.svn.wordpress.org/trunk@45715


git-svn-id: http://core.svn.wordpress.org/trunk@45526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 17:49:57 +00:00
Sergey Biryukov
75857aa857 Users: Use wp_update_user() in get_password_reset_key().
Props jayswadas, spacedmonkey, donmhico, SergeyBiryukov.
Fixes #45746.
Built from https://develop.svn.wordpress.org/trunk@45714


git-svn-id: http://core.svn.wordpress.org/trunk@45525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 17:25:55 +00:00
Sergey Biryukov
f6189321e1 Users: Reorganize user_nicename, user_url, user_registered setting in wp_insert_user() for consistency with the order or fields in the database.
See #45746.
Built from https://develop.svn.wordpress.org/trunk@45713


git-svn-id: http://core.svn.wordpress.org/trunk@45524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 17:13:57 +00:00
Sergey Biryukov
4a6461dcc2 Users: Use get_password_reset_key() in wp_new_user_notification().
Props mrasharirfan, spacedmonkey.
Fixes #45745.
Built from https://develop.svn.wordpress.org/trunk@45712


git-svn-id: http://core.svn.wordpress.org/trunk@45523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 15:30:58 +00:00
Sergey Biryukov
6623a824d0 Taxonomy: Correct some strict comparisons after [45710].
See #47573.
Built from https://develop.svn.wordpress.org/trunk@45711


git-svn-id: http://core.svn.wordpress.org/trunk@45522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 15:04:56 +00:00
Sergey Biryukov
3e1126d940 Coding Standards: Use strict comparison in wp-includes/taxonomy.php.
Props andizer, SergeyBiryukov.
Fixes #47573.
Built from https://develop.svn.wordpress.org/trunk@45710


git-svn-id: http://core.svn.wordpress.org/trunk@45521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 13:45:56 +00:00
Sergey Biryukov
fd03949143 Coding Standards: Fix WPCS violations after [45708].
See #45747.
Built from https://develop.svn.wordpress.org/trunk@45709


git-svn-id: http://core.svn.wordpress.org/trunk@45520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 12:03:56 +00:00
Sergey Biryukov
b32cff72c2 Users: Deprecate update_user_status() in favor of wp_update_user().
Props spacedmonkey, SergeyBiryukov.
Fixes #45747.
Built from https://develop.svn.wordpress.org/trunk@45708


git-svn-id: http://core.svn.wordpress.org/trunk@45519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 11:28:54 +00:00
Sergey Biryukov
2d574d673f Database: Use a strict comparison for has_filter() check in wpdb::placeholder_escape().
The filter is added with a priority of `0`, so a loose comparison had an unintended effect of adding the filter on every call.

Props withinboredom.
Fixes #47430.
Built from https://develop.svn.wordpress.org/trunk@45707


git-svn-id: http://core.svn.wordpress.org/trunk@45518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 02:25:56 +00:00
K. Adam White
5f9ba92af4 REST API: Skip processing fields which are not present in the selected context.
In `WP_REST_Controller::get_fields_for_response()`, exclude fields which are not registered to appear in the request's context.

In conjunction with r45705 this prevents the unnecessary computation of the sample permalink when making a request that is not context=edit.

Props dlh.
Fixes #45605.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 20:21:56 +00:00
K. Adam White
d296736b75 REST API: Generate sample permalink only when a dependent field is requested.
The sample permalink will now only be generated if the derivative `permalink_template` or `generated_slug` fields are to be included in the response, preventing an unnecessary database request for each post (via `wp_unique_post_slug()`) when those fields are not requested.

Props dlh.
See #45605.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 20:00:57 +00:00
Sergey Biryukov
ee23869c68 Docs: Correct parameter documentation for bulk_edit_custom_box and quick_edit_custom_box actions.
Props abrain.
Fixes #47810.
Built from https://develop.svn.wordpress.org/trunk@45704


git-svn-id: http://core.svn.wordpress.org/trunk@45515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 15:10:58 +00:00
Sergey Biryukov
fec01b0685 Docs: Correct parameter type and description for is_email filter.
Props jenkoian.
Fixes #47793.
Built from https://develop.svn.wordpress.org/trunk@45703


git-svn-id: http://core.svn.wordpress.org/trunk@45514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 01:26:54 +00:00
Sergey Biryukov
383c1df66b Docs: Correct @return value description for get_term_link().
Props garrett-eclipse.
Fixes #47806.
Built from https://develop.svn.wordpress.org/trunk@45702


git-svn-id: http://core.svn.wordpress.org/trunk@45513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 01:19:56 +00:00
Tammie Lister
d5c7657189 Media: Reduces the bulk media options to have one primary button
This fixes where 2 primary buttons were showing for bulk actions within media trash.

Props garrett-eclipse, afercia, ianbelanger, SergeyBiryukov
Fixes #46757, #46758

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


git-svn-id: http://core.svn.wordpress.org/trunk@45512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-30 23:20:57 +00:00
Tammie Lister
fa9980049e Admin: Improve Dashboard icon contrast.
The icons used across the dashboard had too low contrast to pass AA WCAG guidelines. They’re now slightly darker for better contrast.

Props @melchoyce, @SergeyBiryukov, @chetan200891 , @kjellr 
Fixes #46935

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


git-svn-id: http://core.svn.wordpress.org/trunk@45511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-30 22:54:57 +00:00
Sergey Biryukov
c7493264a4 Rewrite Rules: Check if $wp_rewrite->flush_rules() is callable before calling it in flush_rewrite_rules().
Props bsetiawan88, markjaquith.
Fixes #47087.
Built from https://develop.svn.wordpress.org/trunk@45699


git-svn-id: http://core.svn.wordpress.org/trunk@45510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 17:52:56 +00:00
Sergey Biryukov
98642b4821 Users: Use case-insensitive email address comparison when checking whether "Grant this user super admin privileges" checkbox should be displayed on Edit User screen.
Props trepmal.
Fixes #47119.
Built from https://develop.svn.wordpress.org/trunk@45698


git-svn-id: http://core.svn.wordpress.org/trunk@45509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 17:42:55 +00:00
Sergey Biryukov
ec8940edeb Coding Standards: Fix WPCS violations in wp-admin/includes/class-walker-nav-menu-edit.php.
Props sudhiryadav, audrasjb.
Fixes #46902.
Built from https://develop.svn.wordpress.org/trunk@45697


git-svn-id: http://core.svn.wordpress.org/trunk@45508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:53:52 +00:00
Sergey Biryukov
c9942bb3d8 Coding Standards: Fix WPCS violations in [45694].
See #47466.
Built from https://develop.svn.wordpress.org/trunk@45696


git-svn-id: http://core.svn.wordpress.org/trunk@45507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:52:56 +00:00
Sergey Biryukov
e7abdc7040 Docs: Improve the DocBlocks for got_mod_rewrite(), extract_from_markers(), insert_with_markers().
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45695


git-svn-id: http://core.svn.wordpress.org/trunk@45506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:35:56 +00:00
Sergey Biryukov
67e5038470 Rewrite Rules: Add a comment to # BEGIN/END .htaccess markers to clarify that the directives are dynamically generated, and should only be modified via WordPress filters.
Introduce `insert_with_markers_inline_instructions` filter to modify the default instructions text.

Props bradleyt, SergeyBiryukov.
Fixes #47466.
Built from https://develop.svn.wordpress.org/trunk@45694


git-svn-id: http://core.svn.wordpress.org/trunk@45505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:31:57 +00:00
Sergey Biryukov
7a4d1b5dbd Permalinks: Improve appearance of URL examples on Permalink Settings screen.
Props luan-ramos, sarath.ar.
Fixes #41559.
Built from https://develop.svn.wordpress.org/trunk@45693


git-svn-id: http://core.svn.wordpress.org/trunk@45504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:11:56 +00:00
Sergey Biryukov
b95b055225 Administration: Allow breaking long strings in <code> tags at any point, to avoid overflowing on mobile.
Props david.binda, mukesh27.
Fixes #47329.
Built from https://develop.svn.wordpress.org/trunk@45692


git-svn-id: http://core.svn.wordpress.org/trunk@45503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:09:55 +00:00
Sergey Biryukov
a59301c2ba Site Health: Consistently use wpdb::db_version() for checking the database server version, instead of partically replicating its functionality.
Props Clorith, wpfed.
Fixes #47738.
Built from https://develop.svn.wordpress.org/trunk@45691


git-svn-id: http://core.svn.wordpress.org/trunk@45502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 14:55:57 +00:00