public function addChildAdminBar($slug, $options)
    {
        $identifier = $this->getModel()->getIdentifier();

        add_action('admin_bar_menu', function () use ($identifier, $slug, $options) {
            global $wp_admin_bar;

            if ($slug === $identifier) {
                return;
            }

            // Get page identifier
            $pageid = $identifier.'-'.$slug;

            // Add child admin bar
            $wp_admin_bar->add_node([
                'parent'    => $identifier,
                'id'        => $pageid,
                'title'     => $options['title'],
                'href'      => admin_url('admin.php?page='.$pageid),
                'meta'      => false
            ]);
        });
    }
public function addChildAdminBar($slug, $options)
    {
        $identifier = $this->getModel()->getIdentifier();

        add_action('admin_bar_menu', function () use ($identifier, $slug, $options) {
            global $wp_admin_bar;

            if ($slug === $identifier) {
                return;
            }

            // Get page identifier
            $pageid = $identifier.'-'.$slug;

            // Add child admin bar
            $wp_admin_bar->add_node([
                'parent'    => $identifier,
                'id'        => $pageid,
                'title'     => $options['title'],
                'href'      => admin_url('admin.php?page='.$pageid),
                'meta'      => false
            ]);
        });
    }
public function addChildAdminBar ( $ slug , $ options ) { $ identifier = $ this -> getModel ( ) -> getIdentifier ( ) ; add_action ( 'admin_bar_menu' , function ( ) use ( $ identifier , $ slug , $ options ) { global $ wp_admin_bar ; if ( $ slug === $ identifier ) { return ; } // Get page identifier $ pageid = $ identifier . '-' . $ slug ; // Add child admin bar $ wp_admin_bar -> add_node ( [ 'parent' => $ identifier , 'id' => $ pageid , 'title' => $ options [ 'title' ] , 'href' => admin_url ( 'admin.php?page=' . $ pageid ) , 'meta' => false ] ) ; } ) ; }
Add child admin bar page.

@param string    $slug
@param array     $options
Add child admin bar page .