Admin Menu Editor
Create the actual admin page (5 posts)

  1. bkcohen
    Posted 3 years ago #

    I have the menu setup but I help with creating the admin page. I get includes errors with this...

        //must check that the user has the required capability
        if (!current_user_can('manage_options'))
          wp_die( __('You do not have sufficient permissions to access this page.') );
        // variables for the field and option names
        $opt_name = mysql_real_escape_string($_POST['name']);
        $hidden_field_name = 'mt_submit_hidden';
        $data_field_name = 'name';
        // See if the user has posted us some information
        // If they did, this hidden field will be set to 'Y'
        if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
            // Read their posted value
            $opt_val = $_POST[ $data_field_name ];
            // Save the posted value in the database
            // Put an settings updated message on the screen
    	<div class="updated"><p><strong><?php _e('settings saved.', 'menu-test' ); ?></strong></p></div>
        // Now display the settings editing screen
        echo '<div class="wrap">';
        // settings form
        <form name="form1" method="post" action="">
        <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
        <input type="text" name="<?php echo $data_field_name; ?>" value="<?php echo $opt_val; ?>" size="50">
        </p><hr />
        <p class="submit">
        <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />


  2. Janis Elsts
    Plugin Author

    Posted 3 years ago #

    Using Admin Menu Editor for this purpose is probably the wrong approach. If you're making a plugin or theme and need to add an admin page, please use the administration menu functions instead.

    Also, the Hacks forum would be a better place for your plugin development questions.

  3. bkcohen
    Posted 3 years ago #

    Then what exactly is the point of admin-menu-plugin ?

    It's not to create a menu that links to new admin pages?

  4. Janis Elsts
    Plugin Author

    Posted 3 years ago #

    Most often, people use this plugin to:

    • Hide/show menus for specific roles.
    • Customize existing menu items - change their name, URL, position, and so on.
    • Re-order and organize the admin menu to better fit the users' needs.
    • Create menu items that link to external pages, such as tutorials.
  5. reportica
    Posted 3 years ago #

    Hi bkcohen

    Could this help?

    It allows me to create help documents and install them in the Admin menu.

    Hope this helps.

    Janis, thanks again for such professional work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.