如何修改Wordpress“页面添加新屏幕"; [英] How to go about modifying the Wordpress "Pages Add New Screen"

查看:108
本文介绍了如何修改Wordpress“页面添加新屏幕";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在考虑开发自己的worpdress主题框架.我想使用jquery ui来构建一个bootstrap 3.0拖放界面,该界面我已经解决了,但是我不知道如何按照此处引用的方式编辑页面添加新屏幕": https://codex.wordpress.org/Pages_Add_New_Screen

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>';
});

widget_text块属于高级自定义字段"(它是可重复/可排序的字段).我不确定,但是我认为它可以使用CSS或jQuery删除Meta Box边框.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