本文整理汇总了PHP中MS_Helper_Html类的典型用法代码示例。如果您正苦于以下问题:PHP MS_Helper_Html类的具体用法?PHP MS_Helper_Html怎么用?PHP MS_Helper_Html使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MS_Helper_Html类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_contents
/**
* Returns the contens of the dialog
*
* @since 1.0.0
*
* @return object
*/
public function get_contents($data)
{
$subscription = $data['model'];
$gateways = MS_Model_Gateway::get_gateway_names(false, true);
if (isset($gateways[$subscription->gateway_id])) {
$gateway = $gateways[$subscription->gateway_id];
} elseif (empty($subscription->gateway_id)) {
$gateway = __('- No Gateway -', 'membership2');
} else {
$gateway = '(' . $subscription->gateway_id . ')';
}
$events = MS_Model_Event::get_events(array('topic' => 'membership', 'nopaging' => true, 'relationship_id' => $subscription->id));
$sub_details = array('title' => __('Subscription Details', 'membership2'), 'type' => MS_Helper_Html::TYPE_HTML_TABLE, 'value' => array(array('Subscription ID', $subscription->id), array('Membership', $subscription->get_membership()->name), array('Payment Gateway', $gateway), array('Payment Type', $subscription->get_payment_description(null, true)), array('Subscription Start', $subscription->start_date), array('Subscription End', $subscription->expire_date), array('Status', $subscription->status)), 'field_options' => array('head_col' => true));
$evt_details = array();
foreach ($events as $event) {
$evt_details[] = array('title' => __('Event Details', 'membership2'), 'type' => MS_Helper_Html::TYPE_HTML_TABLE, 'value' => array(array('Event ID', $event->id), array('Date', $event->date), array('Description', $event->description)), 'field_options' => array('head_col' => true));
}
ob_start();
?>
<div>
<?php
MS_Helper_Html::html_element($sub_details);
MS_Helper_Html::html_separator();
foreach ($evt_details as $detail) {
MS_Helper_Html::html_element($detail);
}
?>
</div>
<?php
$html = ob_get_clean();
return apply_filters('ms_view_member_subscription_to_html', $html);
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:39,代码来源:class-ms-view-member-subscription.php
示例2: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_Content::RULE_ID);
// This fixes the list-title generated by MS_Helper_ListTable_Rule.
unset($_GET['status']);
$rule_listtable = new MS_Rule_Content_ListTable($rule);
$rule_listtable->prepare_items();
$header_data = apply_filters('ms_view_membership_protectedcontent_header', array('title' => __('Comments & More Tag', MS_TEXT_DOMAIN), 'desc' => __('Decide how to protect Comments and More Tag contents.', MS_TEXT_DOMAIN)), MS_Rule_Content::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box(__('Pages', MS_TEXT_DOMAIN));
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_Content::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:28,代码来源:class-ms-rule-content-view.php
示例3: to_html
/**
* Displays the import preview form.
*
* @since 1.0.0
* @return string
*/
public function to_html()
{
$data = apply_filters('ms_import_preview_data_before', $this->data['model']->source);
$compact = !empty($this->data['compact']);
if (!is_object($data)) {
$data = (object) array('memberships' => array(), 'members' => array(), 'notes' => array(), 'settings' => array(), 'source' => '', 'export_time' => '');
}
// Converts object to array
$data->memberships = (array) $data->memberships;
$data->members = (array) $data->members;
$fields = $this->prepare_fields($data);
if ($compact) {
$overview_box = array($fields['batchsize'], $fields['sep'], $fields['clear_all'], $fields['skip'], $fields['import']);
} else {
$overview_box = array($fields['details'], $fields['sep'], $fields['batchsize'], $fields['sep'], $fields['clear_all'], $fields['back'], $fields['import'], $fields['download']);
}
ob_start();
MS_Helper_Html::settings_box($overview_box, __('Import Overview', 'membership2'));
if (!$compact) {
MS_Helper_Html::settings_box(array($fields['memberships']), __('List of all Memberships', 'membership2'), '', 'open');
MS_Helper_Html::settings_box(array($fields['members']), __('List of all Members', 'membership2'), '', 'open');
MS_Helper_Html::settings_box(array($fields['settings']), __('Imported Settings', 'membership2'), '', 'open');
}
echo '<script>window._ms_import_obj = ' . json_encode($data) . '</script>';
$html = ob_get_clean();
return apply_filters('ms_import_preview_object', $html, $data);
}
开发者ID:EdoMagen,项目名称:project-s-v2,代码行数:33,代码来源:class-ms-view-settings-import.php
示例4: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_Category::RULE_ID);
$rule_listtable = new MS_Rule_Category_ListTable($rule);
$rule_listtable->prepare_items();
$header_data = array();
$header_data['title'] = __('Choose which Categories you want to protect', 'membership2');
$header_data['desc'] = '';
$header_data = apply_filters('ms_view_membership_protectedcontent_header', $header_data, MS_Rule_Category::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings ">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box(__('Categories', 'membership2'), 'search-cat');
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_Category::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:29,代码来源:class-ms-rule-category-view.php
示例5: to_html
/**
* Create view output.
*
* @since 1.0.0
*
* @return string
*/
public function to_html()
{
$fields = $this->prepare_fields();
$form_url = esc_url_raw(remove_query_arg(array('action', 'coupon_id')));
if ($this->data['coupon']->is_valid()) {
$title = __('Edit Coupon', 'membership2');
} else {
$title = __('Add Coupon', 'membership2');
}
ob_start();
// Render tabbed interface.
?>
<div class="ms-wrap">
<?php
MS_Helper_Html::settings_header(array('title' => $title, 'title_icon_class' => 'wpmui-fa wpmui-fa-pencil-square'));
?>
<form action="<?php
echo esc_url($form_url);
?>
" method="post" class="ms-form">
<?php
MS_Helper_Html::settings_box($fields, '', '', 'static', 'ms-small-form');
?>
</form>
<div class="clear"></div>
</div>
<?php
$html = ob_get_clean();
return apply_filters('ms_addon_coupon_view_edit_to_html', $html, $this);
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:37,代码来源:class-ms-addon-coupon-view-edit.php
示例6: to_html
/**
* Overrides parent's to_html() method.
*
* Creates an output buffer, outputs the HTML and grabs the buffer content before releasing it.
* Creates a wrapper 'ms-wrap' HTML element to contain content and navigation. The content inside
* the navigation gets loaded with dynamic method calls.
* e.g. if key is 'settings' then render_settings() gets called, if 'bob' then render_bob().
*
* @todo Could use callback functions to call dynamic methods from within the helper, thus
* creating the navigation with a single method call and passing method pointers in the $tabs array.
*
* @since 1.0.0
*
* @return object
*/
public function to_html()
{
$this->check_simulation();
// Setup navigation tabs.
$tabs = $this->data['tabs'];
$desc = array();
ob_start();
// Render tabbed interface.
?>
<div class="ms-wrap wrap">
<?php
$desc = $this->advanced_forms($desc);
MS_Helper_Html::settings_header(array('title' => __('Membership 2 Settings', 'membership2'), 'title_icon_class' => 'wpmui-fa wpmui-fa-cog', 'desc' => $desc));
$active_tab = MS_Helper_Html::html_admin_vertical_tabs($tabs);
// Call the appropriate form to render.
$tab_name = str_replace('-', '_', $active_tab);
$callback_name = 'render_tab_' . $tab_name;
$render_callback = apply_filters('ms_view_settings_edit_render_callback', array($this, $callback_name), $active_tab, $this->data);
?>
<div class="ms-settings ms-settings-<?php
echo esc_attr($tab_name);
?>
">
<?php
$html = call_user_func($render_callback);
$html = apply_filters('ms_view_settings_' . $callback_name, $html);
echo $html;
?>
</div>
</div>
<?php
$this->render_settings_footer($tab_name);
$html = ob_get_clean();
return $html;
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:50,代码来源:class-ms-view-settings-edit.php
示例7: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_Adminside::RULE_ID);
$rule_listtable = new MS_Rule_Adminside_ListTable($rule);
$rule_listtable->prepare_items();
$header_data = apply_filters('ms_view_membership_protectedcontent_header', array('title' => __('Protect Admin Side pages', 'membership2'), 'desc' => array(__('Note that WordPress also restricts access to pages before Content Protection is applied.', 'membership2'), __('Tip: Combine with the <b>User Role</b> rules to grant your members additional permission if required!', 'membership2'))), MS_Rule_Adminside::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box();
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_Adminside::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:26,代码来源:class-ms-rule-adminside-view.php
示例8: to_html
public function to_html()
{
$this->check_simulation();
// Search for orphaned relationships and delete them.
MS_Model_Member::clean_db();
$listview = MS_Factory::create('MS_Helper_ListTable_Member');
$listview->prepare_items();
ob_start();
?>
<div class="wrap ms-wrap ms-member-list">
<?php
MS_Helper_Html::settings_header(array('title' => __('Members', MS_TEXT_DOMAIN), 'title_icon_class' => 'wpmui-fa wpmui-fa-users', 'desc' => __('Here you can manage the Memberships of existing Users.', MS_TEXT_DOMAIN)));
// Display a filter to switch between individual memberships.
$this->membership_filter();
$listview->views();
$listview->search_box();
?>
<form method="post">
<?php
$listview->display();
?>
</form>
</div>
<?php
$html = ob_get_clean();
return $html;
}
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:29,代码来源:class-ms-view-member-list.php
示例9: to_html
/**
* Create view output.
*
* @since 1.0.0
*
* @return string
*/
public function to_html()
{
$this->check_simulation();
$fields = $this->prepare_fields();
$form_url = esc_url_raw(remove_query_arg(array('action', 'invoice_id')));
if ($this->data['invoice']->is_valid()) {
$title = __('Edit Billing', MS_TEXT_DOMAIN);
} else {
$title = __('Add Billing', MS_TEXT_DOMAIN);
}
ob_start();
// Render tabbed interface.
?>
<div class="ms-wrap ms-billing">
<?php
MS_Helper_Html::settings_header(array('title' => $title, 'title_icon_class' => 'wpmui-fa wpmui-fa-pencil-square'));
?>
<form action="<?php
echo $form_url;
?>
" method="post" class="ms-form">
<?php
MS_Helper_Html::settings_box($fields, '', '', 'static', 'ms-small-form');
?>
</form>
<div class="clear"></div>
</div>
<?php
$html = ob_get_clean();
return apply_filters('ms_view_billing_edit_to_html', $html, $this);
}
开发者ID:klgrimley,项目名称:mzf,代码行数:38,代码来源:class-ms-view-billing-edit.php
示例10: to_html
/**
* Create view output.
*
* @since 1.0.0
* @return string
*/
public function to_html()
{
$fields = $this->prepare_fields();
ob_start();
?>
<div class="ms-membership-add ms-cols-2">
<form method="post" id="ms-choose-type-form">
<div class="ms-settings-row cf">
<h3><?php
_e('Set the membership type:', MS_TEXT_DOMAIN);
?>
</h3>
<?php
MS_Helper_Html::html_element($fields['type']);
?>
</div>
<div>
<?php
foreach ($fields['control_fields'] as $field) {
MS_Helper_Html::html_element($field);
}
?>
</div>
</form>
</div>
<?php
$html = ob_get_clean();
return $html;
}
开发者ID:klgrimley,项目名称:mzf,代码行数:35,代码来源:class-ms-view-membership-tab-type.php
示例11: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_MemberRoles::RULE_ID);
$rule_listtable = new MS_Rule_MemberRoles_ListTable($rule);
$rule_listtable->prepare_items();
$header_data['title'] = __('Assign WordPress User Roles to your Members', MS_TEXT_DOMAIN);
$header_data['desc'] = array(__('When assigning a Membership to any role, then this role will be added to all members of that Membership. You can even assign multiple roles to a single Membership.', MS_TEXT_DOMAIN), __('For security reasons the Administrator role cannot be assigned to a Membership.', MS_TEXT_DOMAIN));
$header_data = apply_filters('ms_view_membership_protectedcontent_header', $header_data, MS_Rule_MemberRoles::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box(__('Capability', MS_TEXT_DOMAIN));
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_MemberRoles::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:28,代码来源:class-ms-rule-memberroles-view.php
示例12: to_html
/**
* Create view output.
*
* @since 1.0.0
* @return string
*/
public function to_html()
{
$this->check_simulation();
$membership = $this->data['membership'];
$admin_message = MS_Helper_Membership::get_admin_message(array($membership->name), $membership);
$title = MS_Helper_Membership::get_admin_title();
$membership_list = MS_Factory::create('MS_Helper_ListTable_Membership');
$membership_list->prepare_items();
$create_new_button = array('id' => 'create_new_ms_button', 'type' => MS_Helper_Html::TYPE_HTML_LINK, 'url' => $this->data['create_new_url'], 'value' => __('Create New Membership', MS_TEXT_DOMAIN), 'class' => 'button');
ob_start();
?>
<div class="wrap ms-wrap">
<?php
MS_Helper_Html::settings_header(array('title' => $title, 'desc' => array(__('Here you can view and edit all the Memberships you have created.', MS_TEXT_DOMAIN), $admin_message)));
?>
<form action="" method="post">
<div class="ms-list-table-wrapper ms-membership-list">
<?php
MS_Helper_Html::html_element($create_new_button);
$membership_list->display();
MS_Helper_Html::html_element($create_new_button);
?>
</div>
</form>
</div>
<?php
$html = ob_get_clean();
echo $html;
}
开发者ID:klgrimley,项目名称:mzf,代码行数:37,代码来源:class-ms-view-membership-list.php
示例13: to_html
/**
* Create view output.
*
* @since 1.0.0
* @return string
*/
public function to_html()
{
$list_table = MS_Factory::create('MS_Helper_ListTable_Event');
$list_table->prepare_items();
if (isset($_REQUEST['membership_id'])) {
$membership = MS_Factory::load('MS_Model_Membership', $_REQUEST['membership_id']);
$title = sprintf(__('%s News', 'membership2'), $membership->get_name_tag());
$url = esc_url_raw(add_query_arg(array('step' => MS_Controller_Membership::STEP_OVERVIEW), remove_query_arg(array('paged', 'order', 'post_mime_type', 'detached', 'orderby', 's'))));
$back_link = array('id' => 'back', 'type' => MS_Helper_Html::TYPE_HTML_LINK, 'value' => __('» Back to Overview', 'membership2'), 'url' => $url, 'class' => 'wpmui-field-button button');
} else {
$title = __('Membership News', 'membership2');
$back_link = '';
}
ob_start();
?>
<div class="wrap ms-wrap ms-membership-news">
<?php
MS_Helper_Html::settings_header(array('title' => $title));
MS_Helper_Html::html_element($back_link);
$list_table->search_box();
$list_table->views();
?>
<form action="" method="post">
<?php
$list_table->display();
?>
</form>
</div>
<?php
$html = ob_get_clean();
echo '' . $html;
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:40,代码来源:class-ms-view-membership-news.php
示例14: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_Page::RULE_ID);
$rule_listtable = new MS_Rule_Page_ListTable($rule);
$rule_listtable->prepare_items();
$header_data = apply_filters('ms_view_membership_protectedcontent_header', array('title' => __('Apply protection to Pages and and grant access to members', 'membership2'), 'desc' => __('All pages that do not have Content Protection applied are visible to Everyone', 'membership2')), MS_Rule_Page::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box(__('Pages', 'membership2'));
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_Page::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:26,代码来源:class-ms-rule-page-view.php
示例15: to_html
/**
* Create view output.
*
* @since 1.0.0
* @return string
*/
public function to_html()
{
$this->check_simulation();
$this->check_network();
$desc = array(__('Choose Pages, Categories etc. that you want to make <strong>unavailable</strong> to visitors, and non-members.', 'membership2'));
ob_start();
// Render tabbed interface.
?>
<div class="ms-wrap wrap ms-wrap-membership2">
<?php
MS_Helper_Html::settings_header(array('title' => __('Set-up Protection Rules', 'membership2'), 'desc' => $desc));
// Display a filter to switch between individual memberships.
$this->membership_filter();
// In network-wide protection mode allow user to select a site.
$this->site_filter();
$active_tab = $this->data['active_tab'];
MS_Helper_Html::html_admin_vertical_tabs($this->data['tabs'], $active_tab);
// Call the appropriate form to render.
$callback_name = 'render_tab_' . str_replace('-', '_', $active_tab);
$render_callback = array($this, $callback_name);
$render_callback = apply_filters('ms_view_protectedcontent_define-' . $active_tab, $render_callback, $this->data);
if (is_callable($render_callback)) {
$html = call_user_func($render_callback);
} else {
// This is to notify devs that a file/hook is missing or wrong.
$html = '<div class="ms-settings">' . '<div class="error below-h2"><p>' . '<em>No View defined by hook "ms_view_protectedcontent_define-' . $active_tab . '"</em>' . '</p></div>' . '</div>';
}
$html = apply_filters('ms_view_membership_protected_' . $active_tab, $html);
echo $html;
?>
</div>
<?php
$html = ob_get_clean();
return apply_filters('ms_view_membership_protectedcontent_to_html', $html, $this);
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:41,代码来源:class-ms-view-protection.php
示例16: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_MemberCaps::RULE_ID);
$rule_listtable = new MS_Rule_MemberCaps_ListTable($rule);
$rule_listtable->prepare_items();
$header_data = array();
$header_data['title'] = __('Assign WordPress Capabilities to your Members', 'membership2');
$header_data['desc'] = array(__('Fine-tune member permissions by assigning certain Capabilities to each Membership. All Members of that Membership are granted the specified Capabilities.', 'membership2'), __('Important: All users that are not inside these Memberships will be striped of any Protected Capability!', 'membership2'), __('You should only use these rules if you know what you are doing! Granting the wrong capabilities makes your website prone to abuse. For a bit of security we already removed the most critical Capabilities from this list.', 'membership2'));
$header_data = apply_filters('ms_view_membership_protectedcontent_header', $header_data, MS_Rule_MemberCaps::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box(__('Capability', 'membership2'));
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_MemberCaps::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:29,代码来源:class-ms-rule-membercaps-view.php
示例17: to_html
/**
* Create view output.
*
* @since 1.0.0
* @return string
*/
public function to_html()
{
$fields = $this->prepare_fields();
$cols = count($fields['type']['field_options']);
if ($cols < 2) {
$cols = 2;
}
if ($cols > 3) {
$cols = 2;
}
ob_start();
?>
<div class="ms-wrap">
<?php
MS_Helper_Html::settings_header(array('title' => __('Create New Membership', MS_TEXT_DOMAIN), 'desc' => __('First up, choose a name and a type for your membership site.', MS_TEXT_DOMAIN)));
?>
<div class="ms-settings ms-membership-add ms-cols-<?php
echo esc_attr($cols);
?>
">
<form method="post" id="ms-choose-type-form">
<div class="ms-settings-row cf">
<h3><?php
_e('Choose a membership type:', MS_TEXT_DOMAIN);
?>
</h3>
<?php
MS_Helper_Html::html_element($fields['type']);
?>
</div>
<div class="ms-settings-row cf">
<?php
MS_Helper_Html::html_element($fields['name']);
?>
</div>
<div class="ms-settings-row cf">
<div class="ms-options-wrapper">
<?php
foreach ($fields['config_fields'] as $field) {
echo '<span class="opt">';
MS_Helper_Html::html_element($field);
echo '</span>';
}
?>
</div>
</div>
<div class="ms-control-fields-wrapper">
<?php
foreach ($fields['control_fields'] as $field) {
MS_Helper_Html::html_element($field);
}
?>
</div>
</form>
</div>
</div>
<?php
$html = ob_get_clean();
return $html;
}
开发者ID:klgrimley,项目名称:mzf,代码行数:66,代码来源:class-ms-view-membership-add.php
示例18: to_html
public function to_html()
{
$settings = $this->data['settings'];
$fields = array('plugin_enabled' => array('id' => 'plugin_enabled', 'type' => MS_Helper_Html::INPUT_TYPE_RADIO_SLIDER, 'title' => __('Content Protection', 'membership2'), 'desc' => __('This setting toggles the content protection on this site.', 'membership2'), 'value' => MS_Plugin::is_enabled(), 'data_ms' => array('action' => MS_Controller_Settings::AJAX_ACTION_TOGGLE_SETTINGS, 'setting' => 'plugin_enabled')), 'hide_admin_bar' => array('id' => 'hide_admin_bar', 'type' => MS_Helper_Html::INPUT_TYPE_RADIO_SLIDER, 'title' => __('Hide admin toolbar', 'membership2'), 'desc' => __('Hide the admin toolbar for non administrator users.', 'membership2'), 'value' => $settings->hide_admin_bar, 'data_ms' => array('action' => MS_Controller_Settings::AJAX_ACTION_TOGGLE_SETTINGS, 'setting' => 'hide_admin_bar')));
$fields = apply_filters('ms_view_settings_prepare_general_fields', $fields);
$setup = MS_Factory::create('MS_View_Settings_Page_Setup');
$action_url = esc_url_raw(remove_query_arg(array('msg')));
ob_start();
MS_Helper_Html::settings_tab_header();
?>
<form action="<?php
echo esc_url($action_url);
?>
" method="post" class="cf">
<div class="cf">
<div class="ms-half">
<?php
MS_Helper_Html::html_element($fields['plugin_enabled']);
?>
</div>
<div class="ms-half">
<?php
MS_Helper_Html::html_element($fields['hide_admin_bar']);
?>
</div>
</div>
<?php
MS_Helper_Html::html_separator();
MS_Helper_Html::html_element($setup->html_full_form());
?>
</form>
<?php
return ob_get_clean();
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:35,代码来源:class-ms-view-settings-page-general.php
示例19: to_html
/**
* Create view output.
*
* @since 1.0.0
*
* @return string
*/
public function to_html()
{
$code_list = MS_Factory::create('MS_Addon_Invitation_Helper_Listtable');
$code_list->prepare_items();
$title = __('Invitations', 'membership2');
$add_new_button = array('id' => 'add_new', 'type' => MS_Helper_Html::TYPE_HTML_LINK, 'url' => MS_Controller_Plugin::get_admin_url(MS_Addon_Invitation::SLUG, array('action' => 'edit', 'invitation_id' => 0)), 'value' => __('Add New Code', 'membership2'), 'class' => 'button');
ob_start();
?>
<div class="wrap ms-wrap">
<?php
MS_Helper_Html::settings_header(array('title' => $title, 'title_icon_class' => 'wpmui-fa wpmui-fa-ticket'));
?>
<div>
<?php
MS_Helper_Html::html_element($add_new_button);
?>
</div>
<form action="" method="post">
<?php
$code_list->display();
?>
</form>
<p><em>
<?php
_e('By default all Memberships are protected and require an invitation code to register.<br>You can manually change this for individual memberships via a new setting in the "Payment Options" settings of each membership.', 'membership2');
?>
</em></p>
</div>
<?php
$html = ob_get_clean();
return apply_filters('ms_addon_invitation_view_list_to_html', $html, $this);
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:41,代码来源:class-ms-addon-invitation-view-list.php
示例20: to_html
public function to_html()
{
$membership = MS_Model_Membership::get_base();
$rule = $membership->get_rule(MS_Rule_CptItem::RULE_ID);
$rule_listtable = new MS_Rule_CptItem_ListTable($rule);
$rule_listtable->prepare_items();
$header_data = apply_filters('ms_view_membership_protectedcontent_header', array('title' => __('Choose Custom Post Types you want to protect', MS_TEXT_DOMAIN), 'desc' => ''), MS_Rule_CptItem::RULE_ID, $this);
ob_start();
?>
<div class="ms-settings">
<?php
MS_Helper_Html::settings_tab_header($header_data);
$rule_listtable->views();
$rule_listtable->search_box(__('Posts', MS_TEXT_DOMAIN));
?>
<form action="" method="post">
<?php
$rule_listtable->display();
do_action('ms_view_membership_protectedcontent_footer', MS_Rule_CptItem::RULE_ID, $this);
?>
</form>
</div>
<?php
MS_Helper_Html::settings_footer();
return ob_get_clean();
}
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:26,代码来源:class-ms-rule-cptitem-view.php
注:本文中的MS_Helper_Html类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论