• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP settings_fields函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: catMCE_options

function catMCE_options()
{
    if (!current_user_can('manage_options')) {
        wp_die(__('You do not have sufficient permissions to access this page.'));
    }
    ?>
	<div class="wrap">
	<h2>CategoryTinyMCE SEO Settings</h2>
	<div id="donate_container">
     The latest fully maintained version (Categorytinymce 4.x) which includes the bottom listing description box can be found at http://wp.ypraise.com/. Adding a bottom description for your categories and tags can help you with your user experience and SEO.
    </div>
	
	<p><form method="post" action="options.php">	</p>
	<p>SEO Settings for CategoryTinyMCE:</p>
	
	<?php 
    settings_fields('catMCE_options');
    ?>
<p>Choose SEO:  

<input type="checkbox" name="catMCE_seo" value="1" <?php 
    checked('1', get_option('catMCE_seo'));
    ?>
 />
							</p>

 <?php 
    submit_button();
    echo '</form>';
    echo '</div>';
}
开发者ID:serker72,项目名称:T3S,代码行数:31,代码来源:categorytinymce.php


示例2: print_settings

 /**
  * Print Settings
  */
 public function print_settings()
 {
     settings_fields('wcbulkorderform_variation_template');
     do_settings_sections('wcbulkorderform_variation_template');
     $option = get_option('wcbulkorderform_variation_template');
     //print_r($option);
 }
开发者ID:hslatman,项目名称:woocommerce-bulk-order-form,代码行数:10,代码来源:variation_template_options.php


示例3: display_page

function display_page()
{
    ?>

        <div class="wrap">
	        <h2>Page d'administration type</h2>

	        <?php 
    settings_errors();
    // affichage des erreurs, peut recevoir des valeurs
    ?>

	        <form method="post" action="options.php" enctype="multipart/form-data">

	            <?php 
    // nécessaire au fonctionnement du form avec pour argument l'ID du group créer avec register_settings()
    settings_fields('admin-type-settings');
    // génére les champs avec pour argument ID de la page référente (slug)
    do_settings_sections('admin-type');
    // l'input submit
    submit_button();
    ?>
 

	        </form>
        </div>

    <?php 
}
开发者ID:JulienIsGreat,项目名称:Preform,代码行数:29,代码来源:admin-type.php


示例4: clink_settings

/**
 * Clink settings function
 */
function clink_settings()
{
    ?>
	    <div class="wrap">
			<h2><span class="clink-main-dashicons dashicons dashicons-admin-links"></span><?php 
    _e('Global Clink Settings', 'aryan-themes');
    ?>
</h2>
			<?php 
    settings_errors();
    ?>
			<form method="post" action="options.php">
				<table class="form-table">
					<tbody>
						<?php 
    settings_fields("general-section");
    do_settings_sections("clink-options");
    submit_button();
    ?>
					</tbody>
				</table>
			</form>
		</div>
<?php 
}
开发者ID:aryanthemes,项目名称:Clink,代码行数:28,代码来源:admin.php


示例5: display_plugin_admin_page

    public function display_plugin_admin_page()
    {
        ?>
		<div class="wrap">
			<h2><?php 
        _e('Import / Export', $this->plugin_slug);
        ?>
</h2>
			<p class="description"><?php 
        _e('In this section you can easly import or export all Reviewer Plugin data. The importing process replaces the existing content of Reviewer Plugin, before go ahead make a backup of your WordPress database. The exporting process saves: templates, preferences, reviews, users ratings, comparison tables , support data', 'reviewer');
        ?>
</p>
			<?php 
        settings_errors();
        ?>
			<form method="post" action="options.php" enctype="multipart/form-data">
			<!-- <form method="post"> -->
			<?php 
        settings_fields($this->option_name);
        do_settings_sections($this->menu_slug);
        submit_button(__('Export', $this->plugin_slug), 'primary', 'rwp_io_submit', true, array('data-export' => __('Export', $this->plugin_slug), 'data-import' => __('Import', $this->plugin_slug)));
        ?>
			</form>

			<?php 
        $this->backup_files();
        //RWP_Reviewer::pretty_print(  $this->option_value );
        ?>

			<?php 
        //RWP_Reviewer::pretty_print( $this->option_value );
        ?>
		</div><!--/wrap-->
		<?php 
    }
开发者ID:jprdev,项目名称:S.J-Enterprise,代码行数:35,代码来源:class-io-page.php


