示例#1
0
 public static function instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new DLN_Html_Template();
         self::$instance->constants();
         self::$instance->includes();
     }
     return self::$instance;
 }
示例#2
0
            wp_enqueue_script('dln-core', get_template_directory_uri() . '/assets/js/core/mws.js', array(), bp_get_version(), true);
            wp_enqueue_script('dln-core-themer', get_template_directory_uri() . '/assets/js/core/themer.js', array(), bp_get_version(), true);
            $data = array('site_url' => __(get_template_directory_uri() . '/assets/'));
            wp_localize_script('dln-core-themer', 'dln_var', $data);
        }
    }
    add_action('wp_enqueue_scripts', 'dln_enqueue_styles');
}
if (!function_exists('dln_disable_adminbar')) {
    function dln_disable_adminbar()
    {
        if (!is_admin()) {
            if (!isset($_GET['show_adminbar']) or 'yes' != $_GET['show_adminbar']) {
                add_filter('show_admin_bar', '__return_false');
                ?>
				  <style type="text/css">
				    .show-admin-bar {
				      display: none;
				    }
				  </style>
				<?php 
            }
        }
    }
    add_action('init', 'dln_disable_adminbar', 9);
}
define('DLN_THEME_DIR', trailingslashit(WP_CONTENT_DIR . '/themes/dln-theme'));
require DLN_THEME_DIR . '/html-templates/html-template.php';
if (class_exists('DLN_Html_Template')) {
    $template = DLN_Html_Template::instance();
}