本文整理匯總了PHP中ITSEC_Core::get_required_cap方法的典型用法代碼示例。如果您正苦於以下問題:PHP ITSEC_Core::get_required_cap方法的具體用法?PHP ITSEC_Core::get_required_cap怎麽用?PHP ITSEC_Core::get_required_cap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ITSEC_Core
的用法示例。
在下文中一共展示了ITSEC_Core::get_required_cap方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: add_admin_pages
public function add_admin_pages()
{
$capability = ITSEC_Core::get_required_cap();
$page_refs = array();
add_menu_page(__('Settings', 'better-wp-security'), __('Security', 'better-wp-security'), $capability, 'itsec', array($this, 'show_page'));
$page_refs[] = add_submenu_page('itsec', __('iThemes Security Settings', 'better-wp-security'), __('Settings', 'better-wp-security'), $capability, 'itsec', array($this, 'show_page'));
$page_refs[] = add_submenu_page('itsec', '', __('Security Check', 'better-wp-security'), $capability, 'itsec-security-check', array($this, 'show_page'));
$page_refs[] = add_submenu_page('itsec', __('iThemes Security Logs', 'better-wp-security'), __('Logs', 'better-wp-security'), $capability, 'itsec-logs', array($this, 'show_page'));
if (!ITSEC_Core::is_pro()) {
$page_refs[] = add_submenu_page('itsec', '', '<span style="color:#2EA2CC">' . __('Go Pro', 'better-wp-security') . '</span>', $capability, 'itsec-go-pro', array($this, 'show_page'));
}
foreach ($page_refs as $page_ref) {
add_action("load-{$page_ref}", array($this, 'load'));
}
}
示例2: itsec_network_brute_force_add_notice
function itsec_network_brute_force_add_notice()
{
if (ITSEC_Modules::get_setting('network-brute-force', 'api_nag') && current_user_can(ITSEC_Core::get_required_cap())) {
ITSEC_Core::add_notice('itsec_network_brute_force_show_notice');
}
}