當前位置: 首頁>>代碼示例>>PHP>>正文


PHP settings_errors函數代碼示例

本文整理匯總了PHP中settings_errors函數的典型用法代碼示例。如果您正苦於以下問題:PHP settings_errors函數的具體用法?PHP settings_errors怎麽用?PHP settings_errors使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了settings_errors函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dswoddil_theme_settings_page_render

/**
 * Render theme settings page.
 *
 * @since DSW oddil 1.0
 */
function dswoddil_theme_settings_page_render()
{
    // Create a header in the default WordPress 'wrap' container
    ?>
	<div class="wrap">
		<h2><?php 
    _e('DSW Oddil Theme Settings', 'dswoddil');
    ?>
</h2>
		<?php 
    settings_errors();
    ?>

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

	</div>
	<?php 
}
開發者ID:kalich5,項目名稱:dsw-oddil,代碼行數:33,代碼來源:theme-options.php

示例2: 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

示例3: italystrap_callback_function

    /**
     * Add WordPress standard form for options page
     * @return string
     */
    public function italystrap_callback_function()
    {
        if (!current_user_can($this->capability)) {
            wp_die(__('You do not have sufficient permissions to access this page.'));
        }
        ?>

				<div class="wrap">
					<h2>
						<span class="dashicons dashicons-admin-settings" style="font-size:32px;margin-right:15px"></span> ItalyStrap panel
					</h2>
						<?php 
        settings_errors();
        ?>

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

			<?php 
    }
開發者ID:AndrGelmini,項目名稱:ItalyStrap,代碼行數:32,代碼來源:ItalyStrapOptionTheme.php

示例4: et_shortcodes_options_render_page

function et_shortcodes_options_render_page()
{
    ?>
	<div class="wrap">
		<?php 
    screen_icon();
    ?>
		<h2><?php 
    esc_html_e('ET Shortcodes Plugin Options');
    ?>
</h2>
		<?php 
    settings_errors();
    ?>

		<form method="post" action="options.php">
			<?php 
    settings_fields('et_shortcodes_options');
    do_settings_sections('et_shortcodes_plugin_options');
    submit_button();
    ?>
		</form>
	</div>
	<?php 
}
開發者ID:welearncodes,項目名稱:traktern,代碼行數:25,代碼來源:et-shortcodes.php

示例5: 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

示例6: bnfw_render_license_page

/**
 * Render license page.
 *
 * @since 1.4
 */
function bnfw_render_license_page()
{
    $settings = apply_filters('bnfw_settings_licenses', array());
    ob_start();
    ?>

	<div class="wrap">
		<h2><?php 
    esc_html_e('BNFW Add-on Licenses', 'bnfw');
    ?>
</h2>

		<form method="post" action="options.php" class="bnfw-form">
			<?php 
    settings_errors();
    settings_fields('bnfw-license-settings');
    do_settings_sections('bnfw-license');
    if (!empty($settings)) {
        submit_button(esc_html__('Save License', 'bnfw'));
    } else {
        esc_html_e('<br>You have no BNFW Add-ons installed yet. You can buy add-ons from the <a href="https://betternotificationsforwp.com/store/?utm_source=WP%20Admin%20Submenu%20Item%20-%20"Add-on%20Licenses"&amp;utm_medium=referral" target="_blank">Store</a>.', 'bnfw');
    }
    ?>
		</form>
	</div>

	<?php 
    echo ob_get_clean();
}
開發者ID:voltronik,項目名稱:bnfw,代碼行數:34,代碼來源:class-bnfw-license-setting.php

示例7: am_options_page

function am_options_page($active_tab = '')
{
    ?>

	<div class="wrap">
		<h2><?php 
    _e('Theme Options', 'AM_Sandbox');
    ?>
</h2>

		<?php 
    settings_errors();
    ?>

		<!-- TODO: NAV-TABS ($active_tab) -->

		<form method="post" action="options.php">
			
			<?php 
    settings_fields('AM_Sandbox_options');
    am_options_fields();
    submit_button();
    ?>

		</form>

	</div>

<?php 
}
開發者ID:Alxmerino,項目名稱:am-sandbox-theme,代碼行數:30,代碼來源:am-admin-page-options.php

