rebase on oct-10-2023
This commit is contained in:
@@ -89,7 +89,7 @@ final class WP_Screen {
|
||||
* have a `$parent_base` of 'edit'.
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
public $parent_base;
|
||||
|
||||
@@ -99,7 +99,7 @@ final class WP_Screen {
|
||||
* Some `$parent_file` values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'.
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
public $parent_file;
|
||||
|
||||
@@ -230,7 +230,7 @@ final class WP_Screen {
|
||||
$post_type = $id;
|
||||
$id = 'post'; // Changes later. Ends up being $base.
|
||||
} else {
|
||||
if ( '.php' === substr( $id, -4 ) ) {
|
||||
if ( str_ends_with( $id, '.php' ) ) {
|
||||
$id = substr( $id, 0, -4 );
|
||||
}
|
||||
|
||||
@@ -241,16 +241,16 @@ final class WP_Screen {
|
||||
}
|
||||
|
||||
if ( ! $post_type && $hook_name ) {
|
||||
if ( '-network' === substr( $id, -8 ) ) {
|
||||
if ( str_ends_with( $id, '-network' ) ) {
|
||||
$id = substr( $id, 0, -8 );
|
||||
$in_admin = 'network';
|
||||
} elseif ( '-user' === substr( $id, -5 ) ) {
|
||||
} elseif ( str_ends_with( $id, '-user' ) ) {
|
||||
$id = substr( $id, 0, -5 );
|
||||
$in_admin = 'user';
|
||||
}
|
||||
|
||||
$id = sanitize_key( $id );
|
||||
if ( 'edit-comments' !== $id && 'edit-tags' !== $id && 'edit-' === substr( $id, 0, 5 ) ) {
|
||||
if ( 'edit-comments' !== $id && 'edit-tags' !== $id && str_starts_with( $id, 'edit-' ) ) {
|
||||
$maybe = substr( $id, 5 );
|
||||
if ( taxonomy_exists( $maybe ) ) {
|
||||
$id = 'edit-tags';
|
||||
@@ -1118,6 +1118,7 @@ final class WP_Screen {
|
||||
<?php _e( 'Some screen elements can be shown or hidden by using the checkboxes.' ); ?>
|
||||
<?php _e( 'Expand or collapse the elements by clicking on their headings, and arrange them by dragging their headings or by clicking on the up and down arrows.' ); ?>
|
||||
</p>
|
||||
<div class="metabox-prefs-container">
|
||||
<?php
|
||||
|
||||
meta_box_prefs( $this );
|
||||
@@ -1137,6 +1138,7 @@ final class WP_Screen {
|
||||
echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user