Ejemplo n.º 1
0
/**
 * Register additional widget areas.
 *
 * Note: Has to be early on the "init" hook in order to display translations!
 *
 * @since 1.0.0
 *
 * @uses  genesis_register_sidebar()
 */
function ddw_gwfoot_register_widget_areas()
{
    /** Add shortcode support to widgets */
    if (!GWFOOT_NO_WIDGETS_SHORTCODE && !is_admin()) {
        add_filter('widget_text', 'do_shortcode');
    }
    // end-if constant & !is_admin() check
    /** Set filter for "Footer Area #1" widget title */
    $gwfoot_footer_one_widget_title = apply_filters('gwfoot_filter_footer_one_widget_title', __('Footer Area #1', 'genesis-widgetized-footer'));
    /** Set filter for "Footer Area #1" widget description */
    $gwfoot_footer_one_widget_description = apply_filters('gwfoot_filter_footer_one_widget_description', sprintf(__('This is the first widget area (%s) within the Genesis Footer.', 'genesis-widgetized-footer'), $gwfoot_footer_one_widget_title));
    /** Register the "Footer Area #1" widget area */
    genesis_register_sidebar(array('id' => 'gwfoot-footer-one-widget', 'name' => esc_attr__($gwfoot_footer_one_widget_title), 'description' => esc_attr__($gwfoot_footer_one_widget_description), 'before_widget' => '<div id="%1$s" class="gwfoot-footer-one widget-area %2$s">', 'after_widget' => '</div>'));
    /** Set filter for "Footer Area #2" widget title */
    $gwfoot_footer_two_widget_title = apply_filters('gwfoot_filter_footer_two_widget_title', __('Footer Area #2', 'genesis-widgetized-footer'));
    /** Set filter for "Footer Area #2" widget description */
    $gwfoot_footer_two_widget_description = apply_filters('gwfoot_filter_footer_two_widget_description', sprintf(__('This is the second widget area (%s) within the Genesis Footer.', 'genesis-widgetized-footer'), $gwfoot_footer_two_widget_title));
    /** Register the "Footer Area #2" widget area */
    genesis_register_sidebar(array('id' => 'gwfoot-footer-two-widget', 'name' => esc_attr__($gwfoot_footer_two_widget_title), 'description' => esc_attr__($gwfoot_footer_two_widget_description), 'before_widget' => '<div id="%1$s" class="gwfoot-footer-two widget-area %2$s">', 'after_widget' => '</div>'));
    /** Set filter for "Footer Disclaimer" widget title */
    $gwfoot_footer_disclaimer_widget_title = apply_filters('gwfoot_filter_footer_disclaimer_widget_title', __('Footer Disclaimer', 'genesis-widgetized-footer'));
    /** Set filter for "Footer Disclaimer" widget description */
    $gwfoot_footer_disclaimer_widget_description = apply_filters('gwfoot_filter_footer_disclaimer_widget_description', __('This is Footer Disclaimer widget area within the Genesis Footer.', 'genesis-widgetized-footer'));
    /**
     * Register the "Footer Disclaimer" widget area
     *    Do not register for AgentPress 2.x and RealPro 1.x child themes
     *      as these already have their own Disclaimer widget area
     */
    if (!GWFOOT_NO_DISCLAIMER_WIDGET_AREA && (!function_exists('agentpress_disclaimer') || !function_exists('realpro_disclaimer'))) {
        genesis_register_sidebar(array('id' => 'gwfoot-footer-disclaimer-widget', 'name' => esc_attr__($gwfoot_footer_disclaimer_widget_title), 'description' => esc_attr__($gwfoot_footer_disclaimer_widget_description), 'before_widget' => '<div id="%1$s" class="gwfoot-footer-disclaimer widget-area %2$s">', 'after_widget' => '</div>'));
    }
    // end-if constant plus AgentPress 2.x / RealPro 1.x check
}
Ejemplo n.º 2
0
function gs_register_sidebars()
{
    $sidebars = array(array('id' => 'home-top', 'name' => __('Home Top', CHILD_DOMAIN), 'description' => __('This is the top homepage section.', CHILD_DOMAIN)), array('id' => 'home-middle-01', 'name' => __('Home Left Middle', CHILD_DOMAIN), 'description' => __('This is the homepage left section.', CHILD_DOMAIN)), array('id' => 'home-middle-02', 'name' => __('Home Middle Middle', CHILD_DOMAIN), 'description' => __('This is the homepage middle section.', CHILD_DOMAIN)), array('id' => 'home-middle-03', 'name' => __('Home Right Middle', CHILD_DOMAIN), 'description' => __('This is the homepage right section.', CHILD_DOMAIN)), array('id' => 'home-bottom', 'name' => __('Home Bottom', CHILD_DOMAIN), 'description' => __('This is the homepage right section.', CHILD_DOMAIN)), array('id' => 'portfolio', 'name' => __('Portfolio', CHILD_DOMAIN), 'description' => __('Use featured posts to showcase your portfolio.', CHILD_DOMAIN)), array('id' => 'after-post', 'name' => __('After Post', CHILD_DOMAIN), 'description' => __('This will show up after every post.', CHILD_DOMAIN)));
    foreach ($sidebars as $sidebar) {
        genesis_register_sidebar($sidebar);
    }
}
Ejemplo n.º 3
0
/**
 * Register additional widget areas.
 *
 * Note: Has to be early on the "init" hook in order to display translations!
 *
 * @since 1.2.0
 *
 * @uses  is_admin()
 * @uses  genesis_register_sidebar()
 */
