当前位置: 首页>>代码示例>>PHP>>正文


PHP GFFormSettings::get_tabs方法代码示例

本文整理汇总了PHP中GFFormSettings::get_tabs方法的典型用法代码示例。如果您正苦于以下问题:PHP GFFormSettings::get_tabs方法的具体用法?PHP GFFormSettings::get_tabs怎么用?PHP GFFormSettings::get_tabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GFFormSettings的用法示例。


在下文中一共展示了GFFormSettings::get_tabs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: page_header

    public static function page_header($title = '')
    {
        // register admin styles
        wp_register_style('gform_admin', GFCommon::get_base_url() . '/css/admin.css');
        wp_print_styles(array('jquery-ui-styles', 'gform_admin', 'wp-pointer'));
        $form = GFFormsModel::get_form_meta(rgget('id'));
        $current_tab = rgempty('subview', $_GET) ? 'settings' : rgget('subview');
        $setting_tabs = GFFormSettings::get_tabs($form['id']);
        // kind of boring having to pass the title, optionally get it from the settings tab
        if (!$title) {
            foreach ($setting_tabs as $tab) {
                if ($tab['name'] == $current_tab) {
                    $title = $tab['label'];
                }
            }
        }
        ?>

		<div class="wrap gforms_edit_form <?php 
        echo GFCommon::get_browser_class();
        ?>
">
			<h2 class="gf_admin_page_title">
				<span><?php 
        echo $title;
        ?>
</span><span class="gf_admin_page_subtitle"><span class="gf_admin_page_formid">ID: <?php 
        echo $form['id'];
        ?>
</span><span class="gf_admin_page_formname"><?php 
        _e('Form Name', 'gravityforms');
        ?>
: <?php 
        echo $form['title'];
        ?>
</span></span>
			</h2>

			<?php 
        GFCommon::display_admin_message();
        ?>

			<?php 
        RGForms::top_toolbar();
        ?>

			<div id="gform_tab_group" class="gform_tab_group vertical_tabs">
				<ul id="gform_tabs" class="gform_tabs">
				<?php 
        foreach ($setting_tabs as $tab) {
            $query = array('subview' => $tab['name']);
            if (isset($tab['query'])) {
                $query = array_merge($query, $tab['query']);
            }
            $url = add_query_arg($query);
            ?>
					<li <?php 
            echo $current_tab == $tab['name'] ? "class='active'" : '';
            ?>
>
						<a href="<?php 
            echo esc_url($url);
            ?>
"><?php 
            echo esc_html($tab['label']);
            ?>
</a><span></span>
					</li>
				<?php 
        }
        ?>
				</ul>

				<div id="gform_tab_container_1" class="gform_tab_container">
					<div class="gform_tab_content" id="tab_<?php 
        echo $current_tab;
        ?>
">

	<?php 
    }
开发者ID:renztoygwapo,项目名称:lincoln,代码行数:81,代码来源:form_settings.php

示例2: get_form_settings_sub_menu_items

 public static function get_form_settings_sub_menu_items($form_id)
 {
     require_once GFCommon::get_base_path() . '/form_settings.php';
     $sub_menu_items = array();
     $tabs = GFFormSettings::get_tabs($form_id);
     foreach ($tabs as $tab) {
         if ($tab['name'] == 'settings') {
             $form_setting_menu_item['label'] = 'Settings';
         }
         $sub_menu_items[] = array('url' => admin_url("admin.php?page=gf_edit_forms&view=settings&subview={$tab['name']}&id={$form_id}"), 'label' => $tab['label'], 'capabilities' => array('gravityforms_edit_forms'));
     }
     return $sub_menu_items;
 }
开发者ID:kidaak,项目名称:gravityforms,代码行数:13,代码来源:gravityforms.php

示例3: page_header

    public static function page_header($title = '')
    {
        // register admin styles
        $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG || isset($_GET['gform_debug']) ? '' : '.min';
        wp_register_style('gform_admin', GFCommon::get_base_url() . "/css/admin{$min}.css");
        wp_print_styles(array('jquery-ui-styles', 'gform_admin', 'wp-pointer'));
        $form = GFFormsModel::get_form_meta(rgget('id'));
        $current_tab = rgempty('subview', $_GET) ? 'settings' : rgget('subview');
        $setting_tabs = GFFormSettings::get_tabs($form['id']);
        // kind of boring having to pass the title, optionally get it from the settings tab
        if (!$title) {
            foreach ($setting_tabs as $tab) {
                if ($tab['name'] == $current_tab) {
                    $title = $tab['label'];
                }
            }
        }
        ?>

		<div class="wrap gforms_edit_form gforms_form_settings_wrap <?php 
        echo GFCommon::get_browser_class();
        ?>
">

			<?php 
        GFCommon::form_page_title($form);
        ?>

			<?php 
        GFCommon::display_dismissible_message();
        ?>

			<?php 
        GFCommon::display_admin_message();
        ?>

			<?php 
        RGForms::top_toolbar();
        ?>

			<div id="gform_tab_group" class="gform_tab_group vertical_tabs">
				<ul id="gform_tabs" class="gform_tabs">
				<?php 
        foreach ($setting_tabs as $tab) {
            $query = array('subview' => $tab['name']);
            if (isset($tab['query'])) {
                $query = array_merge($query, $tab['query']);
            }
            $url = add_query_arg($query);
            ?>
					<li <?php 
            echo $current_tab == $tab['name'] ? "class='active'" : '';
            ?>
>
						<a href="<?php 
            echo esc_url($url);
            ?>
"><?php 
            echo esc_html($tab['label']);
            ?>
</a><span></span>
					</li>
				<?php 
        }
        ?>
				</ul>

				<div id="gform_tab_container_1" class="gform_tab_container">
					<div class="gform_tab_content" id="tab_<?php 
        echo esc_attr($current_tab);
        ?>
">

	<?php 
    }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:75,代码来源:form_settings.php


注:本文中的GFFormSettings::get_tabs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。