Commit Graph

20671 Commits

Author SHA1 Message Date
joedolson
2b1dffc900 Administration: Fix undefined element JS error in pagination handler.
Follow up to [59727]. Handle cases where the `#current-page-selector` is not present on the page to prevent a JS warning.

Props tobiasbg, mamaduka, jorbin, joedolson. 
See #62534.
Built from https://develop.svn.wordpress.org/trunk@59746


git-svn-id: http://core.svn.wordpress.org/trunk@59088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-30 23:38:23 +00:00
audrasjb
34458b5bca Coding standards: Remove unused variables from privacy_policy_guide() function.
See #62279.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-29 21:54:23 +00:00
audrasjb
6376a8f6f7 Privacy: Replace Policy Name with an auto increment to avoid internationalized plugin name issues.
This changeset replaces plugin sanitized names with an auto increment integer to fix an issue with accordions displaying privacy policies for plugins with special characters in their names.

Follow-up to [50161].

Props ecgan, sabernhardt, audrasjb.
Fixes #62713.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-29 21:35:19 +00:00
joedolson
7b5f5f727a Administration: Fix pagination in categories, tags, and plugins tables.
Fix an issue introduced in [59134] that prevented manual entry of a page number in the pagination input field from navigating pages. Requiring validation of the bulk actions input also impacted other inputs nested in the same form.

Also fixes a pre-existing bug where it was not possible to navigate to page 1 using the input field.

Props ffffelix, im3dabasia1, apermo, rishavdutta, joedolson, swissspidy, jorbin, joedolson.
Fixes #62534.
Built from https://develop.svn.wordpress.org/trunk@59727


git-svn-id: http://core.svn.wordpress.org/trunk@59069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-29 17:40:21 +00:00
John Blackbourn
b7a73d6a45 Security: Enable the referrer policy header on the login screen.
This sets the same referrer policy of `strict-origin-when-cross-origin` that's used in the admin area to prevent a referrer being sent to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within the URL.

The header can be disabled if necessary by removing the `wp_admin_headers` action from the `login_init` hook.

Props kkmuffme, sagarlakhani, albatross10

Fixes #62273
See #42036
Built from https://develop.svn.wordpress.org/trunk@59712


git-svn-id: http://core.svn.wordpress.org/trunk@59054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-27 14:41:22 +00:00
audrasjb
cf2aebff7f Administration: Use a lighter font-weight value for settings labels.
This changeset lowers the font-weight value from `600` to `400` for labels located in the Settings screens.
This is an initial implementation of the WordPress design system, aligning with the broader goal of achieving a more consistent and unified design across the administration.

Props karmatosed, audrasjb.
Fixes #62865.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 23:51:24 +00:00
audrasjb
ffa50f3c7b Themes: Improve theme count behavior in the Add Themes screen.
This changeset fixes an UI issue where the theme count in the "Add Themes" screen touches the top border on small screens.

Props sukhendu2002, diliphingarajiya, dilipbheda, ankitkumarshah, dhruvang21, im3dabasia1.
Fixes #62499.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 17:11:23 +00:00
audrasjb
130a7a8567 Plugins: Improve search box margin behavior in the Add Plugins screen.
This changeset fixes a margin issue in the search input box on the Add New Plugins screen, which was previously breaking below 1138px. Specifically, the top margin was set to 0px, and the overall appearance of the search box was inconsistent between 1000px and 1138px. Now, the margin is consistent across all breakpoints.

Props jomonthomaslobo1, narenin, iflairwebtechnologies, peterwilsoncc, audrasjb, shailu25.
Fixes #61785.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 14:12:19 +00:00
audrasjb
471cffffcc Administration: Introduce a lighter background for WP Admin.
This changeset replaces the light grey background color with the white color defined in the Editor Storybook. This change also impacts admin color schemes that previously utilized the default admin background color.
This is an initial implementation of the WordPress design system, aligning with the broader goal of achieving a more consistent and unified design across the administration.

Props karmatosed, audrasjb.
Fixes #62831.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 14:07:23 +00:00
audrasjb
492dd1ba34 Import: Add the import_filters action hook to the Import screen.
This changeset introduces the new `import_filters` action hook at the end of the Import screen, consistently with other admin screens like `export.php`.

Props audrasjb, lenasterg.
Fixes #54419.
See #19863.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 14:02:21 +00:00
audrasjb
4de28b054d Themes: Add wp-theme-<name> and wp-child-theme-<name> classes to body_class.
This changeset introduces new classes to the body tag. The classes `wp-theme-<name>` and `wp-child-theme-<name>` (when the current theme is a child theme) are added, where `<name>` represents the sanitized name of the active theme.

Props cais, GaryJ, nacin, SergeyBiryukov, johnjamesjacoby, nirajgirixd, poena, audrasjb, rinkalpagdar.
Fixes #19736.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 10:58:24 +00:00
joedolson
a429f0e6c2 Editor: Change the Text editor label to Code.
Rename the 'Text' tab of the classic editor to 'Code', mimicking the labels used in the block editor: "Visual editor" and "Code editor".
 
Update code comment and Help documentation to reference the editor using the new label.

Props lukecavanagh, ctienshi, travel_girl, audrasjb, sabernhardt, joedolson, rseigel, mark-k, sergeybiryukov, presskopp, giuriani, afercia, knutsp, audrasjb, sukhendu2002.
Fixes #38061.
Built from https://develop.svn.wordpress.org/trunk@59696


git-svn-id: http://core.svn.wordpress.org/trunk@59038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-23 23:54:23 +00:00
joedolson
e3ae09cc69 Editor: Remove option to disable the visual editor.
Remove the option "Disable the visual editor when writing" from the user profile if it is currently false. If enabled, the option will stay available until disabled.

This was blocked due to issues with tab order and focusability in the classic editor environment until [59188].

Props mark-k, SergeyBiryukov, joedolson, pento, iseulde, chriscct7, afercia, prasadkarmalkar, rcreators, jamieblomerus.
Fixes #34681.
Built from https://develop.svn.wordpress.org/trunk@59695


git-svn-id: http://core.svn.wordpress.org/trunk@59037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-23 22:49:23 +00:00
audrasjb
b863373e3c Administration: Remove useless arrow icon from WordPress admin menu.
This changeset deletes the arrow that is typically added next to WordPress admin menu items that have submenus. The `.wp-menu-arrow` element is no longer visible since the WP 3.8 redesign, but the HTML and CSS remained. With this changeset, the HTML generating the arrow is removed, and the corresponding CSS styling is deleted.

Props helen, azaozz, jbkkd, pbearne, flixos90.
Fixes #26960.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 22:33:22 +00:00
audrasjb
0619c6d95a General: Stop direct loading of files in /wp-admin that should only be included.
This changeset restricts direct access call in `/wp-admin` and its sub directories.

Follow-up to [11768].

Props deepakrohilla.
See #61314.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 14:06:22 +00:00
audrasjb
37e2744105 Themes: Remove title attributes from theme list tables.
This changeset updates the old list tables for themes and theme installation to remove `title` attributes or replace them with a more acessible implementation:
- Removes `title` attributes from `span` elements
- Replaces `title` with `aria-label` for links whose visible text starts with the same word, consistently with links on the "Add Plugins" screen
- Reuses the `$preview_title` variable to keep ARIA labels consistent for both Preview links

Follow-up to [22439], [27548], [31513], [32991], [50804], [53414].

Props karlgroves, sabernhardt, audrasjb, alh0319.
Fixes #62834.
See #24766.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 21:49:22 +00:00
John Blackbourn
d93f38e360 Administration: Clarify some references to "we" and "our" in the administration area.
This changes some text to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word “we” should be avoided (...) unless its made very clear which group is speaking

Fixes #62295

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


git-svn-id: http://core.svn.wordpress.org/trunk@59010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-20 22:04:28 +00:00
desrosj
2e64ee9f0d Administration: Modernize admin color scheme SASS files.
This updates the admin color scheme `.sass` files to address some deprecated notices caused by upstream changes.

- `string` and `colors` are no longer globally available functions.
- `@import` is deprecated in favor of `@use`.

There are still a few notices that are output, however this will require an update to the `grunt-sass` package to resolve.

Props MattyRob.
Fixes #62323.
Built from https://develop.svn.wordpress.org/trunk@59656


