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


PHP do_settings_fields函数代码示例

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


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

示例1: sb_do_settings_sections

function sb_do_settings_sections($page)
{
    global $wp_settings_sections, $wp_settings_fields;
    if (!isset($wp_settings_sections[$page])) {
        return;
    }
    $count = 0;
    foreach ((array) $wp_settings_sections[$page] as $section) {
        $section_id = $section['id'];
        $class = 'sbtheme-option-section';
        echo '<div id="' . $section_id . '" class="' . $class . '">';
        if ($section['title']) {
            echo "<h3 class=\"setting-title\">{$section['title']}</h3>\n";
        }
        if ($section['callback']) {
            call_user_func($section['callback'], $section);
        }
        $has_field = true;
        if (!isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section_id])) {
            $has_field = false;
        }
        echo '<table class="form-table">';
        if ($has_field && 'sb_options_section' != $section_id) {
            do_settings_fields($page, $section_id);
        } elseif ('sb_options_section' == $section_id) {
            sb_core_get_content('sb-about');
        }
        echo '</table>';
        echo '</div>';
        $count++;
    }
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:32,代码来源:sb-setting-page.php

示例2: hrecipe_postbox_fields

function hrecipe_postbox_fields($id, $title, $content, $section)
{
    global $hrecipe_options_file;
    ?>

      <div id="<?php 
    echo $id;
    ?>
" class="postbox">
        <div class="handlediv" title="Click to toggle"><br /></div>
        <h3 class="hndle"><span><?php 
    echo $title;
    ?>
</span></h3>
        <div class="inside hrecipe">
           <?php 
    echo $content;
    ?>
           <table class="form-table">
             <?php 
    //echo $section
    ?>
             <?php 
    do_settings_fields($hrecipe_options_file, $section);
    ?>
          </table>
        </div>
      </div>
<?php 
}
开发者ID:vigilanteweb,项目名称:hrecipe,代码行数:30,代码来源:options.php

示例3: badgeos_obi_issuer_settings

    function badgeos_obi_issuer_settings()
    {
        if (!current_user_can(badgeos_get_manager_capability())) {
            wp_die("You do not have sufficient permissions to access this page.");
        }
        ?>
		<div class="wrap">
        	<?php 
        settings_errors();
        ?>
            <?php 
        $this->json_api_controller_status();
        ?>
            <h2>Open Badges Issuer Add-on Settings</h2>
            <form method="post" action="options.php"> 
                <?php 
        @settings_fields('badgeos_obi_issuer_settings');
        ?>
                <?php 
        @do_settings_fields('badgeos_obi_issuer_settings');
        ?>
        
                <?php 
        do_settings_sections('badgeos_obi_issuer_template');
        ?>
        
                <?php 
        @submit_button();
        ?>
            </form>
        </div>
        <?php 
    }
开发者ID:geoffroigaron,项目名称:open-badges-issuer-addon,代码行数:33,代码来源:settings.php

示例4: _doSettingsSections

 /**
  * @param $page
  */
 protected function _doSettingsSections($page)
 {
     global $wp_settings_sections, $wp_settings_fields;
     if (!isset($wp_settings_sections[$page])) {
         return;
     }
     echo '<ul class="nav nav-pills nav-pills-wp" role="tablist">';
     foreach ((array) $wp_settings_sections[$page] as $section) {
         if (strpos($section['id'], 'external') !== false) {
             continue;
         }
         printf('<li role="presentation"><a href="#%s" controls="%s" role="tab" data-toggle="tab">%s</a></li>', $section['id'], $section['id'], $section['title']);
     }
     echo '</ul>';
     echo '<div class="tab-content">';
     foreach ((array) $wp_settings_sections[$page] as $section) {
         if (!isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']])) {
             continue;
         }
         if (strpos($section['id'], 'external') !== false) {
             do_settings_fields($page, $section['id']);
         } else {
             printf('<div role="tabpanel" class="tab-pane" id="%s"><table class="form-table">', $section['id']);
             if ($section['callback']) {
                 call_user_func($section['callback'], $section);
             }
             do_settings_fields($page, $section['id']);
             echo '</table></div>';
         }
     }
     echo '</div>';
 }
开发者ID:jasmun,项目名称:Noco100,代码行数:35,代码来源:Pills.php

