示例#1
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('init', array($this, 'setup_maintenance_mode'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_action('admin_bar_menu', array($this, 'add_info_to_admin_toolbar'), 100);
 }
示例#2
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     add_filter('bbp_forums_widget_options', array($this, 'add_widget_class'));
     add_filter('bbp_topics_widget_options', array($this, 'add_widget_class'));
     add_filter('bbp_views_widget_options', array($this, 'add_widget_class'));
     // Remove small avatars
     add_filter('bbp_after_get_reply_author_link_parse_args', array($this, 'remove_small_avatars'));
     add_filter('bbp_after_get_topic_author_link_parse_args', array($this, 'remove_small_avatars'));
     add_action('bbp_theme_before_topic_meta', array($this, 'begin_bigger_avatars'));
     add_action('bbp_theme_after_topic_meta', array($this, 'end_bigger_avatars'));
     add_action('bbp_theme_before_forum_sub_forums', array($this, 'alter_sub_forums'));
     remove_action('bbp_theme_after_forum_sub_forums', array($this, 'alter_sub_forums'));
     //add_filter( 'bbp_user_can_view_forum', array( $this, 'user_can_view_test' ), 10, 3 );
     add_filter('bbp_get_logout_link', array($this, 'adjust_logout_link'), 10, 2);
     add_action('init', array($this, 'init'), 11);
     // Breadcrumb
     add_filter('bbp_after_get_breadcrumb_parse_args', array($this, 'adjust_breadcrumb_markup'));
     add_action('wp', array($this, 'switch_breadcrumb_nav'));
     add_filter('bbp_no_breadcrumb', '__return_true');
     // Manage sidebars
     add_filter('g1_setup_sidebars', array($this, 'setup_sidebars'));
     // Fix nav menu CSS class
     add_filter('nav_menu_css_class', array($this, 'fix_nav_menu_css_class'), 10, 2);
     // Include custom shortcodes
     require_once 'shortcode-forums.php';
     if (is_admin()) {
         add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     }
 }