git-svn-id: http://core.svn.wordpress.org/trunk@58999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 21:05:33 +00:00
Sergey Biryukov
201d79b06e Upload: Remove redundant check for ABSPATH in wp-admin/async-upload.php.
This aims to bring consistency with a similar fragment in other files, since relocating `wp-admin` or `wp-load.php` is not supported at this time.

Follow-up to [6659], [7971], [8315].

Props hussain896, swissspidy, knutsp, SergeyBiryukov.
Fixes #62809.
Built from https://develop.svn.wordpress.org/trunk@59634


git-svn-id: http://core.svn.wordpress.org/trunk@58997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 16:18:24 +00:00
desrosj
6658e0eb76 Coding Standards: Add missing space for self-closing tags.
Props laxman-prajapati, sabernhardt.
Fixes #62799.
Built from https://develop.svn.wordpress.org/trunk@59600


git-svn-id: http://core.svn.wordpress.org/trunk@58986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-13 14:57:23 +00:00
ryelle
24fcd34673 Help/About: Allow "See everything new" button to wrap
On some screen sizes and languages, the "See everything new" button expands out of the content area. This change allows the button to wrap at all screen sizes, and updates the style of this button for wrapped text.

Props franciscabusas22, sabernhardt, yogeshbhutka, sainathpoojary, im3dabasia1, audrasjb.
Fixes #62380.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-06 16:20:23 +00:00
Sergey Biryukov
8166540e32 Options, Meta APIs: Ensure after_section is printed for sections without any fields.
This brings consistency with the `before_section` HTML content, which did get printed in `do_settings_sections()` regardless of whether the settings section has any fields attached.

Follow-up to [8855], [21742], [54247].

Props alpipego, SergeyBiryukov.
Fixes #62746.
Built from https://develop.svn.wordpress.org/trunk@59564


git-svn-id: http://core.svn.wordpress.org/trunk@58950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-28 22:10:20 +00:00
joedolson
c05ab18981 Customizer: Allow custom accordion items with obsolete structure.
In [59224], customizer accordion item HTML structure was changed to include a `button` element as the interactive control. However, some themes inject custom markup for panel headings. 

Fix `controls.js` to handle both the new markup and the old markup, which is relatively common in themes.   

Props paullb, desrosj, sabernhardt, joedolson, jorbin.
Fixes #62494.
Built from https://develop.svn.wordpress.org/trunk@59555


git-svn-id: http://core.svn.wordpress.org/trunk@58941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 20:46:28 +00:00
audrasjb
988751f0bf I18n: Add translator context for various occurrences of "upload".
This changeset adds a `noun` or `verb` context to the various occurrences of "upload" in the admin, to make it easier for translators to differenciate these strings depending on the context.

Props timse201, wpgerd.
Fixes #62732.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 19:15:26 +00:00
audrasjb
ceb9b355bf Themes: Fix unwanted horizontal scrolling in theme details screen on mobile.
This changeset fixes an issue where the theme browser created unwanted horizontal scrolling on some mobile devices. The issue occured when viewing theme details on mobile.

Follow-up to [26142].

Props wildworks, abcd95, sainathpoojary, dhruvang21, sabernhardt.
Fixes #62411.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 08:36:23 +00:00
Sergey Biryukov
51a1a54a87 Help/About: Reorder release squad titles for some consistency in translation tools.
Follow-up to [59545].

See #62386.
Built from https://develop.svn.wordpress.org/trunk@59552


git-svn-id: http://core.svn.wordpress.org/trunk@58938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 23:16:24 +00:00
audrasjb
243c0cc59e Login and Registration: Adjust login form margins for better consistency.
This changeset addresses adjusts margins around the login form for visual consistency. The margin above and below the form is now consistently set to 24px, and the margin below the logo has also been adjusted to 24px.

Follow-up to [26072].

Props deeppatel8950, audrasjb, priyank9033, viralsampat, vijaysinh9094, sabernhardt, .
Fixes #61667.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 22:39:27 +00:00
audrasjb
8d89d471f0 Media: Fix margin issues on the Media file upload screen.
This changeset fixes an issue in the Media Library where icons or thumbnails of uploaded files were stuck to the border of their container after file upload.

Follow-up to [58279].

Props sukhendu2002, im3dabasia1, sainathpoojary, joedolson.
Fixes #62573.
See #60141.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 21:54:27 +00:00
Peter Wilson
1747403b13 Help/About: Add additional release squad titles to credits page.
Introduces translatable strings for additional [https://make.wordpress.org/core/handbook/about/release-cycle/wordpress-release-team-and-focus-leads/ release squad titles].

This is to allow improved acknowledgement of an individual's role in a release squad by enabling the use of these roles in the credits API going forward.

Props audrasjb, desrosj, jorbin, timse201, yogeshbhutkar.
Fixes #62386.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 21:56:26 +00:00
Sergey Biryukov
4210bfdbb2 Privacy: Replace hardcoded MD5 references in wp_credits_section_list().
The Credits API has been updated to return SHA-256 email hashes.

Follow-up to [59532], [meta14307].

Props haozi.
Fixes #62706, #60638.
Built from https://develop.svn.wordpress.org/trunk@59541


git-svn-id: http://core.svn.wordpress.org/trunk@58927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 03:44:24 +00:00
Sergey Biryukov
072c0afc53 Editor: Check get_user_count() instead of get_users() for the locked post notice.
This aims to avoid slowing down the post editing by using a cached value instead of calling `get_users()`, which can be slow when plugins add various filters to all `get_users()` calls, especially with meta value comparisons on large `user_meta` tables.

Follow-up to [24304], [24543], [41829], [53011], [53018].

Props berislav.grgicak, bor0, costdev.
See #55958.
Built from https://develop.svn.wordpress.org/trunk@59522


git-svn-id: http://core.svn.wordpress.org/trunk@58908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-16 23:51:25 +00:00
joedolson
cc3c3bf4e6 Comments: Avoid reverting comment reply when context menu is open.
Fix a bug where a comment reply would be discarded if `esc` was pressed to dismiss the context menu in Safari or Firefox.

Checks whether the contextmenu is open and ignores the `esc` key if it is.

Props yellowafterlife, yogeshbhutkar, joedolson.
Fixes #62346.
Built from https://develop.svn.wordpress.org/trunk@59514


git-svn-id: http://core.svn.wordpress.org/trunk@58900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-14 01:32:18 +00:00
audrasjb
880bce2ad5 Themes: Replace "Active" wording with "Installed" in the theme install checks page.
When reinstalling a theme by uploading a ZIP file, the wording used in some strings referred to the "active" theme even though it's not the currrently active theme. This changeset replaces these strings to refer to the "installed" theme, which is more accurate.

Follow-up to [52610], [52580].

Props afercia, ankitkumarshah, abcd95, yogeshbhutkar, parthvataliya, sainathpoojary, virgar, gaellebesson, nuryko, guillaumeturpin, maximemeganck, sabrineg.
Fixes #62603.
See #54831, #54770



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


git-svn-id: http://core.svn.wordpress.org/trunk@58899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 23:53:17 +00:00
joedolson
e25f6d7e2f Editor: Hide 'Skip to Editor' if editor not supported.
Wrap the classic editor 'Skip to Editor' link in a conditional to prevent it from rendering on post types that do not have editor support.

Props wildworks, parthvataliya, narenin, sainathpoojary, ankitkumarshah, parthvataliya, im3dabasia1.
Fixes #62623.
Built from https://develop.svn.wordpress.org/trunk@59511


git-svn-id: http://core.svn.wordpress.org/trunk@58897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 21:53:15 +00:00
joedolson
ac54a93332 Customize: Remove unnecessary height: 100% on accordion button.
Remove CSS that could occasionally trigger the accordion buttons to be 100% the height of the accordion container.

Props dhewercorus, im3dabasia1, sabernhardt, rvoigt, ghinamt, vishy-moghan, frankbiganski, redkite.
Fixes #62491.
Built from https://develop.svn.wordpress.org/trunk@59510


git-svn-id: http://core.svn.wordpress.org/trunk@58896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 21:10:20 +00:00
desrosj
26335af1ac Build/Test Tools: Update devDependencies.
This updates the following `devDependencies`:

- `dotenv` from `16.4.5` to `16.4.7`
- `dotenv-expand` from `11.0.6` to `12.0.1`
- `postcss` from `8.4.47` to `8.4.49`
- `qunit` from `2.22.0` to `2.23.1`
- `sass` from `1.79.4` to `1.79.6`
- `terser-webpack-plugin` from `5.3.10` to `5.3.11`
- `uglify-js` from `3.17.4` to `3.19.3`
- `uuid` from `9.0.1` to `11.0.3`
- `webpack` from `5.90.2` to `5.97.1`

Additionally, `npm audit fix` has been run.

Follow up to [58585].

See #62220.
Built from https://develop.svn.wordpress.org/trunk@59509


git-svn-id: http://core.svn.wordpress.org/trunk@58895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 19:06:24 +00:00
Sergey Biryukov
56f776835d Filesystem API: Check PHP_OS_FAMILY instead of php_uname() in PclZip.
The `php_uname()` function can be disabled on some hosts, in which case the call fails.

The `PHP_OS_FAMILY` constant indicates the operating system family PHP was built for, and is available as of PHP 7.2.0.

Reference: [https://www.php.net/manual/en/reserved.constants.php#constant.php-os-family PHP Manual: Predefined Constants: PHP_OS_FAMILY].

Follow-up to [6779], [57985], [58678], [58684].

Props daymobrew, costdev, desrosj.
Fixes #57711.
Built from https://develop.svn.wordpress.org/trunk@59506


git-svn-id: http://core.svn.wordpress.org/trunk@58892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-12 22:23:16 +00:00
Sergey Biryukov
708282ecaf Coding Standards: Use strict comparison in media_upload_form_handler().
Follow-up to [10390].

Props deepakrohilla, iflairwebtechnologies, mukesh27, dingguodong, aristath.
Fixes #62009.
Built from https://develop.svn.wordpress.org/trunk@59497


git-svn-id: http://core.svn.wordpress.org/trunk@58883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-07 22:08:19 +00:00
Sergey Biryukov
c10dbc8434 Coding Standards: Use correct escaping function for wp_http_referer.
Follow-up to [58069].

Props yogeshbhutkar, sainathpoojary, PcTevree, knutsp, siliconforks, stromhalm, shanemuir.
Fixes #62551.
Built from https://develop.svn.wordpress.org/trunk@59496


git-svn-id: http://core.svn.wordpress.org/trunk@58882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-06 17:07:22 +00:00
Pascal Birchler
cbca77642b Plugins: Load wp-admin/includes/plugin.php earlier.
Partially reverts [59479] and [59461], which previously tried to move some functions from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so they are available early, so that `get_plugin_data()` can be used.

However, other functions from that file are often used by plugins without necessarily checking whether they are available, easily causing fatal errors. Requiring this file directly is a safer approach to avoid such errors.

Props peterwilsoncc, dd32, swissspidy, johnbillion.
Fixes #62244.
Built from https://develop.svn.wordpress.org/trunk@59488


git-svn-id: http://core.svn.wordpress.org/trunk@58874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 12:13:17 +00:00
Sergey Biryukov
ab2697f8bf Customize: Begin HTML markup before Customizer script hooks.
This prevents printing styles and scripts before the `<!DOCTYPE>`.

The `_wp_admin_html_begin()` function should precede Customizer script hooks, in case a plugin prints markup inside a hook such as `admin_enqueue_scripts`.

Follow-up to [19995], [27907].

Props sabernhardt.
Fixes #62629.
Built from https://develop.svn.wordpress.org/trunk@59480


git-svn-id: http://core.svn.wordpress.org/trunk@58866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 23:36:18 +00:00
Pascal Birchler
789d1d9c2e Plugins: Make more plugin-related functions available early on.
This is a follow-up to [59461], which moved `get_plugin_data()` from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so it's available during the plugin loading process.

Related functions like `is_plugin_active()` are often used together and should therefore be moved as well, to improve backward compatibility for plugins which load `wp-admin/includes/plugin.php` only conditionally.

Props johnbillion, dd32, swissspidy.
See #62244.
Built from https://develop.svn.wordpress.org/trunk@59479


git-svn-id: http://core.svn.wordpress.org/trunk@58865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 17:10:15 +00:00
Sergey Biryukov
e6f29b4c0e Date/Time: Add d.m.Y to date format presets on General Settings screen.
This gives users another option when selecting how dates are displayed on their site. This change is relevant for better localization, providing more date format choices for users in regions where this format is common.

The `array_unique()` call ensures that if this format was already added by a plugin or theme, it won't be duplicated.

Follow-up to [9131], [22299], [28820], [28848].

Props Daedalon, pbearne, fierevere, im3dabasia1, SergeyBiryukov.
Fixes #55685.
Built from https://develop.svn.wordpress.org/trunk@59475


git-svn-id: http://core.svn.wordpress.org/trunk@58861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-01 18:39:20 +00:00
Sergey Biryukov
001cc12b71 Coding Standards: Cast gmdate( 'Z' ) to an integer before addition.
This addresses two instances of the (numeric string) `gmdate( 'Z' )` being added to an `int` value.

Affected functions:
* `upgrade_110()`
* `WP_Date_Query::validate_date_values()`

Follow-up to [942], [29925], [45424].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59465


git-svn-id: http://core.svn.wordpress.org/trunk@58851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-27 11:40:18 +00:00
Sergey Biryukov
869f9b1df5 Coding Standards: Cast wp_count_terms() result to int before using in ceil().
This addresses two instances of the (numeric string) return value from `wp_count_terms()` being used directly in `ceil()`, which expects an `int|float`.

Affected methods:
* `WP_Sitemaps_Taxonomies::get_max_num_pages()`
* `wp_nav_menu_item_taxonomy_meta_box()`

Reference: [https://www.php.net/manual/en/function.ceil.php PHP Manual: ceil()].

Follow-up to [14248], [14291], [14569], [14943], [48072], [57648].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59462


git-svn-id: http://core.svn.wordpress.org/trunk@58848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-26 21:17:25 +00:00
Pascal Birchler
117b935b89 I18N: Load translations just-in-time for custom themes and plugins.
In #34114, just-in-time (JIT) translation loading was implemented for projects hosted on WordPress.org. This is now expanded to all other plugins/themes.

Projects with a custom `Text Domain` and `Domain Path` header no longer need to call `load_plugin_textdomain()` or `load_theme_textdomain()`.

This reduces the risk of calling them too late, after some translation calls already happened, and generally makes it easier to properly internationalize a plugin or theme.

This moves the `get_plugin_data()` from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so it's available during the plugin loading process.

Props swissspidy.
Fixes #62244.
Built from https://develop.svn.wordpress.org/trunk@59461


git-svn-id: http://core.svn.wordpress.org/trunk@58847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-26 10:16:17 +00:00
Pascal Birchler
6e38205391 I18N: Switch locale to admin locale when sending auto update emails.
If sending an auto update email to the site administrator's email address, look up if a user with the same email exists and switch to that user's locale. If not, explicitly switches to the site locale.

This is a follow-up to [59128] where this was previously added for other types of emails.

Props benniledl, swissspidy.
Fixes #62496.
Built from https://develop.svn.wordpress.org/trunk@59460


git-svn-id: http://core.svn.wordpress.org/trunk@58846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-26 10:03:17 +00:00
Andrew Ozz
683505a121 Editor: Fix selecting/deselecting multiple unwanted categories when clicking on a Category checkbox on the old Edit Post screen.
Props ffffelix, desrosj, ironprogrammer, neotrope, narenin, zaoyao, im3dabasia1, cbravobernal, azaozz.
Fixes #62504.
Built from https://develop.svn.wordpress.org/trunk@59454


git-svn-id: http://core.svn.wordpress.org/trunk@58840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 20:10:24 +00:00
Sergey Biryukov
d37c855db1 I18N: Adjust translator comments in nav-menu.js.
Includes:
* Moving the comments directly above `wp.i18n._x()` so that they can be picked up properly.
* Simplifying the context to avoid unnecessarily translating the string twice for the same use case.
* Using the established translator comments format for consistency.

Follow-up to [59428].

See #62402.
Built from https://develop.svn.wordpress.org/trunk@59431


git-svn-id: http://core.svn.wordpress.org/trunk@58817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 11:22:19 +00:00
joedolson
41226f1164 Menus: i18n: Fix untranslatable strings in nav-menu.js.
Wrap three untranslatable strings in nav menus in JS translation functions.

Follow up to [59265].

Props juliemoynat, swissspidy, yogeshbhutkar, sergeybiryukov, desrosj, tobifjellner, audrasjb, joedolson.
Fixes #62402.
Built from https://develop.svn.wordpress.org/trunk@59426


git-svn-id: http://core.svn.wordpress.org/trunk@58812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 23:25:20 +00:00