开发者

In Wordpress CMS, the controls under the WYSIWYG editor

I want to create a wordpress plugin where it adds additional controls underneath the WYSIWYG editor when adding pages/posts. But I don't know what keywords I'm supposed to google for to find relevant tutorials on how to do it.

Can s开发者_运维技巧omeone provide me with resources?


It's called add_meta_box() - call it within a hooked admin_init function like so;

function my_custom_meta_box()
{
    add_meta_box(
        'my_meta_box_id',
        'My Meta Box Title',
        'my_meta_box_callback',
        'post', // either post, page or link,
        'normal', // position of the meta box,
        'high' // position priority
    );
}
add_action('admin_init', 'my_custom_meta_box');

function my_meta_box_callback()
{
    echo 'This is the content of my meta box!';
}


Do you want the filter reference for hooks to add to the editor? Plugin API/Filter Reference « WordPress Codex There are lots of plugins that add controls to the editor: WordPress › WordPress Plugins - TinyMCE


I've written a good tutorial on adding WordPress Meta Boxes additionally check out my WPalchemy Meta Box PHP Class which will help you create meta boxes with ease.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