示例5: license_page

    /**
     * Add Plugin License Page
     *
     * @since 1.5.6
     */
    function license_page()
    {
        ?>
        <div class="wrap">
                <h2><?php 
        _e('Plugin License Options');
        ?>
</h2>
                <div class="fts-activation-msg"><ol><li>Enter your License Key and Click the Save Changes button.</li>
       <li>Click Activate License. When activated it will
       show the word "<span style="color:green;">Active</span>" in green next to the button.</li></ol></div>
                <form method="post" action="options.php">
                    <?php 
        settings_fields($this->license_page_slug . '_license_manager_page');
        ?>

                    <table class="form-table">
                        <tbody>
                            <?php 
        do_settings_fields($this->license_page_slug, 'main_section');
        ?>
                        </tbody>
                    </table>
                    <?php 
        submit_button();
        ?>
                </form>
    <?php 
    }
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:34,代码来源:namespaced_EDD_SL_Plugin_Licence_Manager.php

示例6: license_page

    function license_page()
    {
        ?>
	<div class="wrap">
			<h2><?php 
        _e('Plugin License Options');
        ?>
</h2>
			<form method="post" action="options.php">
				<?php 
        settings_fields('EDD_license_manager_page');
        ?>
				
				<table class="form-table">
					<tbody>
                   		<?php 
        do_settings_fields(__FILE__, 'main_section');
        ?>
					</tbody>
				</table>	
				<?php 
        submit_button();
        ?>
			</form>
<?php 
    }
开发者ID:hkarriche,项目名称:wordpress,代码行数:26,代码来源:EDD_SL_Plugin_Licence_Manager.php

示例7: renderPage

    function renderPage()
    {
        global $wp_settings_fields;
        ?>
<div class="wrap">
<h2><?php 
        echo esc_html($this->_title);
        ?>
</h2>
<form method="post" action="options.php">
<?php 
        settings_fields($this->_id);
        if (!empty($wp_settings_fields[$this->_id]['default'])) {
            ?>
<table class="form-table">
<?php 
            do_settings_fields($this->_id, 'default');
            ?>
</table>
<?php 
        }
        do_settings_sections($this->_id);
        submit_button();
        ?>
</form>
</div>
<?php 
    }
开发者ID:kamichimo,项目名称:wp-koalabo,代码行数:28,代码来源:class-setting-page.php

示例8: saasaparilla_render_settings_page

/**
 * Render the settings page
 *
 * @since       1.0.0
 * @global      array $saasaparilla_options The SaaSaparilla options
 * @return      void
 */
function saasaparilla_render_settings_page()
{
    global $saasaparilla_options;
    $active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], saasaparilla_get_settings_tabs()) ? $_GET['tab'] : 'general';
    ob_start();
    ?>
	<div class="wrap">
		<h2 class="nav-tab-wrapper">
			<?php 
    foreach (saasaparilla_get_settings_tabs() as $tab_id => $tab_name) {
        $tab_url = add_query_arg(array('settings-updated' => false, 'tab' => $tab_id));
        $active = $active_tab == $tab_id ? ' nav-tab-active' : '';
        echo '<a href="' . esc_url($tab_url) . '" title="' . esc_attr($tab_name) . '" class="nav-tab' . $active . '">' . esc_html($tab_name) . '</a>';
    }
    ?>
		</h2>
		<div id="tab_container">
			<form method="post" action="options.php">
				<table class="form-table">
					<?php 
    settings_fields('saasaparilla_settings');
    do_settings_fields('saasaparilla_settings_' . $active_tab, 'saasaparilla_settings_' . $active_tab);
    ?>
				</table>
				<?php 
    if (!isset($_GET['tab']) || $_GET['tab'] !== 'help') {
        submit_button();
    }
    ?>
			</form>
		</div>
	</div>
	<?php 
    echo ob_get_clean();
}
开发者ID:saivarunk,项目名称:SaaSaparilla,代码行数:42,代码来源:display.php

示例9: affwp_settings_admin

/**
 * Options Page
 *
 * Renders the options page contents.
 *
 * @since 1.0
 * @return void
 */
function affwp_settings_admin()
{
    $active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], affwp_get_settings_tabs()) ? $_GET['tab'] : 'general';
    ob_start();
    ?>
	<div class="wrap">
		<h2 class="nav-tab-wrapper">
			<?php 
    foreach (affwp_get_settings_tabs() as $tab_id => $tab_name) {
        $tab_url = add_query_arg(array('settings-updated' => false, 'tab' => $tab_id));
        $active = $active_tab == $tab_id ? ' nav-tab-active' : '';
        echo '<a href="' . esc_url($tab_url) . '" title="' . esc_attr($tab_name) . '" class="nav-tab' . $active . '">';
        echo esc_html($tab_name);
        echo '</a>';
    }
    ?>
		</h2>
		<div id="tab_container">
			<form method="post" action="options.php">
				<table class="form-table">
				<?php 
    settings_fields('affwp_settings');
    do_settings_fields('affwp_settings_' . $active_tab, 'affwp_settings_' . $active_tab);
    ?>
				</table>
				<?php 
    submit_button();
    ?>
			</form>
		</div><!-- #tab_container-->
	</div><!-- .wrap -->
	<?php 
    echo ob_get_clean();
}
开发者ID:companyjuice,项目名称:AffiliateWP,代码行数:42,代码来源:display-settings.php

