//* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Set Localization (do not remove) load_child_theme_textdomain( 'outreach', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'outreach' ) ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Outreach Pro Theme', 'outreach' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/outreach/' ); define( 'CHILD_THEME_VERSION', '3.0.0' ); //* Add HTML5 markup structure add_theme_support( 'html5' ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Enqueue Google fonts add_action( 'wp_enqueue_scripts', 'outreach_google_fonts' ); function outreach_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:400,700', array(), CHILD_THEME_VERSION ); } //* Enqueue Responsive Menu Script add_action( 'wp_enqueue_scripts', 'outreach_enqueue_responsive_script' ); function outreach_enqueue_responsive_script() { wp_enqueue_script( 'outreach-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); } //* Add new image sizes add_image_size( 'home-top', 1140, 460, TRUE ); add_image_size( 'home-bottom', 285, 160, TRUE ); add_image_size( 'sidebar', 300, 150, TRUE ); //* Add support for custom header add_theme_support( 'custom-header', array( 'header-selector' => '.site-title a', 'header-text' => false, 'height' => 100, 'width' => 340, ) ); //* Add support for custom background add_theme_support( 'custom-background' ); //* Add support for additional color style options add_theme_support( 'genesis-style-selector', array( 'outreach-pro-blue' => __( 'Outreach Pro Blue', 'outreach' ), 'outreach-pro-orange' => __( 'Outreach Pro Orange', 'outreach' ), 'outreach-pro-purple' => __( 'Outreach Pro Purple', 'outreach' ), 'outreach-pro-red' => __( 'Outreach Pro Red', 'outreach' ), ) ); //* Add support for structural wraps add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'site-inner', 'footer-widgets', 'footer', ) ); //* Add support for 4-column footer widgets add_theme_support( 'genesis-footer-widgets', 4 ); //* Set Genesis Responsive Slider defaults add_filter( 'genesis_responsive_slider_settings_defaults', 'outreach_responsive_slider_defaults' ); function outreach_responsive_slider_defaults( $defaults ) { $args = array( 'location_horizontal' => 'Left', 'location_vertical' => 'bottom', 'posts_num' => '4', 'slideshow_excerpt_content_limit' => '100', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_width' => '35', 'slideshow_height' => '460', 'slideshow_more_text' => __( 'Continue Reading', 'outreach' ), 'slideshow_title_show' => 1, 'slideshow_width' => '1140', ); $args = wp_parse_args( $args, $defaults ); return $args; } //* Hook after post widget after the entry content add_action( 'genesis_after_entry', 'outreach_after_entry', 5 ); function outreach_after_entry() { if ( is_singular( 'post' ) ) genesis_widget_area( 'after-entry', array( 'before' => '
', ) ); } //* Modify the size of the Gravatar in the author box add_filter( 'genesis_author_box_gravatar_size', 'outreach_author_box_gravatar_size' ); function outreach_author_box_gravatar_size( $size ) { return '80'; } //* Remove comment form allowed tags add_filter( 'comment_form_defaults', 'outreach_remove_comment_form_allowed_tags' ); function outreach_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } //* Add the sub footer section add_action( 'genesis_before_footer', 'outreach_sub_footer', 5 ); function outreach_sub_footer() { if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) { echo ''; } } //* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'outreach' ), 'description' => __( 'This is the top section of the Home page.', 'outreach' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'outreach' ), 'description' => __( 'This is the bottom section of the Home page.', 'outreach' ), ) ); genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'outreach' ), 'description' => __( 'This is the after entry widget area.', 'outreach' ), ) ); genesis_register_sidebar( array( 'id' => 'sub-footer-left', 'name' => __( 'Sub Footer - Left', 'outreach' ), 'description' => __( 'This is the left section of the sub footer.', 'outreach' ), ) ); genesis_register_sidebar( array( 'id' => 'sub-footer-right', 'name' => __( 'Sub Footer - Right', 'outreach' ), 'description' => __( 'This is the right section of the sub footer.', 'outreach' ), ) ); if(!function_exists('ultimate_get_icon_position_json')){ function ultimate_get_icon_position_json(){ $json = '{ "Display Text and Icon - Always":{ "Icon_at_Left":"ubtn-sep-icon-at-left", "Icon_at_Right":"ubtn-sep-icon-at-right" }, "Display Icon With Text - On_Hover":{ "Bring_in_Icon_from_Left":"ubtn-sep-icon-left", "Bring_in_Icon_from_Right":"ubtn-sep-icon-right", "Push_Icon_to_Left":"ubtn-sep-icon-left-rev", "Push_Icon_to_Right":"ubtn-sep-icon-right-rev" }, "Replace Text by Icon - On Hover":{ "Push_out_Text_to_Top":"ubtn-sep-icon-bottom-push", "Push_out_Text_to_Bottom":"ubtn-sep-icon-top-push", "Push_out_Text_to_Left":"ubtn-sep-icon-right-push", "Push_out_Text_to_Right‏":"ubtn-sep-icon-left-push" } }'; return $json; } } function ultimate_get_banner2_json(){ $json = '{ "Long_Text":{ "Style_1":"style1", "Style_2":"style5", "Style_3":"style13" }, "Medium_Text":{ "Style_4":"style2", "Style_5":"style4", "Style_6":"style6", "Style_7":"style7", "Style_8":"style10", "Style_9":"style14" }, "Short_Description":{ "Style_10":"style9", "Style_11":"style11", "Style_12":"style15" } }'; return $json; } if(!function_exists('ultimate_get_animation_json')){ function ultimate_get_animation_json(){ $json = '{ "attention_seekers": { "No Animation": true, "bounce": true, "flash": true, "pulse": true, "rubberBand": true, "shake": true, "swing": true, "tada": true, "wobble": true }, "bouncing_entrances": { "bounceIn": true, "bounceInDown": true, "bounceInLeft": true, "bounceInRight": true, "bounceInUp": true }, "bouncing_exits": { "bounceOut": true, "bounceOutDown": true, "bounceOutLeft": true, "bounceOutRight": true, "bounceOutUp": true }, "fading_entrances": { "fadeIn": true, "fadeInDown": true, "fadeInDownBig": true, "fadeInLeft": true, "fadeInLeftBig": true, "fadeInRight": true, "fadeInRightBig": true, "fadeInUp": true, "fadeInUpBig": true }, "fading_exits": { "fadeOut": true, "fadeOutDown": true, "fadeOutDownBig": true, "fadeOutLeft": true, "fadeOutLeftBig": true, "fadeOutRight": true, "fadeOutRightBig": true, "fadeOutUp": true, "fadeOutUpBig": true }, "flippers": { "flip": true, "flipInX": true, "flipInY": true, "flipOutX": true, "flipOutY": true }, "lightspeed": { "lightSpeedIn": true, "lightSpeedOut": true }, "rotating_entrances": { "rotateIn": true, "rotateInDownLeft": true, "rotateInDownRight": true, "rotateInUpLeft": true, "rotateInUpRight": true }, "rotating_exits": { "rotateOut": true, "rotateOutDownLeft": true, "rotateOutDownRight": true, "rotateOutUpLeft": true, "rotateOutUpRight": true }, "sliders": { "slideInDown": true, "slideInLeft": true, "slideInRight": true, "slideOutLeft": true, "slideOutRight": true, "slideOutUp": true, "slideInUp": true, "slideOutDown": true }, "specials": { "hinge": true, "rollIn": true, "rollOut": true }, "zooming_entrances": { "zoomIn": true, "zoomInDown": true, "zoomInLeft": true, "zoomInRight": true, "zoomInUp": true }, "zooming_exits": { "zoomOut": true, "zoomOutDown": true, "zoomOutLeft": true, "zoomOutRight": true, "zoomOutUp": true }, "infinite_animations": { "InfiniteRotate": true, "InfiniteRotateCounter": true, "InfiniteDangle": true, "InfiniteSwing": true, "InfinitePulse": true, "InfiniteHorizontalShake": true, "InfiniteVericalShake": true, "InfiniteBounce": true, "InfiniteFlash": true, "InfiniteTADA": true, "InfiniteRubberBand": true, "InfiniteHorizontalFlip": true, "InfiniteVericalFlip": true, "InfiniteHorizontalScaleFlip": true, "InfiniteVerticalScaleFlip": true } }'; return $json; } } function getBrowser() { $u_agent = $_SERVER['HTTP_USER_AGENT']; $bname = 'Unknown'; $platform = 'Unknown'; $version= ""; //First get the platform? if (preg_match('/linux/i', $u_agent)) { $platform = 'linux'; } elseif (preg_match('/macintosh|mac os x/i', $u_agent)) { $platform = 'mac'; } elseif (preg_match('/windows|win32/i', $u_agent)) { $platform = 'windows'; } // Next get the name of the useragent yes seperately and for good reason if(preg_match('/MSIE/i',$u_agent) && !preg_match('/Opera/i',$u_agent)) { $bname = 'Internet Explorer'; $ub = "MSIE"; } elseif(preg_match('/Firefox/i',$u_agent)) { $bname = 'Mozilla Firefox'; $ub = "Firefox"; } elseif(preg_match('/Chrome/i',$u_agent)) { $bname = 'Google Chrome'; $ub = "Chrome"; } elseif(preg_match('/Safari/i',$u_agent)) { $bname = 'Apple Safari'; $ub = "Safari"; } elseif(preg_match('/Opera/i',$u_agent)) { $bname = 'Opera'; $ub = "Opera"; } elseif(preg_match('/Netscape/i',$u_agent)) { $bname = 'Netscape'; $ub = "Netscape"; } // finally get the correct version number $known = array('Version', $ub, 'other'); $pattern = '#(?