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

PHP settings_errors函数代码示例

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

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



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


示例16: bnfw_settings_page

/**
 * Settings Page
 */
function bnfw_settings_page()
{
    ob_start();
    ?>

    <div class="wrap">
        <?php 
    screen_icon();
    ?>
        <h2><?php 
    _e('BNFW Settings', 'bnfw');
    ?>
</h2>

        <form method="post" action="options.php" class="bnfw-form">
			<?php 
    settings_errors();
    settings_fields('bnfw-settings');
    do_settings_sections('bnfw-settings');
    submit_button('Save Settings');
    ?>
        </form>
    </div>

    <?php 
    echo ob_get_clean();
}
开发者ID:sagtand,项目名称:sagtand-colab,代码行数:30,代码来源:bnfw-settings.php


示例17: display

    /**
     * @param WP_Theme $theme
     */
    public function display(WP_Theme $theme)
    {
        settings_errors();
        ?>
		<div class="wrap">
			<h2><?php 
        echo esc_html(sprintf(_x('Create a child theme from %s', 'The placeholder is for a theme\'s name', 'child-themify'), $theme->name));
        ?>
</h2>

			<form method="post" action="<?php 
        echo esc_url($this->getLink($theme));
        ?>
">
				<label for="ctf_new_theme"><?php 
        esc_html_e('Name your child theme', 'child-themify');
        ?>
</label><br>
				<input type="text" name="new_theme" id="ctf_new_theme" />
				<?php 
        submit_button(__("Let's go!", 'child-themify'));
        ?>
			</form>
		</div>
		<?php 
        // End of Display
    }
开发者ID:mbrozay,项目名称:fss_frontend-old-lostdatabase,代码行数:30,代码来源:plugin.php


示例18: testimonial_rotator_settings_callback

function testimonial_rotator_settings_callback()
{
    ?>
	<div class="wrap">
	    <h2><?php 
    _e('Testimonial Rotator Settings', 'testimonial_rotator');
    ?>
</h2>

		<?php 
    settings_errors('testimonial-rotator-error-handling');
    ?>

	    <form action="options.php" method="POST">
	        <?php 
    settings_fields('testimonial_rotator_group');
    ?>
	        <?php 
    do_settings_sections('testimonial_rotator');
    ?>
	        <?php 
    submit_button();
    ?>
	    </form>
	</div>
<?php 
}
开发者ID:virendrayadav,项目名称:bigperlus,代码行数:27,代码来源:admin-settings.php


示例19: create_settings_page

    public function create_settings_page()
    {
        ?>
	<div class="wrap">
	    <?php 
        screen_icon();
        ?>
	    <h2>Mixpanel Settings</h2>		
	    <?php 
        settings_errors();
        ?>
	
	    <form method="post" action="options.php">
	    <?php 
        // This prints out all hidden setting fields
        settings_fields('mixpanel_settings_group');
        do_settings_sections('mixpanel_options');
        ?>
	        <?php 
        submit_button();
        ?>
	    </form>
	</div>
<?php 
    }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:25,代码来源:mixpanel.php


示例20: edd_ppe_admin_messages

function edd_ppe_admin_messages()
{
    if (isset($_GET['edd-message']) && 'receipt_added' == $_GET['edd-message'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-added', __('Email added.', 'edd-ppe'), 'updated');
    }
    if (isset($_GET['edd-message']) && 'receipt_add_failed' == $_GET['edd-message'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-add-fail', __('There was a problem adding your email, please try again.', 'edd-ppe'), 'error');
    }
    if (isset($_GET['edd-message']) && 'receipt_updated' == $_GET['edd-message'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-updated', __('Email updated.', 'edd-ppe'), 'updated');
    }
    if (isset($_GET['edd-message']) && 'receipt_update_failed' == $_GET['edd-message'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-updated-fail', __('There was a problem updating your email, please try again.', 'edd-ppe'), 'error');
    }
    if (isset($_GET['edd-action']) && 'send_test_email' == $_GET['edd-action'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-test-email-sent', __('Test Email Sent.', 'edd-ppe'), 'updated');
    }
    if (isset($_GET['edd-action']) && 'delete_receipt' == $_GET['edd-action'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-deleted', __('Email deleted.', 'edd-ppe'), 'updated');
    }
    if (isset($_GET['edd-action']) && 'activate_receipt' == $_GET['edd-action'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-activated', __('Email activated.', 'edd-ppe'), 'updated');
    }
    if (isset($_GET['edd-action']) && 'deactivate_receipt' == $_GET['edd-action'] && current_user_can('manage_shop_settings')) {
        add_settings_error('edd-ppe-notices', 'edd-receipt-deactivated', __('Email deactivated.', 'edd-ppe'), 'updated');
    }
    settings_errors('edd-ppe-notices');
}
开发者ID:nguyenthai2010,项目名称:ngocshop,代码行数:28,代码来源:admin-notices.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP settings_fields函数代码示例发布时间:2022-05-15
下一篇:
PHP settings2params函数代码示例发布时间: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