Add-On to ASE: Add Admin and Site Enhancements to admin SITE-NAME menu

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.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer