Git Product home page Git Product logo

Comments (3)

pgroot91 avatar pgroot91 commented on May 27, 2024

ll close this issue for now still not having any solution! May i find a solution for my issue i will re-open or put a comment with the solution in here.

from cmb2-snippet-library.

pgroot91 avatar pgroot91 commented on May 27, 2024

Solution

function yourprefix_remove_submenus( $submenu_file ) {

    global $plugin_page;

    $hidden_submenus = array(
	// Uncomment "yourprefix_main_options" for removing all submenus
	//'yourprefix_main_options' => true,
        'yourprefix_secondary_options' => true,
	'yourprefix_tertiary_options' => true,
    );

    // Select another submenu item to highlight (optional).
    if ( $plugin_page && isset( $hidden_submenus[ $plugin_page ] ) ) {
        $submenu_file = 'yourprefix_main_options';
    }

    // Hide the submenu.
    foreach ( $hidden_submenus as $submenu => $unused ) {
        remove_submenu_page( 'yourprefix_main_options', $submenu );
    }

    return $submenu_file;
}
add_filter( 'submenu_file', 'yourprefix_remove_submenus' );

from cmb2-snippet-library.

tw2113 avatar tw2113 commented on May 27, 2024

Talk about followup ;)

from cmb2-snippet-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.