本文整理汇总了PHP中MS_Model_Membership::get_dripped_memberships方法的典型用法代码示例。如果您正苦于以下问题:PHP MS_Model_Membership::get_dripped_memberships方法的具体用法?PHP MS_Model_Membership::get_dripped_memberships怎么用?PHP MS_Model_Membership::get_dripped_memberships使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MS_Model_Membership
的用法示例。
在下文中一共展示了MS_Model_Membership::get_dripped_memberships方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enqueue_scripts
/**
* Load Membership manager specific scripts.
*
* @since 1.0.0
*/
public function enqueue_scripts()
{
/*
* Get a list of the dripped memberships:
* We need this info in the javascript.
*/
$dripped = array();
foreach (MS_Model_Membership::get_dripped_memberships() as $item) {
$dripped[$item->id] = $item->name;
}
$data = array('ms_init' => array(), 'lang' => array('quickedit_error' => __('Error while saving changes.', MS_TEXT_DOMAIN)), 'dripped' => $dripped);
$data['ms_init'][] = 'view_protected_content';
switch ($this->get_active_tab()) {
case 'url':
$data['valid_rule_msg'] = __('Valid', MS_TEXT_DOMAIN);
$data['invalid_rule_msg'] = __('Invalid', MS_TEXT_DOMAIN);
$data['empty_msg'] = __('Before testing you have to first enter one or more Page URLs above.', MS_TEXT_DOMAIN);
$data['ms_init'][] = 'view_membership_urlgroup';
break;
default:
wp_enqueue_script('jquery-ui-datepicker');
wp_enqueue_script('jquery-validate');
break;
}
lib2()->ui->data('ms_data', $data);
wp_enqueue_script('ms-admin');
do_action('ms_controller_protection_enqueue_scripts', $this);
}