You can change the first Submenu text with the following script:
function __test_menu() {
global $submenu;
//var_dump($submenu); //check yourself
$submenu['unc_gallery_admin_menu'][0][0] = __( 'Test', 'textdomain' );
}
add_action( 'admin_menu', '__test_menu' );
Please note, your plugin is error-prone, throwing warning messages. Always develop things with WP_DEBUG
to true
. And don’t write hardcore texts, better write them in gettext functions. i.e. write __( 'Test', 'textdomain' );
instead of 'Test';
. It will make your plugin translation-ready. Good luck.