當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Util_Environment::is_w3tc_edge方法代碼示例

本文整理匯總了PHP中Util_Environment::is_w3tc_edge方法的典型用法代碼示例。如果您正苦於以下問題:PHP Util_Environment::is_w3tc_edge方法的具體用法?PHP Util_Environment::is_w3tc_edge怎麽用?PHP Util_Environment::is_w3tc_edge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Util_Environment的用法示例。


在下文中一共展示了Util_Environment::is_w3tc_edge方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: admin_head

 /**
  * Print JS required by the support nag.
  */
 function admin_head()
 {
     $state = Dispatcher::config_state_master();
     // support us
     $support_reminder = $state->get_integer('common.support_us_invitations') < 3 && $state->get_integer('common.install') < time() - W3TC_SUPPORT_US_TIMEOUT && $state->get_integer('common.next_support_us_invitation') < time() && $this->_config->get_string('common.support') == '' && !$this->_config->get_boolean('common.tweeted');
     if ($support_reminder) {
         $state->set('common.next_support_us_invitation', time() + W3TC_SUPPORT_US_TIMEOUT);
         $state->set('common.support_us_invitations', $state->get_integer('common.support_us_invitations') + 1);
         $state->save();
         do_action('w3tc_message_action_generic_support_us');
     }
     // edge mode
     $edge_reminder = !$support_reminder && !Util_Environment::is_w3tc_edge($this->_config) && $state->get_integer('common.edge_invitations') < 3 && $state->get_integer('common.install') < time() - W3TC_EDGE_TIMEOUT && $state->get_integer('common.next_edge_invitation') < time();
     if ($edge_reminder) {
         if ($state->get_integer('common.edge_invitations') > 1) {
             $next = time() + 30 * 24 * 60 * 60;
         } else {
             $next = time() + W3TC_EDGE_TIMEOUT;
         }
         $state->set('common.next_edge_invitation', $next);
         $state->set('common.edge_invitations', $state->get_integer('common.edge_invitations') + 1);
         $state->save();
         do_action('w3tc_message_action_generic_edge');
     }
 }
開發者ID:developmentDM2,項目名稱:Whohaha,代碼行數:28,代碼來源:Generic_Plugin_AdminNotifications.php

示例2: 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

示例3: admin_init

 public function admin_init()
 {
     $config = Dispatcher::config();
     $groups = $config->get_array('mobile.rgroups');
     if (Util_Environment::is_w3tc_edge($config) && isset($groups['google']) && sizeof($groups['google']['agents']) == 1 && $groups['google']['agents'][0] == 'googlebot') {
         w3tc_delete_user_agent_group('google');
     }
 }
開發者ID:eduardodomingos,項目名稱:eduardodomingos.com,代碼行數:8,代碼來源:Extension_WordPressSeo_Plugin_Admin.php

示例4: parse

 /**
  * Parses FAQ XML file into array
  *
  * @return array
  */
 public static function parse()
 {
     $config = Dispatcher::config();
     $faq = array();
     self::parse_file($faq, 'faq', '', '');
     if (Util_Environment::is_w3tc_edge($config)) {
         self::parse_file($faq, 'faq-edge', 'edge', '<b>Edge:</b> ');
     }
     if (Util_Environment::is_w3tc_pro($config)) {
         self::parse_file($faq, 'faq-pro', 'pro', '<b>Pro:</b> ');
     }
     return $faq;
 }
開發者ID:developmentDM2,項目名稱:Whohaha,代碼行數:18,代碼來源:Generic_Faq.php

示例5: __

                </th>
            </tr>
            <?php 
Util_Ui::config_item(array('key' => 'common.track_usage', 'control' => 'checkbox', 'checkbox_label' => __('Anonymously track usage to improve product quality', 'w3-total-cache'), 'style' => '2'));
?>

            <?php 
do_action('w3tc_settings_general_boxarea_miscellaneous_content');
?>
            <?php 
if (is_network_admin() || !Util_Environment::is_wpmu()) {
    ?>
            <tr id="edge_mode">
                <th colspan="2">
                    <?php 
    if (!Util_Environment::is_w3tc_edge($this->_config)) {
        echo '<a href="' . Util_Ui::url(array('w3tc_edge_mode_enable' => 'y')) . '"><strong>' . __('Enable Edge mode', 'w3-total-cache') . '</strong></a>';
    } else {
        echo '<a href="' . Util_Ui::url(array('w3tc_edge_mode_disable' => 'y')) . '"><strong>' . __('Disable Edge mode', 'w3-total-cache') . '</strong></a>';
    }
    ?>
                    <br /><span class="description"><?php 
    _e('Enable this to try out new functionality under development. Might cause issues on some sites.', 'w3-total-cache');
    ?>
</span>
                </th>
            </tr>
            <?php 
}
?>
        </table>
開發者ID:eduardodomingos,項目名稱:eduardodomingos.com,代碼行數:31,代碼來源:general.php

示例6: sprintf

<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
include W3TC_INC_DIR . '/options/common/header.php';
?>

<p>
    <?php 
echo sprintf(__('The plugin is currently <span class="w3tc-%s">%s</span> in <strong>%s%s</strong> mode.', 'w3-total-cache'), $enabled ? "enabled" : "disabled", $enabled ? __('enabled', 'w3-total-cache') : __('disabled', 'w3-total-cache'), Util_Environment::w3tc_edition($this->_config), Util_Environment::is_w3tc_edge($this->_config) ? __(' edge', 'w3-total-cache') : '');
?>
</p>
<form id="w3tc_dashboard" action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
    <p>
        Perform a
        <input type="button" class="button button-self-test {nonce: '<?php 
echo wp_create_nonce('w3tc');
?>
'}" value="<?php 
_e('compatibility check', 'w3-total-cache');
?>
" />,
        <?php 
echo Util_Ui::nonce_field('w3tc');
?>
開發者ID:freeformpdx,項目名稱:kffp-website,代碼行數:31,代碼來源:dashboard.php


注:本文中的Util_Environment::is_w3tc_edge方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。