Commit Graph

47550 Commits

Author SHA1 Message Date
John Blackbourn
eb248dc65b Docs: Correct and improve inline docs relating to the style engine.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55719 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 23:55:50 +00:00
John Blackbourn
a3ed152c54 Docs: Improve formatting of markup in the docs for WP_HTML_Tag_Processor.
Code blocks wrapped inside backtacks don't need to be indented.

See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55718 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 23:53:19 +00:00
John Blackbourn
b54303cd82 Build/Test Tools: Fix the permissions that are granted to the Slack notifications workflow.
Follow-up to [55715].

See #57865


git-svn-id: https://develop.svn.wordpress.org/trunk@55717 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 23:20:40 +00:00
Jb Audras
a67f9a0483 Help/About: Left-align 6.2 about page subheading.
This changeset removes the `aligncenter` class from `h2` and `is-subheading` items in the WordPress 6.2 About Page, for more consistent alignment. Also, future minor releases will add more left-aligned paragraphs under the "Maintenance Releases" section.

Props shagors, sabernhardt, mukesh27, amin7, costdev, pavanpatil1, audrasjb.
Fixes #57387.


git-svn-id: https://develop.svn.wordpress.org/trunk@55716 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 22:30:51 +00:00
John Blackbourn
3bfc6611ad Build/Test Tools: Restrict the permissions granted to jobs on GitHub Actions
The `permissions` key in a job declares the GitHub permissions that are granted to the token that's used by the job. Restricting the permissions reduces the impact that a vulnerability in the CI system can have.

Props desrosj, johnbillion

See #57865


git-svn-id: https://develop.svn.wordpress.org/trunk@55715 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 22:15:27 +00:00
John Blackbourn
eb409e4cac Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes.
Props mat-lipe, szepeviktor, costdev, audrasjb, johnbillion

Fixes #58229
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55714 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 21:28:11 +00:00
Jb Audras
d73323e969 Script Loader: Update jQuery version to 3.6.4 to match the current version.
This changeset updates the jQuery version to 3.6.4 in `script-loader.php` to correcly match the current version used in WordPress.

This was accidentally missed in [55491].

Props nickpap, TobiasBg, dhrumilk.
Fixes #58203.
See #57324.


git-svn-id: https://develop.svn.wordpress.org/trunk@55713 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 21:25:40 +00:00
John Blackbourn
9db82aa219 Docs: Miscellaneous formatting corrections to inline docs and whitespace.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55712 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 19:44:49 +00:00
John Blackbourn
90fb45dfdd Docs: Corrections and improvements to docblocks for global styles, global settings, theme.json parsing, and shortcodes.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55711 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 18:46:44 +00:00
Sergey Biryukov
8a074052c5 General: Restore strpos() check in wp-admin/load-styles.php.
This resolves a fatal error on PHP < 8.0, as `wp-includes/compat.php` is not loaded in this file, so `str_starts_with()` may not be available.

Follow-up to [55703].

Props dd32, flixos90, DigTek.
Fixes #58244. See #58012.

git-svn-id: https://develop.svn.wordpress.org/trunk@55710 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 15:44:39 +00:00
Andrea Fercia
252570e437 Post Types: Add the view_items label to the wp_block post type.
The `view_items` post type label is used in the Editor, for the `aria-label` of the link to go back to the Posts list. When editing a Reusable block, it fallbacks to 'View Posts'. It should be 'View Reusable blocks'.

Fixes #58209.


git-svn-id: https://develop.svn.wordpress.org/trunk@55709 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 14:06:10 +00:00
Bernie Reiter
e3d345800d HTML API: Accumulate shift for internal parsing pointer.
A bug was discovered where where the parser wasn't returning to the
start of the affected tag after making some updates.

In few words, the Tag Processor has not been treating its own internal
pointer `bytes_already_parsed` the same way it treats its bookmarks.
That is, when updates are applied to the input document and then
`get_updated_html()` is called, the internal pointer transfers to
the newly-updated content as if no updates had been applied since
the previous call to `get_updated_html()`.

In this patch we're creating a new "shift accumulator" to account for
all of the updates that accrue before calling `get_updated_html()`.
This accumulated shift will be applied when swapping the input document
with the output buffer, which should result in the pointer pointing to
the same logical spot in the document it did before the udpate.

