如何修改Wordpress“页面添加新屏幕" [英] How to go about modifying the Wordpress "Pages Add New Screen"
问题描述
我一直在考虑为 worpdress 开发我自己的主题框架.我想使用 jquery ui 来构建一个引导程序 3.0 拖放界面,我已经完成了,但我不知道如何编辑此处引用的页面添加新屏幕":
widget_text
块属于高级自定义字段(它是一个可重复/可排序的字段).我不确定了,但我认为它使用 CSS 或 jQuery 删除了 Meta Box 边框.
I have been thinking about developing my own theme framework for worpdress. I'd like to use jquery ui to build a bootstrap 3.0 drag and drop interface, which I already have worked out, but I can't figure out how to edit the "Pages Add New Screen" as referenced here: https://codex.wordpress.org/Pages_Add_New_Screen
Would I add files to my client side theme that affected my admin structure as well? Does anyone have any suggestions as to how to do something like this. Alot of themes these days come with these drag and drop frameworks and it would be nice, to be able to create one of my own, just need some direction on where to start editing / looking.
We add a Custom Meta Box and do our thing inside it.
There are some hooks that are not Meta Boxes and we can use to insert content into that admin page:
add_action( 'edit_form_top', function( $post )
{
echo '<h1 style="color:red">edit_form_top</h1>';
});
add_action( 'edit_form_after_title', function( $post )
{
echo '<h1 style="color:red">edit_form_after_title</h1>';
});
add_action( 'edit_form_after_editor', function( $post )
{
echo '<h1 style="color:red">edit_form_after_editor</h1>';
});
add_action( 'edit_page_form', function( $post )
{
// edit_page_form is ONLY for pages, the other is for the rest of post types
echo '<h1 style="color:red">edit_page_form/edit_form_advanced</h1>';
});
add_action( 'dbx_post_sidebar', function( $post )
{
echo '<h1 style="color:red">dbx_post_sidebar</h1>';
});
The widget_text
block belongs to Advanced Custom Fields (it's a repeatable/sortable field). I'm not sure anymore, but I think it removes the Meta Box borders with CSS or jQuery.
这篇关于如何修改Wordpress“页面添加新屏幕"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!