示例8: corenominal_apikey_callback

/**
 * Output the page
 */
function corenominal_apikey_callback()
{
    ?>
	<div class="wrap">

		<h1>corenominal API Plugin &mdash; Keygen</h1>

		<?php 
    settings_errors();
    ?>

		<p>Create and save an API Key for use within the theme. You can either create your own key, or click the "Key Gen" button (<em>recommended</em>).</p>

		<hr>

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

			<?php 
    settings_fields('corenominal_apikey_group');
    ?>
			<?php 
    do_settings_sections('corenominal_apikey');
    ?>
			<?php 
    submit_button();
    ?>

		</form>

	</div>
	<?php 
}
開發者ID:corenominal,項目名稱:corenominal-wp-api,代碼行數:35,代碼來源:corenominal_api_key.php

示例9: weixin_robot_basic_page

function weixin_robot_basic_page()
{
    if (isset($_POST['weixin_robot_options_nonce']) && wp_verify_nonce($_POST['weixin_robot_options_nonce'], 'weixin_robot')) {
        update_option('wpjam_net_domain_check_56', $_POST['wpjam_net_domain_check_56']);
    }
    if (wpjam_net_check_domain(56)) {
        settings_errors();
        $labels = weixin_robot_get_option_labels();
        wpjam_option_page($labels, $title = '設置', $type = 'tab');
    } else {
        global $plugin_page;
        ?>
		<div class="wrap">
			<h2>微信機器人</h2>
			<p>商城更換了授權模式,已經購買用戶,請到這裏 <a href="http://wpjam.net/wp-admin/admin.php?page=orders&domain_limit=1&product_id=56" class="button">獲取授權碼</a>。<br />未購買用戶,請聯係 QQ 11497107 購買。</p>
			<!--<p>你還沒有授權域名,點擊這裏:<a href="http://wpjam.net/wp-admin/admin.php?page=orders&domain_limit=1&product_id=56" class="button">授權域名</a></p>-->
			<form method="post" action="<?php 
        echo admin_url('admin.php?page=' . $plugin_page);
        ?>
" enctype="multipart/form-data" id="form">
				<input type="text" id="wpjam_net_domain_check_56" name="wpjam_net_domain_check_56" value="" class="regular-text" />
				<?php 
        wp_nonce_field('weixin_robot', 'weixin_robot_options_nonce');
        ?>
				<p class="submit"><input class="button-primary" type="submit" value="提交" /></p>
			</form>
		</div>
		<?php 
    }
}
開發者ID:zengyun123,項目名稱:weixin-robot-advanced-dev,代碼行數:30,代碼來源:weixin-robot-options.php

示例10: display_page

    function display_page()
    {
        ?>
		<div class="wrap">
	
			<div id="icon-themes" class="icon32"></div>
			<h2><?php 
        echo $this->_o_page['page']['title'];
        ?>
</h2>
			<?php 
        settings_errors();
        ?>
	
			<form method="post" action="options.php">
				<?php 
        settings_fields($this->_o_page['id']);
        ?>
				<?php 
        do_settings_sections($this->_o_page['id']);
        ?>
				<?php 
        submit_button();
        ?>
			</form>
	
		</div><!-- /.wrap -->
	<?php 
    }
開發者ID:kreapress,項目名稱:Jelli,代碼行數:29,代碼來源:settings.php

示例11: render_example_media

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

		<h2>Example Media Page</h2>

		<?php 
    settings_errors();
    ?>

		<form method="post" action="<?php 
    echo esc_url(admin_url('options.php'));
    ?>
">
			<?php 
    settings_fields(get_settings_page_slug());
    // the nonce, action, etc
    do_settings_sections(get_settings_page_slug());
    // the actual fields
    submit_button();
    ?>
		</form>

	</div>
<?php 
}
開發者ID:cmmarslender,項目名稱:image-select,代碼行數:27,代碼來源:options-api-example.php

