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


PHP ot_theme_options_layouts_form函数代码示例

本文整理汇总了PHP中ot_theme_options_layouts_form函数的典型用法代码示例。如果您正苦于以下问题:PHP ot_theme_options_layouts_form函数的具体用法?PHP ot_theme_options_layouts_form怎么用?PHP ot_theme_options_layouts_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: display_page

 /**
  * Loads the content for each page
  *
  * @return    string
  *
  * @access    public
  * @since     2.0
  */
 public function display_page()
 {
     $screen = get_current_screen();
     /* loop through settings */
     foreach ((array) $this->options as $option) {
         /* loop through pages */
         foreach ((array) $this->get_pages($option) as $page) {
             /* verify page */
             if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                 $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                 /* update active layout content */
                 if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                     $layouts = get_option('option_tree_layouts');
                     /* has active layout */
                     if (isset($layouts['active_layout'])) {
                         $option_tree = get_option($option['id']);
                         $layouts[$layouts['active_layout']] = base64_encode(serialize($option_tree));
                         update_option('option_tree_layouts', $layouts);
                     }
                 }
                 echo '<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                 screen_icon(isset($page['screen_icon']) ? $page['screen_icon'] : 'options-general');
                 echo '<h2>' . $page['page_title'] . '</h2>';
                 echo ot_alert_message($page);
                 settings_errors('option-tree');
                 /* Header */
                 echo '<div id="option-tree-header-wrap">';
                 echo '<ul id="option-tree-header">';
                 echo '<li id="option-tree-logo"><a href="http://wordpress.org/extend/plugins/option-tree/" target="_blank">OptionTree</a></li>';
                 echo '<li id="option-tree-version"><span>Version ' . OT_VERSION . '</span></li>';
                 echo '</ul>';
                 /* layouts form */
                 if ($page['id'] == 'ot_theme_options') {
                     ot_theme_options_layouts_form();
                 }
                 echo '</div>';
                 /* remove forms on the custom settings pages */
                 if ($show_buttons) {
                     echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                     settings_fields($option['id']);
                 } else {
                     echo '<div id="option-tree-settings-api">';
                 }
                 /* Sub Header */
                 echo '<div id="option-tree-sub-header">';
                 if ($show_buttons) {
                     echo '<button class="option-tree-ui-button grey right">' . $page['button_text'] . '</button>';
                 }
                 echo '</div>';
                 /* Navigation */
                 echo '<div class="ui-tabs">';
                 /* check for sections */
                 if (isset($page['sections']) && count($page['sections']) > 0) {
                     echo '<ul class="ui-tabs-nav">';
                     /* loop through page sections */
                     foreach ((array) $page['sections'] as $section) {
                         echo '<li><a href="#section_' . $section['id'] . '">' . $section['title'] . '</a></li>';
                     }
                     echo '</ul>';
                 }
                 /* sections */
                 echo '<div id="poststuff" class="metabox-holder">';
                 echo '<div id="post-body">';
                 echo '<div id="post-body-content">';
                 $this->do_settings_sections($_GET['page']);
                 echo '</div>';
                 echo '</div>';
                 echo '</div>';
                 echo '<div class="clear"></div>';
                 echo '</div>';
                 /* buttons */
                 if ($show_buttons) {
                     echo '<div class="option-tree-ui-buttons">';
                     echo '<button class="option-tree-ui-button grey right">' . $page['button_text'] . '</button>';
                     echo '</div>';
                 }
                 echo $show_buttons ? '</form>' : '</div>';
                 /* reset button */
                 if ($show_buttons) {
                     echo '<form method="post" action="' . str_replace('&settings-updated=true', '', $_SERVER["REQUEST_URI"]) . '">';
                     /* form nonce */
                     wp_nonce_field('option_tree_reset_form', 'option_tree_reset_nonce');
                     echo '<input type="hidden" name="action" value="reset" />';
                     echo '<button type="submit" class="option-tree-ui-button red light left reset-settings" title="' . __('Reset Options', 'option-tree') . '">' . __('Reset Options', 'option-tree') . '</button>';
                     echo '</form>';
                 }
                 echo '</div>';
             }
         }
     }
     return false;
 }
开发者ID:aguerojahannes,项目名称:aguerojahannes.com,代码行数:100,代码来源:ot-settings-api.php

