本文整理汇总了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
}
示例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
}
示例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
}
示例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
}
示例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> » All Pages</li>
<li> » All Posts</li>
<li> » The Site Home</li>
<li> » A Specific Page</li>
<li> » A Specific Post</li>
<li> » 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>';
}
示例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"&utm_medium=referral" target="_blank">Store</a>.', 'bnfw');
}
?>
</form>
</div>
<?php
echo ob_get_clean();
}
示例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
}
示例8: corenominal_apikey_callback
/**
* Output the page
*/
function corenominal_apikey_callback()
{
?>
<div class="wrap">
<h1>corenominal API Plugin — 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
}
示例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
}
}
示例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
}
示例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
}
示例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
}
示例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);
}
示例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
}
示例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
}