示例6: create_admin_page

    /**
     * Options page callback
     */
    public function create_admin_page()
    {
        $this->options = get_option('watchtower');
        ?>
		<div class="wrap">
			<style>
				.watchtower_token_field {
					background: #ffea96 !important;
				}

				.watchtower_token_area, .watchtower_token_field {
					font-size: 20px;
					padding: 10px;
				}

				.watchtower_token_area {
					margin: auto;
					float: left;
					padding-left: 0px;
				}
			</style>
			<h2>Watchtower Settings</h2>
			<form method="post" action="options.php">
				<?php 
        settings_fields('watchtower');
        do_settings_sections('watchtower-settings');
        submit_button('Update settings');
        ?>
			</form>
		</div>
		<?php 
    }
开发者ID:c2pdev,项目名称:WatchTower_Client,代码行数:35,代码来源:class-watchtower.php


示例7: palo_options_page_html

/**
 * Generates and outputs the HTML for the settings page
 * 
 * The function is used as a callback function in add_options_page()
 */
function palo_options_page_html()
{
    global $palo_options, $palo_textdomain;
    ?>
	<div class="wrap">
		<h2><?php 
    _e('PA Login & Access Settings', $palo_textdomain);
    ?>
</h2>
		<p><?php 
    // _e( '<img src="https://lh4.ggpht.com/H0xw6Aflpd04ss7WZaYArUKRS4M1_92GX7tfttxJLUD0kSOpjNF8UKoXroFxSX5EVQ=w300" height="64" class="alignright" /> Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.', $palo_textdomain );
    ?>
</p>
		<form action="options.php" method="post">
			<?php 
    settings_fields('palo_options_group');
    ?>
			<?php 
    do_settings_sections('palo_settings');
    ?>
			<?php 
    submit_button();
    ?>
		</form>

	</div>
	<div class="wrap">
		<hr />
		<blockquote><pre><?php 
    //echo substr( print_r( $palo_options, true ), 5 );
    ?>
</pre></blockquote>
	</div>
	<?php 
}
开发者ID:gvh1993,项目名称:project-vvvh,代码行数:40,代码来源:functions.php


示例8: renderSettingsPage

    /**
     * renders plugin settings page
     */
    function renderSettingsPage()
    {
        if (!current_user_can('manage_options')) {
            wp_die(__('You do not have sufficient permissions to access this page.'));
        }
        ?>

		<div class="wrap">
			<?php 
        screen_icon();
        ?>
			<h2><?php 
        echo __('OnPage Post SEO Settings', 'wtb_seo');
        ?>
</h2>
			
			<form method="post" action="options.php">
				
				<?php 
        settings_fields('wtb_seo_settings_main_group');
        do_settings_sections('wtb_seo_settings');
        ?>
				
				<?php 
        submit_button();
        ?>
			</form>
		</div>
		<?php 
    }
开发者ID:repupress,项目名称:onpage-post-seo-wordpress-plugin,代码行数:33,代码来源:settings.php


示例9: jeweltheme_rpi_option_page

function jeweltheme_rpi_option_page()
{
    ?>
    <div class="wrap">

      <?php 
    screen_icon();
    ?>

        <h2>H2CWEB Related Post Inside</h2>

        <form action="options.php" method="post">

            <?php 
    settings_fields('jeweltheme_rpi_options');
    ?>

            <?php 
    do_settings_sections('jeweltheme_rpi');
    ?>

            <input name="Submit" class="button button-primary" type="submit" value="Save Changes" />

        </form>

    </div>

    <?php 
}
开发者ID:jun200,项目名称:wordpress,代码行数:29,代码来源:index.php


示例10: options_page

        public static function options_page()
        {
            $tab = self::current_tab();
            ?>
			<div class="wrap">
				<?php 
            self::plugin_options_tabs();
            ?>
				<form method="post" action="options.php" class="options-form">
					<?php 
            settings_fields($tab);
            ?>
					<?php 
            do_settings_sections($tab);
            ?>
					<?php 
            if (WP_REST_API_Log_Settings_Help::$settings_key !== $tab) {
                submit_button(__('Save Changes'), 'primary', 'submit', true);
            }
            ?>
				</form>
			</div>
			<?php 
            $settings_updated = filter_input(INPUT_GET, 'settings-updated', FILTER_SANITIZE_STRING);
            if (!empty($settings_updated)) {
                do_action('wp-rest-api-log-settings-updated');
                flush_rewrite_rules();
            }
        }
开发者ID:petenelson,项目名称:wp-rest-api-log,代码行数:29,代码来源:class-wp-rest-api-log-settings.php


示例11: overview

