本文整理汇总了PHP中Admin::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::init方法的具体用法?PHP Admin::init怎么用?PHP Admin::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::init方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_init
public function test_init()
{
$this->admin->init();
$this->assertNotEmpty($this->admin->network);
$this->assertNotEmpty($this->admin->live_update);
$this->assertInstanceOf('\\WP_Stream\\Network', $this->admin->network);
$this->assertInstanceOf('\\WP_Stream\\Live_Update', $this->admin->live_update);
}
示例2: __construct
public function __construct()
{
PluginInstall::init();
// if (is_admin()) {
Admin::init();
//add_filter('admin_footer_text', array($this, 'sagenda_custom_admin_footer'));
//} else {
ShortCode::init();
//}
}
示例3: includes
private function includes()
{
// require( BBPKR_INC . '/theme.php' );
// require( BBPKR_INC . '/forum.php' );
// require( BBPKR_INC . '/topic.php' );
// require( BBPKR_INC . '/reply.php' );
// require( BBPKR_INC . '/editor.php' );
// require( BBPKR_INC . '/attachments.php' );
// require( BBPKR_INC . '/private.php' );
// require( BBPKR_INC . '/permissions.php' );
// require( BBPKR_INC . '/forum-roles.php' );
// require( BBPKR_INC . '/meta.php' );
// require( BBPKR_LIB . '/meta.php' );
// require( BBPKR_LIB . '/view.php' );
if (is_admin()) {
// require_once( BBPKR_PATH . '/admin/init.php' );
Admin::init();
}
/*if ( !defined('GDBBPRESSATTACHMENTS_PATH' ) ) {
require_once( BBPKR_LIB . '/gd-bbpress-attachments/gd-bbpress-attachments.php');
}*/
}
示例4: init
public function init()
{
parent::init();
$this->checkPower('feedback');
}
示例5: init
public function init()
{
parent::init();
$this->currentMenu = '1001';
}
示例6: run
public static function run()
{
if (isset($_GET['mode'])) {
$mode = $_GET['mode'];
} else {
$mode = "";
}
$request = True;
//najskôr vyriadime požiadavku
if ($mode == self::MODE_LOGIN && isset($_POST['password'])) {
Auth::login($_POST['password']);
} else {
if ($mode == self::MODE_SUBMIT_TEST) {
if (Auth::isAuth()) {
Test::submit();
} else {
Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
}
} else {
if ($mode == self::MODE_LOGOUT) {
if (Auth::isAuth()) {
Auth::logout();
} else {
Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
}
} else {
if ($mode == self::MODE_DEL_PREDMET) {
if (Auth::isAdmin()) {
Admin::delPredmet();
} else {
Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
}
} else {
if ($mode == self::MODE_ADD_CLASS) {
if (Auth::isAdmin()) {
Admin::addClass();
} else {
Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
}
} else {
if ($mode == self::MODE_DEL_CLASS) {
if (Auth::isAdmin()) {
Admin::delClass();
} else {
Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
}
} else {
if ($mode == self::MODE_ADD_PREDMET) {
if (Auth::isAuth()) {
Admin::addPredmet();
} else {
Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
}
}
}
}
}
}
}
}
//a idem spracovť stránku
//ak som prihlásený a chcem sa znova prihlásiť tak mi to nepojde
if (self::$page == self::LOGIN && Auth::isAuth()) {
Viewer::setPage(self::TEST_LIST);
}
if (self::$page == self::TEST_LIST) {
TestList::init();
} else {
if (self::$page == self::TEST) {
Test::init();
} else {
if (self::$page == self::STATS) {
Stats::init();
} else {
if (self::$page == self::ADMIN) {
Admin::init();
}
}
}
}
}
示例7: header
<?php
session_start();
include 'lib/class-admin.php';
include 'lib/class-mini-cms.php';
$twig = MiniCMS::twigInit();
if (!isset($_SESSION['username'])) {
header('Location: login.php');
}
$admin = new Admin();
if (isset($_POST) && !empty($_POST)) {
$admin->saveSections($_POST);
}
$admin->init($twig);
示例8: init
public function init()
{
parent::init();
$this->checkPower('config');
$this->layout = 'config';
}
示例9: function
if (file_exists($composer_autoload)) {
require_once $composer_autoload;
}
const ENV_API_KEY = 'THISDATA_API_KEY';
const ENV_JS_WRITE_KEY = 'THISDATA_JS_WRITE_KEY';
const ENV_JS_SIGNATURE = 'THISDATA_JS_SIGNATURE';
const ENV_WEBHOOK_SIGNATURE = 'THISDATA_WEBHOOK_SIGNATURE';
if (version_compare(\PHP_VERSION, '5.5', '<')) {
add_action('admin_notices', function () {
$message = sprintf(sprintf(__('Sorry your PHP version is too old. The ThisData plugin requires PHP >= 5.5. You are running version %s.', 'thisdata-plugin'), \PHP_VERSION), Admin::getSettingsPageURL());
echo '<div class="notice notice-info"><p>' . $message . '</p></div>';
});
} else {
if (is_admin()) {
$admin = new Admin();
$admin->init();
$admin->render();
}
add_action('init', function () {
if ($apiKey = API::getKey()) {
try {
Events::init(API::getEventsEndpoint());
Webhook::init();
JS::init();
} catch (\Exception $e) {
add_action('admin_notices', function () use($e) {
$message = $e->getMessage();
echo '<div class="notice notice-error"><p>' . $message . '</p></div>';
});
}
} elseif (empty($_GET['page']) || $_GET['page'] !== Admin::SETTINGS) {
示例10: init
public function init()
{
$this->_checkAdmin = false;
$this->layout = "login";
parent::init();
}