您的位置:首页 > 其它

wordpress 插件开发1 helloword

2013-10-20 00:19 288 查看
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.效果图如下:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: