//include the main class file
require_once "libs/admin-page-class/admin-page-class.php";
/**
 * configure your admin page
 */
$config = array('menu' => 'settings', 'page_title' => __('Public Localhost', 'apc'), 'capability' => 'edit_themes', 'option_group' => 'hwngrok_options', 'id' => 'hw_admin_page', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
/**
 * instantiate your admin page
 */
$options_panel = new BF_Admin_Page_Class($config);
$options_panel->OpenTabs_container('');
/**
 * define your admin page tabs listing
 */
$options_panel->TabsListing(array('links' => array('options_1' => __('Simple Options', 'apc'), 'options_2' => __('Fancy Options', 'apc'))));
/**
 * Open admin page first tab
 */
$options_panel->OpenTab('options_1');
/**
 * Add fields to your admin page first tab
 * 
 * Simple options:
 * input text, checbox, select, radio 
 * textarea
 */
//title
$options_panel->Title(__("For ngrok hoang plugin", "apc"));
//An optionl descrption paragraph
$options_panel->addParagraph(__("This is a simple paragraph", "apc"));
예제 #2
0
 /**
  * Build admin page
  *
  * @wp-hook plugins_loaded
  * @since   2012.12.21
  * @return  void
  */
 public function build_admin()
 {
     # Initiate the admin page
     $options_panel = new BF_Admin_Page_Class($this->config);
     $options_panel->OpenTabs_container('');
     # Define tabs listing
     $tabs_links = array('appearance' => __('Appearance', 'mtt'), 'admin_bar' => __('Admin Bar', 'mtt'), 'admin_menus' => __('Admin Menus'), 'dashboard' => __('Dashboard', 'mtt'), 'post_listing' => __('Post and Page Listing', 'mtt'), 'post_editing' => __('Post and Page Editing', 'mtt'), 'media' => __('Media', 'mtt'), 'widgets' => __('Widgets', 'mtt'), 'plugins' => __('Plugins', 'mtt'), 'user_profile' => __('Users and Profile', 'mtt'), 'shortcodes' => __('Shortcodes', 'mtt'), 'general' => __('General Settings', 'mtt'), 'login_logout' => __('Login', 'mtt'), 'maintenance' => __('Maintenance Mode', 'mtt'));
     # MS support
     if ($this->multisite) {
         $tabs_links['multisite'] = __('Multisite', 'mtt');
     }
     # Finish tabs listing
     $tabs_links['credits'] = __('Credits', 'mtt');
     $tabs_links['import_export'] = __('Import Export Reset', 'mtt');
     # Declare tabs listing
     $options_panel->TabsListing(array('links' => $tabs_links));
     # Include Admin Tabs
     $plugin_url = B5F_MTT_Init::get_instance()->plugin_url;
     foreach ($this->plugin_sections as $section) {
         require_once 'admin-tabs/' . $section . '.php';
     }
     # Special Admin Section
     require_once 'admin-tabs/credits.php';
     # Import Export Admin Tabs
     $options_panel->OpenTab('import_export');
     $options_panel->Title(__('Import Export Reset', 'mtt'));
     $options_panel->addImportExport();
     $options_panel->addParagraph("<hr><h3> Reset</h3>");
     $options_panel->addCheckboxList('mtt_reset_plugin', array('do_it' => 'Select this to reset all plugin data.'), array('name' => 'Reset all plugin data.', 'desc' => '', 'class' => 'no-toggle', 'std' => false));
     $options_panel->addCheckboxList('mtt_verbose_plugin', array('visible' => ''), array('name' => '', 'class' => 'mtt-hidden', 'desc' => '', 'std' => false));
     $options_panel->CloseTab();
     # End Admin Tabs Container
     $options_panel->CloseTab();
     # Create Admin Interface
     $this->options_class = $options_panel;
 }
예제 #3
0
function sw_optionsClass()
{
    // Fetch the Options Array - This is the sw_options filter hook
    global $sw_options;
    $sw_options = apply_filters('sw_options', $sw_options);
    // Initiate the Options Class with the config settings in the array
    $options_panel = new BF_Admin_Page_Class($sw_options['config']);
    // Open the Options Tabs Container
    $options_panel->OpenTabs_container('');
    // Execute the list of options tabs
    $options_panel->TabsListing($sw_options['tabs']);
    // Loop through the options tabs and build the options page
    foreach ($sw_options['options'] as $tabName => $tabOptions) {
        $options_panel->OpenTab($tabName);
        // Loop through and output the options for this tab
        foreach ($tabOptions as $key => $option) {
            // TITLE - Add a Title
            if ($option['type'] == 'title') {
                $options_panel->Title($option['content']);
            }
            // PARAGRAPH - Add a Paragraph of Information
            if ($option['type'] == 'paragraph') {
                $options_panel->addParagraph($option['content']);
            }
            // TEXTBOX - Add a Textbox option
            if ($option['type'] == 'textbox') {
                if (isset($option['default'])) {
                    $options_panel->addText($key, array('name' => $option['content'], 'std' => $option['default']));
                } else {
                    $options_panel->addText($key, array('name' => $option['content']));
                }
            }
            // CHECKBOX - Add a checkbox option
            if ($option['type'] == 'checkbox') {
                $options_panel->addCheckbox($key, array('name' => $option['content'], $key => $key, 'std' => $option['default']));
            }
            // SORTABLE - Add a sortable option
            if ($option['type'] == 'sortable') {
                $options_panel->addSortable($key, $option['content'], array('name' => $option['name']));
            }
            // SELECT - Add a select option
            if ($option['type'] == 'select') {
                $options_panel->addSelect($key, $option['content'], array('name' => $option['name'], 'std' => $option['default']));
            }
            // COLOROPTION - Add a color picker
            if ($option['type'] == 'colorselect') {
                $options_panel->addColor($key, array('name' => $option['name'], 'std' => $option['default']));
            }
        }
        // Close the tab and move on to the next one
        $options_panel->CloseTab();
    }
}
require_once FFL_PATH . 'includes/classes/admin-page-class/admin-page-class.php';
require_once FFL_PATH . 'includes/classes/class.AdminPageClassExtension.php';
require_once FFL_PATH . 'includes/classes/class.FrontendLogin.php';
/**
 * configure your admin page
 */
$config = array('menu' => 'settings', 'page_title' => 'Flexible Frontend Login', 'capability' => 'manage_options', 'option_group' => 'flexible_frontend_login', 'id' => 'flexible_frontend_login', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
/**
 * Initiate your admin page
 */
$options_panel = new BF_Admin_Page_Class($config);
$options_panel->OpenTabs_container('');
/**
 * define your admin page tabs listing
 */
$options_panel->TabsListing(array('links' => array('options_1' => __('Settings', 'flexible-frontend-login'), 'options_2' => __('Test', 'flexible-frontend-login'), 'options_3' => __('Help', 'flexible-frontend-login'))));
$options_panel->OpenTab('options_1');
//title
$options_panel->Title(__('General Options', 'flexible-frontend-login'));
// Subtitle
$options_panel->addParagraph('<h3>' . __('Edit plugin output to your liking.', 'flexible-frontend-login') . '</h3>');
//popup_link_text
$options_panel->addText('popup_link_text', array('name' => __('Popup Link Text', 'flexible-frontend-login'), 'std' => ''));
//vertical_position
$options_panel->addRadio('vertical_position', array('top' => __('top', 'flexible-frontend-login'), 'bottom' => __('bottom', 'flexible-frontend-login')), array('name' => __('Vertical Position', 'flexible-frontend-login'), 'std' => array('top'), 'desc' => '<small>' . __("Default is 'bottom' for a popup link in the top right corner of your site.", 'flexible-frontend-login') . '</small>'));
//horizontal_position
$options_panel->addRadio('horizontal_position', array('left' => __('left', 'flexible-frontend-login'), 'right' => __('right', 'flexible-frontend-login')), array('name' => __('Horizontal Position', 'flexible-frontend-login'), 'std' => array('left'), 'desc' => '<small>' . __("Default is 'left' for a popup link in the top right corner of your site.", 'flexible-frontend-login') . '</small>'));
// arrange_logged_in_links
/* @TODO
 * implement method to arrange the links in output.php
 * 	$options_panel->addSortable(
예제 #5
0
*/
//include the main class file
require_once "admin-page-class/admin-page-class.php";
/**
 * configure your admin page
 */
$config = array('menu' => 'settings', 'page_title' => __('Demo Admin Page', 'apc'), 'capability' => 'edit_themes', 'option_group' => 'demo_options', 'id' => 'admin_page', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
/**
 * instantiate your admin page
 */
$options_panel = new BF_Admin_Page_Class($config);
$options_panel->OpenTabs_container('');
/**
 * define your admin page tabs listing
 */
$options_panel->TabsListing(array('links' => array('options_1' => __('Simple Options', 'apc'), 'options_2' => __('Fancy Options', 'apc'), 'options_3' => __('Editor Options', 'apc'), 'options_4' => __('WordPress Options', 'apc'), 'options_5' => __('Advanced Options', 'apc'), 'options_6' => __('Field Validation', 'apc'), 'options_7' => __('Import Export', 'apc'))));
/**
 * Open admin page first tab
 */
$options_panel->OpenTab('options_1');
/**
 * Add fields to your admin page first tab
 * 
 * Simple options:
 * input text, checbox, select, radio 
 * textarea
 */
//title
$options_panel->Title(__("Simple Options", "apc"));
//An optionl descrption paragraph
$options_panel->addParagraph(__("This is a simple paragraph", "apc"));
예제 #6
0
    array_unshift($links, $settings_link);
    return $links;
}
$plugin = plugin_basename(__FILE__);
add_filter("plugin_action_links_{$plugin}", 'settings_link');
require_once 'admin-page-class/admin-page-class.php';
$config = array('menu' => 'settings', 'page_title' => 'WPIC Options', 'capability' => 'edit_themes', 'option_group' => 'wpic_options', 'id' => 'admin_page', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
/**
 * Initiate your admin page
 */
$options_panel = new BF_Admin_Page_Class($config);
/**
 * define your admin page tabs listing
 */
$options_panel->OpenTabs_container('');
$options_panel->TabsListing(array('links' => array('options_1' => __('Basic Options'))));
// Open admin page first tab with the id options_1
$options_panel->OpenTab('options_1');
/**
* Add fields to your admin page first tab
*
* Simple options:
* input text, checbox, select, radio
* textarea
*/
$data = get_option('wpic_options');
//title
$options_panel->Title('Thank you for downloading and installing this plugin! In this page you can setup your default settings for the image carousel.</br> If you are not sure what to do, or what everything in here does, check the installation tab in the plugin\'s download at page located <a href="#" target="_blank">here</a>.');
$options_panel->addParagraph('<h3>Your shortcode: </h3><a href="' . $_SERVER['PHP_SELF'] . '?page=options-general.php_wpic_options">Refresh</a> <span> [wpic color="' . $data['color'] . '" visible="' . $data['visible'] . '" width="' . $data['width'] . '" height="' . $data['height'] . '" speed="' . $data['wait'] . '" auto="' . $data['switch'] . '" ][/wpic]</span>');
//select field
$options_panel->addSelect('color', array('blue' => 'Blue', 'green' => 'Green', 'gray' => 'Gray', 'lightbrown' => 'Lightbrown', 'navy' => 'Navy', 'orange' => 'Orange', 'pink' => 'Pink', 'purple' => 'Purple', 'red' => 'Red', 'yellow' => 'Yellow'), array('name' => ' </br>Select the default color of WPIC', 'std' => array('selectkey2')));
예제 #7
0
<?php

require_once plugin_dir_path(__FILE__) . "/admin-page-class/admin-page-class.php";
$lssf_config = array('menu' => 'settings', 'page_title' => 'LS Social Feed', 'capability' => 'edit_themes', 'option_group' => 'ls_social_feed', 'id' => 'ls_social_feed', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
$lssf_options_panel = new BF_Admin_Page_Class($lssf_config);
$lssf_options_panel->OpenTabs_container('ls_social_feed');
$lssf_options_panel->TabsListing(array('links' => array('lssf_opt_fb' => __('Facebook', 'ls_social_feed'), 'lssf_opt_gplus' => __('Google+', 'ls_social_feed'), 'lssf_opt_templates' => __('Templates', 'ls_social_feed'), 'lssf_about' => __('About this plugin', 'ls_social_feed'), 'lssf_importexport' => __('Import/Export settings', 'ls_social_feed'))));
$lssf_options_panel->OpenTab('lssf_opt_fb');
$lssf_options_panel->Title(__("Facebook", "ls_social_feed"));
$lssf_options_panel->addParagraph(__("You need an active Facebook App to fetch Facebook feed.", "ls_social_feed"));
$lssf_options_panel->addText('fb_appid', array('name' => __('App ID', 'ls_social_feed'), 'std' => '', 'desc' => ''));
$lssf_options_panel->addText('fb_appsecret', array('name' => __('App Secret', 'ls_social_feed'), 'std' => '', 'desc' => ''));
$lssf_options_panel->CloseTab();
$lssf_options_panel->OpenTab('lssf_opt_gplus');
$lssf_options_panel->Title(__("Google+", "ls_social_feed"));
//$lssf_options_panel->addParagraph( __("", "ls_social_feed") );
$lssf_options_panel->addText('gplus_key', array('name' => __('Google+ API Key', 'ls_social_feed'), 'std' => '', 'desc' => ''));
$lssf_options_panel->CloseTab();
$lssf_def_template_path = plugin_dir_path(__FILE__) . '/tpl-default.html';
$lssf_def_template = @file_get_contents($lssf_def_template_path);
$lssf_options_panel->OpenTab('lssf_opt_templates');
$lssf_options_panel->Title(__("Templates", "ls_social_feed"));
$lssf_options_panel->addCode('main_template', array('name' => __('Global Template (HTML)', 'ls_social_feed'), 'syntax' => 'html', 'std' => $lssf_def_template, 'desc' => __('', 'ls_social_feed')));
$templates_help = '<h3>' . __("Template Variables", "ls_social_feed") . '</h3>';
$templates_help .= '<div><b>%%item_text%%</b> - ' . __("Feed item text", "ls_social_feed") . '</div>';
$templates_help .= '<div><b>%%item_url%%</b> - ' . __("Url to read more or url to source post", "ls_social_feed") . '</div>';
$templates_help .= '<div><b>%%att_type%%</b> - ' . __("Attachement - type", "ls_social_feed") . '</div>';
$templates_help .= '<div><b>%%att_image%%</b> - ' . __("Attachement - image url address", "ls_social_feed") . '</div>';
$templates_help .= '<div><b>%%meta_author%%</b> - ' . __("Item meta - author", "ls_social_feed") . '</div>';
$templates_help .= '<div><b>%%meta_avatar%%</b> - ' . __("Item meta - author avatar", "ls_social_feed") . '</div>';
$templates_help .= '<div><b>%%meta_date%%</b> - ' . __("Meta data - date posted", "ls_social_feed") . '</div>';