本文整理汇总了PHP中MS_Helper_Html::html_admin_vertical_tabs方法的典型用法代码示例。如果您正苦于以下问题:PHP MS_Helper_Html::html_admin_vertical_tabs方法的具体用法?PHP MS_Helper_Html::html_admin_vertical_tabs怎么用?PHP MS_Helper_Html::html_admin_vertical_tabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MS_Helper_Html
的用法示例。
在下文中一共展示了MS_Helper_Html::html_admin_vertical_tabs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: to_html
/**
* Create view output.
*
* @since 1.0.1.0
* @return string
*/
public function to_html()
{
$this->check_simulation();
// Setup navigation tabs.
$tabs = $this->data['tabs'];
$membership = $this->data['membership'];
$desc = array();
ob_start();
// Render tabbed interface.
?>
<div class="ms-wrap wrap">
<?php
MS_Helper_Html::settings_header(array('title' => $membership->get_name_tag(), 'title_icon_class' => '', 'desc' => __('Edit Memberhip details and define Membership specific settings.', MS_TEXT_DOMAIN)));
$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_membership_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
$html = ob_get_clean();
return $html;
}
示例2: 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;
}
示例3: 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().
*
* @since 1.0.0
*
* @return object
*/
public function to_html()
{
$this->check_simulation();
// Setup navigation tabs.
$tabs = $this->data['tabs'];
ob_start();
// Render tabbed interface.
?>
<div class="ms-wrap wrap">
<?php
MS_Helper_Html::settings_header(array('title' => __('Help and documentation', MS_TEXT_DOMAIN), 'title_icon_class' => 'wpmui-fa wpmui-fa-info-circle'));
$active_tab = MS_Helper_Html::html_admin_vertical_tabs($tabs);
// Call the appropriate form to render.
$callback_name = 'render_tab_' . str_replace('-', '_', $active_tab);
$render_callback = apply_filters('ms_view_help_render_callback', array($this, $callback_name), $active_tab, $this->data);
?>
<div class="ms-settings ms-help-content">
<?php
$html = call_user_func($render_callback);
$html = apply_filters('ms_view_help_' . $callback_name, $html);
echo $html;
?>
</div>
</div>
<?php
return ob_get_clean();
}
示例4: 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);
}