本文整理汇总了PHP中theme::init方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::init方法的具体用法?PHP theme::init怎么用?PHP theme::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类theme
的用法示例。
在下文中一共展示了theme::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Configure the system and display the theme
*
* @param string $config_file Custom path to the config file
* @return void
*/
public static function init($config_file = '')
{
if (empty($config_file)) {
self::$config_file = __DIR__ . '/../config.php';
}
self::$error = new error();
self::$config = self::_get_config($config_file);
self::_check_config(self::$config);
self::set_vars(self::$config);
debug::init();
self::update_check();
theme::init();
theme::display();
}
示例2: janitor
janitor();
// article or form preview
if (isset($_POST['form_preview']) || isset($_GET['txpreview'])) {
include txpath . '/publish.php';
textpattern();
exit;
}
if (!empty($admin_side_plugins) and gps('event') != 'plugin') {
load_plugins(1);
}
// plugins may have altered privilege settings
if (!defined('TXP_UPDATE_DONE') && !gps('event') && !empty($default_event) && has_privs($default_event)) {
$event = $default_event;
}
// init private theme
$theme = theme::init();
include txpath . '/lib/txplib_head.php';
// ugly hack, for the people that don't update their admin_config.php
// Get rid of this when we completely remove admin_config and move privs to db
if ($event == 'list') {
require_privs('article');
} else {
require_privs($event);
}
callback_event($event, $step, 1);
$inc = txpath . '/include/txp_' . $event . '.php';
if (is_readable($inc)) {
include $inc;
}
callback_event($event, $step, 0);
$microdiff = getmicrotime() - $microstart;
示例3:
<?php
/**
* Semanitic UI for WordPress functions file
*/
// PSR-4 Autoloader
require_once __DIR__ . '/includes/autoload.php';
// Put any alias classes here
class theme extends \semantic\theme
{
}
// Run any init methods here
theme::init();
// Get Custom Functions
theme::part('custom-functions', 'include', 'custom-functions');
// Initialize WordPress
theme::part('wp-init', 'include', 'wp-init');
示例4: theme
<?php
/****************************/
/* Galore */
/* reviews.php */
/* Dummy reviews php page */
/****************************/
require "config.php";
require $init->pathObjects . "/theme.php";
$object = new theme();
$object->object = "reviews";
echo $object->init();
示例5: get_template_directory
<?php
/**
* Theme initialization
*/
require get_template_directory() . '/lib/theme.php';
$theme = new theme();
$theme->init();