[wordpress插件] Devel开发

wordpress 插件 文章 2020-04-16 02:50 661 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插件] azurecurve Series Index天蓝色曲线指数
[wordpress插件] Comment Word Count评论字数
[wordpress插件] CDN Image ProxyCDN映像代理
[wordpress插件] ChristmasSprite &#8211; Christmas CountDownChristmasSprite –圣诞节倒计时
[wordpress插件] Contact Form 7 &#8211; Campaign Monitor Addon联系表格7 – Campaign Monitor插件
随便看看
微信公众号openid? 2347
微信开放平台跟公众平台有什么区别? 3608
怎么添加小程序支付功能? 4516
教育科技公司申请微信支付被拒绝? 4798
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177