Hallo Leute,
ich versuche seit einer ganzen Weile verzweifelt eine Optionsseite für mein Plugin zu erstellen, aber es klappt einfach nicht.
Ich habe jetzt einfach mal das Beispiel von Wordpress genommen aber nichtmal damit klappt es.
Hier der Quelltext:
PHP
add_action('admin_menu', 'my_plugin_menu');
function my_plugin_menu() {
add_options_page('My Plugin Options', 'My Plugin', 9, __FILE__, '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>';
}
Alles anzeigen
Ich hoffe mir kann jemand helfen.