In effect this patch adds a single workaround for treating the
internal pointer like a bookmark, plus a temporary pointer which points
to the beginning of the current tag when calling `get_updated_html()`.
This will preserve the assumption that updating a document doesn't
move that pointer, or shift which tag is currently matched.

Props dmsnell, zieladam.
Fixes #58179.

git-svn-id: https://develop.svn.wordpress.org/trunk@55706 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 11:29:42 +00:00
Jb Audras
e848581008 Docs: Various improvements in Bookmark Administration API function descriptions, as per docblocks standards.
Follow-up to [55704].

See #57840.


git-svn-id: https://develop.svn.wordpress.org/trunk@55705 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 10:01:52 +00:00
Jb Audras
137cf0d461 Coding Standards: Remove unnecessary variable escapement in Bookmark Administration API.
This changeset removes an unnecessary `esc_html()` escapement for `link_url`, as `esc_url()` already does the job.

Follow-up to [11383].

Props utsav72640, audrasjb.
Fixes #58239.


git-svn-id: https://develop.svn.wordpress.org/trunk@55704 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-03 09:56:32 +00:00
Sergey Biryukov
4cb3e1582a Code Modernization: Replace usage of strpos() with str_starts_with().
`str_starts_with()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) begins with the given substring (needle).

WordPress core includes a polyfill for `str_starts_with()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `0 === strpos( ... )` with `str_starts_with()` in core files, making the code more readable and consistent, as well as improving performance.

While `strpos()` is slightly faster than the polyfill on PHP < 8.0, `str_starts_with()` is noticeably faster on PHP 8.0+, as it is optimized to avoid unnecessarily searching along the whole haystack if it does not find the needle.

Follow-up to [52039], [52040], [52326].

Props spacedmonkey, costdev, sabernhardt, mukesh27, desrosj, jorbin, TobiasBg, ayeshrajans, lgadzhev, SergeyBiryukov.
Fixes #58012.

git-svn-id: https://develop.svn.wordpress.org/trunk@55703 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-02 15:43:03 +00:00
Jonny Harris
73dbbe5372 Cache API: Add helper function wp_cache_set_last_changed.
Add a helper function called `wp_cache_set_last_changed` to set the last changed value for cache groups. This function has a new action called `wp_cache_set_last_changed`, allowing for developers to cache invalidate when last changed value is changed. 

Props tillkruess, spacedmonkey, peterwilsoncc, mukesh27, johnjamesjacoby. 
Fixes #57905.

git-svn-id: https://develop.svn.wordpress.org/trunk@55702 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-02 11:24:52 +00:00
Jonny Harris
9ef194bc4b Taxonomy: Remove redundant call to get_term in wp_queue_posts_for_term_meta_lazyload.
In [55252] the function `wp_queue_posts_for_term_meta_lazyload` was refactored to use `wp_cache_get_multiple`. This refactor included a call to `get_term`. However, calling get_term calls `sanitize_term`, which sanitizes all fields in a term. The full term object is not needed in this context as term meta only needs to the term id, which is already in the function. Saving calls to `sanitize_term` will improve performance of this function. 

Props spacedmonkey, joemcgill, mukesh27. 
Fixes #57966.

git-svn-id: https://develop.svn.wordpress.org/trunk@55701 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-02 10:55:57 +00:00
Sergey Biryukov
1bd815adbb External Libraries: Update license URL in Text_Diff library.
The former URL used to refer to LGPL 2.1 at the time, but does not redirect to its current location.

Includes updating the `Algorithm::Diff` Perl module URL.

Props jigar-bhanushali, utsav72640.
Fixes #58217.

git-svn-id: https://develop.svn.wordpress.org/trunk@55700 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-01 11:04:12 +00:00
Sergey Biryukov
3895f70db0 Upgrade/Install: Update sodium_compat to v1.20.0.
The latest version of sodium_compat includes a fix for the Poly1305 implementation.

