<?php
/**
* The main class.
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
class Unify {
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();
}
}
}
class Unify
最新推荐文章于 2024-03-13 14:06:01 发布