Friday, January 13, 2023
HomeWordPress Developmentplugin improvement - Admin Menu for New Publish

plugin improvement – Admin Menu for New Publish


I’m studying WordPress Plugin improvement. I wish to add a Admin Menu to Create a New Publish like beneath.

enter image description here

My code is like beneath.

public operate admin_menu() {
    add_menu_page( 'Information Info', 'Information Information', 'manage_options', 'news_info', [$this, 'api_key_page'], 'dashicons-info-outline', 30 );
    add_submenu_page( 'news_info', 'Information Info', 'API Key', 'manage_options', 'news_info_page', [$this, 'api_key_page'], 0 );
    add_submenu_page( 'news_info', 'Information Info', 'Add Information', 'manage_options', 'news_info', 'call_back_function', 1 );
}

What ought to I put inside call_back_function ? Is it the correct approach to create Admin Menu ?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments