我已经使用了几乎所有的Wordpress示例代码,但仍然不起作用。我已经将php文件放在wp-content/plugins/menuitem/下。代码很简单
<?php add_action(\'admin_menu\', \'donations_overview_menu\');
function donations_overview_menu() {
add_options_page(\'Donations overview\', \'Donations overview\', \'manage_options\', \'donations-overview\', \'donations_overview\');}
function donations_overview() {
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>\';
}
?>