示例#3
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('widgets_init', array($this, 'register_widgets'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_action('g1_prefooter_begin', array($this, 'render_toolbar_in_prefooter'));
 }
示例#4
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('widgets_init', array($this, 'register_widgets'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_action('wp_ajax_g1_mailchimp_add_to_mailing_list', array($this, 'add_to_mailing_list'));
     add_action('wp_ajax_nopriv_g1_mailchimp_add_to_mailing_list', array($this, 'add_to_mailing_list'));
 }
示例#5
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('init', array($this, 'add_post_type_support'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_filter('pre_option_page_for_posts', array($this, 'pre_option_page_for_posts'));
     add_filter('pre_option_page_on_front', array($this, 'pre_option_page_on_front'));
     add_filter('pre_option_show_on_front', array($this, 'pre_option_show_on_front'));
     add_filter('nav_menu_css_class', array($this, 'fix_nav_menu_css_class'), 10, 2);
     add_action('g1_collections_register', array($this, 'register_collections'));
 }
示例#6
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     // general setup
     add_action('wp', array($this, 'setup_learndash'));
     // sidebars
     add_filter('g1_setup_sidebars', array($this, 'setup_sidebars'));
     // support features
     add_action('init', array($this, 'add_post_type_support'));
     // theme options
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
 }
示例#7
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_filter('g1_element_slider_choices', array($this, 'add_slider_choices'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     if (is_admin()) {
         // Include stylesheets
         add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
         // Include javascripts
         add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
     } else {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
     add_action('g1_post_meta_manager_register', array($this, 'g1_post_meta_manager_register'));
     add_filter('g1_element_media_box_choices', array($this, 'add_media_box_choices'));
     add_filter('g1_mediabox_help', array($this, 'mediabox_help'));
     add_action('g1_mediabox', array($this, 'mediabox'), 10, 2);
     add_action('g1_precontent', array($this, 'precontent'));
     add_action('add_meta_boxes', array($this, 'remove_meta_boxes'));
     add_action('init', array($this, 'register_post_type'));
 }
示例#8
0
function setup_redux_framework_options()
{
    $args = array();
    // Setting dev mode to true allows you to view the class settings/info in the panel.
    // Default: true
    $args['dev_mode'] = false;
    // Set the icon for the dev mode tab.
    // If $args['icon_type'] = 'image', this should be the path to the icon.
    // If $args['icon_type'] = 'iconfont', this should be the icon name.
    // Default: info-sign
    //$args['dev_mode_icon'] = 'info-sign';
    // Set the class for the dev mode tab icon.
    // This is ignored unless $args['icon_type'] = 'iconfont'
    // Default: null
    $args['dev_mode_icon_class'] = 'icon-large';
    // If you want to use Google Webfonts, you MUST define the api key.
    $args['google_api_key'] = 'AIzaSyARJV95W1bhfrtQ2trA9FUxMGKHqpYkLS0';
    // Define the starting tab for the option panel.
    // Default: '0';
    //$args['last_tab'] = '0';
    // Define the option panel stylesheet. Options are 'standard', 'custom', and 'none'
    // If only minor tweaks are needed, set to 'custom' and override the necessary styles through the included custom.css stylesheet.
    // If replacing the stylesheet, set to 'none' and don't forget to enqueue another stylesheet!
    // Default: 'standard'
    $args['admin_stylesheet'] = 'custom';
    // Add HTML before the form.
    //$args['intro_text'] = __('<p>This text is displayed above the options panel. It isn\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', Redux_TEXT_DOMAIN);
    // Add content after the form.
    //$args['footer_text'] = __('<p>This text is displayed below the options panel. It isn\'t required, but more info is always better! The footer_text field accepts all HTML.</p>', Redux_TEXT_DOMAIN);
    // Set footer/credit line.
    //$args['footer_credit'] = __('<p>This text is displayed in the options panel footer across from the WordPress version (where it normally says \'Thank you for creating with WordPress\'). This field accepts all HTML.</p>', Redux_TEXT_DOMAIN);
    // Setup custom links in the footer for share icons
    $args['share_icons']['twitter'] = array('link' => 'http://twitter.com/bringthepixel', 'title' => 'Follow us on Twitter', 'img' => Redux_OPTIONS_URL . 'img/social/Twitter.png');
    $args['share_icons']['facebook'] = array('link' => 'http://www.facebook.com/bringthepixel', 'title' => 'Find us on Facebook', 'img' => Redux_OPTIONS_URL . 'img/social/Facebook.png');
    // Enable the import/export feature.
    // Default: true
    $args['show_import_export'] = true;
    // Set the icon for the import/export tab.
    // If $args['icon_type'] = 'image', this should be the path to the icon.
    // If $args['icon_type'] = 'iconfont', this should be the icon name.
    // Default: refresh
    //$args['import_icon'] = 'refresh';
    // Set the class for the import/export tab icon.
    // This is ignored unless $args['icon_type'] = 'iconfont'
    // Default: null
    $args['import_icon_class'] = 'icon-large';
    // Set a custom option name. Don't forget to replace spaces with underscores!
    $args['opt_name'] = G1_Theme()->get_id();
    $args['sections_filter_name'] = '3clicks';
    $args['skin_options'] = array('style_ui_corners', 'style_background', 'style_background_switch', 'style_background_image', 'style_background_image_hdpi', 'style_background_repeat', 'style_background_position', 'style_background_attachment', 'style_background_scroll', 'style_top_background', 'style_top_background_switch', 'style_top_background_image', 'style_top_background_image_hdpi', 'style_top_background_repeat', 'style_top_background_position', 'style_top_background_attachment', 'style_top_background_scroll', 'style_fonts_regular_type', 'style_fonts_regular_google_font', 'style_fonts_regular_size', 'style_fonts_meta_type', 'style_fonts_meta_google_font', 'style_fonts_important_type', 'style_fonts_important_google_font', 'style_fonts_important_size', 'style_fonts_primary_nav_type', 'style_fonts_primary_nav_google_font', 'style_fonts_primary_nav_size', 'style_fonts_primary_nav_padding_top', 'style_fonts_primary_nav_padding_bottom', 'ta_preheader_open_type', 'ta_preheader_open_on_startup', 'ta_preheader_space', 'ta_preheader_top_divider_switch', 'ta_preheader_top_divider_color', 'ta_preheader_top_divider_width', 'ta_preheader_bottom_divider_switch', 'ta_preheader_bottom_divider_color', 'ta_preheader_bottom_divider_width', 'ta_preheader_layout', 'ta_preheader_composition', 'ta_preheader_g1_social_icons', 'ta_preheader_searchform', 'ta_preheader_cs_1_background', 'ta_preheader_cs_1_background_opacity', 'ta_preheader_cs_1_background_switch', 'ta_preheader_cs_1_background_image', 'ta_preheader_cs_1_background_image_hdpi', 'ta_preheader_cs_1_background_repeat', 'ta_preheader_cs_1_background_position', 'ta_preheader_cs_1_background_attachment', 'ta_preheader_cs_1_text1', 'ta_preheader_cs_1_text2', 'ta_preheader_cs_1_text3', 'ta_preheader_cs_1_link', 'ta_preheader_cs_1_link_hover', 'ta_preheader_cs_2_background', 'ta_preheader_cs_2_text1', 'ta_header_position', 'ta_header_space', 'ta_header_top_divider_switch', 'ta_header_top_divider_color', 'ta_header_top_divider_width', 'ta_header_bottom_divider_switch', 'ta_header_bottom_divider_color', 'ta_header_bottom_divider_width', 'ta_header_layout', 'ta_header_composition', 'ta_header_id_margin_top', 'ta_header_id_margin_bottom', 'ta_header_primary_nav_margin_top', 'ta_header_primary_nav_margin_bottom', 'ta_header_tagline', 'ta_header_searchform', 'ta_header_primary_nav_style', 'ta_header_cs_1_background', 'ta_header_cs_1_background_opacity', 'ta_header_cs_1_background_switch', 'ta_header_cs_1_background_image', 'ta_header_cs_1_background_image_hdpi', 'ta_header_cs_1_background_repeat', 'ta_header_cs_1_background_position', 'ta_header_cs_1_background_attachment', 'ta_header_cs_1_text1', 'ta_header_cs_1_text2', 'ta_header_cs_1_text3', 'ta_header_cs_1_link', 'ta_header_cs_1_link_hover', 'ta_header_cs_2_background', 'ta_header_cs_2_text1', 'ta_precontent_space', 'ta_precontent_top_divider_switch', 'ta_precontent_top_divider_color', 'ta_precontent_top_divider_width', 'ta_precontent_bottom_divider_switch', 'ta_precontent_bottom_divider_color', 'ta_precontent_bottom_divider_width', 'ta_precontent_layout', 'ta_precontent_cs_1_background', 'ta_precontent_cs_1_background_opacity', 'ta_precontent_cs_1_background_switch', 'ta_precontent_cs_1_background_image', 'ta_precontent_cs_1_background_image_hdpi', 'ta_precontent_cs_1_background_repeat', 'ta_precontent_cs_1_background_position', 'ta_precontent_cs_1_background_attachment', 'ta_precontent_cs_1_text1', 'ta_precontent_cs_1_text2', 'ta_precontent_cs_1_text3', 'ta_precontent_cs_1_link', 'ta_precontent_cs_1_link_hover', 'ta_precontent_cs_2_background', 'ta_precontent_cs_2_text1', 'ta_content_space', 'ta_content_top_divider_switch', 'ta_content_top_divider_color', 'ta_content_top_divider_width', 'ta_content_bottom_divider_switch', 'ta_content_bottom_divider_color', 'ta_content_bottom_divider_width', 'ta_content_layout', 'ta_content_cs_1_background', 'ta_content_cs_1_background_opacity', 'ta_content_cs_1_background_switch', 'ta_content_cs_1_background_image', 'ta_content_cs_1_background_image_hdpi', 'ta_content_cs_1_background_repeat', 'ta_content_cs_1_background_position', 'ta_content_cs_1_background_attachment', 'ta_content_cs_1_text1', 'ta_content_cs_1_text2', 'ta_content_cs_1_text3', 'ta_content_cs_1_link', 'ta_content_cs_1_link_hover', 'ta_content_cs_2_background', 'ta_content_cs_2_text1', 'ta_prefooter_space', 'ta_prefooter_top_divider_switch', 'ta_prefooter_top_divider_color', 'ta_prefooter_top_divider_width', 'ta_prefooter_bottom_divider_switch', 'ta_prefooter_bottom_divider_color', 'ta_prefooter_bottom_divider_width', 'ta_prefooter_layout', 'ta_prefooter_composition', 'ta_prefooter_twitter_toolbar', 'ta_prefooter_gmap', 'ta_prefooter_cs_1_background', 'ta_prefooter_cs_1_background_opacity', 'ta_prefooter_cs_1_background_switch', 'ta_prefooter_cs_1_background_image', 'ta_prefooter_cs_1_background_image_hdpi', 'ta_prefooter_cs_1_background_repeat', 'ta_prefooter_cs_1_background_position', 'ta_prefooter_cs_1_background_attachment', 'ta_prefooter_cs_1_text1', 'ta_prefooter_cs_1_text2', 'ta_prefooter_cs_1_text3', 'ta_prefooter_cs_1_link', 'ta_prefooter_cs_1_link_hover', 'ta_prefooter_cs_2_background', 'ta_prefooter_cs_2_text1', 'ta_footer_space', 'ta_footer_top_divider_switch', 'ta_footer_top_divider_color', 'ta_footer_top_divider_width', 'ta_footer_bottom_divider_switch', 'ta_footer_bottom_divider_color', 'ta_footer_bottom_divider_width', 'ta_footer_layout', 'ta_footer_composition', 'ta_footer_cs_1_background', 'ta_footer_cs_1_background_opacity', 'ta_footer_cs_1_background_switch', 'ta_footer_cs_1_background_image', 'ta_footer_cs_1_background_image_hdpi', 'ta_footer_cs_1_background_repeat', 'ta_footer_cs_1_background_position', 'ta_footer_cs_1_background_attachment', 'ta_footer_cs_1_text1', 'ta_footer_cs_1_text2', 'ta_footer_cs_1_text3', 'ta_footer_cs_1_link', 'ta_footer_cs_1_link_hover', 'ta_footer_cs_2_background', 'ta_footer_cs_2_text1', 'map_color', 'map_invert_lightness');
    // Set a custom menu icon.
    //$args['menu_icon'] = '';
    // Set a custom title for the options page.
    // Default: Options
    $args['menu_title'] = __('Theme Options', Redux_TEXT_DOMAIN);
    // Set a custom page title for the options page.
    // Default: Options
    $args['page_title'] = __('Theme Options', Redux_TEXT_DOMAIN);
    // Set a custom page slug for options page (wp-admin/themes.php?page=***).
    // Default: redux_options
    $args['page_slug'] = 'g1_theme_options';
    // Register theme options page under 'Appearance'
    $args['page_type'] = 'submenu';
    $args['page_parent'] = 'themes.php';
    // Set a custom page capability.
    // Default: manage_options
    //$args['page_cap'] = 'manage_options';
    // Set the menu type. Set to "menu" for a top level menu, or "submenu" to add below an existing item.
    // Default: menu
    //$args['page_type'] = 'submenu';
    // Set the parent menu.
    // Default: themes.php
    // A list of available parent menus is available at http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
    //$args['page_parent'] = 'options_general.php';
    // Set a custom page location. This allows you to place your menu where you want in the menu order.
    // Must be unique or it will override other items!
    // Default: null
    //$args['page_position'] = null;
    // Set a custom page icon class (used to override the page icon next to heading)
    //$args['page_icon'] = 'icon-themes';
    // Set the icon type. Set to "iconfont" for Font Awesome, or "image" for traditional.
    // Redux no longer ships with standard icons!
    // Default: iconfont
    //$args['icon_type'] = 'image';
    // Disable the panel sections showing as submenu items.
    // Default: true
    //$args['allow_sub_menu'] = false;
    // Set ANY custom page help tabs, displayed using the new help tab API. Tabs are shown in order of definition.
    //$args['help_tabs'][] = array(
    //    'id' => 'redux-opts-1',
    //    'title' => __('Theme Information 1', Redux_TEXT_DOMAIN),
    //    'content' => __('<p>This is the tab content, HTML is allowed.</p>', Redux_TEXT_DOMAIN)
    //);
    //$args['help_tabs'][] = array(
    //    'id' => 'redux-opts-2',
    //    'title' => __('Theme Information 2', Redux_TEXT_DOMAIN),
    //    'content' => __('<p>This is the tab content, HTML is allowed.</p>', Redux_TEXT_DOMAIN)
    //);
    // Set the help sidebar for the options page.
    //$args['help_sidebar'] = __('<p>This is the sidebar content, HTML is allowed.</p>', Redux_TEXT_DOMAIN);
    $sections = array();
    $tabs = array();
    add_filter(get_redux_opts_sections_filter_name(), 'g1_theme_options_sort_sections_and_fields', 9999);
    global $Redux_Options;
    $Redux_Options = new Redux_Options($sections, $args, $tabs);
}
示例#9
0
<?php

/**
 * For the full license information, please view the Licensing folder
 * that was distributed with this source code.
 *
 * @package G1_Theme03
 * @subpackage G1_Theme
 * @since G1_Theme 1.0.0
 */
// Prevent direct script access
if (!defined('ABSPATH')) {
    die('No direct script access allowed');
}
add_filter(get_redux_opts_sections_filter_name(), 'g1_theme_options_register');
function g1_redux_field_background_image($field_name_prefix, $field_id_prefix, $start_priority, $defaults = array())
{
    return array(array('id' => $field_id_prefix . '_switch', 'class' => 'g1-background-image-fieldset', 'priority' => $start_priority, 'type' => 'select', 'title' => sprintf(__('Use %s Image', Redux_TEXT_DOMAIN), $field_name_prefix), 'options' => array('standard' => __('on', Redux_TEXT_DOMAIN), 'none' => __('off', Redux_TEXT_DOMAIN)), 'switch' => true, 'std' => !empty($defaults['switch']) ? $defaults['switch'] : 'none'), array('id' => $field_id_prefix . '_image', 'priority' => $start_priority + 1, 'type' => 'upload', 'title' => sprintf(__('%s Image', Redux_TEXT_DOMAIN), $field_name_prefix), 'std' => !empty($defaults['image']) ? $defaults['image'] : ''), array('id' => $field_id_prefix . '_image_hdpi', 'priority' => $start_priority + 2, 'type' => 'upload', 'title' => sprintf(__('%s Image (High DPI)', Redux_TEXT_DOMAIN), $field_name_prefix), 'sub_desc' => __('An image for High DPI screen (like Retina) should be twice as big.', Redux_TEXT_DOMAIN), 'std' => !empty($defaults['image_hdpi']) ? $defaults['image_hdpi'] : ''), array('id' => $field_id_prefix . '_repeat', 'priority' => $start_priority + 3, 'type' => 'select', 'title' => sprintf(__('%s Repeat', Redux_TEXT_DOMAIN), $field_name_prefix), 'options' => array('no-repeat' => __('No Repeat', Redux_TEXT_DOMAIN), 'repeat' => __('Tile', Redux_TEXT_DOMAIN), 'repeat-x' => __('Tile Horizontally', Redux_TEXT_DOMAIN), 'repeat-y' => __('Tile Vertically', Redux_TEXT_DOMAIN)), 'std' => !empty($defaults['repeat']) ? $defaults['repeat'] : 'no-repeat'), array('id' => $field_id_prefix . '_position', 'priority' => $start_priority + 4, 'type' => 'select', 'title' => sprintf(__('%s Position', Redux_TEXT_DOMAIN), $field_name_prefix), 'options' => array('left top' => __('Left Top', Redux_TEXT_DOMAIN), 'left center' => __('Left Center', Redux_TEXT_DOMAIN), 'left bottom' => __('Left Bottom', Redux_TEXT_DOMAIN), 'right top' => __('Right Top', Redux_TEXT_DOMAIN), 'right center' => __('Right Center', Redux_TEXT_DOMAIN), 'right bottom' => __('Right Bottom', Redux_TEXT_DOMAIN), 'center top' => __('Center Top', Redux_TEXT_DOMAIN), 'center center' => __('Center Center', Redux_TEXT_DOMAIN), 'center bottom' => __('Center Bottom', Redux_TEXT_DOMAIN)), 'std' => !empty($defaults['position']) ? $defaults['position'] : 'no-repeat'), array('id' => $field_id_prefix . '_attachment', 'priority' => $start_priority + 5, 'type' => 'select', 'title' => sprintf(__('%s Attachment', Redux_TEXT_DOMAIN), $field_name_prefix), 'sub_desc' => '<p>' . __('Whether a background image is fixed or scrolls with the rest of the page.', Redux_TEXT_DOMAIN) . '</p>', 'options' => array('fixed' => __('Fixed', Redux_TEXT_DOMAIN), 'scroll' => __('Scroll', Redux_TEXT_DOMAIN)), 'std' => !empty($defaults['attachment']) ? $defaults['attachment'] : 'scroll'));
}
function g1_redux_field_theme_area_divider($field_name_prefix, $field_id_prefix, $start_priority, $defaults = array())
{
    return array(array('id' => $field_id_prefix . '_switch', 'class' => 'g1-divider-fieldset', 'priority' => $start_priority, 'type' => 'select', 'title' => sprintf(__('%s Divider', Redux_TEXT_DOMAIN), $field_name_prefix), 'options' => array('standard' => __('on', Redux_TEXT_DOMAIN), 'none' => __('off', Redux_TEXT_DOMAIN)), 'switch' => true, 'std' => !empty($defaults['switch']) ? $defaults['switch'] : 'none'), array('id' => $field_id_prefix . '_color', 'priority' => $start_priority + 1, 'type' => 'color', 'title' => sprintf(__('%s Divider Color', Redux_TEXT_DOMAIN), $field_name_prefix), 'std' => !empty($defaults['color']) ? $defaults['color'] : ''), array('id' => $field_id_prefix . '_width', 'priority' => $start_priority + 2, 'type' => 'text', 'title' => sprintf(__('%s Divider Height', Redux_TEXT_DOMAIN), $field_name_prefix), 'desc' => __('px', Redux_TEXT_DOMAIN), 'validate' => 'numeric', 'std' => !empty($defaults['width']) ? $defaults['width'] : ''));
}
function g1_theme_options_register($sections)
{
    $image_uri = trailingslashit(get_template_directory_uri()) . 'images/admin-assets/';
    // General
    $sections['general'] = array('priority' => 20, 'icon' => 'cog', 'icon_class' => 'icon-large', 'title' => __('General', Redux_TEXT_DOMAIN), 'fields' => array());
    $sections['general_main'] = array('priority' => 24, 'icon' => 'cog', 'icon_class' => 'icon-large', 'title' => __('Main', Redux_TEXT_DOMAIN), 'fields' => array(array('id' => 'general_footer_text', 'priority' => 10, 'type' => 'text', 'title' => __('Footer Text', Redux_TEXT_DOMAIN), 'desc' => __('eg. Copyright @ 2013 YourCompany', Redux_TEXT_DOMAIN), 'validate' => 'html', 'std' => '© 2013 by some company. Remember to change this'), array('id' => 'general_responsive_design', 'priority' => 15, 'type' => 'select', 'title' => __('Responsive Design', Redux_TEXT_DOMAIN), 'options' => array('standard' => 'on', 'none' => 'off'), 'switch' => true, 'std' => 'standard'), array('id' => 'general_helpmode', 'priority' => 20, 'type' => 'select', 'title' => __('HelpMode', Redux_TEXT_DOMAIN), 'sub_desc' => '<p>' . __('Enable the HelpMode to get some useful tips throughout the site.', Redux_TEXT_DOMAIN) . '</p>' . '<p>' . __('The HelpMode is visible only to users who have been assigned the administrator role, so regular site visitors don\'t see it.', Redux_TEXT_DOMAIN) . '</p>', 'options' => array('standard' => 'on', 'none' => 'off'), 'switch' => true, 'std' => 'standard'), array('id' => 'general_scroll_to_top', 'priority' => 30, 'type' => 'select', 'title' => __('Scroll To Top', Redux_TEXT_DOMAIN), 'sub_desc' => __('Enable button allowing quick page scroll to the top.', Redux_TEXT_DOMAIN), 'options' => array('standard' => 'on', 'none' => 'off'), 'switch' => true, 'std' => 'standard')));
    $sections['general_branding'] = array('priority' => 26, 'icon' => 'briefcase', 'icon_class' => 'icon-large', 'title' => __('Branding', Redux_TEXT_DOMAIN), 'fields' => array(array('id' => 'branding_logo', 'priority' => 110, 'type' => 'upload', 'title' => __('Desktop Logo', Redux_TEXT_DOMAIN), 'sub_desc' => sprintf(__('Leave it blank to display the site title from <a href="%s">WP General Settings</a> instead.', Redux_TEXT_DOMAIN), network_admin_url('options-general.php'))), array('id' => 'branding_logo_width', 'priority' => 112, 'type' => 'text', 'title' => __('Desktop Logo Width', Redux_TEXT_DOMAIN), 'sub_desc' => __('in pixels', Redux_TEXT_DOMAIN)), array('id' => 'branding_logo_height', 'priority' => 114, 'type' => 'text', 'title' => __('Desktop Logo Height', Redux_TEXT_DOMAIN), 'sub_desc' => __('in pixels', Redux_TEXT_DOMAIN)), array('id' => 'branding_logo_hdpi', 'priority' => 120, 'type' => 'upload', 'title' => __('Desktop Logo (High DPI)', Redux_TEXT_DOMAIN), 'sub_desc' => __('An image for High DPI screen (like Retina) should be twice as big.', Redux_TEXT_DOMAIN)), array('id' => 'branding_logo_mobile', 'priority' => 130, 'type' => 'upload', 'title' => __('Mobile Logo', Redux_TEXT_DOMAIN)), array('id' => 'branding_logo_mobile_width', 'priority' => 132, 'type' => 'text', 'title' => __('Mobile Logo Width', Redux_TEXT_DOMAIN), 'sub_desc' => __('in pixels', Redux_TEXT_DOMAIN)), array('id' => 'branding_logo_mobile_height', 'priority' => 134, 'type' => 'text', 'title' => __('Mobile Logo Height', Redux_TEXT_DOMAIN), 'sub_desc' => __('in pixels', Redux_TEXT_DOMAIN)), array('id' => 'branding_logo_mobile_hdpi', 'priority' => 140, 'type' => 'upload', 'title' => __('Mobile Logo (High DPI)', Redux_TEXT_DOMAIN), 'sub_desc' => __('An image for High DPI screen (like Retina) should be twice as big.', Redux_TEXT_DOMAIN)), array('id' => 'branding_favicon', 'priority' => 150, 'type' => 'upload', 'title' => __('Favicon', Redux_TEXT_DOMAIN), 'sub_desc' => __('The recommended size is 16x16 pixels.', Redux_TEXT_DOMAIN)), array('id' => 'branding_apple_touch_icon', 'priority' => 160, 'type' => 'upload', 'title' => __('Apple Touch Icon', Redux_TEXT_DOMAIN), 'sub_desc' => __('The recommended size is 114x114 pixels.', Redux_TEXT_DOMAIN))));
    // Style
示例#10
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     add_filter(get_redux_opts_sections_filter_name(), array($this, 'register_global_setting'), 12);
     add_action('g1_post_meta_manager_register', array($this, 'register_individual_setting'), 12);
     add_action('single_template', array($this, 'alter_single_template'));
 }
示例#11
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     add_filter(get_redux_opts_sections_filter_name(), array($this, 'register_post_type_single_element'), 99);
     add_action('g1_post_meta_manager_register', array($this, 'register_entry_element'), 99);
 }
示例#12
0
文件: theme.php 项目: aragonc/3clicks
 protected function hook_after_setup_theme()
 {
     add_action(get_redux_opts_sections_filter_name(), array($this, 'register_image_sizes_options'));
     add_action('init', array($this, 'bind_image_sizes'), 999);
 }