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.效果图如下:
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.效果图如下:
相关文章推荐
- WORDPRESS插件开发(一)HELLO WORLD
- WORDPRESS插件开发(二)HELLO WORLD改进版
- WordPress插件开发: 文章同步到OSC博客插件(OscPress) (三)
- WordPress官方插件开发文档
- [置顶] 6 个帮助你开发 WordPress 的实用插件
- wordpress基础插件开发2-add_action()和do_action()的使用
- 怎样开发一个 WordPress 插件
- 怎样开发一个 WordPress 插件
- 怎样开发一个 WordPress 插件
- 黄聪:将自己开发的插件发布到WordPress官方插件站(转)
- WordPress 插件开发实例 – 详细注释的 Widget 开发例子
- WordPress 插件开发教程 Part 2 – WordPress 插件基础
- wordpress插件开发
- VSCode插件开发全攻略(二)HelloWord
- vim插件开发入门之helloword
- WordPress 插件开发实例 – 详细注释的 Widget 开发例子
- wordpress基础插件开发4-add_filter()与apply_filters()的简单应用
- LAMP开发精要(7):在 Wordpress 插件中进行数据库操作
- LAMP开发精要(4):Wordpress 插件示例之二-对示例一的重构
- WordPress插件开发实例教程 - 版权插件