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


PHP Util_Environment::is_w3tc_enterprise方法代码示例

本文整理汇总了PHP中Util_Environment::is_w3tc_enterprise方法的典型用法代码示例。如果您正苦于以下问题:PHP Util_Environment::is_w3tc_enterprise方法的具体用法?PHP Util_Environment::is_w3tc_enterprise怎么用?PHP Util_Environment::is_w3tc_enterprise使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util_Environment的用法示例。


在下文中一共展示了Util_Environment::is_w3tc_enterprise方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: admin_print_scripts_w3tc_general

 public function admin_print_scripts_w3tc_general()
 {
     $state = Dispatcher::config_state();
     if (!$state->get_boolean('minify.hide_minify_help') && !Util_Environment::is_w3tc_edge($this->_config) && !Util_Environment::is_w3tc_enterprise($this->_config)) {
         wp_enqueue_script('w3tc-minify-help', plugins_url('Minify_GeneralPage_View_ShowHelp.js', W3TC_FILE), array(), W3TC_VERSION);
     }
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:7,代码来源:Minify_Plugin_Admin.php

示例2: switch

<?php 
if (!Util_Environment::is_w3tc_pro($config)) {
    ?>
    <?php 
    include W3TC_INC_OPTIONS_DIR . '/edd/buy.php';
}
?>
    <?php 
switch ($page) {
    case 'w3tc_general':
        $anchors = array(array('id' => 'general', 'text' => __('General', 'w3-total-cache')), array('id' => 'page_cache', 'text' => __('Page Cache', 'w3-total-cache')), array('id' => 'minify', 'text' => 'Minify'), array('id' => 'system_opcache', 'text' => __('Opcode Cache', 'w3-total-cache')), array('id' => 'database_cache', 'text' => __('Database Cache', 'w3-total-cache')), array('id' => 'object_cache', 'text' => __('Object Cache', 'w3-total-cache')));
        if (Util_Environment::is_w3tc_pro($config)) {
            $anchors[] = array('id' => 'fragment_cache', 'text' => __('Fragment Cache', 'w3-total-cache'));
        }
        $anchors = array_merge($anchors, array(array('id' => 'browser_cache', 'text' => __('Browser Cache', 'w3-total-cache')), array('id' => 'cdn', 'text' => __('<abbr title="Content Delivery Network">CDN</abbr>', 'w3-total-cache')), array('id' => 'reverse_proxy', 'text' => __('Reverse Proxy', 'w3-total-cache'))));
        if (Util_Environment::is_w3tc_enterprise()) {
            $anchors[] = array('id' => 'amazon_sns', 'text' => __('Amazon <abbr title="Simple Notification Service">SNS</abbr>', 'w3-total-cache'));
        }
        $anchors[] = array('id' => 'monitoring', 'text' => __('Monitoring', 'w3-total-cache'));
        if ($licensing_visible) {
            array('id' => 'licensing', 'text' => __('Licensing', 'w3-total-cache'));
        }
        $link_attrs = array_merge($anchors, $custom_areas, array(array('id' => 'miscellaneous', 'text' => __('Miscellaneous', 'w3-total-cache')), array('id' => 'debug', 'text' => __('Debug', 'w3-total-cache')), array('id' => 'settings', 'text' => __('Import / Export Settings', 'w3-total-cache'))));
        $links = array();
        foreach ($link_attrs as $link) {
            $links[] = "<a href=\"#{$link['id']}\">{$link['text']}</a>";
        }
        $links[] = '<a href="#" class="button-self-test">Compatibility Test</a>';
        ?>
                <p id="w3tc-options-menu">
                    <?php 
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:31,代码来源:header.php

示例3: __construct

 function __construct()
 {
     $c = Dispatcher::config();
     $plugins = array();
     $plugins[] = new Generic_Plugin();
     if ($c->get_boolean('dbcache.enabled')) {
         $plugins[] = new DbCache_Plugin();
     }
     if ($c->get_boolean('objectcache.enabled')) {
         $plugins[] = new ObjectCache_Plugin();
     }
     if ($c->get_boolean('pgcache.enabled')) {
         $plugins[] = new PgCache_Plugin();
     }
     if ($c->get_boolean('cdn.enabled')) {
         $plugins[] = new Cdn_Plugin();
     }
     if ($c->get_boolean('browsercache.enabled')) {
         $plugins[] = new BrowserCache_Plugin();
     }
     if ($c->get_boolean('minify.enabled')) {
         $plugins[] = new Minify_Plugin();
     }
     if ($c->get_boolean('varnish.enabled')) {
         $plugins[] = new Varnish_Plugin();
     }
     if ($c->get_boolean('stats.enabled')) {
         $plugins[] = new UsageStatistics_Plugin();
     }
     if (is_admin()) {
         $plugins[] = new Generic_Plugin_Admin();
         $plugins[] = new BrowserCache_Plugin_Admin();
         $plugins[] = new DbCache_Plugin_Admin();
         $plugins[] = new ObjectCache_Plugin_Admin();
         $plugins[] = new PgCache_Plugin_Admin();
         $plugins[] = new Minify_Plugin_Admin();
         $plugins[] = new Generic_Plugin_WidgetServices();
         $plugins[] = new Generic_WidgetSpreadTheWord_Plugin();
         $plugins[] = new Generic_Plugin_WidgetNews();
         $plugins[] = new Generic_Plugin_WidgetForum();
         $plugins[] = new SystemOpCache_Plugin_Admin();
         $plugins[] = new Cdn_Plugin_Admin();
         if ($c->get_string('cdn.engine') == 'highwinds') {
         } else {
             if ($c->get_string('cdn.engine') != 'netdna') {
                 $plugins[] = new Cdn_Plugin_WidgetMaxCdn();
             } else {
                 $plugins[] = new Cdn_Plugin_WidgetNetDna();
             }
         }
         if ($c->get_boolean('widget.pagespeed.enabled')) {
             $plugins[] = new PageSpeed_Plugin_Widget();
         }
         $plugins[] = new Generic_Plugin_AdminCompatibility();
         if (!(defined('W3TC_PRO') || Util_Environment::is_w3tc_enterprise())) {
             $plugins[] = new Licensing_Plugin_Admin();
         }
         if ($c->get_boolean('pgcache.enabled') || $c->get_boolean('varnish.enabled')) {
             $plugins[] = new Generic_Plugin_AdminRowActions();
         }
         $plugins[] = new Extensions_Plugin_Admin();
         $plugins[] = new Generic_Plugin_AdminNotifications();
         $plugins[] = new UsageStatistics_Plugin_Admin();
     }
     $this->_loaded_plugins = $plugins;
     register_activation_hook(W3TC_FILE, array($this, 'activate'));
     register_deactivation_hook(W3TC_FILE, array($this, 'deactivate'));
 }
开发者ID:eduardodomingos,项目名称:eduardodomingos.com,代码行数:68,代码来源:Root_Loader.php

示例4: w3tc_support_send_details

 /**
  * Send support request action
  *
  * @return void
  */
 function w3tc_support_send_details()
 {
     $c = Dispatcher::config();
     $post = array();
     foreach ($_GET as $p => $v) {
         $post[$p] = $v;
     }
     $post['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
     $post['version'] = W3TC_VERSION;
     $license_level = 'community';
     if (Util_Environment::is_w3tc_pro($c)) {
         $license_level = 'pro';
     } elseif (Util_Environment::is_w3tc_enterprise($c)) {
         $license_level = 'enterprise';
     }
     $post['license_level'] = $license_level . ' ' . $c->get_string('plugin.license_key');
     /**
      * Add attachments
      */
     $attachments = array();
     $attach_files = array(Util_Environment::wp_config_path(), Util_Rule::get_pgcache_rules_core_path(), Util_Rule::get_pgcache_rules_cache_path(), Util_Rule::get_browsercache_rules_cache_path(), Util_Rule::get_browsercache_rules_no404wp_path(), Util_Rule::get_minify_rules_core_path(), Util_Rule::get_minify_rules_cache_path());
     /**
      * Attach config files
      */
     if ($handle = opendir(W3TC_CONFIG_DIR)) {
         while (($entry = @readdir($handle)) !== false) {
             if ($entry == '.' || $entry == '..' || $entry == 'index.html') {
                 continue;
             }
             $attach_file[] = W3TC_CONFIG_DIR . '/' . $entry;
         }
         closedir($handle);
     }
     foreach ($attach_files as $attach_file) {
         if ($attach_file && file_exists($attach_file) && !in_array($attach_file, $attachments)) {
             $attachments[] = array('filename' => basename($attach_file), 'content' => file_get_contents($attach_file));
         }
     }
     /**
      * Attach server info
      */
     $server_info = print_r($this->get_server_info(), true);
     $server_info = str_replace("\n", "\r\n", $server_info);
     $attachments[] = array('filename' => 'server_info.txt', 'content' => $server_info);
     /**
      * Attach phpinfo
      */
     ob_start();
     phpinfo();
     $php_info = ob_get_contents();
     ob_end_clean();
     $attachments[] = array('filename' => 'php_info.html', 'content' => $php_info);
     /**
      * Attach self-test
      */
     ob_start();
     $this->self_test();
     $self_test = ob_get_contents();
     ob_end_clean();
     $attachments[] = array('filename' => 'self_test.html', 'content' => $self_test);
     $post['attachments'] = $attachments;
     $response = wp_remote_post(W3TC_SUPPORT_REQUEST_URL, array('body' => $post, 'timeout' => $c->get_integer('timelimit.email_send')));
     if (!is_wp_error($response)) {
         $result = $response['response']['code'] == 200 && $response['body'] == 'ok';
     } else {
         $result = false;
     }
     echo $result ? 'ok' : 'error';
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:74,代码来源:Support_AdminActions.php

示例5: w3tc_config_save_support_us

 /**
  * Save support us action
  *
  * @return void
  */
 function w3tc_config_save_support_us()
 {
     $support = Util_Request::get_string('support');
     $tweeted = Util_Request::get_boolean('tweeted');
     $signmeup = Util_Request::get_boolean('signmeup');
     $track_usage = Util_Request::get_boolean('track_usage');
     $this->_config->set('common.support', $support);
     $this->_config->set('common.tweeted', $tweeted);
     if ($track_usage) {
         $this->_config->set('common.track_usage', true);
     }
     if ($signmeup) {
         if (Util_Environment::is_w3tc_enterprise($this->_config)) {
             $license = 'enterprise';
         } elseif (Util_Environment::is_w3tc_pro($this->_config)) {
             $license = 'pro';
         } else {
             $license = 'community';
         }
         $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL);
         wp_remote_post(W3TC_MAILLINGLIST_SIGNUP_URL, array('body' => array('email' => $email, 'license' => $license)));
     }
     $this->_config->save();
     Generic_AdminLinks::link_update($this->_config);
     Util_Admin::redirect(array('w3tc_note' => 'config_save'));
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:31,代码来源:Generic_AdminActions_Config.php

示例6: is_w3tc_pro

 /**
  *
  *
  * @param Config  $config
  * @return bool
  */
 public static function is_w3tc_pro($config = null)
 {
     $result = $config->get_string('plugin.type') == 'pro' || $config->get_string('plugin.type') == 'pro_dev' || Util_Environment::is_w3tc_enterprise($config) || defined('W3TC_PRO') && W3TC_PRO;
     return $result;
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:11,代码来源:Util_Environment.php


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