function overview()
{
    ?>

<div class="wrap">
<h2>Inspectlet Analytics</h2>
    <form method="post" action="options.php">
        <?php 
    settings_fields('insp-group');
    ?>
        <p style="width: 70%;">Please paste your Inspectlet Embed JS Code (retrieved from the dashboard) into the field below to start using Inspectlet with Wordpress. If you're having trouble integrating, drop us a line at [email protected]</p>
        <textarea name="insp_code" id="insp_code" cols="60" rows="15"><?php 
    echo get_option('insp_code');
    ?>
</textarea>
        <p class="submit">
        <input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" />
        </p>
    </form>
</div>


<?php 
}
开发者ID:WP-Panda,项目名称:allergenics,代码行数:27,代码来源:inspectlet-user-session-recording-and-heatmaps.php


示例12: create_admin_page

 /**
  * Options page callback
  */
 public function create_admin_page()
 {
     // Set class property
     $this->options = get_option('wirte_here_options');
     ?>
     <div class="wrap">
         <h1>Write Here</h1>
         <p>A simple front end form for WordPress. Write Here will allow you to have registered users to write & manage articles from front end.</p>
         <h3>How to Use?</h3>
             <ol>
                 <li>Create page for writing on front end. Add <b>[write-here]</b></li>
                 <li>Create page for dashboard. Add <b>[write-here-dashboard]</b></li>
                 <li>Create page for editing. Add <b>[write-here-edit]</b></li>
                 <li>Set your edit page below.</li>
             </ol>    
         
         <form method="post" action="options.php">
         <?php 
     // This prints out all hidden setting fields
     settings_fields('my_option_group');
     do_settings_sections('write-here-setting');
     submit_button();
     ?>
         </form>
     </div>
     <?php 
 }
开发者ID:seanyainkiranina,项目名称:Write-Here,代码行数:30,代码来源:write-here-admin.php


示例13: options_page

 function options_page()
 {
     printf('</pre><div><h2>%s</h2>%s<form action="options.php" method="post">', $this->settingsConfig['menu']['title'], $this->settingsConfig['menu']['intro_text']);
     settings_fields($this->settingsConfig['group']);
     do_settings_sections($this->settingsConfig['menu']['page_name']);
     printf('<input type="submit" name="Submit" value="%s" /></form></div><pre>', __('Save Changes'));
 }
开发者ID:repo-storage,项目名称:core-wp,代码行数:7,代码来源:ob_settings_v1_3.php


示例14: gravatar_fixed_options

function gravatar_fixed_options()
{
    ?>
<div class="wrap">
<h2>Gravatar 头像修正</h2>
<form method="post" action="options.php">
<?php 
    settings_fields('gravatar-settings');
    ?>
<table class="form-table">
<tr valign="top">
<th scope="row">Gravatar 服务器</th>
<td><input type="text" name="gravatar_server_1" value="<?php 
    echo get_option('gravatar_server_1');
    ?>
" class="regular-text" /></td>
</tr> 
<tr valign="top">
<th scope="row">Gravatar SSL 服务器</th>
<td><input type="text" name="gravatar_server_s" value="<?php 
    echo get_option('gravatar_server_s');
    ?>
" class="regular-text" /></td>
</tr>
</table>
<p class="submit">
<input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" />
</p>
</form>
</div>
<?php 
}
开发者ID:yaoshanliang,项目名称:WordPress,代码行数:35,代码来源:gravatar-fixed.php


示例15: display_options_page

    public static function display_options_page()
    {
        ?>

		<div class="wrap">

			<h2>Auto Terms of Service and Privacy Policy Options</h2>

			<form action="options.php" method="post" enctype="multipart/form-data">
				<?php 
        if (function_exists('settings_fields')) {
            settings_fields('atospp_plugin_options');
            // Output nonce, action, and option_page fields for a settings page. This should match the group name used in register_setting()
        }
        do_settings_sections(__FILE__);
        ?>

				<p class="submit">
					<input name="submit" type="submit" class="button-primary" value="Save Changes">
				</p>
			</form>

		</div>

		<?php 
    }
开发者ID:aguidetta,项目名称:Enduris,代码行数:26,代码来源:auto-terms-of-service-privacy-policy.php


示例16: create_admin_page

    /**
     * Options page callback
     */
    public function create_admin_page()
    {
        // Set class property
        $this->options = get_option('alpual_responsive_child_options');
        ?>
        <div class="wrap">
            <h2>My Settings</h2>           
            	<h3>Current Piano Key Image</h3>
            	<img class="piano_key" src="<?php 
        echo esc_url($this->options['piano_key']);
        ?>
" height="45" width="960"/>
                <h3 class="new_piano_key_header" style="display:none">New Piano Key Image</h3>
                <img class="piano_key_preview" src="" style="display:none"/>
            	<span class="piano_key_update_text" style="background-color:#FC9;"></span>
            	<form method="post" action="options.php">
            	<?php 
        // This prints out all hidden setting fields
        settings_fields('alpual_responsive_child_option_group');
        do_settings_sections('alpual_responsive_child_setting_admin');
        submit_button();
        ?>
            	</form>
        </div>
        <?php 
    }
