[wordpress插件] Devel开发

wordpress 插件 文章 2020-04-16 02:50 583 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Devel is made up of development oriented administrative components for developers and power users who need more control over their WordPress site.

Devel 由面向开发的管理组件组成,面向需要对WordPress网站进行更多控制的开发人员和高级用户。

Features are seperated into components which can be enabled or disabled.

功能分为可启用或禁用的组件。

In addition, devel has an intuitive API for adding your own custom components into the mix using the devel components API.

此外,devel具有直观的API,可使用devel组件API将自己的自定义组件添加到混合中。

Bundled Components

捆绑的组件

By default, devel comes packaged with:

默认情况下,devel随附于:

    • Custom Fields Manager – Allows to you manage all custom fields in your site.
    • 自定义字段管理器 –允许您管理站点中的所有自定义字段。

    Additional components will be added gradually throughout future releases.

    在将来的发行版中将逐渐添加其他组件。

    If you have any component suggestions, please visit the forums.

    如果您有任何组件建议,请访问论坛

    Components API

    组件API

    Using the components API, you can add your own components to devel.

    使用组件API,您可以将自己的组件添加到开发中。

    Add a component:

    添加组件:

    add_action( 'devel_register_components', 'register_my_components' );

      add_action('devel_register_components','register_my_components');

    function register_my_components() {    

    函数register_my_components(){    

    register_devel_component( array( 'id' => 'debug', 'label' => 'Debug', 'callback' => 'debug_callback', 'description' => 'This is a custom component.' ) );

    register_devel_component(array('id'=>'debug','label'=>'Debug','callback'=>'debug_callback','description'=>'这是一个自定义组件。'));

    }

    }

    In your callback function:

    在您的回调函数中:

    function debug_callback() {    

      function debug_callback(){    

    if ( is_active_devel_component( 'debug' ) ) {        

    如果(is_active_devel_component('debug')){        

    require_once( TEMPLATEPATH . '/devel-component-debug.php' );    

    require_once(TEMPLATEPATH。'/devel-component-debug.php');    

    }

    }

    }

    }

    In devel-component-debug.php you can hook into the devel menu:

    devel-component-debug.php 中,您可以进入开发菜单:

    add_action( 'admin_menu', 'custom_fields_init' );

      add_action('admin_menu','custom_fields_init');

    function custom_fields_init() {    

    函数custom_fields_init(){    

    add_submenu_page( 'devel', 'Debug', 'Debug', 'manage_options', 'debug-component', 'debug_admin_page' );

    add_submenu_page('devel','Debug','Debug','manage_options','debug-component','debug_admin_page');

    }

    }

    function debug_admin_page() { ?>    

    函数debug_admin_page(){?>    

            

            

    <?php screen_icon('tools');

    ?>        

    ?>        

    Debug

        

    调试    

        

        

    <?php

    }

    }

安装步骤

    1. Upload ‘devel’ to the ‘/wp-content/plugins/’ directory.
    2. 将“开发”上传到“ / wp-content / plugins /”目录。

    3. Activate the plugin through the Plugins menu in WordPress.
    4. 通过WordPress中的插件菜单激活插件。

    5. Go to Devel > Devel Components and activate any components you want.
    6. 转到开发>开发组件并激活所需的任何组件。

下载地址
https://downloads.wordpress.org/plugin/devel.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Contact Form 7 Salesforce联系表格7 Salesforce
[wordpress插件] Child Page Of Widget小部件的子页面
[wordpress插件] Count Post Signs计数张贴标志
[wordpress插件] WP Quick Add Child Category By binarycarpenter.comWP快速添加子类别Binarycarpenter.com
[wordpress插件] Clean Up Zombie Users (spammers)清理僵尸用户(垃圾邮件发送者)
随便看看
微信公众号免300认证教程 4931
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 3951
小程序广告组件通过审核,但是小程序内没有显示广告? 4130
企业微信通讯录账号被管理员误/恶意删除,怎么办? 7988
问题? 7220
如何快速搭建抽奖助手小程序(无需代码知识) 5012
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 5965
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5490
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5188
如何解决渲染层网络错误Failed to load media? 16543