This prevents the main area of Edit Media screen from being pushed down too far.
Props sabernhardt, afercia, fierevere, sathyapulse, mikeschroder, johnbillion.
Fixes#48780. See #47136.
git-svn-id: https://develop.svn.wordpress.org/trunk@47418 602fd350-edb4-49c9-b593-d223f7449a82
URL polyfill from the polyfill-library library is not spec-conformant, in a way which negatively impacts its usability for pending revisions to the block editor. Specifically, there were revisions to the implementation of the wp-url script to detect URL validity by relying on thrown errors from the URL constructor, but this specific behavior is not implemented in this version of the polyfill.
There was another issue in r47238, which is that the test used to check whether the polyfill should be included is not accurate. This commit uses a different check and fixes the issue.
Props aduth.
Fixes: #49360.
git-svn-id: https://develop.svn.wordpress.org/trunk@47416 602fd350-edb4-49c9-b593-d223f7449a82
This reverts [47222] due to compatibility issues with plugins which are using the `#poststuff` selector.
See #46964
git-svn-id: https://develop.svn.wordpress.org/trunk@47410 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the alignment of month links in the calendar widget with the changes in version 5.4 for all Bundled Themes, except Twenty Thirteen, which was already fixed in #49546.
Props sabernhardt.
Fixes#49549.
git-svn-id: https://develop.svn.wordpress.org/trunk@47405 602fd350-edb4-49c9-b593-d223f7449a82
Fixes phpcs error in the searchform.php file. The variables in this file were not prefixed correctly.
Props fahimmurshed.
Fixes#49523.
git-svn-id: https://develop.svn.wordpress.org/trunk@47393 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the alignment of month links in the calendar widget with the changes in version 5.4
Props sabernhardt.
Fixes#49546.
git-svn-id: https://develop.svn.wordpress.org/trunk@47392 602fd350-edb4-49c9-b593-d223f7449a82
This adds a missing DocBlock for `::register_routes()` and parameter descriptions for `::post_process_item()`.
Includes minor documenation fixes in other REST API classes for consistency.
Props dkarfa, mukesh27, SergeyBiryukov.
Fixes#48841.
git-svn-id: https://develop.svn.wordpress.org/trunk@47391 602fd350-edb4-49c9-b593-d223f7449a82
This adds a more specific description for accepted object types: `post`, `comment`, `term`, `user`, or any other object type with an associated meta table.
Props sheparddw, kraftbj, DrewAPicture, SergeyBiryukov.
Fixes#45464.
git-svn-id: https://develop.svn.wordpress.org/trunk@47390 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize the documentation between two places, use `WP_Customize_Panel::__construct()` as the canonical source.
Props iaaxpage, marekdedic.
Fixes#48344.
git-svn-id: https://develop.svn.wordpress.org/trunk@47387 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize the documentation between two places, use `WP_Customize_Section::__construct()` as the canonical source.
Props amolv, marekdedic.
Fixes#48346.
git-svn-id: https://develop.svn.wordpress.org/trunk@47386 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize the documentation between two places, use `WP_Customize_Setting::__construct()` as the canonical source.
Props tmanoilov, marekdedic.
Fixes#48347.
git-svn-id: https://develop.svn.wordpress.org/trunk@47384 602fd350-edb4-49c9-b593-d223f7449a82
The button is visually hidden, but was announced by screen readers in workflows unrelated to file uploading, leading to confusion.
Props afercia, audrasjb, azaozz.
Fixes#47611.
git-svn-id: https://develop.svn.wordpress.org/trunk@47375 602fd350-edb4-49c9-b593-d223f7449a82
* `.wp-calendar-table` for the `<table>` element.
* `.wp-calendar-nav` for the navigation wrapper.
* `.wp-calendar-nav-prev` for the previous month link.
* `.wp-calendar-nav-next` for the next month link.
Replace `#prev` and `#next` HTML IDs with `.wp-calendar-nav-prev` and `.wp-calendar-nav-next` classes.
Props sabernhardt, BackuPs, audrasjb, jorbin.
Fixes#39763.
git-svn-id: https://develop.svn.wordpress.org/trunk@47374 602fd350-edb4-49c9-b593-d223f7449a82
If the option does not exist, it will be created with whatever was passed to the `$autoload` parameter, `'yes'` being only the default value.
Props leogermani.
Fixes#48357.
git-svn-id: https://develop.svn.wordpress.org/trunk@47373 602fd350-edb4-49c9-b593-d223f7449a82
Among other things, this preserves compatibility of WP with PHPUnit Code Coverage generation.
Props jrf, Veraxus, Rarst.
See #48605.
git-svn-id: https://develop.svn.wordpress.org/trunk@47370 602fd350-edb4-49c9-b593-d223f7449a82
The parameter was previously used as the number of comments, marked as deprecated in [5101].
Given that it's been deprecated for the last 13 years, it should be safe to undeprecate and repurpose it for a cleaner function signature, instead of adding a fifth parameter.
Follow-up to [47276].
Fixes#48772.
git-svn-id: https://develop.svn.wordpress.org/trunk@47366 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize the documentation between two places, use `WP_Customize_Control::__construct()` as the canonical source.
Props hAmpzter, marekdedic, SergeyBiryukov.
Fixes#48343.
git-svn-id: https://develop.svn.wordpress.org/trunk@47364 602fd350-edb4-49c9-b593-d223f7449a82
Permit passing an empty object as the string "?obj=". The type of the passed empty argument is inferred from the registered schema.
Props TimothyBlynJacobs, steffanhalv, schlessera, dd32.
Fixes#42961.
git-svn-id: https://develop.svn.wordpress.org/trunk@47362 602fd350-edb4-49c9-b593-d223f7449a82
Check a more exhaustive list of post type editing caps beyond "edit_post" to ensure custom user roles with access to to specific post types may still use block editor functionality depending on theme features.
Props miyauchi, TimothyBlynJacobs.
Fixes#46723.
git-svn-id: https://develop.svn.wordpress.org/trunk@47361 602fd350-edb4-49c9-b593-d223f7449a82
Several filters were introduced to the render_block method since the initial implementation of the block-renderer/ endpoints, causing the output of those endpoints to diverge from the rendered content of blocks on the frontend.
Props kadamwhite, TimothyBlynJacobs, miinasikk.
Fixes#49387.
git-svn-id: https://develop.svn.wordpress.org/trunk@47360 602fd350-edb4-49c9-b593-d223f7449a82
This switches `WP_Dependencies::recurse_deps()` from recursively checking the same handles over and over again to keep a flattened array of queued items and their dependencies for faster lookup in `WP_Dependencies::query()`.
Props superdav42.
Fixes#46469.
git-svn-id: https://develop.svn.wordpress.org/trunk@47359 602fd350-edb4-49c9-b593-d223f7449a82
This resolves PHP notices in a few places in core where this capability is checked.
Props Mte90, johnbillion, dipesh.kakadiya, jipmoors, bamadesigner, dd32, johnjamesjacoby, xedin.unknown, flixos90, SergeyBiryukov.
Fixes#30991.
git-svn-id: https://develop.svn.wordpress.org/trunk@47357 602fd350-edb4-49c9-b593-d223f7449a82
This resolves PHP warnings when extensions like `php_uopz` or `php_tideways_xhprof` are in use.
Object variables in PHP 5+ contain a reference to the object, and it's the reference that's passed around.
Props jqz, killerbishop, Mte90, TJNowell, jorbin, pento, pcarvalho, valentinbora, SergeyBiryukov.
Fixes#44979.
git-svn-id: https://develop.svn.wordpress.org/trunk@47355 602fd350-edb4-49c9-b593-d223f7449a82
The string was previously added in [42794] and accidentally removed in [44163].
Props garrett-eclipse, audrasjb.
Fixes#49505.
git-svn-id: https://develop.svn.wordpress.org/trunk@47353 602fd350-edb4-49c9-b593-d223f7449a82
- Update the DependencyExtractionWebpackPlugin to 2.3.0 and set it to output a single assets file.
- Grunt: copy the assets file to both `SOURCE_DIR` and `BUILD_DIR` as `wp-includes/assets/script-loader-packages.php`.
- "Unignore" the `wp-includes/assets` directory. Its content will be committed similarly to `wp-includes/blocks`.
- Update `wp_default_packages_scripts()` to use the above file. This also removes the hard-coded lists of packages and packages with translations.
Props gziolo, pbearne, johnbillion, isabel_brison, ocean90, azaozz.
Fixes#48154.
git-svn-id: https://develop.svn.wordpress.org/trunk@47352 602fd350-edb4-49c9-b593-d223f7449a82
Following [47260] a namespace such as "test-ns" prevents any namespace such as "test-ns/v1" from being found when matching routes.
While not best practice, this was an unintentional back-compat break; this patch restores the original behavior.
Props david.binda, TimothyBlynJacobs.
Fixes#48530.
git-svn-id: https://develop.svn.wordpress.org/trunk@47351 602fd350-edb4-49c9-b593-d223f7449a82
This brings parity with the `wp_nav_menu_item_custom_fields` action added in [47190] for the Menus screen.
Props celloexpressions.
Fixes#47056.
git-svn-id: https://develop.svn.wordpress.org/trunk@47350 602fd350-edb4-49c9-b593-d223f7449a82
Correct an issue where comments marked as spam in a mobile view displayed incorrectly, filling a narrow and very tall column with the notice that a comment was marked as spam.
Props jeremyfelt, lorenzof, mukesh27, razamalik, xkon.
Fixes#48814.
git-svn-id: https://develop.svn.wordpress.org/trunk@47340 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the pullquote color setting by adding classes that are more specific to the color options.
Props ianbelanger.
Fixes#49410.
git-svn-id: https://develop.svn.wordpress.org/trunk@47339 602fd350-edb4-49c9-b593-d223f7449a82
All schema types, not just objects, are permitted as the base type of a resource. A future patch could add validation support for those types, but this fix only prevents a PHP warning from being issued.
Props dhavalkasvala, johnwatkins0, birgire.
Fixes#48785.
git-svn-id: https://develop.svn.wordpress.org/trunk@47328 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the margins in the block editor to address recent changes in block margins.
Props Joen, SergeyBiryukov, kjellr, jffng, allancole.
Fixes#48526.
git-svn-id: https://develop.svn.wordpress.org/trunk@47327 602fd350-edb4-49c9-b593-d223f7449a82
The documentation for register_setting has also been clarified to include all of the supported types and the flexibility of the show_in_rest parameter.
Fixes#42875.
Props perrywagle, dshanske, kadamwhite.
git-svn-id: https://develop.svn.wordpress.org/trunk@47325 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that `wp_update_post()` does not unintentionally modify post tags if the post has several tags with the same name but different slugs.
Tags should only be modified if `tags_input` parameter was explicitly provided, and is different from the existing tags.
Props kaggdesign, SergeyBiryukov.
Fixes#45121.
git-svn-id: https://develop.svn.wordpress.org/trunk@47317 602fd350-edb4-49c9-b593-d223f7449a82
Even though the source URL for an attachment is stored in a variable, attachments should still be passed through the `wp_video_shortcode()` function.
Unprops desrosj, spacedmonkey.
See #46718.
git-svn-id: https://develop.svn.wordpress.org/trunk@47308 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes an issue where the error codes associated with failed REST API tests are not being printed to the screen. In addition, the square brackets have been replaced with parentheses for consistency, and the error code (which is much less useful to end-users than the error message itself) has been moved to the end of the line.
This also clarifies the associated translator comments.
Props afercia, desrosj.
Fixes#49426.
git-svn-id: https://develop.svn.wordpress.org/trunk@47306 602fd350-edb4-49c9-b593-d223f7449a82
Being a good idea in theory, in practice it does not always work reliably, may not recognize newer CSS properties, and sometimes displays phantom errors with no particular error message.
A plugin can re-enable CSS linting via the `wp_code_editor_settings` filter.
Props skypressatx, ThemeZee, johnbillion, ianbelanger, ZanderZ, starvoters1, raoulunger, prashantvatsh, SergeyBiryukov.
Fixes#44471.
git-svn-id: https://develop.svn.wordpress.org/trunk@47305 602fd350-edb4-49c9-b593-d223f7449a82
Per Web Content Accessibility Guidelines 2.0, big chunks of italic text should be avoided.
Same applies to UI controls, since they're meant to be comfortably readable by the largest possible audience, e.g.: label elements.
Removes italic font style from:
- the Quick Edit / Bulk Edit forms
- the Recovery Mode plugin error details
- the Image Editor inline help
Props birgire, audrasjb, SergeyBiryukov, melchoyce, estelaris, sabernhardt, xkon, nrqsnchz, afercia.
See #47327.
git-svn-id: https://develop.svn.wordpress.org/trunk@47304 602fd350-edb4-49c9-b593-d223f7449a82
This requires only `wp-admin/includes/user.php` for `get_editable_roles()`, instead of `wp-admin/includes/admin.php`.
Follow-up to [43589].
Props johnwatkins0.
Fixes#49450.
git-svn-id: https://develop.svn.wordpress.org/trunk@47299 602fd350-edb4-49c9-b593-d223f7449a82
Although the file is already included via the `::insert_attachment()` method, this addresses an inconsistency and corrects a misleading comment.
It also reduces the possibility of a future error in case `::insert_attachment()` is no longer called earlier in `::create_item()` at some point.
Follow-up to [43850] and [44206].
Props luisrivera.
Fixes#49449.
git-svn-id: https://develop.svn.wordpress.org/trunk@47296 602fd350-edb4-49c9-b593-d223f7449a82
Other inputs are already restored to their previous values in that case.
Props Girishpanchal, nilamacharya, JoshuaWold, welcher, SergeyBiryukov.
Fixes#43031.
git-svn-id: https://develop.svn.wordpress.org/trunk@47294 602fd350-edb4-49c9-b593-d223f7449a82
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