admin-init

<?php

    /**
     * 1、在这里定义了一些用到的函数和常量、变量。
     * 2、框架只需要加载者一个文件就可用添加所有扩展和选项了
     * https://github.com/reduxframework/redux-framework/blob/master/sample/sample-config.php
     */

    // 不允许直接访问此文件。
if ( ! defined( 'ABSPATH' ) ) {
	exit( '拒绝直接访问脚本.' );
}
   /**
 * The main class.
 */

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Direct script access denied.' );
}
class Unify {
	public static $framework_folder='redux';
	public static $template_dir_path = '';
	public static $template_dir_url = '';
	public static $stylesheet_dir_path = '';
	public static $stylesheet_dir_url = '';
	/**
	 * The class constructor
	 *
	 * @access private
	 */
	private function __construct() {

		// Add a non-persistent cache group.
		wp_cache_add_non_persistent_groups( 'Unify' );

		// Set static vars.
		if ( '' === self::$template_dir_path ) {
			self::$template_dir_path = wp_normalize_path( get_template_directory() );
		}
		if ( '' === self::$template_dir_url ) {
			self::$template_dir_url = get_template_directory_uri();
		}
		if ( '' === self::$stylesheet_dir_path ) {
			self::$stylesheet_dir_path = wp_normalize_path( get_stylesheet_directory() );
		}
		if ( '' === self::$stylesheet_dir_url ) {
			self::$stylesheet_dir_url = get_stylesheet_directory_uri();
		}
		}
}
   //include_once wp_normalize_path( get_template_directory() . '/redux/inc/class-Unify.php' );
   /**
    * 包含路径函数常量文件.
    */
   //定义框架目录为当前启用的主题目录里的redux,如果想自定义文件夹请修改redux为自己的文件夹名称
   //include_once wp_normalize_path( get_template_directory() .'$framework_folder'.' /inc/path-init.php' );
   //include_once wp_normalize_path( get_template_directory() .'/redux/inc/path-init.php' );
   //include_once Unify::$template_dir_path . '/redux/inc/path-init.php';
   //include_once Unify::$framework_dir_path . '/inc/path-init.php';
   //include_once $framework_dir_path . "/inc/path-init.php"; 
   //include_once Unify::$template_dir_path . '/redux/path-init.php';
   

    // Load the TGM init if it exists
    if ( file_exists( dirname( __FILE__ ) . '/tgm/tgm-init.php' ) ) {
        require_once dirname( __FILE__ ) . '/tgm/tgm-init.php';
    }

    // Load the embedded Redux Framework
    if ( file_exists( dirname( __FILE__ ).'/framework/framework.php' ) ) {
        require_once dirname(__FILE__).'/framework/framework.php';
    }

    // Load the theme/plugin options
    if ( file_exists( dirname( __FILE__ ) . '/inc/options-init.php' ) ) {
        require_once dirname( __FILE__ ) . '/inc/options-init.php';
    }
    
    // Load Redux extensions
    if ( file_exists( dirname( __FILE__ ) . '/extensions/extensions-init.php' ) ) {
        require_once dirname( __FILE__ ) . '/extensions/extensions-init.php';
    }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值