• I’ve been stuck for 2 days with a plugin I’m trying to write – I need help.

    1: The plugin places a settings page under ‘Settings’ and an action page under ‘Tools’. The settings page is working fine.

    2: The plugin is installed under ‘……./wp-content//plugins/MyPlugin’ with all the code is a single file ‘MyPlugin.php’

    3: The action page is called with
    add_submenu_page(‘tools.php’, ‘MyPlugin Action’, ‘MyPlugin Action’, esc_attr(get_option(‘Capability’) ), ‘Tools’, ‘MyPlugin Action_page’);

    4: The action page contains a form which wants to calls itself back when the ‘Submit’ button gets clicks. The HTML reads:
    echo ‘<form action=”‘.$_SERVER[‘PHP_SELF’].'” method=”post” enctype=”multipart/form-data” name=”LoadCSVData”><table>’;

    I just CANNOT get this form to call itself back; I’m practically random coding now hoping that something will work.

    Fundamentally. I do not understand what a ‘menu slug’ is. What the heck is it?

    Can anyone out there help me with this?

Viewing 1 replies (of 1 total)
  • Thread Starter jlarysz

    (@jlarysz)

    OK, I cracked it. Random coding worked this time.

    If I give the form no action at all, it returns to itself on Submit.

Viewing 1 replies (of 1 total)
  • The topic ‘I need help with plugin code’ is closed to new replies.