• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpcf_embedded_admin_init_hook函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wpcf_embedded_admin_init_hook函数的典型用法代码示例。如果您正苦于以下问题:PHP wpcf_embedded_admin_init_hook函数的具体用法?PHP wpcf_embedded_admin_init_hook怎么用?PHP wpcf_embedded_admin_init_hook使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wpcf_embedded_admin_init_hook函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: wpcf_embedded_init

/**
 * Main init hook.
 */
function wpcf_embedded_init()
{
    $locale = get_locale();
    load_textdomain('wpcf', WPCF_EMBEDDED_ABSPATH . '/locale/types-' . $locale . '.mo');
    if (!defined('WPV_VERSION')) {
        load_textdomain('wpv-views', WPCF_EMBEDDED_ABSPATH . '/locale/locale-views/views-' . $locale . '.mo');
    }
    // Define necessary constants if plugin is not present
    if (!defined('WPCF_VERSION')) {
        define('WPCF_VERSION', '1.0.4');
        define('WPCF_META_PREFIX', 'wpcf-');
        define('WPCF_EMBEDDED_RELPATH', icl_get_file_relpath(__FILE__));
    } else {
        define('WPCF_EMBEDDED_RELPATH', WPCF_RELPATH . '/embedded');
    }
    define('WPCF_EMBEDDED_INC_RELPATH', WPCF_EMBEDDED_RELPATH . '/includes');
    define('WPCF_EMBEDDED_RES_RELPATH', WPCF_EMBEDDED_RELPATH . '/resources');
    if (is_admin()) {
        require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
        wpcf_embedded_admin_init_hook();
    } else {
        require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
    }
    wpcf_init_custom_types_taxonomies();
    if (defined('DOING_AJAX')) {
        require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
    }
    wpcf_embedded_check_import();
}
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:32,代码来源:types.php


示例2: wpcf_embedded_init


//.........这里部分代码省略.........
    // Module manager
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/module-manager.php';
    // WPML specific code
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/wpml.php';
    // CRED specific code.
    if (defined('CRED_FE_VERSION')) {
        require_once WPCF_EMBEDDED_INC_ABSPATH . '/cred.php';
    }
    /*
     *
     *
     * TODO This is a must for now.
     * See if any fields need to be loaded.
     *
     * 1. Checkboxes - may be missing when submitted
     */
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields/checkbox.php';
    /*
     *
     *
     * Use this call to load basic scripts and styles if necesary
     * wpcf_enqueue_scripts();
     */
    require_once WPCF_EMBEDDED_ABSPATH . '/usermeta-init.php';
    // Include frontend or admin code
    if (is_admin()) {
        require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
        /*
         * TODO Check if called twice
         *
         * Watch this! This is actually called twice everytime
         * in both modes (plugin or embedded)
         */
        wpcf_embedded_admin_init_hook();
    } else {
        require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
    }
    global $wpcf;
    // TODO since Types 1.2 Continue adding new functionalities HERE
    /*
     * Consider code already there as core.
     * Use hooks to add new functionalities
     *
     * Introduced new global object $wpcf
     * Holds useful objects like:
     * $wpcf->field - Field object (base item object)
     * $wpcf->repeater - Repetitive field object
     */
    // Set debugging
    if (!defined('WPCF_DEBUG')) {
        define('WPCF_DEBUG', false);
    } else {
        if (WPCF_DEBUG) {
            wp_enqueue_script('jquery');
        }
    }
    $wpcf->debug = new stdClass();
    require WPCF_EMBEDDED_INC_ABSPATH . '/debug.php';
    add_action('wp_footer', 'wpcf_debug', PHP_INT_MAX);
    add_action('admin_footer', 'wpcf_debug', PHP_INT_MAX);
    // Set field object
    $wpcf->field = new WPCF_Field();
    // Set fields object
    $wpcf->fields = new WPCF_Fields();
    // Set usermeta field object
    $wpcf->usermeta_field = new WPCF_Usermeta_Field();
开发者ID:reginaldojunior,项目名称:blog,代码行数:67,代码来源:bootstrap.php


示例3: wpcf_embedded_init

/**
 * Main init hook.
 * 
 * All rest of init processes are continued here.
 * Sets locale, constants, includes...
 * 
 * @todo Make sure plugin AND embedded code are calling this function on 'init'
 * @todo Test priorities
 */
function wpcf_embedded_init()
{
    do_action('wpcf_before_init');
    // Set locale
    $locale = get_locale();
    load_textdomain('wpcf', WPCF_EMBEDDED_ABSPATH . '/locale/types-' . $locale . '.mo');
    if (!defined('WPV_VERSION')) {
        load_textdomain('wpv-views', WPCF_EMBEDDED_ABSPATH . '/locale/locale-views/views-' . $locale . '.mo');
    }
    // Define necessary constants if plugin is not present
    // This ones are skipped if used as embedded code!
    if (!defined('WPCF_VERSION')) {
        define('WPCF_VERSION', '1.2');
        define('WPCF_META_PREFIX', 'wpcf-');
        define('WPCF_EMBEDDED_RELPATH', icl_get_file_relpath(__FILE__));
    } else {
        // Otherwise if plugin code - just define embedded paths
        define('WPCF_EMBEDDED_RELPATH', WPCF_RELPATH . '/embedded');
    }
    // Define embedded paths
    define('WPCF_EMBEDDED_INC_RELPATH', WPCF_EMBEDDED_RELPATH . '/includes');
    define('WPCF_EMBEDDED_RES_RELPATH', WPCF_EMBEDDED_RELPATH . '/resources');
    // TODO INCLUDES!
    //
    // Please add all required includes here
    // Since Types 1.2 we can consider existing code as core.
    // All new functionalities should be added as includes HERE
    // and marked with @since Types $version.
    //
    // Thanks!
    //
    // Basic
    /*
     * 
     * Mind class extensions queue
     */
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/fields.php';
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/field.php';
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/class.wpcf-template.php';
    // Repeater
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/repeater.php';
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/repetitive-fields-ordering.php';
    // Relationship
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/relationship.php';
    // Conditional
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/conditional.php';
    // API
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/api.php';
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/api.php';
    // Validation
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/validation.php';
    // Post Types
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/class.wpcf-post-types.php';
    // Import Export
    require_once WPCF_EMBEDDED_ABSPATH . '/classes/class.wpcf-import-export.php';
    // Incubator
    require_once WPCF_EMBEDDED_ABSPATH . '/incubator/index.php';
    // Module manager
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/module-manager.php';
    // WPML specific code
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/wpml.php';
    /*
     * 
     * 
     * TODO This is a must for now.
     * See if any fields need to be loaded.
     */
    require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields/checkbox.php';
    /*
     * 
     * 
     * Use this call to load basic scripts and styles if necesary
     * wpcf_enqueue_scripts();
     */
    // Include frontend or admin code
    if (is_admin()) {
        require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
        /*
         * TODO Check if called twice
         * 
         * Watch this! This is actually called twice everytime
         * in both modes (plugin or embedded)
         */
        wpcf_embedded_admin_init_hook();
    } else {
        require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
    }
    global $wpcf;
    // TODO since Types 1.2 Continue adding new functionalities HERE
    /*
     * Consider code already there as core.
//.........这里部分代码省略.........
开发者ID:adisonc,项目名称:MaineLearning,代码行数:101,代码来源:bootstrap.php



注:本文中的wpcf_embedded_admin_init_hook函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpcf_embedded_check_import函数代码示例发布时间:2022-05-23
下一篇:
PHP wpcf_custom_types_register_translation函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap