/** * 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 }
/** * 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 }
/** * 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 }
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 }
/** * 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>'; }
/** * 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(); }
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 }
/** * 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 }
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 } }
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 }
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 }
/** * 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 }
/** * 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); }
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 }
/** * 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 }
/** * 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(); }
/** * @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 }
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 }
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 }
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'); }
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 }
public function display_plugin_admin_page() { ?> <div class="wrap"> <h2><?php _e('Add new template', $this->plugin_slug); ?> </h2> <?php settings_errors(); ?> <form method="post" action="options.php"> <?php settings_fields($this->option_name); do_settings_sections($this->menu_slug); submit_button(); ?> </form> <?php //RWP_Reviewer::pretty_print( $this->temp); //RWP_Reviewer::pretty_print( $this->option_value ); ?> </div><!--/wrap--> <?php }
public static function showInterface() { $theme = empty($_GET['theme']) ? '' : $_GET['theme']; $theme = wp_get_theme($theme); if (self::checkCreds()) { return; } 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(self::getLink($theme->get_stylesheet())); ?> "> <label><?php esc_html_e('Name your child theme', 'child-themify'); ?> </label><br> <input type="text" name="new_theme" /> <?php submit_button(__("Let's go!", 'child-themify')); ?> </form> </div> <?php }
function dpoo_options_page() { if (isset($_GET['settings-updated'])) { $options = get_option('dpoo_options'); add_settings_error('results', 'results', '<p>IDs updated. Full report:</p>' . "\n" . "\n" . $options['dpoo_results'], 'updated'); } ?> <div> <h2>Denver Post Ooyala/Inform video ID replacer</h2> <?php settings_errors(); ?> <form action="options.php" method="POST"> <?php settings_fields('dpoo_options'); ?> <?php do_settings_sections('dpoo'); ?> <input name="Submit" type="submit" value="<?php esc_attr_e('Replace Oyala IDs'); ?> " /> </form></div> <?php }
/** * Outputs the snippet box where a user can paste and modify a snippet. * * The textarea will be formatted by CodeMirror for code editing. * * @since 1.0.0 * * @global object $post The current post object */ public function snippet() { global $post; if (!Cwwp_Init::is_snippet_screen()) { return; } settings_errors('cwwp-snippets'); wp_nonce_field('cwwp-snips', 'cwwp-snips'); ?> <h4 class="top-title"><?php _e('Code Snippet', 'cwwp-custom-snippets'); ?> </h4> <p><?php printf(__('Paste your code snippet into the code editor below. Leave out any opening (%s) and closing (%s) php tags.', 'cwwp-custom-snippets'), '<code><strong><?php</strong></code>', '<code><strong>?></strong></code>'); ?> </p> <textarea id="cwwp-code-snippet" name="cwwp-code-snippet" spellcheck="false"><?php echo stripslashes(trim(self::get_code_snippet($post->ID))); ?> </textarea> <h4><?php _e('Code Snippet Description', 'cwwp-custom-snippets'); ?> </h4> <p><?php _e('Describe your code snippet using the editor below. Although optional, it is highly recommended to do this for future reference.', 'cwwp-custom-snippets'); ?> </p> <?php wp_editor(get_post_meta($post->ID, '_cwwp_code_snippet_desc', true), 'cwwp-code-snippet-desc', array('wpautop' => false, 'media_buttons' => false, 'teeny' => true, 'quicktags' => false, 'textarea_rows' => 4)); ?> <?php }
/** * Options page callback */ public function create_woo_product_stock_alert_settings() { global $WOO_Product_Stock_Alert; ?> <div class="wrap"> <?php $this->dc_settings_tabs(); ?> <?php $tab = isset($_GET['tab']) ? $_GET['tab'] : 'woo_product_stock_alert_general'; $this->options = get_option("dc_{$tab}_settings_name"); //print_r($this->options); // This prints out all hidden setting errors settings_errors("dc_{$tab}_settings_name"); ?> <form method="post" action="options.php"> <?php // This prints out all hidden setting fields settings_fields("dc_{$tab}_settings_group"); do_settings_sections("dc-{$tab}-settings-admin"); submit_button(); ?> </form> </div> <?php do_action('woo_product_stock_alert_dualcube_admin_footer'); }
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 }
function wptuts_admin_options_page() { ?> <!-- 'wrap','submit','icon32','button-primary' and 'button-secondary' are classes for a good WP Admin Panel viewing and are predefined by WP CSS --> <div class="wrap"> <div id="icon-themes" class="icon32"><br /></div> <h2><?php _e( 'WPTuts Options', 'wptuts' ); ?></h2> <!-- If we have any error by submiting the form, they will appear here --> <?php settings_errors( 'wptuts-settings-errors' ); ?> <form id="form-wptuts-options" action="options.php" method="post" enctype="multipart/form-data"> <?php settings_fields('theme_wptuts_options'); do_settings_sections('wptuts'); ?> <p class="submit"> <input name="theme_wptuts_options[submit]" id="submit_options_form" type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'wptuts'); ?>" /> <input name="theme_wptuts_options[reset]" type="submit" class="button-secondary" value="<?php esc_attr_e('Reset Defaults', 'wptuts'); ?>" /> </p> </form> </div> <?php }
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 }
function dpovi_options_page() { if (isset($_GET['settings-updated'])) { add_settings_error('results', 'results', '<p>Found a lot of video IDs. Copy them below.</p>', 'updated'); } ?> <div> <h2>Denver Post Video ID discoverer</h2> <?php settings_errors(); ?> <form action="options.php" method="POST"> <?php settings_fields('dpovi_options'); ?> <?php do_settings_sections('dpovi'); ?> <input name="Submit" type="submit" value="<?php esc_attr_e('Discover Video IDs'); ?> " /> </form></div> <?php }