• I’m trying to separate a plugin into different files for scalability (and it’s much easier to read.)

    I’ve created the plugin and called it ‘PLUGIN_activate’. Its only used to create a table and call other functions.

    The admin options page is called as so:

    function PLUGIN_admin_menu()
    {
    	add_options_page('PLUGIN Options', 'PLUGIN', 'manage_options', 'plugin_plugin', 'plugin_admin_page');
    }
    add_action( 'admin_menu', 'PLUGIN_admin_menu' );

    I have another file (in the same directory as the plugin) called PLUGIN_admin. This is where the function ‘plugin_admin_page’ is stored. Is there a way to call it in my add_options_page function on the PLUGIN_activate page? I’ve tried relative and full paths without luck.

    TIA

The topic ‘add_options_page function in a different file.’ is closed to new replies.