remove_menu_page Remove background menu

Posted in:
Update time:2021-08-23

function function

Remove WordPress backend top level menu.

function parameter

parametersdata typeRequired or notdescriptivedefault value
$menu_slugstring (computer science)beMenu Slugnot have

Function Return Value

Returns the removed menu data if it succeeds, or false if it fails.

usage example

The function needs to be mounted on the admin_init hook to take effect. In the following example, we remove the wpcf7 menu.

add_action( 'admin_init', function () {
    remove_menu_page( 'wpcf7' );
});

related function

remove_submenu_page Functions and remove_menu_page Similar, except that there is an extra parameter for the parent menu slug.

We offer WordPress Themes and Plugins Custom Development Services

This site has long undertaken WordPress themes, plugins, WooCommerce-based store mall development business. We have 10 years of experience in WordPress development, if you want to Developing Websites with WordPress, please contact WeChat: iwillhappy1314 or email: amos@wpcio.com for inquiries.

发表回复

Your email address will not be published. 必填项已用 * 标注

*