当前位置: 首页>>代码示例>>PHP>>正文


PHP Admin::init方法代码示例

本文整理汇总了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);
 }
开发者ID:evgenykireev,项目名称:stream,代码行数:8,代码来源:test-class-admin.php

示例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();
     //}
 }
开发者ID:RetinaInc,项目名称:sagenda-wp,代码行数:10,代码来源:sagenda-wp.php

示例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');
     		}*/
 }
开发者ID:082net,项目名称:bbpresskr,代码行数:22,代码来源:core.php

示例4: init

 public function init()
 {
     parent::init();
     $this->checkPower('feedback');
 }
开发者ID:ph7pal,项目名称:momo,代码行数:5,代码来源:FeedbackController.php

示例5: init

 public function init()
 {
     parent::init();
     $this->currentMenu = '1001';
 }
开发者ID:FlynnFang,项目名称:cyfyy,代码行数:5,代码来源:PatientController.php

示例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();
                 }
             }
         }
     }
 }
开发者ID:kabell,项目名称:dotaznik,代码行数:81,代码来源:Viewer.php

示例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);
开发者ID:lggorman,项目名称:mini-cms,代码行数:14,代码来源:admin.php

示例8: init

 public function init()
 {
     parent::init();
     $this->checkPower('config');
     $this->layout = 'config';
 }
开发者ID:ph7pal,项目名称:momo,代码行数:6,代码来源:ConfigController.php

示例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) {
开发者ID:thisdata,项目名称:thisdata-wordpress,代码行数:31,代码来源:index.php

示例10: init

 public function init()
 {
     $this->_checkAdmin = false;
     $this->layout = "login";
     parent::init();
 }
开发者ID:FlynnFang,项目名称:cyfyy,代码行数:6,代码来源:LoginController.php


注:本文中的Admin::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。