public function menu_html()
    {
        echo '<h1>' . get_admin_page_title() . '</h1>';
        ?>

        <form method="post" action="options.php">
            <?php 
        settings_fields('thfo_newsletter_settings');
        ?>
            <?php 
        do_settings_sections('thfo_newsletter_settings');
        ?>
            <?php 
        submit_button(__('Save'));
        ?>


        </form>

        <form method="post" action="">
            <input type="hidden" name="send_newsletter" value="1"/>
            <?php 
        submit_button(__('Send', 'wp-post-updated'));
        ?>
        </form>

        <?php 
    }
Example #2
0
    public function menu_html()
    {
        global $wpdb;
        echo '<h1>' . get_admin_page_title() . '</h1>';
        ?>
        <form method="post" action="">
        <?php 
        settings_fields('poll_settings');
        // Section comprenant les éléments du formulaire
        do_settings_sections('poll_settings');
        // Récupération des propositions de réponse en BDD
        $elements = $wpdb->get_results('SELECT id, label FROM ' . $wpdb->prefix . 'poll_options ORDER BY label;');
        if ($elements) {
            foreach ($elements as $element) {
                echo '<input type="text" name="' . $element->id . '" value="' . $element->label . '" /><br />';
            }
        }
        submit_button();
        // Bouton d'envoi du formulaire
        ?>
        </form>

        <form method="post" action="">
		    <input type="hidden" name="poll_reset" value="1"/>
		    <?php 
        submit_button(__('Réinitialiser les options et les résultats'));
        ?>
		</form>
	    <?php 
    }
Example #3
0
    public function menu_html()
    {
        echo '<h1>' . get_admin_page_title() . '</h1>';
        ?>
            <form method="post" action="options.php">
            <?php 
        settings_fields('wpdoli_settings');
        ?>
            <?php 
        do_settings_sections('wpdoli_settings');
        ?>
            <?php 
        submit_button();
        ?>
            </form>	
            <form method="post" action="">
            <input type="hidden" name="wpdoli_settings_test_webservice" value="1"/>
            <?php 
        if ($this->testlabel) {
            ?>
            <span>Test de dolibarr: <?php 
            echo $this->testlabel;
            ?>
</span>
            <?php 
        }
        ?>
            <?php 
        submit_button('Testez le webservice');
        ?>
            </form>
            <?php 
    }
    public function init()
    {
        ?>
        <h1><?php 
        echo get_admin_page_title();
        ?>
</h1>
        
        <?php 
        $price = filter_input(INPUT_GET, 'price');
        if (isset($price) && $price == 'invalid') {
            echo '<div id="message" class="notice notice-error is-dismissible"><p>Invalid file extension. Please use *.csv file.</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
        }
        if (isset($price) && $price == 'updated') {
            echo '<div id="message" class="updated notice notice-success is-dismissible"><p>Prices updated successfully</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
        }
        ?>

        <form method="post" action="<?php 
        echo admin_url('admin.php?page=' . $this->page . '&action=update_prices');
        ?>
" enctype="multipart/form-data">
            <p>
                <input type="file" name="update_prices">
            </p>
            <p>
                <input type="submit" value="Update Prices" class="button button-primary">
            </p>
        </form>

        <p><em><strong>NOTE:</strong> Please upload the file with *.csv extension and data should be separated by comma (,)</em></p>

        <?php 
    }
    public function init()
    {
        ?>
		<h1><?php 
        echo get_admin_page_title();
        ?>
</h1>
		<?php 
        $import = filter_input(INPUT_GET, 'import');
        if (isset($import) && $import == 'invalid') {
            echo '<div id="message" class="notice notice-error is-dismissible"><p>Invalid file extension. Please use *.csv file.</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
        }
        if (isset($import) && $import == 'success') {
            echo '<div id="message" class="updated notice notice-success is-dismissible"><p>file imported successfully</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
        }
        ?>
		<form method="post"
		      action="<?php 
        echo admin_url('admin.php?page=' . $this->page . '&action=import_combos');
        ?>
"
		      enctype="multipart/form-data">
			<p>
				<input type="file" name="import_combos">
			</p>
			<p>
				<input type="submit" value="Import Fabrics" class="button button-primary">
			</p>
		</form>
		<?php 
    }
function my_plugin_options()
{
    echo '<h1>' . get_admin_page_title() . '</h1>';
    ?>


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

<?php 
    wp_nonce_field('update-options');
    ?>
<p><?php 
    _e('Number of characters displayed before the break ( " read more " ) :', 'plugincomments_textdomain');
    ?>
</p>
<input type="text" name="option1" id="option1" value="<?php 
    echo get_option('option1');
    ?>
">

<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="option1" />
<br/>
<input type="submit" value="<?php 
    _e('Save Changes', 'plugincomments_textdomain');
    ?>
" />
</form>



<?php 
}
/**
 * Build the options page
 */
function viktorr1975_options_page()
{
    ?>
      <div class="wrap">         
          <h2> <?php 
    echo esc_html(get_admin_page_title());
    ?>
</h2>           
          <div id="poststuff">
               <div id="post-body">
                    <div id="post-body-content">
                         <form method="POST" action="options.php">
                              <?php 
    settings_fields('viktorr1975_options');
    // скрытые защитные поля
    do_settings_sections('viktorr1975_options');
    //выводим секцию с опциями
    submit_button();
    ?>
                         </form>
                    </div> <!-- end post-body-content -->
               </div> <!-- end post-body -->
          </div> <!-- end poststuff -->
     </div>
<?php 
}
function remove_stop_words_admin()
{
    ?>
	<div class="wrap">
	<?php 
    screen_icon();
    ?>
	<h2><?php 
    echo esc_html(get_admin_page_title());
    ?>
</h2>
	<p>You can use a predefined list of stop words from <a href="http://kaneandre.ws/wp-content/uploads/stop-words.txt">here</a>.</p>
	<form method="post" action="options.php">
        <?php 
    settings_fields('remove_stop_words');
    ?>
        <table class="form-table">
            <tr valign="top">
                <th scope="row">Word list (comma separated)</th>
                <td><textarea rows="4" cols="50" name="remove_stop_words"/><?php 
    echo sanitize_text_field(get_option('remove_stop_words'));
    ?>
 </textarea> </td>
            </tr>
        </table>
        <?php 
    submit_button();
    ?>
    </form>
</div>
<?php 
}
    /**
     * Admin page markup. Mostly handled by CMB2
     * @since  0.1.0
     */
    public function admin_page_display()
    {
        ?>
		<div class="wrap cmb2-options-page <?php 
        echo $this->key;
        ?>
">
			<h2><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h2>
			<?php 
        cmb2_metabox_form($this->metabox_id, $this->key);
        ?>
      <hr />
			<h2><?php 
        echo $this->ads_title;
        ?>
</h2>
			<?php 
        cmb2_metabox_form($this->ads_metabox_id, $this->key);
        ?>
		</div>
		<?php 
    }
Example #10
0
    /**
     * Callback for displaying the Genesis Readme admin page.
     *
     * Checks if the file contents are readable, and echoes out HTML.
     *
     * @since 1.3.0
     *
     * @uses CHILD_DIR
     */
    public function admin()
    {
        /** Assume we cannot find the file */
        $file = false;
        /** Get the file contents */
        $file = @file_get_contents(CHILD_DIR . '/README.txt');
        /** If we can't find file contents, show a message */
        if (!$file || empty($file)) {
            $file = '<div class="error"><p>' . sprintf(__('The %s file was not found in the child theme, or it was empty.', 'genesis'), '<code>README.txt</code>') . '</p></div>';
        }
        ?>
		<div id="genesis-readme-file" class="wrap">
			<?php 
        screen_icon('edit-pages');
        ?>
			<h2><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h2>
			<?php 
        echo wpautop($file);
        ?>
		</div>
		<?php 
    }
Example #11
0
 /**
  * Human-readable title of the page.
  *
  * @return string
  */
 public function getTitle()
 {
     if (!isset($this->title)) {
         $this->title = html_entity_decode(get_admin_page_title(), ENT_QUOTES);
     }
     return $this->title;
 }
    /**
     * Admin page markup. Mostly handled by CMB2
     * @since  0.1.0
     */
    public function admin_page_display()
    {
        ?>
		<div class="wrap cmb2-options-page <?php 
        echo $this->key;
        ?>
">
			<div id="poststuff"> 
	            <div id="post-body" class="metabox-holder columns-<?php 
        echo 1 == get_current_screen()->get_columns() ? '1' : '2';
        ?>
">	 
	                <div id="post-body-content">
						<h2><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h2>
						<?php 
        cmb2_metabox_form($this->metabox_id, $this->key, array('cmb_styles' => false));
        ?>
					</div>
					<div id="postbox-container-1" class="postbox-container">
					    <?php 
        do_meta_boxes('', 'side', null);
        ?>
					</div>
				</div>
			</div>
			
		</div>
		
		<?php 
    }
Example #13
0
    public function menu_html()
    {
        echo '<h1>' . get_admin_page_title() . '</h1>';
        ?>
			<form method="post" action="options.php">
				<?php 
        settings_fields('greg_newsletter_settings');
        ?>
				
				<!-- activation de l'affichage de la section -->
				<?php 
        do_settings_sections('greg_newsletter_settings');
        ?>
				
				<!-- bouton submit -->
				<?php 
        submit_button();
        ?>
			</form>
			<form method="post" action="">
				<input type="hidden" name="send_newsletter" value="1"/>
				<?php 
        submit_button('Envoyer la newsletter');
        ?>
			</form>
		<?php 
    }
Example #14
0
    /**
     * Generates the header for admin pages
     *
     * @param bool   $form             Whether or not the form start tag should be included.
     * @param string $option           The short name of the option to use for the current page.
     * @param bool   $contains_files   Whether the form should allow for file uploads.
     * @param bool   $option_long_name Group name of the option.
     */
    public function admin_header($form = true, $option = 'wpseo', $contains_files = false, $option_long_name = false)
    {
        if (!$option_long_name) {
            $option_long_name = WPSEO_Options::get_group_name($option);
        }
        ?>
		<div class="wrap wpseo-admin-page page-<?php 
        echo $option;
        ?>
">
		<?php 
        /**
         * Display the updated/error messages
         * Only needed as our settings page is not under options, otherwise it will automatically be included
         * @see settings_errors()
         */
        require_once ABSPATH . 'wp-admin/options-head.php';
        ?>
		<h1 id="wpseo-title"><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h1>
		<div class="wpseo_content_wrapper">
		<div class="wpseo_content_cell" id="wpseo_content_top">
		<?php 
        if ($form === true) {
            $enctype = $contains_files ? ' enctype="multipart/form-data"' : '';
            echo '<form action="' . esc_url(admin_url('options.php')) . '" method="post" id="wpseo-conf"' . $enctype . ' accept-charset="' . esc_attr(get_bloginfo('charset')) . '">';
            settings_fields($option_long_name);
        }
        $this->set_option($option);
    }
 function admin_settings()
 {
     echo '<div class="wrap"><h1>' . get_admin_page_title() . '</h1>';
     $count_methods = array('public' => array('name' => __('Top %s posts', 'wpupostviews'), 'orig' => false), 'orig' => array('name' => __('Real top %s posts', 'wpupostviews'), 'orig' => true));
     foreach ($count_methods as $method) {
         $top_posts = $this->get_top_posts(false, $method['orig']);
         if (!empty($top_posts)) {
             echo '<hr />';
             echo '<h2>' . sprintf($method['name'], $this->options['default_top']) . '</h2>';
             echo '<ol>';
             foreach ($top_posts as $tp) {
                 echo '<li><a href="' . get_edit_post_link($tp->ID) . '"><strong>' . esc_attr($tp->post_title) . '</strong></a> (' . get_post_meta($tp->ID, 'wpupostviews_' . ($method['orig'] ? 'orig_' : '') . 'nbviews', 1) . ')</li>';
             }
             echo '</ol>';
         }
     }
     echo '<hr />';
     echo '<h2>' . __('Settings') . '</h2>';
     echo '<form action="options.php" method="post">';
     settings_fields($this->settings_details['option_id']);
     do_settings_sections($this->options['plugin_id']);
     echo submit_button(__('Save Changes', 'wpupostviews'));
     echo '</form>';
     echo '</div>';
 }
Example #16
0
    static function callbackPage()
    {
        ?>
        <form action="options.php" method="post">

            <?php 
        settings_fields(self::$nameGroup);
        self::$options = get_option(self::$nameClass);
        ?>
            <h2><div class="dashicons dashicons-text"></div> <?php 
        echo get_admin_page_title();
        ?>
</h2>

            <label for="titulo">Título</label>
            <input type="text" id="titulo" class="text" name="<?php 
        echo self::$nameClass . '[welcome_title]';
        ?>
" value="<?php 
        echo htmlspecialchars(self::$options['welcome_title']);
        ?>
" />

            <?php 
        submit_button();
        ?>

        </form>
<?php 
    }
Example #17
0
    /**
     * Admin page markup. Mostly handled by CMB
     */
    public function admin_page_display()
    {
        $option_tabs = self::option_fields();
        $tab_forms = [];
        ?>
		<div class="wrap cmb_options_page <?php 
        echo $this->key;
        ?>
">
			<h2><i class="fa fa-globe"></i> <?php 
        echo esc_html(get_admin_page_title());
        ?>
</h2>

			<h2 class="nav-tab-wrapper">
				<?php 
        foreach ($option_tabs as $option_tab) {
            $tab_slug = $option_tab['id'];
            $nav_class = 'nav-tab';
            if ($tab_slug == $_GET['page']) {
                $nav_class .= ' nav-tab-active';
                $tab_forms[] = $option_tab;
            }
            ?>
					<a class="<?php 
            echo $nav_class;
            ?>
"
					   href="<?php 
            menu_page_url($tab_slug);
            ?>
"><?php 
            esc_attr_e($option_tab['title']);
            ?>
</a>
				<?php 
        }
        ?>
			</h2>


			<?php 
        foreach ($tab_forms as $tab_form) {
            //render all tab forms (normaly just 1 form)
            ?>
				<div id="<?php 
            esc_attr_e($tab_form['id']);
            ?>
" class="group">
					<?php 
            cmb2_metabox_form($tab_form, $tab_form['id']);
            ?>
				</div>
			<?php 
        }
        ?>
		</div>
		<?php 
    }
Example #18
0
    public function menu_html()
    {
        /* page d'accueil administartion du plugin */
        echo '<h1>' . esc_html(get_admin_page_title()) . '</h1>';
        ?>
		<form method="post" action="options.php">

			<!-- un premier champs permettant l'insertion du parametre directement dans la table wp_options via le fichier options.php en ajoutant ce champs dans le groupe d'option -->
			<?php 
        settings_fields('poll_settings');
        ?>
			<p>
				<label for="poll_question"><?php 
        _e('Question :');
        ?>
</label>
				<input type="text" name="poll_question" value="<?php 
        echo get_option('poll_question');
        ?>
" /><br />
			</p>
			<?php 
        /* on recupere l'objet $wpdb representant la connexion a la BDD */
        global $wpdb;
        /* on selectionne toute les options de reponse dans la table poll_options */
        $results = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}poll_options");
        /* puis on affiche les resultats */
        foreach ($results as $result) {
            ?>
					<input type="text" value="<?php 
            echo $result->label;
            ?>
" /><br />
				<?php 
        }
        ?>

			<!-- on ajoute un champs pour ajouter une nouvelle reponse que l'on recupere dans la fonction reponse() -->
			<p>
				<label for="poll_new_reponse"><?php 
        _e('Ajouter une nouvelle réponse :');
        ?>
