WordPress.org

Forums

[resolved] Admin Panel Adjustments (3 posts)

  1. ninjakreborn
    Member
    Posted 4 years ago #

    Does anyone have any links or tutorials to point me in the right direction. I need to add a link to the standard admin panel for a plugin. I need it to go to a page that has two file uploads that they can upload, and then have a script to parse out/database the files.

    Any advice on where to start. I know I need to start off by adding a link to the admin panel somewhere.

    Any advice is greatly appreciated.

  2. Daniel Haim
    Member
    Posted 4 years ago #

    Here is the code to add admin menu

    <?php
    add_action('admin_menu', 'my_plugin_menu');
    function my_plugin_menu() {
      add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');
    }
    
    function my_plugin_options() {
      if (!current_user_can('manage_options'))  {
        wp_die( __('You do not have sufficient permissions to access this page.') );
      }
    
      echo '<div class="wrap">';
      echo '<p>Here is where the form would go if I actually had options.</p>';
      echo '</div>';
    
    }
    ?>

    Here is the documentation page http://codex.wordpress.org/Adding_Administration_Menus

    Good luck,

  3. ninjakreborn
    Member
    Posted 4 years ago #

    Thank you very much. That's everything I needed. I appreciate it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.