开发者ID:alpual,项目名称:wrightdesigns,代码行数:29,代码来源:piano_key_options.php


示例17: gf_disable_autofill_settings_page

function gf_disable_autofill_settings_page()
{
    ?>
<div class="wrap">
<h2>Gravity Forms Disable Autofill Add-On</h2>

<form method="post" action="options.php">
    <?php 
    settings_fields('disable-gf-autofill-settings-group');
    ?>
    <?php 
    do_settings_sections('disable-gf-autofill-settings-group');
    ?>
    <h3>Coming soon</h3>
    <table class="form-table">
        <tr valign="top">
        <th scope="row">Disable Autofill on all forms</th>
        <td><input type="checkbox" name="gfda_disable_all_forms" value="<?php 
    echo esc_attr(get_option('gfda_disable_all_forms'));
    ?>
" /></td>
        </tr>
    </table>

    <?php 
    submit_button();
    ?>

</form>
</div>
<?php 
}
开发者ID:amgxyz,项目名称:Gravity-Forms-Disable-Autofill-Add-On,代码行数:32,代码来源:options.php


示例18: require_login

function require_login()
{
    ?>
    <div>
        <h2><?php 
    print __('Require Login', 'require_login');
    ?>
</h2>
        <form method="post" action="options.php">
            <?php 
    settings_fields('require_login');
    ?>
            <?php 
    do_settings_sections('require_login');
    ?>

            <input type="submit" name="Submit" value="<?php 
    _e('Update Options ?');
    ?>
" />
        </form>
    </div>

    <?php 
}
开发者ID:richard4339,项目名称:wp-require-login,代码行数:25,代码来源:wp-require-login.php


示例19: pado_options

function pado_options()
{
    // Check that the user is able to view this page.
    if (!current_user_can('manage_options')) {
        wp_die(__('You do not have sufficient permissions to access this page.', 'pressapps'));
    }
    ?>

	<div class="wrap">
		<div id="icon-themes" class="icon32"></div>
		<h2><?php 
    _e('Document Settings', 'pressapps');
    ?>
</h2>

		<form action="options.php" method="post">
			<?php 
    settings_fields('pado_setup_options');
    ?>
			<?php 
    do_settings_sections('pado_setup_options');
    ?>
			<?php 
    submit_button();
    ?>
		</form>

	</div>
<?php 
}
开发者ID:rinodung,项目名称:live-theme,代码行数:30,代码来源:page.php


示例20: jr_mt_settings_page

/**
 * Settings page for plugin
 * 
 * Display and Process Settings page for this plugin.
 *
 */
function jr_mt_settings_page()
{
    echo '<div class="wrap">';
    screen_icon('plugins');
    echo '<h2>jonradio Multiple Themes</h2>';
    //	Required because it is only called automatically for Admin Pages in the Settings section
    settings_errors('jr_mt_settings');
    $theme = wp_get_theme()->Name;
    global $jr_mt_options_cache;
    ?>
	<p>This plugin allows you to selectively change the Theme you have selected as your <b>Current Theme</b> in <b>Appearance-Themes</b> on the Admin panels.
	You can choose from any of the <b>Available Themes</b> listed on the Appearance-Themes Admin panel for:
	<ul>
	<li> &raquo; All Pages</li>
	<li> &raquo; All Posts</li>
	<li> &raquo; The Site Home</li>
	<li> &raquo; A Specific Page</li>
	<li> &raquo; A Specific Post</li>
	<li> &raquo; Any other non-Admin page that has its own Permalink; for example, a specific Archive or Category page</li>
	</ul>
	<?php 
    if (function_exists('is_multisite') && is_multisite()) {
        echo "In a WordPress Network (AKA Multisite), Themes must be <b>Network Enabled</b> before they will appear as Available Themes on individual sites' Appearance-Themes panel.";
    }
    echo '</p>';
    echo '<p>';
    echo "The Current Theme is <b>{$theme}</b>. You will not normally need to specify it in any of the Settings on this page. The only exception would be if you specify a different Theme for All Pages or All Posts and wish to use the Current Theme for a specific Page, Post or other non-Admin page.";
    echo '</p>';
    echo '<form action="options.php" method="POST">';
    //	Plugin Settings are displayed and entered here:
    settings_fields('jr_mt_settings');
    do_settings_sections('jr_mt_settings_page');
    echo '<p><input name="save" type="submit" value="Save Changes" class="button-primary" /></p></form>';
}
开发者ID:JalpMi,项目名称:v2contact,代码行数:40,代码来源:admin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP settings_item函数代码示例发布时间:2022-05-15
下一篇:
PHP settings_errors函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap