本文整理汇总了PHP中FrmAppHelper::is_super_admin方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmAppHelper::is_super_admin方法的具体用法?PHP FrmAppHelper::is_super_admin怎么用?PHP FrmAppHelper::is_super_admin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmAppHelper
的用法示例。
在下文中一共展示了FrmAppHelper::is_super_admin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
function update($params)
{
global $wp_roles;
$this->menu = $params['frm_menu'];
$this->mu_menu = isset($params['frm_mu_menu']) ? $params['frm_mu_menu'] : 0;
if ($this->mu_menu) {
update_site_option('frm_admin_menu_name', $this->menu);
} else {
if (FrmAppHelper::is_super_admin()) {
update_site_option('frm_admin_menu_name', false);
}
}
$this->preview_page_id = (int) $params[$this->preview_page_id_str];
$this->lock_keys = isset($params['frm_lock_keys']) ? $params['frm_lock_keys'] : 0;
$this->track = isset($params['frm_track']) ? $params['frm_track'] : 0;
$this->pubkey = $params['frm_pubkey'];
$this->privkey = $params['frm_privkey'];
$this->re_theme = $params['frm_re_theme'];
$this->re_lang = $params['frm_re_lang'];
$this->use_html = isset($params['frm_use_html']) ? $params['frm_use_html'] : 0;
$this->load_style = $params['frm_load_style'];
//$this->custom_style = isset($params['frm_custom_style']) ? $params['frm_custom_style'] : 0;
//$this->custom_stylesheet = isset($params['frm_custom_stylesheet']) ? $params['frm_custom_stylesheet'] : 0;
$this->jquery_css = isset($params['frm_jquery_css']) ? $params['frm_jquery_css'] : 0;
$this->accordion_js = isset($params['frm_accordion_js']) ? $params['frm_accordion_js'] : 0;
$this->success_msg = $params['frm_success_msg'];
$this->invalid_msg = $params['frm_invalid_msg'];
$this->failed_msg = $params['frm_failed_msg'];
$this->submit_value = $params['frm_submit_value'];
$this->login_msg = $params['frm_login_msg'];
//update roles
$frm_roles = FrmAppHelper::frm_capabilities();
$roles = get_editable_roles();
foreach ($frm_roles as $frm_role => $frm_role_description) {
$this->{$frm_role} = isset($params[$frm_role]) ? $params[$frm_role] : 'administrator';
foreach ($roles as $role => $details) {
if ($this->{$frm_role} == $role or $this->{$frm_role} == 'editor' and $role == 'administrator' or $this->{$frm_role} == 'author' and in_array($role, array('administrator', 'editor')) or $this->{$frm_role} == 'contributor' and in_array($role, array('administrator', 'editor', 'author')) or $this->{$frm_role} == 'subscriber') {
$wp_roles->add_cap($role, $frm_role);
} else {
$wp_roles->remove_cap($role, $frm_role);
}
}
}
do_action('frm_update_settings', $params);
}
示例2: _e
?>
" />
</p>
</td></tr>
<tr class="form-field">
<td valign="top" width="200px"><?php
_e('Admin menu label', 'formidable');
?>
</td>
<td>
<input type="text" name="frm_menu" id="frm_menu" value="<?php
echo esc_attr($frm_settings->menu);
?>
" />
<?php
if (IS_WPMU and FrmAppHelper::is_super_admin()) {
?>
<input type="checkbox" name="frm_mu_menu" id="frm_mu_menu" value="1" <?php
checked($frm_settings->mu_menu, 1);
?>
/> <?php
_e('Use this menu name site-wide', 'formidable');
?>
<?php
}
?>
</td>
</tr>
<tr class="form-field">
<td valign="top"><?php
_e('Preview Page', 'formidable');
示例3: _e
<tr class="form-field">
<th valign="top" scope="row"><?php
_e('Message if nothing to display', 'formidable');
?>
</th>
<td>
<textarea id="empty_msg" name="options[empty_msg]" style="width:98%"><?php
echo FrmAppHelper::esc_textarea($values['empty_msg']);
?>
</textarea>
</td>
</tr>
<?php
if (IS_WPMU) {
if (FrmAppHelper::is_super_admin()) {
?>
<tr class="form-field">
<th valign="top" scope="row"><?php
_e('Copy', 'formidable');
?>
</th>
<td>
<input type="checkbox" id="copy" name="options[copy]" value="1" <?php
checked($values['copy'], 1);
?>
/>
<?php
_e('Copy these display settings to other blogs when Formidable Pro is activated. <br/>Note: Use only field keys in the content box(es) above.', 'formidable');
?>
示例4: pro_action_needed
function pro_action_needed($plugin)
{
global $frm_update;
if ($frm_update->pro_is_authorized() and !$frm_update->pro_is_installed()) {
if (IS_WPMU and $frm_update->pro_wpmu and !FrmAppHelper::is_super_admin()) {
return;
}
$frm_update->queue_update(true);
$inst_install_url = wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $plugin, 'upgrade-plugin_' . $plugin);
?>
<td colspan="3" class="plugin-update"><div class="update-message" style="-moz-border-radius:5px;border:1px solid #CC0000;; margin:5px;background-color:#FFEBE8;padding:3px 5px;"><?php
printf(__('Your Formidable Pro installation isn\'t quite complete yet.<br/>%1$sAutomatically Upgrade to Enable Formidable Pro%2$s', 'formidable'), '<a href="' . $inst_install_url . '">', '</a>');
?>
</div></td>
<?php
}
}