</label>
				<input type="text" name="poll_new_reponse" />
			</p>
			<?php 
        submit_button('Enregistrer les modifications');
        ?>
		</form>
		<form method="post" action="" >
			<input type="hidden" value="salut" name="raz" />
			<?php 
        submit_button('Réinitialiser les options et les resultats');
        ?>
		</form>
	<?php 
    }
 function admin_menu_cb()
 {
     if ($_POST && check_admin_referer('n9m-fa')) {
         $settings = array();
         switch ($_POST['n9m_location']) {
             case 'local':
             case 'maxcdn':
             case 'none':
                 $settings['stylesheet'] = $_POST['n9m_location'];
                 break;
             case 'other':
                 $settings['stylesheet'] = 'other';
                 $settings['stylesheet_location'] = sanitize_text_field($_POST['n9m_location-other-location']);
                 break;
         }
         if (isset($_POST['n9m_text_spacing'])) {
             $settings['spacing'] = 1;
         } else {
             $settings['spacing'] = 0;
         }
         update_option('n9m-font-awesome-4-menus', $settings);
         print '<div class="updated"><p>Your settings have been saved!</p></div>';
     }
     $settings = get_option('n9m-font-awesome-4-menus', $this->defaults);
     print ' <div class="wrap">
                 <h2><i class="fa fa-thumbs-o-up"></i> ' . get_admin_page_title() . '</h2>
                 <p>Thank you for using Font Awesome 4 Menus by <a href="http://www.newnine.com" target="_blank">New Nine</a>! To view available icons, <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">click here to visit the Font Awesome website</a>.</p>
                 <form action="' . admin_url('options-general.php?page=n9m-font-awesome-4-menus') . '" method="post">
                     <h3>Font Awesome Stylesheet</h3>
                     <p>Select how you want Font Awesome 4&#8217;s stylesheet loaded on your site (if at all):</p>
                     <table class="form-table">
                         <tbody>
                             <tr>
                                 <th scope="row">Load Font Awesome 4 From:</th>
                                 <td>
                                     <fieldset>
                                         <legend class="screen-reader-text"><span>Load Font Awesome 4 From</span></legend>
                                         <label for="n9m_location-local"><input type="radio" name="n9m_location" id="n9m_location-local" value="local"' . ('local' == $settings['stylesheet'] ? ' checked' : false) . '> Local plugin folder (default)</label>
                                         <br />
                                         <label for="n9m_location-maxcdn"><input type="radio" name="n9m_location" id="n9m_location-maxcdn" value="maxcdn"' . ('maxcdn' == $settings['stylesheet'] ? ' checked' : false) . '> Official Font Awesome CDN <span class="description">(<a href="http://www.bootstrapcdn.com/#fontawesome_tab" target="_blank">Bootstrap CDN powered by MaxCDN</a>)</span></label>
                                         <br />
                                         <label for="n9m_location-other"><input type="radio" name="n9m_location" id="n9m_location-other" value="other"' . ('other' == $settings['stylesheet'] ? ' checked' : false) . '> A custom location:</label> <input type="text" name="n9m_location-other-location" id="n9m_location-other-location" placeholder="Enter full url here" class="regular-text" value="' . (isset($settings['stylesheet_location']) ? $settings['stylesheet_location'] : '') . '">
                                         <br />
                                         <label for="n9m_location-none"><input type="radio" name="n9m_location" id="n9m_location-none" value="none"' . ('none' == $settings['stylesheet'] ? ' checked' : false) . '>Don&#8217;t load Font Awesome 4&#8217;s stylesheet <span class="description">(use this if you load Font Awesome 4 elsewhere on your site)</span></label>
                                     </fieldset>
                                 </td>
                             </tr>
                         </tbody>
                     </table>
                     <h3>Icon Spacing</h3>
                     <p>By default, Font Awesome 4 Menus adds a space before or after the icon in your menu. Uncheck the box below to remove this space and give you finer control over your custom styling.</p>
                     <p><label for="n9m_text_spacing"><input type="checkbox" name="n9m_text_spacing" id="n9m_text_spacing" value="1"' . (1 == $settings['spacing'] ? ' checked' : false) . '> Keep the space between my text and my icons <span class="description">(default is checked)</span></label>
                     <p>' . wp_nonce_field('n9m-fa') . '<button type="submit" class="button button-primary">Save Settings</button></p>
                 </form>
             </div>';
 }
    /**
     * The Custom CSS appearance page
     *
     * @since 1.0.0
     */
    public function custom_css_editor_page()
    {
        $custom_css_default = __('/*
Welcome to the Custom CSS editor!

Please add all your custom CSS here and avoid modifying the core theme files, since that\'ll make upgrading the theme problematic. Your custom CSS will be loaded after the theme\'s stylesheets, which means that your rules will take precedence. Just add your CSS here for what you want to change, you don\'t need to copy all the theme\'s style.css content.
*/', 'ward');
        $custom_css = get_option('ward_custom_css', $custom_css_default);
        ?>
		<div class="wrap">
			<?php 
        screen_icon();
        ?>
			<h2><?php 
        echo get_admin_page_title();
        ?>
</h2>
			<?php 
        if (!empty($_GET['settings-updated'])) {
            echo '<div id="message" class="updated"><p><strong>' . __('Custom CSS updated.', 'ward') . '</strong></p></div>';
        }
        ?>

	        <p><?php 
        printf(__('If you\'re new to CSS, start with a %sbeginner tutorial%s.', 'ward'), '<a href="http://www.htmldog.com/guides/cssbeginner/">', '</a>');
        ?>
</p>

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

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

	            <div id="custom_css_container">
		            <div name="ward_custom_css" id="ward_custom_css" style="border: 1px solid #DFDFDF; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; width: 100%; height: 400px; position: relative;">
	    	        </div>
	    	    </div>

	            <textarea id="custom_css_textarea" name="ward_custom_css" style="display: none;"><?php 
        echo $custom_css;
        ?>
</textarea>

	   			<p><input type="submit" class="button-primary" value="<?php 
        _e('Save Changes', 'ward');
        ?>
" /></p>

	        </form>

	    </div>
	<?php 
    }
Example #21
0
    /**
     * Renders the markup.
     *
     * @since 3.0.0
     *
     * @return void
     */
    public function render()
    {
        $this->asset_manager->enqueue_style('multilingualpress-admin');
        $action = PluginSettingsUpdater::ACTION;
        ?>
		<div class="wrap">
			<h1><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h1>
			<form method="post" action="<?php 
        echo admin_url("admin-post.php?action={$action}");
        ?>
"
				id="multilingualpress-modules">
				<?php 
        echo \Inpsyde\MultilingualPress\nonce_field($this->nonce);
        ?>
				<table class="mlp-module-list">
					<?php 
        foreach ($this->module_manager->get_modules() as $id => $module) {
            /**
             * Filters if the module should be listed on the settings page.
             *
             * @since 3.0.0
             *
             * @param bool $show_module Whether or not the module should be listed on the settings page.
             */
            if (apply_filters("multilingualpress.show_module_{$id}", true)) {
                $this->render_module($module);
            }
        }
        /**
         * Fires at the end of but still inside the module list on the settings page.
         *
         * @since 3.0.0
         */
        do_action('multilingualpress.in_module_list');
        ?>
				</table>
				<?php 
        /**
         * Fires right after after the module list on the settings page.
         *
         * @since 3.0.0
         */
        do_action('multilingualpress.after_module_list');
        submit_button(__('Save Changes', 'multilingual-press'));
        ?>
			</form>
		</div>
		<?php 
    }
Example #22
0
 /**
  * WP action callback
  * @return void
  */
 public function actionAdminNotices()
 {
     if (!WPML::get('isCompatible')) {
         $plugin_title = get_admin_page_title();
         echo '<div class="error">';
         echo sprintf(WPML::__('<p>Error - The plugin <strong>%1$s</strong> requires PHP %2$s + and WP %3$s +.' . '  Please upgrade your PHP and/or WordPress.' . '<br/>Disable the plugin to remove this message.</p>'), $plugin_title, WPML::get('minPhpVersion'), WPML::get('minWpVersion'));
         echo '</div>';
     }
     if (isset($_GET['page']) && $_GET['page'] === WPML::get('adminPage') && is_plugin_active('email-encoder-bundle/email-encoder-bundle.php')) {
         WPML_View::factory('/admin/notices.php')->show();
     }
 }
 /**
  * Generic function to output a simple settings form.
  *
  * @since 1.0.0
  */
 public function do_simple_settings_form()
 {
     echo '<div class="wrap">';
     echo '<h1>' . esc_attr(get_admin_page_title()) . '</h1>';
     echo '<form action="options.php" method="post">';
     settings_fields($this->page);
     do_settings_sections($this->page);
     wp_nonce_field("{$this->page}_save-settings", "{$this->page}_nonce", false);
     submit_button();
     echo '</form>';
     echo '</div>';
 }
Example #24
0
 /**
  * Generate header HTML.
  * @access  public
  * @since   1.0.0
  * @return  void
  */
 public function get_header($token = 'ud-license-manager')
 {
     global $current_screen;
     do_action('ud_licenses_screen_before', $token);
     $html = '<div class="wrap ud-licenses-wrap">' . "\n";
     $html .= '<h2 class="ud-licenses-title">' . get_admin_page_title() . '</h2>' . "\n";
     $html .= '<h2 class="nav-tab-wrapper">' . "\n";
     $html .= $this->get_navigation_tabs();
     $html .= '</h2>' . "\n";
     echo $html;
     do_action('ud_licenses_screen_header_before_content', $token);
 }
Example #25
0
    public function init()
    {
        ?>
		
	   
	   <h1><?php 
        echo get_admin_page_title();
        ?>
</h1>

        <?php 
        $this->notify('Settnigs');
        ?>

        <div class="col-left">
            <form method="post" action="options.php">
                <?php 
        settings_fields('atq_settings');
        ?>
	   <div class="form-field">
	   <label for="atq_header">Header</label>
	   <textarea name="atq_settings[atq_header]" id="atq_header" value="<?php 
        echo $this->setting->atq_header;
        ?>
" ></textarea>
	   </div>

	   <div class="form-field">
	   <label for="atq_footer"> Footer</label>
	   <textarea name="atq_settings[atq_footer]" id="atq_footer" value="<?php 
        echo $this->setting->atq_footer;
        ?>
" ></textarea>
	   	</div>

	   	<label for="atq_mail"> Email</label>
	   <input type="text" name="atq_settings[atq_mail]" id="atq_mail" value="<?php 
        echo $this->setting->atq_mail;
        ?>
">
	   	</div>

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



   <?php 
    }
Example #26
0
    /**
     * Admin page markup. Mostly handled by CUSTO
     * @since  0.1.0
     */
    public function admin_page_display()
    {
        ?>
		<div class="wrap custo-options-page <?php 
        echo $this->key;
        ?>
">
			<h1><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h1>

			<?php 
        $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'general';
        ?>
         
	        <h2 class="nav-tab-wrapper">
	            <a href="?page=custo_options&tab=general" class="nav-tab <?php 
        echo $active_tab == 'general' ? 'nav-tab-active' : '';
        ?>
">General Options</a>
	            <a href="?page=custo_options&tab=frontpage" class="nav-tab <?php 
        echo $active_tab == 'frontpage' ? 'nav-tab-active' : '';
        ?>
">Frontpage Options</a>
	            <a href="?page=custo_options&tab=contact" class="nav-tab <?php 
        echo $active_tab == 'contact' ? 'nav-tab-active' : '';
        ?>
">Contact Options</a>
	            <a href="?page=custo_options&tab=footer" class="nav-tab <?php 
        echo $active_tab == 'footer' ? 'nav-tab-active' : '';
        ?>
">Footer Options</a>
	        </h2>
			<?php 
        if ($active_tab == 'general') {
            echo '<h3>General Settings</h3>';
            cmb2_metabox_form('general_option_metabox', $this->key, array('cmb_styles' => true));
        } elseif ($active_tab == 'frontpage') {
            echo '<h3>Frontpage Settings</h3>';
            cmb2_metabox_form('frontpage_option_metabox', $this->key, array('cmb_styles' => true));
        } elseif ($active_tab == 'contact') {
            echo '<h3>Contact Us Settings</h3>';
            cmb2_metabox_form('contact_option_metabox', $this->key, array('cmb_styles' => true));
        } else {
            echo '<h3>Footer Settings</h3>';
            cmb2_metabox_form('footer_option_metabox', $this->key, array('cmb_styles' => true));
        }
        ?>
		</div>
		<?php 
    }
function entry_ease_divide_output_settings_page()
{
    echo '<div id="themes-options-wrap" class="wrap">' . "\n";
    echo '<h2>' . esc_html(get_admin_page_title()) . '</h2>' . "\n";
    echo '<form method="post" action="options.php">' . "\n";
    settings_fields('entry_ease_divide_output');
    do_settings_sections('entry_ease_divide_output');
    echo '<div class="submit">' . "\n";
    submit_button();
    echo '</div>' . "\n";
    echo '</form>' . "\n";
    echo '</div>' . "\n";
}
Example #28
0
    public static function proccess_upgrades()
    {
        ?>
		<div class="wrap">
			<h2><?php 
        echo get_admin_page_title();
        ?>
</h2>
			<p><?php 
        _e('The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished...', 'dwqa');
        ?>
</p>
			<script type="text/javascript">
			jQuery(document).ready(function($) {
				function dwqaUpgradeSendRequest( restart ) {

					$.ajax({
						url: '<?php 
        echo admin_url('admin-ajax.php');
        ?>
',
						type: 'POST',
						dataType: 'json',
						data: {
							action: 'dwqa-upgrades',
							restart: restart,
						},
					})
					.done(function( resp ) {
						if ( resp.success ) {
							if ( resp.data.finish ) {
								document.location.href = '<?php 
        echo admin_url();
        ?>
';
							} else {
								dwqaUpgradeSendRequest( 0 );
							}
						} else {
							console.log( resp.message );
						}
					});
				}

				dwqaUpgradeSendRequest( 1 );
				
			});
			</script>
		</div>
		<?php 
    }
 /**
  * create settings form
  * @return form Easy Changelog settings
  *
  * @since  1.0.0
  */
 public function do_settings_form()
 {
     $page_title = get_admin_page_title();
     echo '<div class="wrap">';
     echo '<h2>' . esc_attr($page_title) . '</h2>';
     echo '<form action="options.php" method="post">';
     settings_fields('easychangelog');
     do_settings_sections('easychangelog');
     wp_nonce_field('easychangelog_save-settings', 'easychangelog_nonce', false);
     submit_button();
     settings_errors();
     echo '</form>';
     echo '</div>';
 }
    function nmp_settings_page()
    {
        echo '<div class="wrap">';
        echo '<h1>' . get_admin_page_title() . '</h1>';
        ?>
        <form action="options.php" method="post">

            <?php 
        settings_fields('nmp_plugin_setting');
        ?>
            <table width="50%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 18px;">
                <tr>
                    <td><h4><label><?php 
        _e('Delimiters Limit', 'no-markup-please');
        ?>
</label></h4></td>
                    <td><input type="number" name="nmp_delimiters_limit" value="<?php 
        echo get_option('nmp_delimiters_limit');
        ?>
"></td>
                </tr>
                <tr>
                    <td></td>
                    <td style="padding:0 0 30px"><em><?php 
        _e('Set the number of <a href="http://php.net/manual/en/regexp.reference.delimiters.php" target="_blank">delimiters</a> you will allow in comments before triggering the error message below.', 'no-markup-please');
        ?>
</em></td>
                </tr>
                <tr>
                    <td style="padding:0 0 30px"><h4><label><?php 
        _e('Error Message', 'no-markup-please');
        ?>
</label></h4></td>
                    <td style="padding:0 0 30px"><textarea name="nmp_error_message" style="width:100%; height:150px; padding:10px; resize:none " ><?php 
        echo get_option('nmp_error_message');
        ?>
</textarea></td>
                </tr>
                <tr>
                    <td><input type="submit" value="<?php 
        _e('Save Changes', 'no-markup-please');
        ?>
" name="submit" id="submit" class="button button-primary"></td>
                </tr>
            </table>
        </form>
        <?php 
        echo '</div>';
    }