示例12: settings_page

    /**
     * Draw the content of the settings page in WP admin
     */
    public function settings_page()
    {
        ?>

		<div class="wrap">
			<div id="icon-themes" class="icon32"></div>
			<h2><?php 
        _e('Block user logins settings', 'block-user-login');
        ?>
</h2>

			<?php 
        settings_errors();
        ?>

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

				<?php 
        do_action("block_login_display_settings_sections");
        ?>

				<?php 
        submit_button();
        ?>
			</form>

		</div>

		<?php 
    }
開發者ID:uprise10,項目名稱:wp-block-admin-login,代碼行數:33,代碼來源:class-settings.php

示例13: render_form

 /**
  * Renders the widget form.
  *
  * It iterates through all the sections belonging to this widget and calls each one's `render()` function.
  *
  * If no sections are available for this widget, the function will try to call the widget callback function to generate the output.
  *
  * @since 0.5.0
  * @param array $widget_options the widget's widget options with their current values
  */
 public function render_form($widget_options)
 {
     //TODO: of course the following does not work; create manual errors here
     settings_errors($this->slug);
     /**
      * This action can be used to display additional content on top of this widget form.
      *
      * @since 0.5.0
      * @param string the slug of the current widget
      * @param array the arguments array for the current widget
      */
     do_action('wpwd_widget_form_before', $this->slug, $this->args);
     if (count($children = $this->get_children()) > 0) {
         foreach ($children as $section) {
             echo '<div class="wpwd-form-section">';
             $section->render($widget_options, $this);
             echo '</div>';
         }
     } elseif ($this->args['form_callback'] && is_callable($this->args['form_callback'])) {
         call_user_func($this->args['form_callback']);
     } else {
         App::doing_it_wrong(__METHOD__, sprintf(__('There are no sections to display for widget %s. Either add some or provide a valid callback function instead.', 'widgets-definitely'), $this->slug), '0.5.0');
     }
     /**
      * This action can be used to display additional content at the bottom of this widget form.
      *
      * @since 0.5.0
      * @param string the slug of the current widget
      * @param array the arguments array for the current widget
      */
     do_action('wpwd_widget_form_after', $this->slug, $this->args);
 }
開發者ID:felixarntz,項目名稱:widgets-definitely,代碼行數:42,代碼來源:Widget.php

示例14: create_admin_page

    public function create_admin_page()
    {
        // $this->options = get_option($name . '_option_name');
        ?>
		<div class="wrap">
			<h2><?php 
        echo $this->options['title'];
        ?>
</h2>
			<?php 
        if (isset($this->options['description'])) {
            echo '<p>' . $this->options['description'] . '</p>';
        }
        ?>
			<?php 
        settings_errors();
        ?>

			<form method="post" action="options.php">
				<?php 
        settings_fields($this->options['name'] . '_option_group');
        do_settings_sections($this->options['name']);
        submit_button();
        ?>
			</form>
		</div>
	<?php 
    }
開發者ID:Patreo,項目名稱:yonk,代碼行數:28,代碼來源:Class_Option_Page.php

示例15: master_plugin_display

/**
 * Renders a simple page to display for the plugin menu defined above.
 */
function master_plugin_display()
{
    ?>
    <!-- Create a header in the default WordPress 'wrap' container -->
    <div class="wrap">
    	<h2><?php 
    _e('master plugin Options', 'master');
    ?>
</h2>
    		<?php 
    settings_errors();
    ?>
    		<form method="post" action="options.php">
    	    <?php 
    settings_fields(SITE_OPT);
    do_settings_sections(SITE_OPT);
    submit_button();
    ?>
    		</form>
    		
    		<form method="post" action="options.php">
    		<?php 
    settings_fields(POST_OPT);
    do_settings_sections(POST_OPT);
    submit_button();
    ?>
    		</form>
    </div>
    <!-- /.wrap -->
<?php 
}
開發者ID:sp4x,項目名稱:wp_push,代碼行數:34,代碼來源:settings.php


注:本文中的settings_errors函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。