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


PHP Util_Ui::config_key_to_http_name方法代码示例

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


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

示例1: statistics

<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<tr>
    <th colspan="2">
        <?php 
$c = Dispatcher::config();
$is_pro = Util_Environment::is_w3tc_pro($c);
$key = 'stats.enabled';
$value = $c->get($key);
if (!$is_pro) {
    $value = false;
}
$name = Util_Ui::config_key_to_http_name($key);
Util_Ui::checkbox($key, $name, $value, $c->is_sealed('common.') || !$is_pro, __('Enable caching statistics (on dashboard)', 'w3-total-cache'));
if (!$is_pro) {
    echo ' (Available after <a href="#" class="button-buy-plugin">upgrade</a>)';
}
?>
    </th>
</tr>
<?php 
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:27,代码来源:UsageStatistics_View_General.php

示例2: checkbox_debug

 /**
  * Prints checkbox for debug option
  *
  * @param string  $option_id
  */
 protected function checkbox_debug($option_id)
 {
     if (is_array($option_id)) {
         $section = $option_id[0];
         $section_enabled = $this->_config->is_extension_active_frontend($section);
     } else {
         $section = substr($option_id, 0, strrpos($option_id, '.'));
         $section_enabled = $this->_config->get_boolean($section . '.enabled');
     }
     $disabled = $this->_config->is_sealed($option_id) || !$section_enabled;
     $name = Util_Ui::config_key_to_http_name($option_id);
     if (!$disabled) {
         echo '<input type="hidden" name="' . $name . '" value="0" />';
     }
     echo '<label>';
     echo '<input class="enabled" type="checkbox" name="' . $name . '" value="1" ';
     checked($this->_config->get_boolean($option_id), true);
     if ($disabled) {
         echo 'disabled="disabled" ';
     }
     echo ' />';
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:27,代码来源:Base_Page_Settings.php

示例3: config_overloading_button

 /**
  * On subblogs - shows button to enable/disable custom configuration
  *   $a['key'] - config key *_overloaded which are managed
  */
 public static function config_overloading_button($a)
 {
     $c = Dispatcher::config();
     if ($c->is_master()) {
         return;
     }
     if ($c->get_boolean($a['key'])) {
         $name = 'w3tc_config_overloaded_disable~' . Util_Ui::config_key_to_http_name($a['key']);
         $value = __('Use common settings', 'w3-total-cache');
     } else {
         $name = 'w3tc_config_overloaded_enable~' . Util_Ui::config_key_to_http_name($a['key']);
         $value = __('Use specific settings', 'w3-total-cache');
     }
     echo '<div style="float: right">';
     echo '<input type="submit" class="button" name="' . esc_attr($name) . '" value="' . esc_attr($value) . '" />';
     echo '</div>';
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:21,代码来源:Util_Ui.php

示例4:

    </table>
    <?php 
Util_Ui::button_config_save('extension_newrelic_dashboard');
?>
    <?php 
Util_Ui::postbox_footer();
?>

    <?php 
Util_Ui::postbox_header(__('Behavior Settings', 'w3-total-cache'), '', 'behavior');
?>
    <table  class="form-table">
        <tr>
            <th colspan="2">
                <?php 
Util_Ui::checkbox('', Util_Ui::config_key_to_http_name(array('newrelic', 'accept.logged_roles')), $config->get_boolean(array('newrelic', 'accept.logged_roles')), $config->is_sealed('newrelic'));
_e('Use <acronym title="Real User Monitoring">RUM</acronym> only for following user roles', 'w3-total-cache');
?>
</label><br />
                <span class="description"><?php 
_e('Select user roles that <acronym title="Real User Monitoring">RUM</acronym> should be enabled for:', 'w3-total-cache');
?>
</span>

                <div id="newrelic_accept_roles">
                    <?php 
$saved_roles = $config->get_array(array('newrelic', 'accept.roles'));
?>
                    <input type="hidden" name="newrelic___accept__roles" value="" /><br />
                    <?php 
foreach (get_editable_roles() as $role_name => $role_data) {
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:31,代码来源:Extension_NewRelic_Page_View_Apm.php

示例5: _e

                <span class="description">
                    <?php 
_e('Select hooks from the list that should not be cached if user belongs to any of the roles selected below.', 'w3-total-cache');
?>
                </span>
            </td>
        </tr>
        <tr>
            <td><?php 
_e('Select roles:', 'w3-total-cache');
?>
</td>
            <td>
                <?php 
$saved_roles = $config->get_array(array('genesis.theme', 'reject_roles'));
$name = Util_Ui::config_key_to_http_name(array('genesis.theme', 'reject_roles'));
?>
                <input type="hidden" name="<?php 
echo esc_attr($name);
?>
" value="" />
                <?php 
foreach (get_editable_roles() as $role_name => $role_data) {
    ?>
                    <input <?php 
    disabled($config->is_sealed('genesis.theme'));
    ?>
                        type="checkbox"
                        name="<?php 
    echo esc_attr($name);
    ?>
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:31,代码来源:Extension_Genesis_Page_View.php


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