示例2: display_page

 /**
  * Loads the content for each page
  *
  * @return    string
  *
  * @access    public
  * @since     2.0
  */
 public function display_page()
 {
     $screen = get_current_screen();
     /* loop through settings */
     foreach ((array) $this->options as $option) {
         /* loop through pages */
         foreach ((array) $this->get_pages($option) as $page) {
             /* verify page */
             if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                 $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                 /* update active layout content */
                 if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                     $layouts = get_option(ot_layouts_id());
                     /* has active layout */
                     if (isset($layouts['active_layout'])) {
                         $option_tree = get_option($option['id']);
                         $layouts[$layouts['active_layout']] = ot_encode(serialize($option_tree));
                         update_option(ot_layouts_id(), $layouts);
                     }
                 }
                 echo '<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                 echo '<h2>' . $page['page_title'] . '</h2>';
                 echo ot_alert_message($page);
                 settings_errors('option-tree');
                 /* Header */
                 echo '<div id="option-tree-header-wrap">';
                 echo '<ul id="option-tree-header">';
                 echo '<li id="option-tree-logo">' . apply_filters('ot_header_logo_link', '<a href="http://wordpress.org/extend/plugins/option-tree/" target="_blank">OptionTree</a>', $page['id']) . '</li>';
                 echo '<li id="option-tree-version"><span>' . apply_filters('ot_header_version_text', 'OptionTree ' . OT_VERSION, $page['id']) . '</span></li>';
                 // Add additional theme specific links here.
                 do_action('ot_header_list', $page['id']);
                 echo '</ul>';
                 /* layouts form */
                 if ($page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true) {
                     ot_theme_options_layouts_form();
                 }
                 echo '</div>';
                 /* remove forms on the custom settings pages */
                 if ($show_buttons) {
                     echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                     settings_fields($option['id']);
                 } else {
                     echo '<div id="option-tree-settings-api">';
                 }
                 /* Sub Header */
                 echo '<div id="option-tree-sub-header">';
                 echo '<span class="option-tree-ui-button left image"></span>';
                 $current_theme = wp_get_theme(PARENT_THEME);
                 echo '<span class="option-tree-ui-button left vesion ">ver. ' . $current_theme->get('Version') . '</span>';
                 if ($show_buttons) {
                     echo '<button class="option-tree-ui-button grey right">' . $page['button_text'] . '</button>';
                     echo '<button class="option-tree-ui-button grey right imgok"></button>';
                 }
                 echo '<span class="option-tree-ui-button right document"><a href="http://doc.cactusthemes.com/truemag/">Documentation</a></span>';
                 echo '<span class="option-tree-ui-button grey right imgok1"><a href="#"></a></span>';
                 echo '<span class="option-tree-ui-button grey right support"><a href="http://ticket.cactusthemes.com/">Support Forum</a></span>';
                 echo '<span class="option-tree-ui-button grey right imgok2"><a href="#"></a></span>';
                 if (ct_check_for_update(PARENT_THEME) == 1) {
                     echo '<button class="button right" style="margin:6px" name="ct_update_theme" type="submit" value="ct_update_theme" onclick="jQuery(\'#option-tree-settings-api\').attr(\'action\',\'themes.php?page=ot-theme-options&ct_update_theme=true\')">' . __('New Version Found! Update Theme?', 'cactusthemes') . '</button>';
                 }
                 echo '</div>';
                 /* Navigation */
                 echo '<div class="ui-tabs">';
                 /* check for sections */
                 if (isset($page['sections']) && count($page['sections']) > 0) {
                     echo '<ul class="ui-tabs-nav">';
                     /* loop through page sections */
                     foreach ((array) $page['sections'] as $section) {
                         echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '">' . $section['title'] . '</a></li>';
                     }
                     echo '</ul>';
                 }
                 /* sections */
                 echo '<div id="poststuff" class="metabox-holder">';
                 echo '<div id="post-body">';
                 echo '<div id="post-body-content">';
                 $this->do_settings_sections($_GET['page']);
                 echo '</div>';
                 echo '</div>';
                 echo '</div>';
                 echo '<div class="clear"></div>';
                 echo '</div>';
                 /* buttons */
                 if ($show_buttons) {
                     echo '<div class="option-tree-ui-buttons">';
                     echo '<button class="option-tree-ui-button blue right">' . $page['button_text'] . '</button>';
                     echo '</div>';
                 }
                 echo $show_buttons ? '</form>' : '</div>';
                 /* reset button */
                 if ($show_buttons) {
                     echo '<form method="post" action="' . str_replace('&settings-updated=true', '', $_SERVER["REQUEST_URI"]) . '">';
//.........这里部分代码省略.........
开发者ID:davidHuanghw,项目名称:david_blog,代码行数:101,代码来源:ot-settings-api.php

示例3: display_page

 /**
  * Loads the content for each page
  *
  * @return    string
  *
  * @access    public
  * @since     2.0
  */
 public function display_page()
 {
     $screen = get_current_screen();
     $get_settings = get_option('option_tree_settings');
     $theme_data = wp_get_theme();
     /* loop through settings */
     foreach ((array) $this->options as $option) {
         /* loop through pages */
         foreach ((array) $this->get_pages($option) as $page) {
             /* verify page */
             if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                 $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                 /* update active layout content */
                 if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                     $layouts = get_option('option_tree_layouts');
                     /* has active layout */
                     if (isset($layouts['active_layout'])) {
                         $option_tree = get_option($option['id']);
                         $layouts[$layouts['active_layout']] = ot_encode(serialize($option_tree));
                         update_option('option_tree_layouts', $layouts);
                     }
                 }
                 echo '<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                 //screen_icon( ( isset( $page['screen_icon'] ) ? $page['screen_icon'] : 'options-general' ) );
                 //echo '<h2>' . $page['page_title'] . '</h2>';
                 echo ot_alert_message($page);
                 settings_errors('option-tree');
                 /* Header */
                 et_show_promo_text();
                 /* remove forms on the custom settings pages */
                 if ($show_buttons) {
                     echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                     settings_fields($option['id']);
                 } else {
                     echo '<div id="option-tree-settings-api">';
                 }
                 /* Sub Header */
                 echo '<div id="option-tree-sub-header">';
                 // echo '<pre>';
                 //print_r($this->options[0]['pages'][0]['theme_name']);
                 //print_r($theme_data);
                 //echo '</pre>';
                 echo '<h3 class="theme-tittle">' . ETHEME_THEME_NAME . '</h3>' . '<span class="theme-version">v ' . $theme_data->version . '</span>';
                 /* layouts form */
                 if ($page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true) {
                     ot_theme_options_layouts_form();
                 }
                 if ($show_buttons) {
                     echo '<button class="option-tree-ui-button grey right">' . $page['button_text'] . '</button>';
                 }
                 //echo '<a href="'.get_admin_url().'admin.php?page=ot-theme-options&flush=1" class="option-tree-ui-button grey right">Flush cache</a>';
                 echo '<div class="clear"></div>';
                 echo '</div>';
                 /* Navigation */
                 echo '<div class="ui-tabs">';
                 /* check for sections */
                 if (isset($page['sections']) && count($page['sections']) > 0) {
                     echo '<ul class="ui-tabs-nav">';
                     /* loop through page sections */
                     foreach ((array) $page['sections'] as $section) {
                         echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '"><i class="' . $section['icon'] . '"></i>' . $section['title'] . '</a></li>';
                     }
                     echo '</ul>';
                 }
                 /* sections */
                 echo '<div id="poststuff" class="metabox-holder">';
                 echo '<div id="post-body">';
                 echo '<div id="post-body-content">';
                 $this->do_settings_sections($_GET['page']);
                 echo '</div>';
                 echo '</div>';
                 echo '</div>';
                 echo '<div class="clear"></div>';
                 echo '</div>';
                 /* buttons */
                 if ($show_buttons) {
                     echo '<div class="option-tree-ui-buttons">';
                     echo '<button class="option-tree-ui-button grey right">' . $page['button_text'] . '</button>';
                     echo '</div>';
                 }
                 echo $show_buttons ? '</form>' : '</div>';
                 /* reset button */
                 if ($show_buttons) {
                     echo '<form method="post" action="' . str_replace('&settings-updated=true', '', $_SERVER["REQUEST_URI"]) . '">';
                     /* form nonce */
                     wp_nonce_field('option_tree_reset_form', 'option_tree_reset_nonce');
                     echo '<input type="hidden" name="action" value="reset" />';
                     echo '<!--button type="submit" class="option-tree-ui-button red light left reset-settings" title="' . __('Reset Options', 'option-tree') . '">' . __('Reset Options', 'option-tree') . '</button-->';
                     echo '</form>';
                 }
                 echo '</div>';
             }
//.........这里部分代码省略.........
开发者ID:jfitzsimmons,项目名称:soundtrackforspace,代码行数:101,代码来源:ot-settings-api.php

示例4: display_page

 /**
  * Loads the content for each page
  *
  * @return    string
  *
  * @access    public
  * @since     2.0
  */
 public function display_page()
 {
     $screen = get_current_screen();
     /* loop through settings */
     foreach ((array) $this->options as $option) {
         /* loop through pages */
         foreach ((array) $this->get_pages($option) as $page) {
             /* verify page */
             if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                 $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                 /* update active layout content */
                 if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                     $layouts = get_option(ot_layouts_id());
                     /* has active layout */
                     if (isset($layouts['active_layout'])) {
                         $option_tree = get_option($option['id']);
                         $layouts[$layouts['active_layout']] = ot_encode(serialize($option_tree));
                         update_option(ot_layouts_id(), $layouts);
                     }
                 }
                 echo '<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                 echo '<h2>' . $page['page_title'] . '</h2>';
                 echo ot_alert_message($page);
                 settings_errors('option-tree');
                 /* Header */
                 echo '<div id="option-tree-header-wrap">';
                 echo '<ul id="option-tree-header">';
                 echo '<li id="option-tree-logo">' . apply_filters('ot_header_logo_link', '<a href="http://wordpress.org/extend/plugins/option-tree/" target="_blank">OptionTree</a>', $page['id']) . '</li>';
                 echo '<li id="option-tree-version"><span>' . apply_filters('ot_header_version_text', 'OptionTree ' . OT_VERSION, $page['id']) . '</span></li>';
                 // Add additional theme specific links here.
                 do_action('ot_header_list', $page['id']);
                 echo '</ul>';
                 /* layouts form */
                 if ($page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true) {
                     ot_theme_options_layouts_form();
                 }
                 echo '</div>';
                 /* remove forms on the custom settings pages */
                 if ($show_buttons) {
                     echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                     settings_fields($option['id']);
                 } else {
                     echo '<div id="option-tree-settings-api">';
                 }
                 /* Sub Header */
                 echo '<div id="option-tree-sub-header">';
                 if ($show_buttons) {
                     echo '<button class="option-tree-ui-button button button-primary right">' . $page['button_text'] . '</button>';
                 }
                 echo '</div>';
                 /* Navigation */
                 echo '<div class="ui-tabs">';
                 /* check for sections */
                 if (isset($page['sections']) && count($page['sections']) > 0) {
                     echo '<ul class="ui-tabs-nav">';
                     /* loop through page sections */
                     foreach ((array) $page['sections'] as $section) {
                         echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '">' . $section['title'] . '</a></li>';
                     }
                     echo '</ul>';
                 }
                 echo '<ul class="cohhe-social-profiles">
                 <li class="social-twitter"><i class="ot-icon-twitter"></i><a href="https://twitter.com/Cohhe_Themes" target="_blank">Follow us on Twitter</a></li>
                 <li class="social-facebook"><i class="ot-icon-facebook"></i><a href="https://www.facebook.com/cohhethemes" target="_blank">Join us on Facebook</a></li>
                 <li class="social-googleplus"><i class="ot-icon-google-plus"></i><a href="https://plus.google.com/+Cohhe_Themes/posts" target="_blank">Join us on Google+</a></li>
                 <li class="social-cohhe"><i class="cohhe_logo"></i><a href="http://cohhe.com/" target="_blank">Cohhe.com</a></li>
               </ul>';
                 /* sections */
                 echo '<div id="poststuff" class="metabox-holder">';
                 echo '<div id="post-body">';
                 echo '<div id="post-body-content">';
                 $this->do_settings_sections($_GET['page']);
                 echo '</div>';
                 echo '</div>';
                 echo '</div>';
                 echo '<div class="clear"></div>';
                 echo '</div>';
                 /* buttons */
                 if ($show_buttons) {
                     echo '<div class="option-tree-ui-buttons">';
                     echo '<button class="option-tree-ui-button button button-primary right">' . $page['button_text'] . '</button>';
                     echo '</div>';
                 }
                 echo $show_buttons ? '</form>' : '</div>';
                 /* reset button */
                 if ($show_buttons) {
                     echo '<form method="post" action="' . str_replace('&settings-updated=true', '', $_SERVER["REQUEST_URI"]) . '">';
                     /* form nonce */
                     wp_nonce_field('option_tree_reset_form', 'option_tree_reset_nonce');
                     echo '<input type="hidden" name="action" value="reset" />';
                     echo '<button type="submit" class="option-tree-ui-button button button-secondary left reset-settings" title="' . __('Reset Options', 'option-tree') . '">' . __('Reset Options', 'option-tree') . '</button>';
                     echo '</form>';
//.........这里部分代码省略.........
开发者ID:sumeetbajra,项目名称:jewelleryshop,代码行数:101,代码来源:ot-settings-api.php

示例5: display_page

        /**
         * Loads the content for each page
         *
         * @return    string
         *
         * @access    public
         * @since     2.0
         */
        public function display_page()
        {
            $screen = get_current_screen();
            /* loop through settings */
            foreach ((array) $this->options as $option) {
                /* loop through pages */
                foreach ((array) $this->get_pages($option) as $page) {
                    /* verify page */
                    if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                        $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                        /* update active layout content */
                        if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                            $layouts = get_option(ot_layouts_id());
                            /* has active layout */
                            if (isset($layouts['active_layout'])) {
                                $option_tree = get_option($option['id']);
                                $layouts[$layouts['active_layout']] = ot_encode(serialize($option_tree));
                                update_option(ot_layouts_id(), $layouts);
                            }
                        }
                        $sktlink = "http://www.sketchthemes.com/themes/incart-responsive-woocommerce-wordpress-theme/";
                        $sktratelink = "http://wordpress.org/support/view/theme-reviews/incart-lite";
                        $skttest_drive = "http://trial.sketchthemes.com/wp-signup.php";
                        echo '	<div class="donate-info">
					<strong>' . __("To Activate All Features, Please Upgrade to Pro version!", "incart-lite") . '</strong><br/>
					<a title="' . __("Upgrade to Pro", "incart-lite") . '" href="' . esc_url($sktlink) . '" target="_blank" class="upgrade">' . __("Upgrade to Pro", "incart-lite") . '</a>	<a title="' . __('Setup Instructions', 'incart-lite') . '" href="' . get_template_directory_uri() . '/Installation_Instructions.txt' . '" target="_blank" class="donate">' . __('Setup Instructions', 'incart-lite') . '</a>
					<a title="' . __('Rate Incart Lite', 'incart-lite') . '" href="' . esc_url($sktratelink) . '" target="_blank" class="review">' . __('Rate Incart Lite', 'incart-lite') . '</a>
					<a title="' . __('Test Drive', 'incart-lite') . '" href="' . esc_url($skttest_drive) . '" target="_blank" class="review">' . __('Theme Test Drive', 'incart-lite') . '</a>
          <div id="social-share">
					<div class="fb-like">
						<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FSketchThemes&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=21&amp;appId=333709623346310" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe>
					</div>
						<div class="tw-follow" ><a href="https://twitter.com/sketchthemes" class="twitter-follow-button" data-show-count="false" data-size="small">Follow @sketchthemes</a></div>
						<script>
							!function (d, s, id) {
							var js, fjs = d.getElementsByTagName(s)[0];
							if (!d.getElementById(id)) {
							js = d.createElement(s);
							js.id = id;
							js.src = "//platform.twitter.com/widgets.js";
							fjs.parentNode.insertBefore(js, fjs);
							}
							}(document, "script", "twitter-wjs");
						</script>
					</div>	
				</div>
				<div class="clearfix"></div>
				<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                        echo '<h2>' . $page['page_title'] . '</h2>';
                        echo ot_alert_message($page);
                        settings_errors('option-tree');
                        /* Header */
                        echo '<div id="option-tree-header-wrap">';
                        echo '<ul id="option-tree-header">';
                        echo '<li id="option-tree-logo">' . apply_filters('ot_header_logo_link', '<a href="http://sketchthemes.com" target="_blank">OptionTree</a>', $page['id']) . '</li>';
                        echo '<li id="option-tree-version"><span>Version ' . INCART_LITE_THEME_VERSION . '</span></li>';
                        // Add additional theme specific links here.
                        do_action('ot_header_list', $page['id']);
                        echo '</ul>';
                        /* layouts form */
                        if ($page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true) {
                            ot_theme_options_layouts_form();
                        }
                        echo '</div>';
                        /* remove forms on the custom settings pages */
                        if ($show_buttons) {
                            echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                            settings_fields($option['id']);
                        } else {
                            echo '<div id="option-tree-settings-api">';
                        }
                        /* Sub Header */
                        echo '<div id="option-tree-sub-header">';
                        if ($show_buttons) {
                            echo '<button class="option-tree-ui-button button button-primary right">' . $page['button_text'] . '</button>';
                        }
                        echo '<button class="option-tree-ui-button button button-primary left">' . $page['button_text'] . '</button>';
                        echo '</div>';
                        /* Navigation */
                        echo '<div class="ui-tabs">';
                        /* check for sections */
                        if (isset($page['sections']) && count($page['sections']) > 0) {
                            echo '<ul class="ui-tabs-nav">';
                            /* loop through page sections */
                            foreach ((array) $page['sections'] as $section) {
                                echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '">' . $section['title'] . '</a></li>';
                            }
                            echo '</ul>';
                        }
                        /* sections */
                        echo '<div id="poststuff" class="metabox-holder">';
                        echo '<div id="post-body">';
//.........这里部分代码省略.........
开发者ID:Arkon13,项目名称:magazin2,代码行数:101,代码来源:ot-settings-api.php

示例6: display_page

        /**
         * Loads the content for each page
         *
         * @return    string
         *
         * @access    public
         * @since     2.0
         */
        public function display_page()
        {
            $screen = get_current_screen();
            /* loop through settings */
            foreach ((array) $this->options as $option) {
                /* loop through pages */
                foreach ((array) $this->get_pages($option) as $page) {
                    /* verify page */
                    if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                        $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                        /* update active layout content */
                        if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                            $layouts = get_option('option_tree_layouts');
                            /* has active layout */
                            if (isset($layouts['active_layout'])) {
                                $option_tree = get_option($option['id']);
                                $layouts[$layouts['active_layout']] = ot_encode(serialize($option_tree));
                                update_option('option_tree_layouts', $layouts);
                            }
                        }
                        echo '<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                        screen_icon(isset($page['screen_icon']) ? $page['screen_icon'] : 'options-general');
                        echo '<h2>' . $page['page_title'] . '</h2>';
                        echo ot_alert_message($page);
                        settings_errors('option-tree');
                        /* Header */
                        echo '<div id="option-tree-header-wrap">';
                        echo '<ul id="option-tree-header">';
                        echo '<li id="option-tree-version"><span>' . UT_THEME_NAME . ' Version ' . UT_THEME_VERSION . '</span></li>';
                        echo '</ul>';
                        /* layouts form */
                        if ($page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true) {
                            ot_theme_options_layouts_form();
                        }
                        echo '</div>';
                        /* remove forms on the custom settings pages */
                        if ($show_buttons) {
                            echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                            settings_fields($option['id']);
                        } else {
                            echo '<div id="option-tree-settings-api">';
                        }
                        /* Sub Header */
                        echo '<div id="option-tree-sub-header">';
                        if ($show_buttons) {
                            //echo '<a href="http://faq.unitedthemes.com/brooklyn/" target="_blank" class="option-tree-ui-button blue right">View Documentation</a>';
                            echo '<button class="option-tree-ui-button blue right save-settings">' . $page['button_text'] . '</button>';
                        }
                        echo '</div>';
                        /* Navigation */
                        echo '<div class="ui-tabs">';
                        /* check for sections */
                        if (isset($page['sections']) && count($page['sections']) > 0) {
                            echo '<ul class="ui-tabs-nav">';
                            echo '<li class="ut-admin-branding"><img src="' . THEME_WEB_ROOT . '/admin/assets/images/ut-emblem.png" alt="UnitedThemes"></li>';
                            /* loop through page sections */
                            foreach ((array) $page['sections'] as $section) {
                                echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '">';
                                if (!empty($section['icon'])) {
                                    echo '<i class="fa ' . $section['icon'] . ' fa-3x"></i>';
                                }
                                echo $section['title'];
                                echo '</a></li>';
                            }
                            echo '</ul>';
                        }
                        /* sections */
                        echo '<div id="poststuff" class="metabox-holder">';
                        echo '<div id="post-body">';
                        echo '<div id="post-body-content">';
                        $this->do_settings_sections($_GET['page']);
                        echo '</div>';
                        echo '</div>';
                        echo '</div>';
                        echo '<div class="clear"></div>';
                        echo '</div>';
                        echo $show_buttons ? '</form>' : '</div>';
                        echo '</div>';
                        if (function_exists('ut_recognized_icons')) {
                            ?>
            
            <div class="ut-modal-option-tree">
                <div class="ut-modal-box-option-tree ut-admin">
                    
                    <div class="ut-modal-option-tree-header">
                        <div class="inner">
                            <h2><?php 
                            _e('Choose Icon', 'unitedthemes');
                            ?>
</h2>
                        </div>
                    </div>
//.........这里部分代码省略.........
开发者ID:amptdesign,项目名称:ampt-2016,代码行数:101,代码来源:ot-settings-api.php


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