本文整理汇总了PHP中MS_Model_Member::get_membership_ids方法的典型用法代码示例。如果您正苦于以下问题:PHP MS_Model_Member::get_membership_ids方法的具体用法?PHP MS_Model_Member::get_membership_ids怎么用?PHP MS_Model_Member::get_membership_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MS_Model_Member
的用法示例。
在下文中一共展示了MS_Model_Member::get_membership_ids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: column_membership
/**
* Create membership column.
*
* @since 1.0.0
*
* @param MS_Model_Member $member The member object.
*/
public function column_membership($member)
{
if (MS_Model_Member::is_admin_user($member->id)) {
$html = '<b>' . __('Admin User', MS_TEXT_DOMAIN) . '</b>';
} else {
$subscriptions = $member->get_membership_ids();
$visitor = array('id' => 'ms-empty-' . $member->id, 'type' => MS_Helper_Html::TYPE_HTML_TEXT, 'value' => __('(Visitor)'), 'after' => 'Edit', 'class' => 'ms-empty-note');
$list = array('id' => 'ms-memberships-' . $member->id, 'type' => MS_Helper_Html::INPUT_TYPE_SELECT, 'value' => $subscriptions, 'field_options' => self::$memberships, 'multiple' => true, 'class' => 'ms-memberships', 'ajax_data' => array('action' => MS_Controller_Member::AJAX_ACTION_CHANGE_MEMBERSHIPS, 'member' => $member->id));
$html = sprintf('<div class="no-auto-init">%1$s%2$s</div>', MS_Helper_Html::html_element($visitor, true), MS_Helper_Html::html_element($list, true));
}
return apply_filters('ms_helper_listtable_member_column_membership', $html, $member, $this);
}