示例10: main_settings

 function main_settings()
 {
     foreach ($this->sections as $s) {
         echo '<table class="form-table">';
         do_settings_fields(__FILE__, $s['id']);
         echo '</table>';
     }
 }
开发者ID:kingtec,项目名称:kt-web-old,代码行数:8,代码来源:author_category_Panel_class.php

示例11: display_ext_section

function display_ext_section()
{
    // For Multisite only
    ?>
	<table class="form-table">
		<?php 
    do_settings_fields('media', 'uploads_ext');
    ?>
	</table>
	<?php 
}
开发者ID:arthurlacoste,项目名称:add-more-files-extensions,代码行数:11,代码来源:amfe.php

示例12: bb_repost_options_page

function bb_repost_options_page()
{
    echo '<div class="wrap">' . "\n";
    echo '<h2>BB Repost Settings</h2>' . "\n";
    echo "<form action='options.php' method = 'post'>" . "\n";
    echo "<label>Twitter : </label><input type='text' name='bb_repost_twitter' value='" . get_option('bb_repost_twitter') . "'><br>" . "\n";
    submit_button();
    settings_fields('bb-repost-option-group');
    do_settings_fields('bb-repost-option-group');
    echo "</form>" . "\n";
}
开发者ID:BrownBox,项目名称:bb-repost,代码行数:11,代码来源:settings.php

示例13: bbconnect_mailchimp_options_page

function bbconnect_mailchimp_options_page()
{
    echo '<div class="wrap">' . "\n";
    echo '<h2>MailChimp Settings</h2>' . "\n";
    echo "<form action='options.php' method='post'>" . "\n";
    echo "<label>List ID:</label><input type='text' name='bbconnect_mailchimp_list_id' value='" . get_option('bbconnect_mailchimp_list_id') . "' ><br>" . "\n";
    echo "<label>API Key:</label><input type='text' name='bbconnect_mailchimp_api_key' value='" . get_option('bbconnect_mailchimp_api_key') . "' ><br>" . "\n";
    submit_button();
    settings_fields('bbconnect-mailchimp-options-group');
    do_settings_fields('bbconnect-mailchimp-options-group');
    echo '</form>' . "\n";
}
开发者ID:BrownBox,项目名称:bbconnect-mailchimp,代码行数:12,代码来源:settings.php

示例14: gestsup_reset

    public static function gestsup_reset()
    {
        ?>
		<form method="post" action="options.php">
			<?php 
        settings_fields('gestsup_delete');
        ?>
			<?php 
        do_settings_fields('gestsup_delete_data');
        ?>
		</form>
	<?php 
    }
开发者ID:sebastienserre,项目名称:WP-GestSup-Connector,代码行数:13,代码来源:gestsup_options.php

示例15: stagtools_options_page

function stagtools_options_page()
{
    $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'general';
    ob_start();
    ?>

	<div class="wrap">
		<h2 class="nav-tab-wrapper">
			<?php 
    foreach (stagtools_get_settings_tabs() as $tab_id => $tab_name) {
        $tab_url = add_query_arg(array('settings-updated' => false, 'tab' => $tab_id));
        $is_showing = true;
        if ('portfolio' == $tab_id) {
            $is_showing = false;
            if (current_theme_supports('post-type', array('portfolio')) || current_theme_supports('stag-portfolio')) {
                $is_showing = true;
            }
        }
        if ($is_showing) {
            $active = $active_tab == $tab_id ? ' nav-tab-active' : '';
            echo '<a href="' . esc_url($tab_url) . '" title="' . esc_attr($tab_name) . '" class="nav-tab' . $active . '">';
            echo esc_html($tab_name);
            echo '</a>';
        }
    }
    ?>
		</h2>

		<div id="tab_container">
			<form method="post" action="options.php">
				<table class="form-table">
				<?php 
    if ($_GET['page'] == 'stagtools' && isset($_GET['settings-updated']) && $_GET['settings-updated'] == "true") {
        flush_rewrite_rules();
    }
    settings_fields('stag_options');
    do_settings_fields('stagtools_settings_' . $active_tab, 'stagtools_settings_' . $active_tab);
    ?>
				</table>
				<?php 
    submit_button();
    ?>
			</form>
		</div><!-- #tab_container -->
	</div><!-- .wrap -->

	<?php 
    echo ob_get_clean();
}
开发者ID:frontend-labs,项目名称:post-template,代码行数:49,代码来源:settings.php


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