admin-head-{plugin_page} actions
-
Greetings,
I’m working on a plugin that requires some CSS and JS capabilities but only on the option page for the plugin. I followed the information found online regarding creating the options page …
$page = add_options_page( ... ) add_action("admin_head-" . $page, "example");… and created the example function as follows …
function example() { wp_enqueue_script("prototype"); wp_enqueue_script("my-js", WP_PLUGIN_URL . "/path/to/my.js", array("prototype")); wp_enqueue_style("my-css", WP_PLUGIN_URL . "/path/to/my.css); }… but neither the CSS nor the JS seem to get added to the document. What am I doing wrong? I know the function is executing through the use of a quick
echo "Hi!";statement from within example().Thanks,
Dash
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘admin-head-{plugin_page} actions’ is closed to new replies.