1/在/wp-content/plugins/下 创建目录 mytest_helloword
2.创建文件mytest_helloword.php,并添加如下代码:
<?php
/*** @package mytest_helloword
* @version 1.0
*/
/*
Plugin Name: mytest_helloword
Plugin URI: http://blog.csdn.net/zhoushengchao
Description: mytest_helloword wordpress 测试
Author: 周胜超
Version: 1.0
Author URI: http://blog.csdn.net/zhoushengchao
*/
/** Admin pages */
function hello_admin() {
add_menu_page('mytest', 'mytest', 'manage_options', 'mytest_manage', 'mytest_manage');
}
/** Hook for admin pages */
add_action('admin_menu', 'hello_admin');
function mytest_manage(){
?>
<div style="margin:200px;">
<h3>this is my test</h3>
<h1>hello word</h1>
</div>
<?php
}
?>
3.效果图如下: