[ad_1]
A little treat for those that are in and out of the Admin and Site Enhancements settings.
Simply add the below code to your child themes functions.php and you will be given a new child menu located up in the far top left where your site name is called Edit ASE Settings.
Don’t worry about your clients seeing this as it will only be available to administrators.
// Add Admin and Site Enhancements (ASE) to admin SITE-NAME menu
// https://projectdmc.org/plugins/admin-site-enhancements/
/* ------------------------------------- */
if ( ! function_exists( 'ctm_add_link_to_admin_bar' ) ) {
// Only show to admins
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
function ctm_add_link_to_admin_bar($wp_admin_bar) {
$wp_admin_bar->add_node( array(
'parent' => 'site-name',
'id' => 'ase',
'title' => 'Edit ASE Settings',
'href' => esc_url( admin_url( 'tools.php?page=admin-site-enhancements' ) ),
'meta' => false
));
}
}
add_action( 'admin_bar_menu', 'ctm_add_link_to_admin_bar', 999 );
/* ------------------------------------- */Enjoy and I hope some of you find this of use.