function ddw_gwat_register_widget_areas()
{
    /** Add shortcode support to widgets */
    if (!is_admin() && !GWAT_NO_WIDGETS_SHORTCODE) {
        add_filter('widget_text', 'do_shortcode');
    }
    // end-if constant check
    /** Set filter for "Archive Page Template #1" widget title */
    $gwat_archive_one_widget_title = apply_filters('gwat_filter_archive_one_widget_title', __('Archive Page Template #1', 'genesis-widgetized-archive'));
    /** Set filter for "Archive Page Template #1" widget description */
    $gwat_archive_one_widget_description = apply_filters('gwat_filter_archive_one_widget_description', __('This is the first widget area for the Archive Page Template (bundled with the Genesis Framework).', 'genesis-widgetized-archive'));
    /** Register the "Archive Page Template #1" widget area */
    genesis_register_sidebar(array('id' => 'gwat-archive-widget-one', 'name' => $gwat_archive_one_widget_title, 'description' => $gwat_archive_one_widget_description, 'before_widget' => '<div id="%1$s" class="gwat-archive gwat-archive-one widget-area %2$s">', 'after_widget' => '</div>'));
    /** Second Widget Area */
    if (!GWAT_NO_SECOND_WIDGET_AREA) {
        /** Set filter for "Archive Page Template #2" widget title */
        $gwat_archive_two_widget_title = apply_filters('gwat_filter_archive_two_widget_title', __('Archive Page Template #2', 'genesis-widgetized-archive'));
        /** Set filter for "Archive Page Template #2" widget description */
        $gwat_archive_two_widget_description = apply_filters('gwat_filter_archive_two_widget_description', __('This is the second optional widget area for the Archive Page Template (bundled with the Genesis Framework).', 'genesis-widgetized-archive'));
        /** Register the "Archive Page Template #2" widget area */
        genesis_register_sidebar(array('id' => 'gwat-archive-widget-two', 'name' => $gwat_archive_two_widget_title, 'description' => $gwat_archive_two_widget_description, 'before_widget' => '<div id="%1$s" class="gwat-archive gwat-archive-two widget-area %2$s">', 'after_widget' => '</div>'));
    }
    // end-if constant check for second widget area
    /** Third Widget Area */
    if (!GWAT_NO_THIRD_WIDGET_AREA) {
        /** Set filter for "Archive Page Template #3" widget title */
        $gwat_archive_three_widget_title = apply_filters('gwat_filter_archive_three_widget_title', __('Archive Page Template #3', 'genesis-widgetized-archive'));
        /** Set filter for "Archive Page Template #3" widget description */
        $gwat_archive_three_widget_description = apply_filters('gwat_filter_archive_three_widget_description', __('This is the third optional widget area for the Archive Page Template (bundled with the Genesis Framework).', 'genesis-widgetized-archive'));
        /** Register the "Archive Page Template #3" widget area */
        genesis_register_sidebar(array('id' => 'gwat-archive-widget-three', 'name' => $gwat_archive_three_widget_title, 'description' => $gwat_archive_three_widget_description, 'before_widget' => '<div id="%1$s" class="gwat-archive gwat-archive-three widget-area %2$s">', 'after_widget' => '</div>'));
    }
    // end-if constant check for third widget area
}
Ejemplo n.º 4
0
 public static function register_sidebars()
 {
     if (self::get_option('before_content')) {
         genesis_register_sidebar(array('id' => self::BEFORE_CONTENT_SIDEBAR_ID, 'name' => __('Before Content After Header', GENESIS_CLUB_DOMAIN), 'description' => __('Full width area below the header and above the content and any primary and secondary sidebars.', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('before_archive')) {
         genesis_register_sidebar(array('id' => self::BEFORE_ARCHIVE_SIDEBAR_ID, 'name' => __('Before Archive', GENESIS_CLUB_DOMAIN), 'description' => __('Area at the top of the archive for adding an introductory slider', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('before_entry')) {
         genesis_register_sidebar(array('id' => self::BEFORE_ENTRY_SIDEBAR_ID, 'name' => __('Before Entry', GENESIS_CLUB_DOMAIN), 'description' => __('Area before the entry for adding calls to action or ads', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('before_entry_content')) {
         genesis_register_sidebar(array('id' => self::BEFORE_ENTRY_CONTENT_SIDEBAR_ID, 'name' => __('Before Entry Content', GENESIS_CLUB_DOMAIN), 'description' => __('Area before the post content for things like adding social media icons for likes and shares', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_entry_content')) {
         genesis_register_sidebar(array('id' => self::AFTER_ENTRY_CONTENT_SIDEBAR_ID, 'name' => __('After Entry Content', GENESIS_CLUB_DOMAIN), 'description' => __('Area after the post content for adding things like social media icons for likes and shares', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_entry')) {
         genesis_register_sidebar(array('id' => self::AFTER_ENTRY_SIDEBAR_ID, 'name' => __('After Entry', GENESIS_CLUB_DOMAIN), 'description' => __('Area after the entry for adding calls to action or ads', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_archive')) {
         genesis_register_sidebar(array('id' => self::AFTER_ARCHIVE_SIDEBAR_ID, 'name' => __('After Archive', GENESIS_CLUB_DOMAIN), 'description' => __('Area at the end of the archive for adding things like call to actions or ads', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_content')) {
         genesis_register_sidebar(array('id' => self::AFTER_CONTENT_SIDEBAR_ID, 'name' => __('After Content Before Footer', GENESIS_CLUB_DOMAIN), 'description' => __('Full width area just above the footer and below the content and any primary and secondary sidebars.', GENESIS_CLUB_DOMAIN)));
     }
 }
Ejemplo n.º 5
0
/**
 * Register the widget areas enabled by default in Utility.
 *
 * @since  1.0.0
 *
 * @return string Markup for each sidebar ID
 */
function utility_pro_register_widget_areas()
{
    $widget_areas = array(array('id' => 'utility-bar', 'name' => __('Utility Bar', 'utility-pro'), 'description' => __('This is the utility bar across the top of page.', 'utility-pro')), array('id' => 'utility-home-welcome', 'name' => __('Home Welcome', 'utility-pro'), 'description' => __('This is the welcome section at the top of the home page.', 'utility-pro')), array('id' => 'utility-home-gallery-1', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 1), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 1)), array('id' => 'utility-home-gallery-2', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 2), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 2)), array('id' => 'utility-home-gallery-3', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 3), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 3)), array('id' => 'utility-home-gallery-4', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 4), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 4)), array('id' => 'utility-call-to-action', 'name' => __('Call to Action', 'utility-pro'), 'description' => __('This is the Call to Action section on the home page.', 'utility-pro')));
    $widget_areas = apply_filters('utility_pro_default_widget_areas', $widget_areas);
    foreach ($widget_areas as $widget_area) {
        genesis_register_sidebar($widget_area);
    }
}
Ejemplo n.º 6
0
function child_theme_setup()
{
    // ** Backend **
    // Remove Unused Menu Items
    add_action('admin_menu', 'be_remove_menus');
    // Customize Menu Order
    add_filter('custom_menu_order', 'be_custom_menu_order');
    add_filter('menu_order', 'be_custom_menu_order');
    // Set up Taxonomies
    add_action('init', 'be_create_my_taxonomies');
    // Set up Taxonomy Default Terms
    add_action('save_post', 'mfields_set_default_object_terms', 100, 2);
    // Set up Meta Boxes
    add_action('init', 'be_create_metaboxes');
    // Setup Sidebars
    genesis_register_sidebar(array('name' => 'Home Column 1', 'id' => 'home-column-1'));
    genesis_register_sidebar(array('name' => 'Home Column 2', 'id' => 'home-column-2'));
    genesis_register_sidebar(array('name' => 'Home Column 3', 'id' => 'home-column-3'));
    // Setup Default Layout
    genesis_set_default_layout('full-width-content');
    // Setup Widgets
    include_once 'lib/widgets/widget-old-prospects.php';
    include_once 'lib/widgets/widget-new-prospects.php';
    include_once 'lib/widgets/widget-active-projects.php';
    include_once 'lib/widgets/widget-other-stats.php';
    include_once 'lib/widgets/widget-poc.php';
    include_once 'lib/widgets/widget-inquiry.php';
    include_once 'lib/widgets/widget-inquiry-result.php';
    include_once 'lib/widgets/widget-forwarded.php';
    include_once 'lib/widgets/widget-project-sources.php';
    include_once 'lib/widgets/widget-referral.php';
    include_once 'lib/widgets/widget-activity-graph.php';
    include_once 'lib/widgets/widget-quotes.php';
    // Move Post Editor to Metabox
    add_action('admin_enqueue_scripts', 'crm_move_posteditor', 10, 1);
    // Don't update theme
    add_filter('http_request_args', 'be_dont_update_theme', 5, 2);
    // Change the labeling for the "Posts" menu to "Contacts"
    add_action('init', 'crm_change_post_object_label');
    add_action('admin_menu', 'crm_change_post_menu_label');
    // Change post title text
    add_action('gettext', 'crm_change_title_text');
    // Modify post column layout
    add_filter('manage_posts_columns', 'crm_add_new_columns');
    // Add taxonomies to post column
    add_action('manage_posts_custom_column', 'crm_manage_columns', 10, 2);
    // Remove post meta fields
    add_action('admin_menu', 'crm_remove_page_fields');
    // Remove Genesis SEO Metabox
    remove_post_type_support('post', 'genesis-seo');
    // Remove Genesis Layout Options
    remove_post_type_support('post', 'genesis-layouts');
    // ** Frontend **
    // Exclude Form from login
    add_filter('registered-users-only_exclusions', 'crm_form_exclusion');
    // Remove Footer
    remove_action('genesis_footer', 'genesis_do_footer');
}
Ejemplo n.º 7
0
/**
 * Registers footer widget areas based on the number of widget areas the user
 * wishes to create with add_theme_support().
 *
 * @since 1.6.0
 *
 * @uses genesis_register_sidebar() Register footer widget areas
 *
 * @return null Returns early if there's no theme support.
 */
function genesis_register_footer_widget_areas()
{
    $footer_widgets = get_theme_support('genesis-footer-widgets');
    if (!$footer_widgets || !isset($footer_widgets[0]) || !is_numeric($footer_widgets[0])) {
        return;
    }
    $footer_widgets = (int) $footer_widgets[0];
    $counter = 1;
    while ($counter <= $footer_widgets) {
        genesis_register_sidebar(array('id' => sprintf('footer-%d', $counter), 'name' => sprintf(__('Footer %d', 'genesis'), $counter), 'description' => sprintf(__('Footer %d widget area.', 'genesis'), $counter)));
        $counter++;
    }
}
Ejemplo n.º 8
0
function child_theme_setup()
{
    // ** Backend **
    // Translations
    load_child_theme_textdomain('social-coup', get_stylesheet_directory() . '/lib/languages');
    // Image Sizes
    add_image_size('sc_thumbnail', 405, 375, true);
    // Sidebars
    unregister_sidebar('sidebar-alt');
    unregister_sidebar('header-right');
    add_theme_support('genesis-footer-widgets', 3);
    genesis_register_sidebar(array('name' => __('Home Left', 'social-coup'), 'id' => 'home-left'));
    genesis_register_sidebar(array('name' => __('Home Middle', 'social-coup'), 'id' => 'home-middle'));
    genesis_register_sidebar(array('name' => __('Home Right', 'social-coup'), 'id' => 'home-right'));
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // Setup Theme Settings
    include_once CHILD_DIR . '/lib/admin/child-theme-settings.php';
    // Editor Stylesheet
    add_editor_style('editor-style.css');
    // Hide Editor on Specific Template Pages
    add_action('admin_init', 'sc_hide_editor');
    // Activate Required Plugins
    require_once CHILD_DIR . '/lib/classes/class-tgm-plugin-activation.php';
    add_action('tgmpa_register', 'cs_register_required_plugins');
    // Add support for custom header
    add_theme_support('genesis-custom-header', array('width' => 545, 'height' => 184, 'textcolor' => '333', 'admin_header_callback' => 'sc_admin_style', 'header_callback' => 'sc_custom_header_style'));
    // ** Frontend **
    // Remove Edit Link
    add_filter('edit_post_link', '__return_false');
    // Viewport Meta Tag for Mobile Browsers
    add_action('genesis_meta', 'cs_viewport_meta_tag');
    // Structural Wraps
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'event-information', 'footer-widgets', 'footer'));
    // Remove text from search
    add_filter('genesis_search_text', '__return_false');
    add_filter('genesis_search_button_text', '__return_false');
    // Move navigation above header
    remove_action('genesis_after_header', 'genesis_do_nav');
    add_action('genesis_before_header', 'genesis_do_nav');
    // Remove site tagline from header
    add_filter('genesis_seo_description', '__return_false');
    // Event Information
    add_action('genesis_after_header', 'cs_event_description');
    // Footer Text
    add_filter('genesis_footer_backtotop_text', 'cs_footer_left');
    add_filter('genesis_footer_creds_text', 'cs_footer_right');
}
Ejemplo n.º 9
0
 function __construct($tp_active = false)
 {
     global $current_blog, $gsm_simple_menu;
     $this->home = !is_multisite() || defined('BP_ENABLE_MULTIBLOG') || $current_blog->blog_id == BP_ROOT_BLOG;
     $this->adminbar = !(bp_use_wp_admin_bar() || defined('BP_DISABLE_ADMIN_BAR') || get_site_option('hide-loggedout-adminbar') && !is_user_logged_in());
     $this->stylesheet = get_option('stylesheet');
     $this->settings = get_option($this->settings_key);
     if (!($this->style = genesis_get_option('style_selection'))) {
         $this->style = 'style.css';
     }
     if ($this->simple_menu = !empty($gsm_simple_menu)) {
         $this->custom_subnav =& $gsm_simple_menu;
     }
     do_action('gconnect_before_init');
     if (is_admin()) {
         require_once GENESISCONNECT_DIR . 'lib/class.options.php';
         $this->admin = new GConnect_Admin($this, $tp_active);
     } else {
         require_once GENESISCONNECT_DIR . 'lib/class.front.php';
         $this->front = new GConnect_Front($this, $tp_active);
         if (!$tp_active && !is_user_logged_in() && $this->home) {
             $custom_register = $this->get_option('custom_register');
             if ($custom_register && 'none' != $custom_register) {
                 require_once GENESISCONNECT_DIR . 'lib/class.visitor.php';
                 $this->front->set_visitor(new GConnect_visitor($this, $custom_register));
             } elseif (is_multisite()) {
                 add_action('wp', array(&$this, 'bp_core_wpsignup_redirect'));
             } else {
                 add_action('init', array(&$this, 'bp_core_wpsignup_redirect'));
             }
         }
     }
     if ('widget' == $this->get_option('before_content')) {
         genesis_register_sidebar(array('name' => 'Before BuddyPress', 'description' => __('This is above the BuddyPress content', 'genesis-connect'), 'id' => 'gconnect-before'));
     }
     if (is_dir(GENESISCONNECT_DIR . 'child-theme/' . $this->stylesheet)) {
         $addon_directory = GENESISCONNECT_DIR . 'child-theme/' . $this->stylesheet;
         $addon_functions = $addon_directory . '/my-functions.php';
         if (is_file($addon_functions)) {
             require_once $addon_functions;
         }
         if (!is_admin()) {
             $this->front->set_addon($addon_directory, GENESISCONNECT_URL . 'child-theme/' . $this->stylesheet);
         }
     } elseif (!is_admin()) {
         $this->front->set_addon(get_stylesheet_directory(), get_stylesheet_directory_uri());
     }
     do_action('gconnect_after_init');
 }
Ejemplo n.º 10
0
function genesischild_extra_widgets()
{
    genesis_register_sidebar(array('id' => 'preheaderleft', 'name' => __('PreHeaderLeft', 'genesischild'), 'description' => __('This is the preheader left area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'preheaderright', 'name' => __('PreHeaderRight', 'genesischild'), 'description' => __('This is the preheader right area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'hero', 'name' => __('Hero Home Page', 'genesischild'), 'description' => __('This is the Hero Home Page area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'optin', 'name' => __('Optin', 'genesischild'), 'description' => __('This is the optin area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'home-top', 'name' => __('Home Top', 'genesischild'), 'description' => __('This is the home top area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'home-middle', 'name' => __('Home Middle', 'genesischild'), 'description' => __('This is the home middle area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'home-bottom', 'name' => __('Home Bottom', 'genesischild'), 'description' => __('This is the home bottom area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'before-entry', 'name' => __('Before Entry', 'genesischild'), 'description' => __('This is the before content area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'footerwidgetheader', 'name' => __('Footer Widget Header', 'genesischild'), 'description' => __('This is for the Footer Widget Headline', 'genesischild')));
    genesis_register_sidebar(array('id' => 'footercontent', 'name' => __('Footer', 'genesischild'), 'description' => __('This is the general footer area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'postfooterleft', 'name' => __('Post Footer Left', 'genesischild'), 'description' => __('This is the post footer left area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'postfooterright', 'name' => __('Post Footer Right', 'genesischild'), 'description' => __('This is the post footer right area', 'genesischild')));
}
Ejemplo n.º 11
0
/**
 * This function calls necessary child theme files
 *
 * @since 1.1.0
 */
function bw_init()
{
    /** Theme Specific Functions */
    include_once CHILD_LIB_DIR . '/functions/bw-functions.php';
    // Load admin files when necessary
    if (is_admin()) {
        // Admin files here
    }
    /** Customizer Options 
    		Must be outside is_admin check because the Customizer displays a theme page**/
    include_once CHILD_LIB_DIR . '/admin/bw-customizer.php';
    /**Image Reloaded **/
    include_once CHILD_LIB_DIR . '/admin/bw-customize-image-reloaded.php';
    genesis_register_sidebar(array('id' => 'top-bar', 'name' => __('Top Bar', CHILD_DOMAIN), 'description' => __('This is a widget area that is the top bar', CHILD_DOMAIN)));
}
Ejemplo n.º 12
0
/**
 * Register additional widget areas.
 *
 * Note: Has to be early on the "init" hook in order to display translations!
 *
 * @since 1.0.0
 *
 * @uses  is_admin()
 * @uses  genesis_register_sidebar()
 *
 * @param string 	$gwnf_404_widget_title
 * @param string 	$gwnf_404_widget_description
 * @param string 	$gwnf_notfound_widget_title
 * @param string 	$gwnf_notfound_widget_description
 */
function ddw_gwnf_register_widget_areas()
{
    /** Add shortcode support to widgets */
    if (!GWNF_NO_WIDGETS_SHORTCODE && !is_admin()) {
        add_filter('widget_text', 'do_shortcode');
    }
    // end-if constant & !is_admin() check
    /** Set filter for "404 Error Page" widget title */
    $gwnf_404_widget_title = apply_filters('gwnf_filter_404_widget_title', __('404 Error Page', 'genesis-widgetized-notfound'));
    /** Set filter for "404 Error Page" widget description */
    $gwnf_404_widget_description = apply_filters('gwnf_filter_404_widget_description', __('This is the widget area of the 404 Not Found Error Page.', 'genesis-widgetized-notfound'));
    /** Register the "404 Error Page" widget area */
    genesis_register_sidebar(array('id' => 'gwnf-404-widget', 'name' => $gwnf_404_widget_title, 'description' => $gwnf_404_widget_description, 'before_widget' => '<div id="%1$s" class="gwnf-404 widget-area %2$s">', 'after_widget' => '</div>'));
    /** Set filter for "Search Not Found" widget title */
    $gwnf_notfound_widget_title = apply_filters('gwnf_filter_notfound_widget_title', __('Search Not Found', 'genesis-widgetized-notfound'));
    /** Set filter for "Search Not Found" widget description */
    $gwnf_notfound_widget_description = apply_filters('gwnf_filter_notfound_widget_description', __('This is the widget area of the search not found content section.', 'genesis-widgetized-notfound'));
    /** Register the "Search Not Found" widget area */
    genesis_register_sidebar(array('id' => 'gwnf-notfound-widget', 'name' => $gwnf_notfound_widget_title, 'description' => $gwnf_notfound_widget_description, 'before_widget' => '<div id="%1$s" class="gwnf-notfound widget-area %2$s">', 'after_widget' => '</div>'));
}
Ejemplo n.º 13
0
        $class .= ' widget-halves';
    }
    return $class;
}
//* Relocate the post info
remove_action('genesis_entry_header', 'genesis_post_info', 12);
add_action('genesis_entry_header', 'genesis_post_info', 5);
//* Customize the entry meta in the entry header
add_filter('genesis_post_info', 'altitude_post_info_filter');
function altitude_post_info_filter($post_info)
{
    $post_info = '[post_date format="M d Y"] [post_edit]';
    return $post_info;
}
//* Customize the entry meta in the entry footer
add_filter('genesis_post_meta', 'altitude_post_meta_filter');
function altitude_post_meta_filter($post_meta)
{
    $post_meta = 'Written by [post_author_posts_link] [post_categories before=" &middot; Categorized: "]  [post_tags before=" &middot; Tagged: "]';
    return $post_meta;
}
//* Register widget areas
genesis_register_sidebar(array('id' => 'front-page-1', 'name' => __('Front Page 1', 'altitude'), 'description' => __('This is the front page 1 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-2', 'name' => __('Front Page 2', 'altitude'), 'description' => __('This is the front page 2 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-3', 'name' => __('Front Page 3', 'altitude'), 'description' => __('This is the front page 3 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-4', 'name' => __('Front Page 4', 'altitude'), 'description' => __('This is the front page 4 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-5', 'name' => __('Front Page 5', 'altitude'), 'description' => __('This is the front page 5 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-6', 'name' => __('Front Page 6', 'altitude'), 'description' => __('This is the front page 6 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-7', 'name' => __('Front Page 7', 'altitude'), 'description' => __('This is the front page 7 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-8', 'name' => __('Front Page 8', 'altitude'), 'description' => __('This is the front page 8 section.', 'altitude')));
Ejemplo n.º 14
0
        echo '<div class="sub-footer"><div class="wrap">';
        genesis_widget_area('sub-footer-left', array('before' => '<div class="sub-footer-left">', 'after' => '</div>'));
        genesis_widget_area('sub-footer-right', array('before' => '<div class="sub-footer-right">', 'after' => '</div>'));
        echo '</div><!-- end .wrap --></div><!-- end .sub-footer -->';
    }
}
add_action('genesis_after_header', 'amazing_times_homepage_sidebar');
function amazing_times_homepage_sidebar()
{
    if (!is_home()) {
        return;
    }
    remove_action('genesis_sidebar', 'genesis_do_sidebar');
    add_action('genesis_sidebar', 'amazing_times_do_sidebar');
}
function amazing_times_do_sidebar()
{
    dynamic_sidebar('home-sidebar');
}
//* Add support for 3-column footer widgets
add_theme_support('genesis-footer-widgets', 3);
//* Register widget areas
genesis_register_sidebar(array('id' => 'home-sidebar', 'name' => __('Home Sidebar', 'amazingtimes'), 'description' => __('This is the homepage sidebar.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-featured-full', 'name' => __('Home Featured', 'amazingtimes'), 'description' => __('This is the featured section of the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-top-full', 'name' => __('Home Top', 'amazingtimes'), 'description' => __('This is the top section of the content area on the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-middle-full', 'name' => __('Home Middle', 'amazingtimes'), 'description' => __('This is the middle section of the content area on the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-bottom-full', 'name' => __('Home Bottom', 'amazingtimes'), 'description' => __('This is the bottom section of the content area on the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'after-entry', 'name' => __('After Entry', 'amazingtimes'), 'description' => __('This is the after entry widget area.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'sub-footer-left', 'name' => __('Sub Footer - Left', 'amazingtimes'), 'description' => __('This is the left section of the sub footer.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'sub-footer-right', 'name' => __('Sub Footer - Right', 'amazingtimes'), 'description' => __('This is the right section of the sub footer.', 'amazingtimes')));
Ejemplo n.º 15
0
function streamline_author_box_gravatar_size($size)
{
    return '80';
}
/** Customize the post meta function */
add_filter('genesis_post_meta', 'post_meta_filter');
function post_meta_filter($post_meta)
{
    if (!is_page()) {
        $post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
        return $post_meta;
    }
}
/** Add the after post section */
add_action('genesis_after_post_content', 'streamline_after_post');
function streamline_after_post()
{
    if (!is_singular('post')) {
        return;
    }
    genesis_widget_area('after-post', array('before' => '<div class="after-post widget-area">'));
}
/** Add support for 3-column footer widgets */
add_theme_support('genesis-footer-widgets', 3);
/** Register widget areas */
genesis_register_sidebar(array('id' => 'newsletter', 'name' => __('Newsletter', 'streamline'), 'description' => __('This is the newsletter section below the navigation.', 'streamline')));
genesis_register_sidebar(array('id' => 'home-featured-1', 'name' => __('Home Featured #1', 'streamline'), 'description' => __('This is the featured #1 column on the homepage.', 'streamline')));
genesis_register_sidebar(array('id' => 'home-featured-2', 'name' => __('Home Featured #2', 'streamline'), 'description' => __('This is the featured #2 column on the homepage.', 'streamline')));
genesis_register_sidebar(array('id' => 'home-featured-3', 'name' => __('Home Featured #3', 'streamline'), 'description' => __('This is the featured #3 column on the homepage.', 'streamline')));
genesis_register_sidebar(array('id' => 'after-post', 'name' => __('After Post', 'streamline'), 'description' => __('This is the after post section.', 'streamline')));
add_action('get_header', 'remove_post_meta');
function remove_post_meta()
{
    if (is_front_page()) {
        remove_action('genesis_after_post_content', 'genesis_post_meta');
    }
}
// Add widgeted footer section
add_action('genesis_before_footer', 'agentpress_include_footer_widgets');
function agentpress_include_footer_widgets()
{
    require_once CHILD_DIR . '/footer-widgeted.php';
}
// Customize the footer section
add_filter('genesis_footer_creds_text', 'expose_footer_creds_text');
function expose_footer_creds_text($creds)
{
    $creds = __('Copyright', 'genesis') . ' [footer_copyright] [footer_childtheme_link] ' . __('on', 'expose') . ' [footer_genesis_link] &middot; [footer_wordpress_link] &middot; [footer_loginout]';
    return $creds;
}
// Custom text to display when no comments exist on a post
add_filter('genesis_no_comments_text', 'expose_no_comments_text');
function expose_no_comments_text()
{
    return '<h3>Comments</h3><div class="no-comments">There are currently no comments on this post, be the first by filling out the form below.</div>';
}
// Register widget areas
genesis_register_sidebar(array('name' => 'Footer #1', 'id' => 'footer-1', 'description' => 'This is the first column of the footer section.', 'before_title' => '<h4 class="widgettitle">', 'after_title' => '</h4>'));
genesis_register_sidebar(array('name' => 'Footer #2', 'id' => 'footer-2', 'description' => 'This is the second column of the footer section.', 'before_title' => '<h4 class="widgettitle">', 'after_title' => '</h4>'));
genesis_register_sidebar(array('name' => 'Footer #3', 'id' => 'footer-3', 'description' => 'This is the third column of the footer section.', 'before_title' => '<h4 class="widgettitle">', 'after_title' => '</h4>'));
function gregr_theme_setup()
{
    // Start the engine
    // Holds all of the funtions called from this main file
    // View /lib/gregr_child_functions.php for details
    include_once get_stylesheet_directory() . '/lib/gregr_child_functions.php';
    /* <-- THIS FILE IS REQUIRED!! DO NOT REMOVE --> */
    // Add a custom post types with or without custom taxonomy
    // View /lib/custom_post_types for details
    //include_once( get_stylesheet_directory() . '/lib/custom_post_types.php' );
    // Add some custom options to the admin panel
    // View /lib/admin_funtions.php for details
    include_once get_stylesheet_directory() . '/lib/admin_functions.php';
    // Custom metabox options
    //include_once( get_stylesheet_directory() . '/lib/custom_metabox.php' );
    // Add additional theme options
    include_once get_stylesheet_directory() . '/lib/custom_theme_options.php';
    /***** CLEAN UP THE <HEAD> *****/
    // Remove rsd link
    remove_action('wp_head', 'rsd_link');
    // Remove Windows Live Writer
    remove_action('wp_head', 'wlwmanifest_link');
    // Index link
    remove_action('wp_head', 'index_rel_link');
    // Previous link
    remove_action('wp_head', 'parent_post_rel_link', 10, 0);
    // Start link
    remove_action('wp_head', 'start_post_rel_link', 10, 0);
    // Links for adjacent posts
    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
    // Remove WP version
    remove_action('wp_head', 'wp_generator');
    /***** OTHER <HEAD> ELEMENTS *****/
    // Add Viewport meta tag for mobile browsers
    add_action('genesis_meta', 'gregr_viewport_meta_tag');
    //* Add viewport meta tag for mobile browsers GENESIS 2.0 FEATURE
    // Disable the action above if you want to use what Genesis adds for viewport. Use one or the other
    //add_theme_support( 'genesis-responsive-viewport' );
    // Change favicon location
    //add_filter( 'genesis_pre_load_favicon', 'gregr_favicon_filter' );
    // Add scripts & styles
    add_action('wp_enqueue_scripts', 'gregr_load_custom_scripts', 999);
    // IE conditional wrapper
    add_filter('style_loader_tag', 'gregr_ie_conditional', 10, 2);
    // Remove version number from js and css
    if (!is_admin() || !is_admin_bar_showing()) {
        add_filter('script_loader_src', '_remove_script_version', 15, 1);
        add_filter('style_loader_src', '_remove_script_version', 15, 1);
    }
    /***** STRUCTURE & REPOSITIONING *****/
    // Add HTML5 functions
    add_theme_support('html5');
    /** Add support for structural wraps */
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer'));
    // Adds custom microdata depending on post type - can me modified in gregr_child_functions file
    // KEEP DISABLED UNLESS YOU DO SOMETHING IN "gregr_child_functions.php" FILE
    // add_filter( 'genesis_attr_entry', 'gregr_custom_entry_attributes', 20 );
    // Reposition nav menus
    //remove_action('genesis_after_header','genesis_do_nav');
    //remove_action('genesis_after_header','genesis_do_subnav');
    //add_action('genesis_header_right','genesis_do_subnav');
    //add_action('genesis_header_right','genesis_do_nav');
    // Remove Genesis layout settings
    // remove_theme_support( 'genesis-inpost-layouts' );
    /***** CUSTOMIZING TITLES & DESCRIPTION & BREADCRUMBS *****/
    // Remove and/or add custom site title
    //remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
    //add_action( 'genesis_site_title', 'gregr_custom_seo_site_title' );
    // Remove and/or add custom post title
    //remove_action('genesis_entry_header','genesis_do_post_title');
    //add_action('genesis_entry_header','gregr_do_custom_post_title');
    // Remove and/or add custom site description
    //remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
    //add_action( 'genesis_site_description', 'gregr_custom_seo_site_description' );
    // Reposition breadcrumbs
    //remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    //add_action( 'genesis_entry_header', 'genesis_do_breadcrumbs' );
    /***** FOOTER *****/
    // Footer creds
    add_filter('genesis_footer_creds_text', 'gregr_footer_creds_text');
    add_filter('genesis_footer_backtotop_text', 'gregr_footer_backtotop_text');
    // Add support for footer widgets
    add_theme_support('genesis-footer-widgets', 3);
    /***** OTHER GENESIS CLEANUP OPTIONS *****/
    // Remove Genesis widgets
    //add_action( 'widgets_init', 'gregr_remove_genesis_widgets', 20 );
    // Remove unused Genesis profile options
    remove_action('show_user_profile', 'genesis_user_options_fields');
    remove_action('edit_user_profile', 'genesis_user_options_fields');
    remove_action('show_user_profile', 'genesis_user_archive_fields');
    remove_action('edit_user_profile', 'genesis_user_archive_fields');
    remove_action('show_user_profile', 'genesis_user_seo_fields');
    remove_action('edit_user_profile', 'genesis_user_seo_fields');
    remove_action('show_user_profile', 'genesis_user_layout_fields');
    remove_action('edit_user_profile', 'genesis_user_layout_fields');
    // Remove Genesis layout options
    //genesis_unregister_layout( 'sidebar-content' );
    //genesis_unregister_layout( 'content-sidebar-sidebar' );
    //genesis_unregister_layout( 'sidebar-sidebar-content' );
    //genesis_unregister_layout( 'sidebar-content-sidebar' );
    //genesis_unregister_layout( 'content-sidebar' );
    //genesis_unregister_layout( 'full-width-content' );
    // Remove Genesis menu link
    //remove_theme_support( 'genesis-admin-menu' );
    /***** SIDEBARS & WIDGETS *****/
    // Remove the header right widget area
    //unregister_sidebar( 'header-right' );
    //unregister_sidebar( 'sidebar-alt' );
    // Home page widgets
    genesis_register_sidebar(array('id' => 'home-featured-full', 'name' => __('Home Featured Full', 'gregshtml5starter'), 'description' => __('This is the featured section if you want full width.', 'gregshtml5starter')));
    genesis_register_sidebar(array('id' => 'home-featured-left', 'name' => __('Home Featured Left', 'gregshtml5starter'), 'description' => __('This is the featured section left side.', 'gregshtml5starter')));
    genesis_register_sidebar(array('id' => 'home-featured-right', 'name' => __('Home Featured Right', 'gregshtml5starter'), 'description' => __('This is the featured section right side.', 'gregshtml5starter')));
    genesis_register_sidebar(array('id' => 'home-middle-1', 'name' => __('Home Middle 1', 'gregshtml5starter'), 'description' => __('This is the home middle left section.', 'gregshtml5starter')));
    genesis_register_sidebar(array('id' => 'home-middle-2', 'name' => __('Home Middle 2', 'gregshtml5starter'), 'description' => __('This is the home middle center section.', 'gregshtml5starter')));
    genesis_register_sidebar(array('id' => 'home-middle-3', 'name' => __('Home Middle 3', 'gregshtml5starter'), 'description' => __('This is the home middle right section.', 'gregshtml5starter')));
    genesis_register_sidebar(array('id' => 'home-bottom', 'name' => __('Home Bottom', 'gregshtml5starter'), 'description' => __('This is the home bottom section.', 'gregshtml5starter')));
    /***** OTHER *****/
    add_filter('http_request_args', 'gregr_prevent_theme_update', 5, 2);
    //add_image_size( 'custom-thumb', 220, 180 );
    // Below is the closing bracket of theme setup. It's kinda important.
}
Ejemplo n.º 18
0
    $loop .= sprintf('<a href="%s" class="more-link">%s</a>', get_permalink(), __('View Listing', 'apl'));
    return $loop;
}
/** Register widget areas */
genesis_register_sidebar(array('id' => 'top-search', 'name' => __('Top Search', 'signature'), 'description' => __('This is the top search section.', 'signature')));
genesis_register_sidebar(array('id' => 'slider', 'name' => __('Slider', 'signature'), 'description' => __('This is the slider section.', 'signature')));
genesis_register_sidebar(array('id' => 'property-search', 'name' => __('Property Search', 'signature'), 'description' => __('This is the property search section.', 'signature')));
genesis_register_sidebar(array('id' => 'connect', 'name' => __('Connect', 'signature'), 'description' => __('This is the black bar with connect info', 'signature')));
genesis_register_sidebar(array('id' => 'news', 'name' => __('In the News', 'signature'), 'description' => __('This is the In the News section.', 'signature')));
genesis_register_sidebar(array('id' => 'meet', 'name' => __('Meet', 'signature'), 'description' => __('This is the meet section.', 'signature')));
genesis_register_sidebar(array('id' => 'book', 'name' => __('Book', 'signature'), 'description' => __('This is the book section.', 'signature')));
genesis_register_sidebar(array('id' => 'testimonials', 'name' => __('Testimonials', 'signature'), 'description' => __('This is the testimonials section.', 'signature')));
genesis_register_sidebar(array('id' => 'properties', 'name' => __('Properties', 'signature'), 'description' => __('This is the properties section.', 'signature')));
genesis_register_sidebar(array('id' => 'featured-bottom-left', 'name' => __('Featured Bottom Left', 'signature'), 'description' => __('This is the featured bottom left section.', 'signature')));
genesis_register_sidebar(array('id' => 'featured-bottom-right', 'name' => __('Featured Bottom Right', 'signature'), 'description' => __('This is the featured bottom right section.', 'signature')));
genesis_register_sidebar(array('id' => 'disclaimer', 'name' => __('Disclaimer', 'signature'), 'description' => __('This is the disclaimer section.', 'signature')));
/**
 * Custom header callback.
 *
 * It outputs special CSS to the document head, modifying the look of the header
 * based on user input.
 *
 * @since 1.6.0
 */
remove_action('genesis_site_description', 'genesis_seo_site_description');
function genesis_custom_header_style()
{
    /** If no options set, don't waste the output. Do nothing. */
    if (HEADER_IMAGE == get_header_image()) {
        return;
    }
Ejemplo n.º 19
0
    $count = plumr_count_widgets($id);
    $class = '';
    if ($count == 1) {
        $class .= ' widget-full';
    } elseif ($count % 3 == 1) {
        $class .= ' widget-thirds';
    } elseif ($count % 4 == 1) {
        $class .= ' widget-fourths';
    } elseif ($count % 2 == 0) {
        $class .= ' widget-halves uneven';
    } else {
        $class .= ' widget-halves';
    }
    return $class;
}
//* Add support for 1-column footer widget
add_theme_support('genesis-footer-widgets', 1);
//* Register widget areas
genesis_register_sidebar(array('id' => 'front-page-1', 'name' => __('Front Page 1', 'plumr'), 'description' => __('This is the 1st section on the front page.', 'plumr')));
genesis_register_sidebar(array('id' => 'front-page-2', 'name' => __('Front Page 2', 'plumr'), 'description' => __('This is the 2nd section on the front page.', 'plumr')));
genesis_register_sidebar(array('id' => 'front-page-3', 'name' => __('Front Page 3', 'plumr'), 'description' => __('This is the 3rd section on the front page.', 'plumr')));
genesis_register_sidebar(array('id' => 'front-page-4', 'name' => __('Front Page 4', 'plumr'), 'description' => __('This is the 4th section on the front page.', 'plumr')));
//* Customize the entire footer
remove_action('genesis_footer', 'genesis_do_footer');
add_action('genesis_footer', 'sp_custom_footer');
function sp_custom_footer()
{
    ?>
	<p>&copy; Copyright 2016 <a href="http://myplumr.com/">Plumr</a> &middot; All Rights Reserved &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
	<?php 
}
Ejemplo n.º 20
0
    genesis_widget_area('welcome-message', array('before' => '<div class="welcome-message"><div class="wrap">', 'after' => '</div></div>'));
}
//* Customize more tag
add_filter('the_content_more_link', 'bg_custom_more_tag');
function bg_custom_more_tag()
{
    return '<a class="more-link" href="' . get_permalink() . '">Continue Reading</a>';
}
//* Remove entry meta in the entry header
remove_action('genesis_entry_header', 'genesis_entry_header_markup_open', 5);
remove_action('genesis_entry_header', 'genesis_post_info', 12);
remove_action('genesis_entry_header', 'genesis_entry_header_markup_close', 15);
//* Remove the entry meta in the entry footer
remove_action('genesis_entry_footer', 'genesis_entry_footer_markup_open', 5);
remove_action('genesis_entry_footer', 'genesis_post_meta');
remove_action('genesis_entry_footer', 'genesis_entry_footer_markup_close', 15);
//* Remove site footer
remove_action('genesis_footer', 'genesis_footer_markup_open', 5);
remove_action('genesis_footer', 'genesis_do_footer');
remove_action('genesis_footer', 'genesis_footer_markup_close', 15);
//* Hook site footer widget area
add_action('genesis_footer', 'bg_site_footer', 3);
function bg_site_footer()
{
    genesis_widget_area('site-footer', array('before' => '<footer class="site-footer" itemscope itemtype="http://schema.org/WPFooter"><div class="wrap">', 'after' => '</div></footer>'));
}
//* Register widget areas
genesis_register_sidebar(array('id' => 'welcome-message', 'name' => __('Welcome Message', 'bg'), 'description' => __('This is the welcome message widget area.', 'bg')));
genesis_register_sidebar(array('id' => 'newsletter-signup', 'name' => __('Newsletter Signup', 'bg'), 'description' => __('This is the newsletter signup widget area.', 'bg')));
genesis_register_sidebar(array('id' => 'site-footer', 'name' => __('Site Footer', 'bg'), 'description' => __('This is the site footer widget area.', 'bg')));
Ejemplo n.º 21
0
<?php

/*
 *  Register widget areas
 *  
 *  
 *  @package     Scratch
 *  @author      Justin Gries
 *  @license     GPL-2.0+
 */
// register the 'home-welcome' sidebar
genesis_register_sidebar(array('id' => 'home-welcome', 'name' => __('Home Welcome', CHILD_THEME_NAME), 'description' => __('This is a home widget area that will show ' . 'on the front page', CHILD_THEME_NAME)));
// register the 'call-to-action' sidebar
genesis_register_sidebar(array('id' => 'call-to-action', 'name' => __('Call to Action', CHILD_THEME_NAME), 'description' => __('This is a call-to-action widget area that will show ' . 'on the front page', CHILD_THEME_NAME)));
Ejemplo n.º 22
0
<?php

//* Start the engine
include_once get_template_directory() . '/lib/init.php';
//* Child theme (do not remove)
define('CHILD_THEME_NAME', 'WordCampBerlin15');
define('CHILD_THEME_URL', 'https://github.com/arkadiusjonczek/wordcampberlin15');
define('CHILD_THEME_VERSION', '1.0.0');
//* Enqueue Google Fonts
add_action('wp_enqueue_scripts', 'genesis_sample_google_fonts');
function genesis_sample_google_fonts()
{
    wp_enqueue_style('google-fonts', '//fonts.googleapis.com/css?family=Libre+Baskerville:400,700|Roboto+Condensed:300', array(), CHILD_THEME_VERSION);
}
//* Add HTML5 markup structure
add_theme_support('html5', array('search-form', 'comment-form', 'comment-list'));
//* Add Accessibility support
add_theme_support('genesis-accessibility', array('headings', 'drop-down-menu', 'search-form', 'skip-links', 'rems'));
//* Add viewport meta tag for mobile browsers
add_theme_support('genesis-responsive-viewport');
//* Add support for custom background
add_theme_support('custom-background');
//* Add support for 3-column footer widgets
add_theme_support('genesis-footer-widgets', 3);
genesis_register_sidebar(array('id' => 'front-page-1', 'name' => __('Front Page 1', 'wordcampberlin15'), 'description' => __('This is the front page 1 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-2', 'name' => __('Front Page 2', 'wordcampberlin15'), 'description' => __('This is the front page 2 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-3', 'name' => __('Front Page 3', 'wordcampberlin15'), 'description' => __('This is the front page 3 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-4', 'name' => __('Front Page 4', 'wordcampberlin15'), 'description' => __('This is the front page 4 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-5', 'name' => __('Front Page 5', 'wordcampberlin15'), 'description' => __('This is the front page 5 section.', 'altitude')));
Ejemplo n.º 23
0
genesis_register_sidebar(array('id' => 'home-slider', 'name' => __('Home - Slider', 'executive'), 'description' => __('This is the slider section on the home page.', 'executive')));
/** Add custom sidebar */
genesis_register_sidebar(array('name' => __('About Company sidebar', 'executive'), 'id' => 'sidebar-about', 'description' => __('This is an about sidebar', 'executive')));
/** Add the company text section */
//add_action( 'genesis_before_content_sidebar_wrap', 'custom_company_text' );
//add_action('genesis_before_content_sidebar_wrap','custom_company_text');
/*function custom_company_text(){
    if(!is_home())
        return;
    genesis_widget_area('company-text', array(
        'before' => '<div class="company-text widget-area">'
    ));
}*/
genesis_register_sidebar(array('id' => 'home-top', 'name' => __('Home - Top', 'executive'), 'description' => __('This is the top section of the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-cta', 'name' => __('Home - Call To Action', 'executive'), 'description' => __('This is the call to action section on the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-middle', 'name' => __('Home - Middle', 'executive'), 'description' => __('This is the middle section of the home page.', 'executive')));
unregister_sidebar('home-cta');
unregister_sidebar('home-top');
unregister_sidebar('home-middle');
// Read more button
/*function sp_read_more_link(){
    return '... <br/><a class="more-link" href="'. the_permalink().'">[Continue Reading]</a>';
}*/
//add_filter('get_the_content_more_link','sp_read_more_link');
/* function executive_read_more(){
       return '<a class="btn btn--sm" target="_blank" href="'.get_permalink() .'"></a>';
    }
add_filter('excerpt_more', 'executive_read_more');*/
/**********************************
 *
 * Replace Header Site Title with Inline Logo
Ejemplo n.º 24
0
    if ('portfolio' == get_post_type()) {
        return '';
    }
    return $output;
}
//* Remove comment form allowed tags
add_filter('comment_form_defaults', 'executive_remove_comment_form_allowed_tags');
function executive_remove_comment_form_allowed_tags($defaults)
{
    $defaults['comment_notes_after'] = '';
    return $defaults;
}
//* Add support for 3-column footer widgets
add_theme_support('genesis-footer-widgets', 3);
//* Add support for after entry widget
add_theme_support('genesis-after-entry-widget-area');
//* Relocate after entry widget
remove_action('genesis_after_entry', 'genesis_after_entry_widget_area');
add_action('genesis_after_entry', 'genesis_after_entry_widget_area', 5);
//* Register widget areas
genesis_register_sidebar(array('id' => 'home-slider', 'name' => __('Home - Slider', 'executive'), 'description' => __('This is the slider section on the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-top', 'name' => __('Home - Top', 'executive'), 'description' => __('This is the top section of the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-cta', 'name' => __('Home - Call To Action', 'executive'), 'description' => __('This is the call to action section on the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-middle', 'name' => __('Home - Middle', 'executive'), 'description' => __('This is the middle section of the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-divider', 'name' => __('Home - Divider', 'executive'), 'description' => __('This is a divider for the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-divider2', 'name' => __('Home - Divider 2', 'executive'), 'description' => __('This is a divider for the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-divider3', 'name' => __('Home - Divider 3', 'executive'), 'description' => __('This is a divider for the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-divider4', 'name' => __('Home - Divider 3', 'executive'), 'description' => __('This is a divider for the home page.', 'executive')));
genesis_register_sidebar(array('id' => 'home-photo', 'name' => __('Home - Photo', 'executive'), 'description' => __('Home photo.', 'executive')));
genesis_register_sidebar(array('id' => 'home-hosting', 'name' => __('Home - Hosting', 'executive'), 'description' => __('Home hosting.', 'executive')));
Ejemplo n.º 25
0
genesis_register_sidebar(array('id' => 'welcome-feature-1', 'name' => __('Welcome Feature #1', 'epik'), 'description' => __('This is the first column of the Welcome feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'welcome-feature-2', 'name' => __('Welcome Feature #2', 'epik'), 'description' => __('This is the second column of the Welcome feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'welcome-feature-3', 'name' => __('Welcome Feature #3', 'epik'), 'description' => __('This is the third column of the Welcome feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-1', 'name' => __('Home Feature #1 (Left)', 'epik'), 'description' => __('This is the first column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-2', 'name' => __('Home Feature #2 (Right)', 'epik'), 'description' => __('This is the second column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-3', 'name' => __('Home Feature #3 (Gray)', 'epik'), 'description' => __('This is the 3rd column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-4', 'name' => __('Home Feature #4 (White)', 'epik'), 'description' => __('This is the 4th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-5', 'name' => __('Home Feature #5 (Dark Gray)', 'epik'), 'description' => __('This is the 5th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-6', 'name' => __('Home Feature #6 (White)', 'epik'), 'description' => __('This is the 6th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-7', 'name' => __('Home Feature #7 (Gray)', 'epik'), 'description' => __('This is the 7th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-8', 'name' => __('Home Feature #8 (White)', 'epik'), 'description' => __('This is the 8th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-9', 'name' => __('Home Feature #9 (Gray)', 'epik'), 'description' => __('This is the 9th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-10', 'name' => __('Home Feature #10', 'epik'), 'description' => __('This is the 10th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-11', 'name' => __('Home Feature #11', 'epik'), 'description' => __('This is the 11th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-12', 'name' => __('Home Feature #12', 'epik'), 'description' => __('This is the 12th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-13', 'name' => __('Home Feature #13', 'epik'), 'description' => __('This is the 13th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'home-feature-14', 'name' => __('Home Feature #14 (White)', 'epik'), 'description' => __('This is the 14th column of the feature section of the homepage.', 'epik')));
genesis_register_sidebar(array('id' => 'after-entry', 'name' => __('After Entry', 'epik'), 'description' => __('This widget will show up at the very end of each post.', 'epik')));
/** Force full width layout on single posts only*/
add_filter('genesis_pre_get_option_site_layout', 'full_width_layout_single_posts');
/** 
* @author Brad Dalton 
* @link http://wpsites.net/web-design/change-layout-genesis/ 
*/
function full_width_layout_single_posts($opt)
{
    if (is_single()) {
        $opt = 'content-sidebar';
        return $opt;
    }
}
require_once TEMPLATEPATH . '/lib/init.php';
require_once CHILD_DIR . '/lib/style.php';
/** Child theme (do not remove) **/
define('CHILD_THEME_NAME', 'Focus Theme');
define('CHILD_THEME_URL', 'http://www.studiopress.com/themes/focus');
/** Add support for custom background **/
add_custom_background();
/** Add support for custom header **/
add_theme_support('genesis-custom-header', array('width' => 960, 'height' => 100));
/** Add support for 3-column footer widgets **/
add_theme_support('genesis-footer-widgets', 3);
/** Add new image sizes **/
add_image_size('grid-thumbnail', 100, 100, TRUE);
/** Modify the size of the Gravatar in the author box **/
add_filter('genesis_author_box_gravatar_size', 'focus_gravatar_size');
function focus_gravatar_size($size)
{
    return 80;
}
/** Add after post section **/
add_action('genesis_before_comments', 'focus_after_post_box');
function focus_after_post_box()
{
    if (is_single()) {
        require CHILD_DIR . '/after-post.php';
    }
}
/** Register widget areas **/
genesis_register_sidebar(array('id' => 'after-post-left', 'name' => __('After Post Left', 'focus'), 'description' => __('This is the left section after a post.', 'focus')));
genesis_register_sidebar(array('id' => 'after-post-right', 'name' => __('After Post Right', 'focus'), 'description' => __('This is the right section after a post.', 'focus')));
</label> <input type="text" name="<?php 
    echo GENESIS_SETTINGS_FIELD;
    ?>
[crystal_portfolio_content_archive_limit]" id="<?php 
    echo GENESIS_SETTINGS_FIELD;
    ?>
[crystal_portfolio_content_archive_limit]" value="<?php 
    echo esc_attr(genesis_option('crystal_portfolio_content_archive_limit'));
    ?>
" size="3" /> <label for="<?php 
    echo GENESIS_SETTINGS_FIELD;
    ?>
[crystal_portfolio_content_archive_limit]"><?php 
    _e('characters', 'genesis');
    ?>
</label></p>
    
    <p><span class="description"><?php 
    _e('<b>NOTE:</b> Using this option will limit the text and strip all formatting from the text displayed. To use this option, choose "Display post content" in the select box above.', 'genesis');
    ?>
</span></p>
<?php 
}
// Register widget areas
genesis_register_sidebar(array('name' => 'Home Top Left', 'id' => 'home-top-left', 'description' => 'This is the top left section of the homepage.'));
genesis_register_sidebar(array('name' => 'Home Top Right', 'id' => 'home-top-right', 'description' => 'This is the top right section of the homepage.'));
genesis_register_sidebar(array('name' => 'Home Middle', 'id' => 'home-middle', 'description' => 'This is the first column of the middle section of the homepage.'));
genesis_register_sidebar(array('name' => 'Home Bottom #1', 'id' => 'home-bottom-1', 'description' => 'This is the first column of the bottom section of the homepage.'));
genesis_register_sidebar(array('name' => 'Home Bottom #2', 'id' => 'home-bottom-2', 'description' => 'This is the second column of the bottom section of the homepage.'));
genesis_register_sidebar(array('name' => 'Home Bottom #3', 'id' => 'home-bottom-3', 'description' => 'This is the third column of the bottom section of the homepage.'));
add_action('genesis_before_header', 'education_include_topnav');
function education_include_topnav()
{
    require CHILD_DIR . '/topnav.php';
}
// Force layout on homepage
add_filter('genesis_pre_get_option_site_layout', 'education_home_layout');
function education_home_layout($opt)
{
    if (is_home()) {
        $opt = 'content-sidebar-sidebar';
    }
    return $opt;
}
// Add inner wrap divs for full width background image
add_action('genesis_before_content_sidebar_wrap', 'edu_csw_wrap_div');
add_action('genesis_after_content_sidebar_wrap', 'edu_csw_wrap_div');
function edu_csw_wrap_div()
{
    echo current_filter() == 'genesis_before_content_sidebar_wrap' ? '<div class="wrap">' . "\n" : '</div><!-- end .wrap -->';
}
// Customize the footer section
add_filter('genesis_footer_creds_text', 'education_footer_creds_text');
function education_footer_creds_text($creds)
{
    $creds = __('Copyright', 'genesis') . ' [footer_copyright] [footer_childtheme_link] ' . __('on', 'education') . ' [footer_genesis_link] &middot; [footer_wordpress_link] &middot; [footer_loginout]';
    return $creds;
}
// Register widget areas
genesis_register_sidebar(array('name' => 'Homepage', 'id' => 'homepage', 'description' => 'This is the featured column of the homepage.'));
Ejemplo n.º 29
0
//* Hook sticky message before site header
add_action('genesis_before', 'mobile_first_sass_sticky_message');
function mobile_first_sass_sticky_message()
{
    genesis_widget_area('sticky-message', array('before' => '<div class="sticky-message">', 'after' => '</div>'));
}
//* Remove comment form allowed tags
add_filter('comment_form_defaults', 'mobile_first_sass_remove_comment_form_allowed_tags');
function mobile_first_sass_remove_comment_form_allowed_tags($defaults)
{
    $defaults['comment_notes_after'] = '';
    return $defaults;
}
//* Modify the size of the Gravatar in the author box
add_filter('genesis_author_box_gravatar_size', 'mobile_first_sass_author_box_gravatar');
function mobile_first_sass_author_box_gravatar($size)
{
    return 160;
}
//* Modify the size of the Gravatar in the entry comments
add_filter('genesis_comment_list_args', 'mobile_first_sass_comments_gravatar');
function mobile_first_sass_comments_gravatar($args)
{
    $args['avatar_size'] = 100;
    return $args;
}
//* Add support for 3-column footer widgets
add_theme_support('genesis-footer-widgets', 3);
//* Register widget areas
genesis_register_sidebar(array('id' => 'sticky-message', 'name' => __('Sticky Message', 'bg-mobile-first-jp-sass'), 'description' => __('This is the sticky message widget area.', 'bg-mobile-first-jp-sass')));
Ejemplo n.º 30
0
{
    global $product;
    $args['posts_per_page'] = 6;
    return $args;
}
add_filter('woocommerce_output_related_products_args', 'jk_related_products_args');
function jk_related_products_args($args)
{
    $args['posts_per_page'] = 4;
    // 4 related products
    $args['columns'] = 2;
    // arranged in 2 columns
    return $args;
}
//* Register Horizontal Opt-In widget area
genesis_register_sidebar(array('id' => 'horizontal-opt-in', 'name' => __('Horizontal Opt-In'), 'description' => __('This is the widget area for horizontal opt-in form.')));
//* Display Horizontal Opt-In below Header
add_action('genesis_before_header', 'sk_horizontal_opt_in');
function sk_horizontal_opt_in()
{
    genesis_widget_area('horizontal-opt-in', array('before' => '<div class="horizontal-opt-in widget-area"><div class="wrap">', 'after' => '</div></div>'));
}
//* Unregister secondary sidebar
unregister_sidebar('sidebar-alt');
// Set a minimum number of products requirement before checking out
add_action('woocommerce_check_cart_items', 'spyr_set_min_num_products');
function spyr_set_min_num_products()
{
    // Only run in the Cart or Checkout pages
    if (is_cart() || is_checkout()) {
        global $woocommerce;