So have the following code, which I am trying to create a custom plug-in for WordPress:
<?php
/*
Plugin Name: Dump-It Scheduler
Plugin URI: mycompany.com
Description: my description
Version: 1.0
Author: Blaine
Author URI: myuri.net
License:
*/
function scheduler_admin_actions() {
add_options_page('Dump-It Scheduling', 'Dump-It Schedule', 'Administrator', 'Dump-It_Master_Schedule');
}
add_action('admin_menu', 'scheduler_admin_actions');
?>
However, I don’t see any addition link in the admin section of the app. I have activated the plugin, but I expect to see an option for this plugin. From what I understand I should see a link added to the admin panel.
I’ll also add that I don’t have any errors (I’m using a debugger plugin). Can’t figure out what is going on here…
I am using WordPress 3.6.1 in case it matters.
What am I missing?
The third parameter is a capability, and has to be
manage_options
or similar in your case. It even can be a role (although not recommended), but it has to be small caps and notAdministrator
.You are missing the last parameter, which is the callback.
The order doesn’t matter, this works:
As it turns out, I had to move the
add_action
above the function like so: