This allow for using these functions outside of the loop.
Props donmhico, garrett-eclipse, Hinjiriyo, imath.
Fixes#48772.
git-svn-id: https://develop.svn.wordpress.org/trunk@47276 602fd350-edb4-49c9-b593-d223f7449a82
When an attempt is made to update an active plugin automatically, there is the potential currently for two negative scenarios:
- The plugin can be deactivated if the Plugins admin screen is loaded when the plugin update is incomplete, causing a PHP error.
- The WSOD protection could be triggered, sending a false alarm email to the site administrator.
By enabling maintenance mode before an active plugin update is attempted, these scenarios can be avoided.
This change implements the same approach as the `Theme_Upgrader` class of using the `upgrader_pre_install` and `upgrader_post_install` hooks to toggle maintenance mode.
Props desrosj, SergeyBiryukov.
Fixes#49400.
git-svn-id: https://develop.svn.wordpress.org/trunk@47275 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the pullquote color setting by moving `color` from `blockquote p` to `blockquote`. Also adds the border-left to the front-end stylesheet to match the editor. Also adds styles for rtl pullquote.
Props kokkieh, desrosj, mukesh27, khushbu19, disillusia, aliveic, abrightclearweb, SergeyBiryukov.
Fixes#47019.
git-svn-id: https://develop.svn.wordpress.org/trunk@47273 602fd350-edb4-49c9-b593-d223f7449a82
The string refers to the post type name specifically, not to a generic term to identify a publication on WordPress.
Props audrasjb, jdy68.
Fixes#49306.
git-svn-id: https://develop.svn.wordpress.org/trunk@47272 602fd350-edb4-49c9-b593-d223f7449a82
This commit makes sure that when uploading a plugin or theme file, the Install Now button is correctly aligned, and the button does not drops to the next line if filename is long.
Props seedsca, SergeyBiryukov, audrasjb.
Fixes#48859.
git-svn-id: https://develop.svn.wordpress.org/trunk@47271 602fd350-edb4-49c9-b593-d223f7449a82
* `erase_others_personal_data`
* `export_others_personal_data`
* `manage_privacy_options`
Previously mapped to `manage_options` or `manage_network` (on Multisite), these are now added to the Administrator role separately.
Additionally, `manage_privacy_options` is added to the Editor role.
Props garrett-eclipse, xkon, pbiron, desrosj, johnbillion, flixos90, juliobox, lakenh, Ov3rfly, ianatkins.
Fixes#44176.
git-svn-id: https://develop.svn.wordpress.org/trunk@47269 602fd350-edb4-49c9-b593-d223f7449a82
The result is still escaped with `esc_url_raw()` for retrieval, and with `esc_url()` for display in `the_header_video_url()`.
Props dlh, Tkama.
Fixes#40044.
git-svn-id: https://develop.svn.wordpress.org/trunk@47267 602fd350-edb4-49c9-b593-d223f7449a82
Implementation of bottom padding in overflow content differs across browsers. See https://github.com/w3c/csswg-drafts/issues/129. To make bottom spacing consistent across browsers there's the need for an alternate CSS method.
- uses a CSS `after` pseudo element or simply a bottom margin to reserve some bottom spacing
- removes a couple leftovers from [40428]
- fixes an annoying visual glitch where the media modal content is visible behind the bottom toolbar border
Props sabernhardt, afercia.
See #40152.
Fixes#48378.
git-svn-id: https://develop.svn.wordpress.org/trunk@47266 602fd350-edb4-49c9-b593-d223f7449a82
register_rest_field can be used to add properties to a schema, but no mechanism existed to alter existing properties like "content".
Running the schema through this filter lets plugins append additional sub-properties to existing schema definitions.
Props luisherranz, TimothyBlynJacobs, swissspidy, westonruter, kadamwhite.
Fixes#47779.
git-svn-id: https://develop.svn.wordpress.org/trunk@47265 602fd350-edb4-49c9-b593-d223f7449a82
The currently active widget controls should always be displayed on top.
Props audrasjb, fervillz, rinkuyadav999, jaydeep23290, ashokrd2013, melchoyce, pento, westonruter, SergeyBiryukov.
Fixes#42001.
git-svn-id: https://develop.svn.wordpress.org/trunk@47263 602fd350-edb4-49c9-b593-d223f7449a82
Rule out groups of API endpoints by simple namespace string comparison to reduce the number of regex checks necessary when matching a route.
Props TimothyBlynJacobs.
Fixes#48530.
git-svn-id: https://develop.svn.wordpress.org/trunk@47260 602fd350-edb4-49c9-b593-d223f7449a82
Fully list which first-party core theme features are supported in the /themes endpoint response. This brings the REST API themes controller's response more in line with the output of get_theme_support().
Props adamboro, apieschel, koke, spacedmonkey, TimothyBlynJacobs.
See #49037.
git-svn-id: https://develop.svn.wordpress.org/trunk@47258 602fd350-edb4-49c9-b593-d223f7449a82
This makes the box more consistent with the Publish meta box in classic editor.
Props birgire, nfmohit, melchoyce, afercia.
Fixes#43587.
git-svn-id: https://develop.svn.wordpress.org/trunk@47252 602fd350-edb4-49c9-b593-d223f7449a82
With a lot of export or erasure requests, the secondary buttons were becoming overwhelming when stacked on top of each other.
Props xkon, karmatosed.
Fixes#49323.
git-svn-id: https://develop.svn.wordpress.org/trunk@47247 602fd350-edb4-49c9-b593-d223f7449a82
This adds a progress indicator for "Download Personal Data" and "Erase Personal Data" row actions, which can take a while with a lot of data.
Props garrett-eclipse, allendav, dominic_ks, xkon, karmatosed, birgire.
Fixes#44264.
git-svn-id: https://develop.svn.wordpress.org/trunk@47246 602fd350-edb4-49c9-b593-d223f7449a82
The function returns an instance of the `WP_User_Request` object itself, not its `$request_data` property.
Follow-up to [44606].
Props garrett-eclipse.
Fixes#46302.
git-svn-id: https://develop.svn.wordpress.org/trunk@47245 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a bug where the in-page pagination does not align within the inner container.
Props ataurr, audrasjb, mukesh27.
Fixes#48979.
git-svn-id: https://develop.svn.wordpress.org/trunk@47244 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a bug where the author bio and post meta have no left or right padding in smaller viewports.
Props JarretC.
Fixes#49254.
git-svn-id: https://develop.svn.wordpress.org/trunk@47241 602fd350-edb4-49c9-b593-d223f7449a82
Previously the REST API did not account for server configurations where the Authorization header must be added using ModRewrite. This caused major DUX issues when trying to use custom authentication mechanisms.
Fixes#47077.
Props dshanske, cklosows.
git-svn-id: https://develop.svn.wordpress.org/trunk@47239 602fd350-edb4-49c9-b593-d223f7449a82
Pending block editor revisions for WordPress 5.4 will make use of `window.URL` and `window.DOMRect`. These are not available in Internet Explorer (or pre-Chromium Edge for `DOMRect`) and must be polyfilled to avoid script errors.
The changes make use of the existing polyfill pattern, and existing `polyfill-library` dependency. The dependency is bumped to the latest version, since the previous version did not include the `DOMRect` polyfill.
Props jorgefilipecosta.
Fixes#49360.
git-svn-id: https://develop.svn.wordpress.org/trunk@47238 602fd350-edb4-49c9-b593-d223f7449a82
Session tokens contain an IP address and user agent.
Props garrett-eclipse, nickylimjj, lakenh, xkon, rconde.
Fixes#45889.
git-svn-id: https://develop.svn.wordpress.org/trunk@47237 602fd350-edb4-49c9-b593-d223f7449a82
The value is used by the WordPress Events and News widget to show relevant WP community events.
The location information may include an IP address, location description, and latitude/longitude coordinates.
Props garrett-eclipse, coreymckrill, xkon.
Fixes#43921.
git-svn-id: https://develop.svn.wordpress.org/trunk@47236 602fd350-edb4-49c9-b593-d223f7449a82
When used as a noun referring to the "virtual" place, `Trash` should be capitalized.
Props garrett-eclipse, aandrewdixon, Presskopp.
Fixes#45317.
git-svn-id: https://develop.svn.wordpress.org/trunk@47233 602fd350-edb4-49c9-b593-d223f7449a82
Link Manager is disabled for new installations since WordPress 3.5, so core should not encourage importing links.
See #meta4706 for the corresponding WordPress.org API change.
Props Ipstenu, hareesh-pillai, DrewAPicture, nacin, karmatosed, dd32, garrett-eclipse.
Fixes#22994. See #21307.
git-svn-id: https://develop.svn.wordpress.org/trunk@47227 602fd350-edb4-49c9-b593-d223f7449a82
Previously the _embed flag would embed all embeddable links in a response even if only a subset of the links were necessary. Now, a list of link relations can be passed in the _embed parameter to restrict the list of embedded objects.
Props rheinardkorf, adamsilverstein, jnylen0, cklosows, chrisvanpatten, TimothyBlynJacobs.
Fixes#39696.
git-svn-id: https://develop.svn.wordpress.org/trunk@47224 602fd350-edb4-49c9-b593-d223f7449a82
The <tfoot> element was allowed to precede the <tbody> element in HTML 5. However, that was changed in HTML 5.1 and <tfoot> must now follow <tbody>.
This removes the tfooot and instead uses a nav element for navigation between months.
Fixes: #39763
Props: isabel_brison, Harry Milatz, audrasjb, abhijitrakas, SergeyBiryukov
git-svn-id: https://develop.svn.wordpress.org/trunk@47223 602fd350-edb4-49c9-b593-d223f7449a82
Repeated containers used for custom fields have duplicate ID attributes. Duplicate IDs are incorrect HTML, and will also cause unexpected results when trying to manipulate using JS. Duplicate IDs are changed to matching classes; CSS & JS updated to match.
Props jankimoradiya, audrasjb, donmhico, afercia.
Fixes#46964.
git-svn-id: https://develop.svn.wordpress.org/trunk@47222 602fd350-edb4-49c9-b593-d223f7449a82
For accessibility, the visual appearance and source order should match. Moving the toolbar to load in the new hook `wp_body_open` (5.2) fixes a long-standing source order problem.
Props jankimoradiya, afercia, SergeyBiryukov, audrasjb, ocean90, xkon, dinhtungdu.
Fixes#47053.
git-svn-id: https://develop.svn.wordpress.org/trunk@47221 602fd350-edb4-49c9-b593-d223f7449a82
The condition is meant to check for a non-empty string, however `get_plugin_page_hook()` can return null, in which case the strict check doesn't work as expected.
Follow-up to [47218].
See #48455, #49222.
git-svn-id: https://develop.svn.wordpress.org/trunk@47220 602fd350-edb4-49c9-b593-d223f7449a82
Depending on the specific media view, the media UI elements are placed in a
different visual order. This change makes sure their visual order always
matches the DOM order.
Propos syhc, audrasjb, afercia.
See #37188.
Fixes#48403.
git-svn-id: https://develop.svn.wordpress.org/trunk@47217 602fd350-edb4-49c9-b593-d223f7449a82
This resolves an issue with plugins like HyperDB, which doesn't have a database connection until a query is made.
Props xkon, Otto42, Clorith.
See #47606.
git-svn-id: https://develop.svn.wordpress.org/trunk@47215 602fd350-edb4-49c9-b593-d223f7449a82
These functions are moved to `inc/helper-functions.php`:
* `twentynineteen_can_show_post_thumbnail()`
* `twentynineteen_image_filters_enabled()`
* `twentynineteen_get_avatar_size()`
* `twentynineteen_is_comment_by_post_author()`
* `twentynineteen_get_discussion_data()`
* `twentynineteen_hsl_hex()`
Additionally, `twentynineteen_add_dropdown_icons()` is moved to `inc/icon-functions.php` to join `twentynineteen_nav_menu_social_icons()`.
Props akshayar, allancole, grapplerulrich.
Fixes#45984.
git-svn-id: https://develop.svn.wordpress.org/trunk@47214 602fd350-edb4-49c9-b593-d223f7449a82
Front Page, Posts Page, or Privacy Policy Page should now be marked as such on the added menu items.
Props garrett-eclipse.
Fixes#49374.
git-svn-id: https://develop.svn.wordpress.org/trunk@47211 602fd350-edb4-49c9-b593-d223f7449a82
The restictions mentioned for the parameter value should be consistenct.
Props pbiron, SergeyBiryukov.
Fixes#49384.
git-svn-id: https://develop.svn.wordpress.org/trunk@47210 602fd350-edb4-49c9-b593-d223f7449a82
These are language constructs, not function calls, so the parentheses are unnecessary.
This updates the PHPCS configuration file the enforce the sniff until it is moved from the `WordPress-Extra` ruleset to the `WordPress-Core` ruleset upstream.
Follow-up to [47198].
Props desrosj, jrf, GaryJ.
Fixes#49376.
git-svn-id: https://develop.svn.wordpress.org/trunk@47207 602fd350-edb4-49c9-b593-d223f7449a82
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.
This commit also includes:
* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
* `wp-admin/admin-header.php`
* `wp-admin/admin-footer.php`
* `wp-includes/version.php`
Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes#48082.
git-svn-id: https://develop.svn.wordpress.org/trunk@47198 602fd350-edb4-49c9-b593-d223f7449a82
This ensures the file containing the `WP_Object_Cache` class conforms to the coding standards.
For backward compatibility, the new file is included from `wp-includes/cache.php`.
Fixes#49373. See #49222.
git-svn-id: https://develop.svn.wordpress.org/trunk@47197 602fd350-edb4-49c9-b593-d223f7449a82
This allows the icons to be retrieved via `get_post_type_object()`.
Props m.usama.masood, michael.ecklund, SergeyBiryukov.
Fixes#38844.
git-svn-id: https://develop.svn.wordpress.org/trunk@47196 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a bug where certain words break on to a second line in the primary and footer menus, in certain languages.
Props smallprogrammers, Shital Patel, mukesh27, audrasjb.
Fixes#48970.
git-svn-id: https://develop.svn.wordpress.org/trunk@47192 602fd350-edb4-49c9-b593-d223f7449a82
The new style is more consistent with other elements like `.wp-core-ui` buttons.
Props audrasjb, mensmaximus, afercia, melchoyce, Clorith.
Fixes#48578.
git-svn-id: https://develop.svn.wordpress.org/trunk@47188 602fd350-edb4-49c9-b593-d223f7449a82
If the post status is not registered, assume it's not public, but still allow access to users with edit permissions (same as for a protected post status, e.g. `draft`), so that they could recover orphaned content.
Add unit tests.
Follow-up to [47178].
Props roytanck, SergeyBiryukov.
Fixes#48653.
git-svn-id: https://develop.svn.wordpress.org/trunk@47181 602fd350-edb4-49c9-b593-d223f7449a82
If the post status is not registered, assume it's not public.
Follow-up to [47178].
Props roytanck.
See #48653.
git-svn-id: https://develop.svn.wordpress.org/trunk@47179 602fd350-edb4-49c9-b593-d223f7449a82
With `map_meta_cap` enabled for a post type, the `read_post` capability for posts with a public status is supposed to be mapped to the post type's `read` capability.
When a post is left in the database after the post status is no longer present, and WP does a `read_post` check against it, a PHP notice was thrown, and the cap check always failed.
As a more graceful fallback, the cap is now mapped onto `edit_others_posts`, which allows highly privileged users to be able to access orphaned content.
A `_doing_it_wrong()` notice is also added, so that developers and site administrators are aware that the cap mapping is failing in the absence of the registered post status.
Follow-up to [34091], which introduced a similar approach to checking mapped caps against an unregistered post type.
Props roytanck, SergeyBiryukov.
Fixes#48653.
git-svn-id: https://develop.svn.wordpress.org/trunk@47178 602fd350-edb4-49c9-b593-d223f7449a82
Core did not include the navigation block PHP files.
This commit fixes the issue referred, and now the navigation block is executed on the frontend. The block still does not work as expected and throws an error during frontend execution. That problem is going to be fixed on the next WordPress package update.
This commit adds the file as it is on the npm package used.
Props gziolo.
Fixes#49348.
git-svn-id: https://develop.svn.wordpress.org/trunk@47176 602fd350-edb4-49c9-b593-d223f7449a82
* Change default value of the `$blog_id` parameter to match the documented type.
* Change the type of the `$reassign` parameter for consistency with `$user_id` and `$blog_id`.
* Add documentation for the return value.
See #49361.
git-svn-id: https://develop.svn.wordpress.org/trunk@47173 602fd350-edb4-49c9-b593-d223f7449a82
Starting with MySQL 5.7.5, the `ANSI` mode implies `ONLY_FULL_GROUP_BY`, which is already listed in `wpdb` as incompatible per [27072].
When `ANSI` is enabled on MySQL 5.7.5+, `ONLY_FULL_GROUP_BY` remains enabled even after being "unset" by `wpdb::set_sql_mode()`.
To prevent this, the `ANSI` mode should also be listed as incompatible. It is not enabled on default MySQL installations.
Props jnylen0.
Fixes#48377.
git-svn-id: https://develop.svn.wordpress.org/trunk@47171 602fd350-edb4-49c9-b593-d223f7449a82
The transient is only used in the `wp_dashboard_plugins_output()` function, which is deprecated and unused since [40607].
The function itself also sets the same transient, so it can be removed from `WP_Plugins_List_Table`.
Props aftabmuni.
Fixes#49340.
git-svn-id: https://develop.svn.wordpress.org/trunk@47167 602fd350-edb4-49c9-b593-d223f7449a82
The original script was deprecated in [30338] and removed in [32677].
Props Presskopp, ketuchetan.
Fixes#39448.
git-svn-id: https://develop.svn.wordpress.org/trunk@47164 602fd350-edb4-49c9-b593-d223f7449a82
This makes the function more consistent with `get_the_ID()` or `wp_get_post_parent_id()`, both returning an integer.
Props 0v3rth3d4wn.
Fixes#40096.
git-svn-id: https://develop.svn.wordpress.org/trunk@47160 602fd350-edb4-49c9-b593-d223f7449a82
Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.
Props afercia, ryokuhi, sabernhardt, garrett-eclipse.
See #47656, #43037, #42945.
git-svn-id: https://develop.svn.wordpress.org/trunk@47156 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the inputs don't push the buttons to the next line.
Props williampatton, bordoni.
Fixes#49043.
git-svn-id: https://develop.svn.wordpress.org/trunk@47151 602fd350-edb4-49c9-b593-d223f7449a82
Use `WP_Site_Health::get_instance()` where it's needed, instead of creating multiple instances of the class.
Props afercia, xkon, Clorith, SergeyBiryukov.
See #47606.
git-svn-id: https://develop.svn.wordpress.org/trunk@47149 602fd350-edb4-49c9-b593-d223f7449a82
Per WCAG 2.0 guidelines, big chunks of italic text should be avoided for better accessibility.
Props birgire, sabernhardt, xkon, garrett-eclipse, melchoyce, karmatosed, afercia, jepperask, SergeyBiryukov.
Fixes#44621. See #47327.
git-svn-id: https://develop.svn.wordpress.org/trunk@47147 602fd350-edb4-49c9-b593-d223f7449a82
The produced ZIP archive will now include an `export.json` file along with the current `index.html`.
Props xkon.
Fixes#49029. See #46424.
git-svn-id: https://develop.svn.wordpress.org/trunk@47146 602fd350-edb4-49c9-b593-d223f7449a82
The theme does not use a `px` fallback for `rem` units anywhere else.
Follow-up to [47053] for Twenty Twenty.
See #49015.
git-svn-id: https://develop.svn.wordpress.org/trunk@47140 602fd350-edb4-49c9-b593-d223f7449a82
Store each generated embedded object in a temporary cache when querying for linked resources so that repeated links to the same resource do not trigger repeated queries or processing.
Props TimothyBlynJacobs.
Fixes#48838.
git-svn-id: https://develop.svn.wordpress.org/trunk@47138 602fd350-edb4-49c9-b593-d223f7449a82
* Remove `WordPress` from `Requires at least` headers.
* Ensure the `Requires at least` and `Requires PHP` headers are present in the `style.css` file.
Follow-up to [46676], which updated `style-rtl.css`, but not `style.scss` or `style.css`.
See #48517.
git-svn-id: https://develop.svn.wordpress.org/trunk@47136 602fd350-edb4-49c9-b593-d223f7449a82
Adds the call to `responsive-embed` theme support in order to fix issues with facebook embeds not being responsive at certain screen widths.
Props williampatton, nielslange.
Fixes#48552.
git-svn-id: https://develop.svn.wordpress.org/trunk@47135 602fd350-edb4-49c9-b593-d223f7449a82
The `ndash` standardly is the "through" indicator for showing inclusive dates and numbers, while the `mdash` is an interruptor and used as an aside.
Props mikejdent, garrett-eclipse.
Fixes#48286.
git-svn-id: https://develop.svn.wordpress.org/trunk@47134 602fd350-edb4-49c9-b593-d223f7449a82
This makes the font family selector for `entry-content` less specific and thus easier to override.
Props alexandreb3, larrach, audrasjb.
Fixes#49318.
git-svn-id: https://develop.svn.wordpress.org/trunk@47133 602fd350-edb4-49c9-b593-d223f7449a82
If an upcoming event spans over several days, this information is now properly reflected in the widget.
Props imath, casiepa, iandunn, hareesh-pillai, melchoyce, mapk, desrosj, audrasjb, SergeyBiryukov.
Fixes#47798.
git-svn-id: https://develop.svn.wordpress.org/trunk@47124 602fd350-edb4-49c9-b593-d223f7449a82
With the upstream library not updated in 10 years since the last time it was merged, it should be safe to treat it as "adopted" rather than external, and make these fixes.
Props passoniate, ottok.
Fixes#49163. See #38464.
git-svn-id: https://develop.svn.wordpress.org/trunk@47123 602fd350-edb4-49c9-b593-d223f7449a82
Apply the case-insensitive network-site comparisons added in [27725] for `wp-admin/network/admin.php` to `wp-admin/user/admin.php` too, for consistency.
Props rimadoshi.
Fixes#49300.
git-svn-id: https://develop.svn.wordpress.org/trunk@47115 602fd350-edb4-49c9-b593-d223f7449a82
This information was previously available on the Moderate Comment screen in the admin, but was missing from moderation emails.
Props imath, danieltj, andraganescu, galbaras, SergeyBiryukov.
Fixes#43805. See #43429.
git-svn-id: https://develop.svn.wordpress.org/trunk@47114 602fd350-edb4-49c9-b593-d223f7449a82
The prefix includes a link to the parent comment and the name of its author.
Props zodiac1978, imath, SergeyBiryukov.
Fixes#43429.
git-svn-id: https://develop.svn.wordpress.org/trunk@47111 602fd350-edb4-49c9-b593-d223f7449a82
For users with the `unfiltered_html` capability, titles can contain legitimate markup.
The title is filtered on saving, so the content in the database is considered safe.
Props kjellr, joyously, peterwilsoncc.
Fixes#49190.
git-svn-id: https://develop.svn.wordpress.org/trunk@47110 602fd350-edb4-49c9-b593-d223f7449a82
Originally added in [4686], these constructor/destructor pairings were designed to prevent the objects from being destroyed before shutdown, when output buffers are flushed.
A deeper investigation reveals that this approach didn't quite work as expected and was later made redundant by introducing `wp_ob_end_flush_all()` in [5462].
Props wonderboymusic, nacin, Mte90, SergeyBiryukov.
Fixes#21402.
git-svn-id: https://develop.svn.wordpress.org/trunk@47107 602fd350-edb4-49c9-b593-d223f7449a82
The action is fired by both `switch_to_blog()` and `restore_current_blog()`, and previously it was difficult for callback functions to determine which function had fired it.
Props SergeyBiryukov, johnbillion, jeremyfelt.
Fixes#49265.
git-svn-id: https://develop.svn.wordpress.org/trunk@47105 602fd350-edb4-49c9-b593-d223f7449a82
The brackets were originally added in [16285] per W3C recommendation in https://www.w3.org/Addressing/URL/5.1_Wrappers.html to avoid wrapping the URL across multiple lines in plain text in older email clients.
This doesn't seem like a common issue in modern email clients, and the current implementation causes more issues than it solves. Since the URL is on a line by itself, it should not require any delimiters.
The URL in recovery mode email introduced in [44973] doesn't have angle brackets, so it's time to retire them in password reset email too if they're not used consistently.
Props donmhico, Otto42, sproutchris, iandunn, dd32, DaveWP196, sebastian.pisula, tommix, sablednah, julian.kimmig, Rahe, clayisland, arenddeboer, nicole2292, nagoke, squarecandy, eatingrules, SergeyBiryukov.
Fixes#21095, #23578, #44589.
git-svn-id: https://develop.svn.wordpress.org/trunk@47086 602fd350-edb4-49c9-b593-d223f7449a82
The `siteurl` option reference was not quite clear, and the string actually refers to the domain name, not the full URL.
Props kharisblank, tobifjellner, ramiy.
Fixes#49214.
git-svn-id: https://develop.svn.wordpress.org/trunk@47085 602fd350-edb4-49c9-b593-d223f7449a82
`WP_Theme::__get()` accepts `Name`, `Version`, and `Author` theme properties in lower case too.
Additionally, remove one short ternary instance, not allowed per the coding standards.
See #49222.
git-svn-id: https://develop.svn.wordpress.org/trunk@47083 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the function has enough context to determine the necessity of replacing the month name with the correct form in locales that require it.
Props SergeyBiryukov, Rarst.
Fixes#48934.
git-svn-id: https://develop.svn.wordpress.org/trunk@47078 602fd350-edb4-49c9-b593-d223f7449a82
The widget informs administrators of any potential issues that should be addressed to improve the performance or security of their website, and directs them to the Site Health screen for more details.
Props Clorith, hedgefield, guddu1315.
See #47606.
git-svn-id: https://develop.svn.wordpress.org/trunk@47063 602fd350-edb4-49c9-b593-d223f7449a82
With the introduction of asynchronous translation updates in WordPress 3.7+, the suggestion is no longer relevant.
Props casiepa, danieltj, tobifjellner, netweb.
Fixes#43242.
git-svn-id: https://develop.svn.wordpress.org/trunk@47061 602fd350-edb4-49c9-b593-d223f7449a82
Make sure `WP_Comments_List_Table::handle_row_actions()` and `WP_MS_Sites_List_Table::handle_row_actions()` return a string, for consistency with other classes.
See #49170, #48303.
git-svn-id: https://develop.svn.wordpress.org/trunk@47059 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up for #48154, where we started including *.asset.php files to declare package dependencies.
This works well but creates warnings in environments where the package does not exist because WordPress was not fully built.
Props jeherve, swissspidy.
Fixes#49144.
git-svn-id: https://develop.svn.wordpress.org/trunk@47048 602fd350-edb4-49c9-b593-d223f7449a82
This patch integrates DependencyExtractionWebpackPlugin which was battle-tested in Gutenberg.
This will greatly simplify the process of upgrading npm packages which change after every Gutenberg release. It might even useful during the WordPress release cycle as we might need to publish more often as we discover critical bugs and regressions.
Props jonsurrell, adamsilverstein, youknowriad, ocean90, netweb.
Fixes#48154.
git-svn-id: https://develop.svn.wordpress.org/trunk@47035 602fd350-edb4-49c9-b593-d223f7449a82
* Only query post types with `'show_in_rest' => true` instead of looping over all post types and checking the `show_in_rest` property separately.
* Return from the `foreach()` loop as soon as the permission check succeeded.
Props pbiron, TimothyBlynJacobs, SergeyBiryukov.
Fixes#49118.
git-svn-id: https://develop.svn.wordpress.org/trunk@47034 602fd350-edb4-49c9-b593-d223f7449a82
Previously, `wp_favicon_request()` was introduced in [13205] to avoid a performance hit of serving a full 404 page on every favicon request.
While working as intended, that implementation did not provide a way for theme or plugin authors to manage the behavior of favicon requests.
This changeset implements the following logic (only applied if WordPress is installed in the root directory):
* If there is a Site Icon set in Customizer, redirect `/favicon.ico` requests to that icon.
* Otherwise, use the WordPress logo as a default icon.
* If a physical `/favicon.ico` file exists, do nothing, let the server handle the request.
Handling `/favicon.ico` is now more consistent with handling `/robots.txt` requests.
New functions and hooks:
* Introduce `is_favicon()` conditional tag to complement `is_robots()`.
* Introduce `do_favicon` action to complement `do_robots` and use it in template loader.
* Introduce `do_favicon()` function, hooked to the above action by default, to complement `do_robots()`.
* Introduce `do_faviconico` action to complement `do_robotstxt`, for plugins to override the default behavior.
* Mark `wp_favicon_request()` as deprecated in favor of `do_favicon()`.
Props jonoaldersonwp, birgire, joostdevalk, mukesh27, SergeyBiryukov.
Fixes#47398.
git-svn-id: https://develop.svn.wordpress.org/trunk@47018 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the first available match was returned, regardless of the case, which was not always the expected result.
Props archon810, ben.greeley, tristangemus, vsamoletov, SergeyBiryukov.
Fixes#39768.
git-svn-id: https://develop.svn.wordpress.org/trunk@47010 602fd350-edb4-49c9-b593-d223f7449a82
In order to tell WordPress not to install new bundled themes on update, `CORE_UPGRADE_SKIP_NEW_BUNDLED` should be set to `true`, as the name suggests, not `false`.
Follow-up to [39064].
Props tomgreer, knutsp, crdunst.
See #49056.
git-svn-id: https://develop.svn.wordpress.org/trunk@47007 602fd350-edb4-49c9-b593-d223f7449a82
This better aligns with the semantics of applying filters to the input and returning a result, rather than performing an action and outputting to the current buffer.
Props ljasinskipl, thefarlilacfield.
Fixes#37422.
git-svn-id: https://develop.svn.wordpress.org/trunk@47004 602fd350-edb4-49c9-b593-d223f7449a82
It's a single-use URL parameter that does not need to be passed to canonical URLs in the admin.
Props dlh.
Fixes#49017.
git-svn-id: https://develop.svn.wordpress.org/trunk@47002 602fd350-edb4-49c9-b593-d223f7449a82
Skip setting the field if the user already exists, which is the case when the user tables are being shared among multiple sites.
Props EFAREM, eclare, darrenlambert, zachflauaus, viralsampat.
Fixes#35778.
git-svn-id: https://develop.svn.wordpress.org/trunk@46989 602fd350-edb4-49c9-b593-d223f7449a82
* Clarify in the documentation that the function returns `false` on failure.
* Consistently pass the return value through the `get_feed_build_date` filter.
Props Rarst, dd32, azaozz, tellyworth.
Fixes#48957.
git-svn-id: https://develop.svn.wordpress.org/trunk@46974 602fd350-edb4-49c9-b593-d223f7449a82
[3525] allowed a difference up to 59 seconds between the post date/time and the current time to consider the post published instead of scheduled, but that didn't take start of a new minute into account.
Rapidly creating post fixtures in unit tests could encounter a one-second discrepancy between `current_time( 'mysql' )` and `gmdate( 'Y-m-d H:i:s' )`, returning values like `2019-12-16 23:43:00` vs. `2019-12-16 23:42:59`, respectively, and setting the post to a `future` status instead of `publish`.
[45851], while working as intended, made the issue somewhat more likely to occur.
This caused all sorts of occasional random failures in various tests on Travis, mostly on PHP 7.1.
Fixes#48145.
git-svn-id: https://develop.svn.wordpress.org/trunk@46968 602fd350-edb4-49c9-b593-d223f7449a82
- Fix PHP warnings in `wp_unique_filename()` when the destination directory is unreadable.
- Run the final name collision test only for files that are saved to the uploads directory.
- Update the unit tests to match.
Props eden159, audrasjb, azaozz.
Fixes#48960 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@46965 602fd350-edb4-49c9-b593-d223f7449a82
This bumps the Twenty Twenty version number to `1.1` and update the `readme.txt` changelog.
Props audrasjb, sinatrateam, SergeyBiryukov
Fixes#48944.
git-svn-id: https://develop.svn.wordpress.org/trunk@46902 602fd350-edb4-49c9-b593-d223f7449a82
Prevent escaped unicode characters become unescaped in unsafe HTML during JSON decoding.
Props: aduth, epiqueras,
git-svn-id: https://develop.svn.wordpress.org/trunk@46896 602fd350-edb4-49c9-b593-d223f7449a82
`wp_kses_bad_protocol()` makes sure to validate that uri attributes don’t contain invalid/or not allowed protocols. While this works fine in most cases, there’s a risk that by using the colon html5 named entity, one is able to bypass this function.
Props: xknown, nickdaugherty, peterwilsoncc.
git-svn-id: https://develop.svn.wordpress.org/trunk@46895 602fd350-edb4-49c9-b593-d223f7449a82
- Silence errors when a node doesn't exist similarly to jQuery.
- Add "feature testing" and fallbacks for old browsers as this may run on the front-end.
- Improve inline docs.
Props dinhtungdu, azaozz.
Fixes#47069.
git-svn-id: https://develop.svn.wordpress.org/trunk@46883 602fd350-edb4-49c9-b593-d223f7449a82
This improves the appearance of various form controls in the admin and addresses some visual inconsistencies in WordPress 5.3.
Props afercia, audrasjb, jameskoster, GDragoN, azaozz, michaelarestad, murgroland, SamuelFernandez, chetan200891, veminom, dlh.
Fixes#48420.
git-svn-id: https://develop.svn.wordpress.org/trunk@46866 602fd350-edb4-49c9-b593-d223f7449a82
Previously, `post_date` or `comment_date` was assumed to be GMT, which is only true if the timezone string for the site matches GMT.
Add unit tests.
Props Rarst, smerriman, justdaiv, wonderboymusic, noyle.
Fixes#30429.
git-svn-id: https://develop.svn.wordpress.org/trunk@46864 602fd350-edb4-49c9-b593-d223f7449a82
This includes a speedup for signature verification on most platforms and bugfixes for 32-bit platforms.
Props paragoninitiativeenterprises, lukaswaudentio.
Fixes#48371.
git-svn-id: https://develop.svn.wordpress.org/trunk@46858 602fd350-edb4-49c9-b593-d223f7449a82
* Add a color that passes WCAG color contrast criteria to every link.
* Add an underline for links in credits list only on hover/focus.
Props audrasjb, ixkaito, mukesh27, melchoyce, SergeyBiryukov.
Fixes#48582.
git-svn-id: https://develop.svn.wordpress.org/trunk@46852 602fd350-edb4-49c9-b593-d223f7449a82
This fixes placeholder misalignment in Firefox when a `height` is added as an inline style to the input field.
Props aljullu, subratamal.
Fixes#48876.
git-svn-id: https://develop.svn.wordpress.org/trunk@46851 602fd350-edb4-49c9-b593-d223f7449a82
Previously, checkboxes for pending comments were partially hidden due to an added `4px` border.
Props audrasjb, jeremyfelt, talldanwp, melchoyce, marcelo2605, waleedt93.
Fixes#48815.
git-svn-id: https://develop.svn.wordpress.org/trunk@46845 602fd350-edb4-49c9-b593-d223f7449a82
This makes the checkbox in the comment form larger and more consistent with other checkboxes.
Props kharisblank, audrasjb.
Fixes#48652.
git-svn-id: https://develop.svn.wordpress.org/trunk@46844 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the actual UI controls state matches the visually conveyed state.
Props afercia, audrasjb, dinhtungdu, sathyapulse, simonjanin, welcher, SergeyBiryukov.
Fixes#48409.
git-svn-id: https://develop.svn.wordpress.org/trunk@46842 602fd350-edb4-49c9-b593-d223f7449a82
This makes `@since` notations in Twenty Seventeen, Twenty Nineteen, and Twenty Twenty consistent with the previous bundled themes.
See #48303.
git-svn-id: https://develop.svn.wordpress.org/trunk@46827 602fd350-edb4-49c9-b593-d223f7449a82
The JS implementation had multiple issues and did not work as expected.
This change includes an accessibility enhancement by using `prefers-reduced-motion: reduce` media query property for users that don't want motion effects. For further explanation on this media query, see MDN documentation: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior#Accessibility_concerns
Props audrasjb, melchoyce, joostdevalk, Anlino, mauteri, sergiomdgomes, littlebigthing, williampatton, netweb, andraganescu, joyously, acosmin, mukesh27, hareesh-pillai.
Fixes#48763, #48551, #48866.
git-svn-id: https://develop.svn.wordpress.org/trunk@46824 602fd350-edb4-49c9-b593-d223f7449a82
This doesn't change the underlying option name as that would be a backcompat break, but it makes the UI a bit more inclusive.
Props dartiss, jeremyfelt, aaronjorbin.
Fixes#48900.
git-svn-id: https://develop.svn.wordpress.org/trunk@46820 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that secondary buttons have an appropriate color contrast in the alternative color schemes.
Props melchoyce, ryelle, audrasjb, ate-up-with-motor, afercia, sabernhardt.
Fixes#48585.
git-svn-id: https://develop.svn.wordpress.org/trunk@46815 602fd350-edb4-49c9-b593-d223f7449a82
This adds an option to the Customizer that allows you to turn the author bio on or off, sitewide.
Props williampatton, nielslange acosmin, dlh.
Fixes#48550.
git-svn-id: https://develop.svn.wordpress.org/trunk@46813 602fd350-edb4-49c9-b593-d223f7449a82
* Document accepted values for the `$items` parameter.
* Use interpolated syntax for the filter name.
Props dilipbheda, johnbillion, SergeyBiryukov.
Fixes#48857.
git-svn-id: https://develop.svn.wordpress.org/trunk@46811 602fd350-edb4-49c9-b593-d223f7449a82
The `all_category_ids` cache key it relied on was removed in [5555] and never repopulated, causing invalid or unexpected results when using a persistent object cache.
Props itowhid06, johnjamesjacoby.
Fixes#48176.
git-svn-id: https://develop.svn.wordpress.org/trunk@46810 602fd350-edb4-49c9-b593-d223f7449a82
The `spl_object_hash()` function was introduced in PHP 5.2.0. As of PHP 5.3, the PHP SPL extension can no longer be disabled, so the `WP_Widget_Factory::hash_object()` workaround was removed in [46220].
See #48074.
git-svn-id: https://develop.svn.wordpress.org/trunk@46808 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize documentation for `add_filter()`, `tests_add_filter()`, `_wp_filter_build_unique_id()`, `_test_filter_build_unique_id()`.
Add a note that `$tag` and `$priority` are no longer used in `_wp_filter_build_unique_id()` since [46220], and the function always returns a string now.
Props donmhico, remcotolsma, SergeyBiryukov.
Fixes#47407. See #48303.
git-svn-id: https://develop.svn.wordpress.org/trunk@46801 602fd350-edb4-49c9-b593-d223f7449a82
The test reports a failure if the default timezone was changed with `date_default_timezone_set()` to anything other than `UTC`.
WordPress historically uses `UTC` as the default timezone for calculating date and time offsets, overriding it is not recommended and can cause widespread and obscure issues.
Props Rarst, Clorith, TimothyBlynJacobs.
Fixes#48692.
git-svn-id: https://develop.svn.wordpress.org/trunk@46797 602fd350-edb4-49c9-b593-d223f7449a82
Overriding default PHP timezone with `date_default_timezone_set()`, while not recommended, should not inadvertently result in changing existing permalinks.
Add a unit test.
Props Rarst, steevithak, archon810, maciejmackowiak, Ov3rfly, Cybr, hometowntrailers, scvleon, miette49.
Fixes#48623.
git-svn-id: https://develop.svn.wordpress.org/trunk@46795 602fd350-edb4-49c9-b593-d223f7449a82
This addresses an inconsistency with `_deprecated_hook()`, which uses `is_null()` to check if `$replacement` was provided, however the previous default value was `false`.
Props shaampk1, felipeelia.
Fixes#48817.
git-svn-id: https://develop.svn.wordpress.org/trunk@46792 602fd350-edb4-49c9-b593-d223f7449a82
On mobile devices using a webkit browser, the menu and search modals could not be opened due to a `TypeError: document.body is null`. This commit fixes that issue by adding a `touch-enabled` class to the body for browsers that do not support media queries.
Props quicoto, poena, Boga86, acosmin, macmanx.
Fixes#48601.
git-svn-id: https://develop.svn.wordpress.org/trunk@46786 602fd350-edb4-49c9-b593-d223f7449a82
With the changes in [45908], `mysql2date()` works correctly for all local time inputs, but should not be used for UTC time inputs.
Add a unit test.
Props Rarst, lisota.
Fixes#48675.
git-svn-id: https://develop.svn.wordpress.org/trunk@46756 602fd350-edb4-49c9-b593-d223f7449a82