Hallo,
probiere gerade mein allererstes plugin zu schreiben, und bekomme es leider nicht angezeigt.
Das plugin soll unter Admin->Tools angezeigt werden.
Im plugin 'angebote.php' habe ich folgenden code (habe mich dabei orientiert an http://codex.wordpress.org/Administration_Menus)
PHP
<?php
/** Step 2 (from text above). */
add_action( 'admin_menu', 'angebote_menu' );
// Add a new submenu under Tools:
//add_submenu_page('tools.php',...) muss das hier rein?
//add_management_page( __('Test Tools','menu-test'), __('Test Tools','menu-test'), 'manage_options', 'testtools', 'mt_tools_page');
/** Step 1. */
function angebote_menu() {
add_options_page( 'Angebote Options', 'Angebote', 'manage_options', 'angebote', 'angebote_options' );
}
/** Step 3. */
function angebote_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
Wenn ich vor dem ersten Befehl ein die(); mache passiert nix ?!?