Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -194,6 +194,16 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) {
)
);
// Add learn link.
$wp_admin_bar->add_node(
array(
'parent' => 'wp-logo-external',
'id' => 'learn',
'title' => __( 'Learn WordPress' ),
'href' => 'https://learn.wordpress.org/',
)
);
// Add forums link.
$wp_admin_bar->add_node(
array(
@@ -897,7 +907,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
)
);
}
} elseif ( is_a( $current_object, 'WP_User' ) && current_user_can( 'edit_user', $current_object->ID ) ) {
} elseif ( $current_object instanceof WP_User && current_user_can( 'edit_user', $current_object->ID ) ) {
$edit_user_link = get_edit_user_link( $current_object->ID );
if ( $edit_user_link ) {
$wp_admin_bar->add_node(
@@ -1100,7 +1110,6 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
)
);
}
}
/**
@@ -1226,32 +1235,51 @@ function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) {
}
/**
* Prints style and scripts for the admin bar.
* Enqueues inline style to hide the admin bar when printing.
*
* @since 3.1.0
* @since 6.4.0
*/
function wp_admin_bar_header() {
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
?>
<style<?php echo $type_attr; ?> media="print">#wpadminbar { display:none; }</style>
<?php
function wp_enqueue_admin_bar_header_styles() {
// Back-compat for plugins that disable functionality by unhooking this action.
$action = is_admin() ? 'admin_head' : 'wp_head';
if ( ! has_action( $action, 'wp_admin_bar_header' ) ) {
return;
}
remove_action( $action, 'wp_admin_bar_header' );
wp_add_inline_style( 'admin-bar', '@media print { #wpadminbar { display:none; } }' );
}
/**
* Prints default admin bar callback.
* Enqueues inline bump styles to make room for the admin bar.
*
* @since 3.1.0
* @since 6.4.0
*/
function _admin_bar_bump_cb() {
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
?>
<style<?php echo $type_attr; ?> media="screen">
html { margin-top: 32px !important; }
@media screen and ( max-width: 782px ) {
html { margin-top: 46px !important; }
function wp_enqueue_admin_bar_bump_styles() {
if ( current_theme_supports( 'admin-bar' ) ) {
$admin_bar_args = get_theme_support( 'admin-bar' );
$header_callback = $admin_bar_args[0]['callback'];
}
</style>
<?php
if ( empty( $header_callback ) ) {
$header_callback = '_admin_bar_bump_cb';
}
if ( '_admin_bar_bump_cb' !== $header_callback ) {
return;
}
// Back-compat for plugins that disable functionality by unhooking this action.
if ( ! has_action( 'wp_head', $header_callback ) ) {
return;
}
remove_action( 'wp_head', $header_callback );
$css = '
@media screen { html { margin-top: 32px !important; } }
@media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } }
';
wp_add_inline_style( 'admin-bar', $css );
}
/**