References:
* [https://github.com/paragonie/sodium_compat/releases/tag/v1.20.0 sodium_compat 1.20.0 release notes]
* [https://github.com/paragonie/sodium_compat/compare/v1.19.0...v1.20.0 Full list of changes in sodium_compat 1.20.0]

Follow-up to [49741], [51002], [51591], [52988], [54150], [54310].

Props jrf, costdev, paragoninitiativeenterprises, mukesh27.
Fixes #58224.

git-svn-id: https://develop.svn.wordpress.org/trunk@55699 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-30 14:06:51 +00:00
Sergey Biryukov
9eb82c2458 Coding Standards: Break out of the inner loop in make_site_theme_from_default().
This more closely matches the previous behavior with multiple `if`/`elseif` statements.

Follow-up to [55688].

See #56982.

git-svn-id: https://develop.svn.wordpress.org/trunk@55698 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-29 18:28:37 +00:00
Sergey Biryukov
8a5daa6b44 Coding Standards: Bring some consistency to REST API revisions initialization.
The autosaves and revisions controllers used to set the same class properties in a slightly different order.

This commit makes the `::__construct()` methods of both classes more consistent to simplify future maintenance.

Follow-up to [46272], [51962].

See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@55697 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-28 15:04:19 +00:00
Sergey Biryukov
5e4d1bc2d6 REST API: Remove unused variable from the permissions check for deleting a revision.
`WP_REST_Revisions_Controller::delete_item_permissions_check()` no longer uses the value of the `$parent_post_type` variable anywhere. 

Follow-up to [45812], [47547], [47850].

Props Soean, mukesh27.
Fixes #58218.

git-svn-id: https://develop.svn.wordpress.org/trunk@55696 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-28 10:03:12 +00:00
oandregal
5c247f75f3 Enqueue registered assets once.
This PR removes the `wp_enqueue_registered_block_scripts_and_styles` callback from the `enqueue_block_editor_assets` action.

There are two actions to enqueue block assets: `enqueue_block_editor_assets` and `enqueue_block_assets`. The former enqueues the assets to the editor and the later enqueues them to the front-end and the editor. Given `wp_enqueue_registered_block_scripts_and_styles` is already bound to the `enqueue_block_assets` (front-end and editor), it is unnecessary to bind it to `enqueue_block_editor_assets` (editor) as well.

This was originally introduced at [44157] and hasn't been modified since.

Props ellatrix, costdev.
Fixes #58208.



git-svn-id: https://develop.svn.wordpress.org/trunk@55695 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-28 08:49:02 +00:00
John Blackbourn
991fa6bff2 Docs: All sorts of improvements and corrections to function and hook docs.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55694 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-27 23:13:36 +00:00
John Blackbourn
65d27e4485 Docs: Correct and improve various documented types for properties, functions, and hooks.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55693 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-27 22:27:51 +00:00
Jb Audras
350a1a871f Docs: Typo fix in WP_REST_Block_Pattern_Categories_Controller docblock.
Props Soean.
Fixes #58204.


git-svn-id: https://develop.svn.wordpress.org/trunk@55692 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-27 22:23:15 +00:00
Sergey Biryukov
f6e523329b Coding Standards: Use __DIR__ magic constant in wp-admin/options-privacy.php.
This replaces the only remaining instance of `dirname( __FILE__ )` in core to avoid the performance overhead of a function call.

Follow-up to [47198], [50161], [50631].

Props hztyfoon, rudlinkon.
Fixes #58207.

git-svn-id: https://develop.svn.wordpress.org/trunk@55691 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-27 13:12:11 +00:00
Jb Audras
250250d35e Text Changes: Typo fix in README.md.
Follow-up to [47752].

Props neychok.
Fixes #58177.


git-svn-id: https://develop.svn.wordpress.org/trunk@55690 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-26 22:26:36 +00:00
Jb Audras
7a0cf18880 Editor: Improve the tag field loading spinner alignment.
This changeset improves the loading spinner alignment of the Classic Editor's tag field.

Follow-up to [19897], [31611].

Props Presskopp, SergeyBiryukov, audrasjb.
Fixes #58136.


git-svn-id: https://develop.svn.wordpress.org/trunk@55689 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-26 21:36:43 +00:00
Sergey Biryukov
6d4fc50edc Coding Standards: Remove an empty else statement in dbDelta().
Use `continue` to help separate each case for better readability, instead of having a wall of `if`/`elseif`.

Includes simplifying a similar fragment in `make_site_theme_from_default()`.

Follow-up to [1575], [2037], [2040], [2044], [2346], [7999], [14080], [14485].

Props costdev, krunal265, hellofromTonya, brookedot, SergeyBiryukov.
Fixes #56982.

git-svn-id: https://develop.svn.wordpress.org/trunk@55688 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-26 15:08:35 +00:00
André
9836f18614 Themes: improve performance of get_block_templates().
`get_block_templates()` is responsible for finding block templates that match a given search. The function receives a query parameter with the relevant metadata (slugs of the templates, areas of the template parts, etc) to find the user templates (database) and theme templates (file directory).

This function can be made more performant by changing how it works. Before this change, it processed all the block templates and discarded the ones that didn't match the query after it occurred. This commit makes it so it discards the templates that don't match the query before processing them. As a result, it only has to process the subset of templates that will be used, instead of all of them.

This change impacts any theme with block templates. TwentyTwentyThree reports a 15% improvement in Time To First Byte.

Props spacedmonkey, jorgefilipecosta, youknowriad, flixos90, mukesh27.
Fixes #57756.


git-svn-id: https://develop.svn.wordpress.org/trunk@55687 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-26 14:38:43 +00:00
André
3c112a6e1b Themes: remove unused parameter in query for get_block_templates().
Remove the `theme` parameter from the query passed to `get_block_templates()`. It is not used or documented. This removal doesn't have any effect in the code, as the data is ignored anyway.

Props draganescu, audrasjb, davidbaumwald, hellofromTonya.
Fixes #57736.


git-svn-id: https://develop.svn.wordpress.org/trunk@55686 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-26 14:25:19 +00:00
Sergey Biryukov
ed83c6aae8 General: Don't pass $action to wp_get_session_token() in wp_create_nonce().
The parameter appears to have been passed by accident, as the function does not accept any parameters.

Follow-up to [54218].

Props malavvasita, hztyfoon, dd32.
Fixes #58181.

git-svn-id: https://develop.svn.wordpress.org/trunk@55685 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-25 14:55:28 +00:00
Jb Audras
26e3948fca I18N: Use correct translation function in wp-admin/includes/media.php.
This changeset replaces `echo __()` with the appropriate `_e()` function. It also ensures the punctuation is included in the translation string.

Props mujuonly, audrasjb, vladytimy, krupalpanchal, mukesh27.
Fixes #58138.


git-svn-id: https://develop.svn.wordpress.org/trunk@55684 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-24 21:26:12 +00:00
Sergey Biryukov
bfdb1adc6a Coding Standards: Update code layout in default_password_nag() for readability.
This aims to better match similar fragments in other core functions.

Follow-up to [11162], [13844], [14170], [55682].

See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@55683 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-24 16:55:40 +00:00
Jb Audras
c2bd49c91f Coding Standards: Escape edit profile URL in default_password_nag().
Props utsav72640, mukesh27.
Fixes #58182.


git-svn-id: https://develop.svn.wordpress.org/trunk@55682 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-24 16:42:19 +00:00
Jb Audras
16f9d4d2f9 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Props laurentmagnin, pouicpouic, jbcouton, audrasjb.
See #57840.


git-svn-id: https://develop.svn.wordpress.org/trunk@55681 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-24 16:35:17 +00:00
Jonny Harris
201a30d387 Users: Change cache group from users-queries to user-queries.
The cache group `users-queries` was added in [55657]. This global cache group, was named to be inline with cache groups added in [55526]. However, the naming of the group does not match, as other cache groups, do not end with s at the end. This change fix this naming. 

Props spacedmonkey, SergeyBiryukov, peterwilsoncc. 
See #40613.

git-svn-id: https://develop.svn.wordpress.org/trunk@55680 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-24 13:51:15 +00:00
Sergey Biryukov
588d9a85ff Coding Standards: Use strict comparison in wp-admin/includes/class-wp-site-icon.php.
Follow-up to [32994], [35299].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@55678 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-23 04:00:26 +00:00
Sergey Biryukov
c2f262971c Coding Standards: Use strict comparison where strtolower() is involved.
Follow-up to [649], [7736], [18821], [19444], [20886], [20893], [23303], [55642], [55652], [55653], [55654].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@55677 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-22 15:17:47 +00:00
Sergey Biryukov
b55b935ccb Coding Standards: Remove unused $key variable in wp-admin/network/sites.php.
Rename `$val` to `$site_id` for clarity.

Follow-up to [12603], [18562], [30020].

See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@55676 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 13:31:20 +00:00
zieladam
87154ab87d HTML API: Fix a case where updates are overlooked when seeking to earlier locations.
This retains the WP_HTML_Tag_Processor attribute updates applied before calling seek() – they were erroneously erased in some cases.

Props dmsnell.
Fixes #58160.





git-svn-id: https://develop.svn.wordpress.org/trunk@55675 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 13:30:11 +00:00
zieladam
fea66becf5 HTML API: Update code style so it passes when backported into Gutenberg.
This changes the indentation of a variable in class-wp-html-tag-processor.php 
to satisfy both WordPress and Gutenberg linters.

Props dmsnell, ntsekouras.
Fixes #58170.



git-svn-id: https://develop.svn.wordpress.org/trunk@55674 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 12:31:29 +00:00
Greg Ziółkowski
f047b94d71 Editor: Add selectors field to block type definition
Adds support for the new selectors property for block types. It adds it to the allowed metadata when registering a block type, makes the WP_Block_Type class aware of it, exposes it through the block types REST API, and the get_block_editor_server_block_settings function.

Corresponding work in the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/46496.

Fixes #57585.
Props aaronrobertshaw, hellofromTonya.



git-svn-id: https://develop.svn.wordpress.org/trunk@55673 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 10:41:58 +00:00
Sergey Biryukov
fa92c3fcf2 Networks and Sites: Use is_main_site() in a few more places.
This updates some more instances of comparing site IDs on Sites and Users screens in network admin to use `is_main_site()` for clarity.

Follow-up to [12603], [13918], [22064], [38814], [41131], [55666].

See #58150.

git-svn-id: https://develop.svn.wordpress.org/trunk@55672 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 09:48:41 +00:00
Jonny Harris
2c6bf77a9e Taxonomy: Always lazily load term meta.
In [34529] introduced lazy loading of term meta. However, this was only in the context of `WP_Query`. Other parts of the codebase, like `WP_Term_Query` did not lazily load term meta. In this change, calls to `update_termmeta_cache` are now replaced with `wp_lazyload_term_meta`, that instead of priming term meta caches, just adds them to the queue to be primed it ever called. This results in far less database queries, as there a number of places where term meta is being primed unnecessarily and never used. Adding everything to the term meta queue, also means that if term meta is used, that is all loaded in a single database / cache call.

Props spacedmonkey, mukesh27, peterwilsoncc. 
Fixes #57645.

git-svn-id: https://develop.svn.wordpress.org/trunk@55671 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 09:22:04 +00:00
Peter Wilson
70054b77af Security: Update GitHub security policy to refer to H1.
Update the security policy displayed on GitHub, `SECURITY.md`, to refer visitors to the [https://hackerone.com/wordpress HackerOne WordPress program] for the full policy.

This allows the project to maintain a single source of truth and avoid the potential for conflicting information across the two sites.

Props desrosj, hellofromTonya, costdev.
Fixes #57937.


git-svn-id: https://develop.svn.wordpress.org/trunk@55670 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 03:17:29 +00:00
Andrew Ozz
4ff67caa58 Script Loader: Improve code style and readability in _wp_normalize_relative_css_links().
Props: westonruter.
See: 58069.

git-svn-id: https://develop.svn.wordpress.org/trunk@55669 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-21 03:11:46 +00:00
Bernie Reiter
bbe7290f29 HTML API: Add support for a few invalid HTML comment forms.
- Comments created by means of a tag closer with an invalid tag name, e.g. `</3>`.
 - Comments closed with the invalid `--!>` closer. (Comments should be closed by `-->` but if the `!` appears it will also close it, in error.)
 - Empty tag name elements, which are technically skipped over and aren't comments, e.g. `</>`.

Props dmsnell, costdev.
Fixes #58007.

git-svn-id: https://develop.svn.wordpress.org/trunk@55667 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-20 17:08:47 +00:00
Sergey Biryukov
0f28f4cf1a Networks and Sites: Simplify the check for main site on Network Admin → Sites screen.
This replaces a site ID comparison when displaying action links in `WP_MS_Sites_List_Table::handle_row_actions()` with a dedicated function call, `is_main_site()`, for clarity.

Follow-up to [13918], [25125], [26120], [32644], [38814].

Props ecorica, spacedmonkey, SergeyBiryukov.
Fixes #58150.

git-svn-id: https://develop.svn.wordpress.org/trunk@55666 602fd350-edb4-49c9-b593-d223f7449a82
2023-04-20 14:28:50 +00:00