false, 'cta_button' => false, 'minified_css' => false, 'front_page' => 1, 'home_headline' => null, 'home_subheadline' => null, 'home_content_area' => null, 'cta_text' => null, 'cta_url' => null, 'featured_content' => null, 'google_site_verification' => '', 'bing_site_verification' => '', 'yahoo_site_verification' => '', 'site_statistics_tracker' => '', 'twitter_uid' => '', 'facebook_uid' => '', 'linkedin_uid' => '', 'youtube_uid' => '', 'stumble_uid' => '', 'rss_uid' => '', 'google_plus_uid' => '', 'instagram_uid' => '', 'pinterest_uid' => '', 'yelp_uid' => '', 'vimeo_uid' => '', 'foursquare_uid' => '', 'responsive_inline_css' => '', 'responsive_inline_js_head' => '', 'responsive_inline_js_footer' => '', 'responsive_inline_css_js_footer' => '', 'static_page_layout_default' => 'default', 'single_post_layout_default' => 'default', 'blog_posts_index_layout_default' => 'default', ); return apply_filters( 'responsive_option_defaults', $defaults ); } /** * Fire up the engines boys and girls let's start theme setup. */ add_action( 'after_setup_theme', 'responsive_setup' ); if ( !function_exists( 'responsive_setup' ) ): function responsive_setup() { global $content_width; $template_directory = get_template_directory(); /** * Global content width. */ if ( !isset( $content_width ) ) { $content_width = 605; } /** * Responsive is now available for translations. * The translation files are in the /languages/ directory. * Translations are pulled from the WordPress default lanaguge folder * then from the child theme and then lastly from the parent theme. * @see http://codex.wordpress.org/Function_Reference/load_theme_textdomain */ $domain = 'responsive'; load_theme_textdomain( $domain, WP_LANG_DIR . '/responsive/' ); load_theme_textdomain( $domain, get_stylesheet_directory() . '/languages/' ); load_theme_textdomain( $domain, get_template_directory() . '/languages/' ); /** * Add callback for custom TinyMCE editor stylesheets. (editor-style.css) * @see http://codex.wordpress.org/Function_Reference/add_editor_style */ add_editor_style(); /** * This feature enables post and comment RSS feed links to head. * @see http://codex.wordpress.org/Function_Reference/add_theme_support#Feed_Links */ add_theme_support( 'automatic-feed-links' ); /** * This feature enables post-thumbnail support for a theme. * @see http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); /** * This feature enables woocommerce support for a theme. * @see http://www.woothemes.com/2013/02/last-call-for-testing-woocommerce-2-0-coming-march-4th/ */ add_theme_support( 'woocommerce' ); /** * This feature enables custom-menus support for a theme. * @see http://codex.wordpress.org/Function_Reference/register_nav_menus */ register_nav_menus( array( 'top-menu' => __( 'Top Menu', 'responsive' ), 'header-menu' => __( 'Header Menu', 'responsive' ), 'sub-header-menu' => __( 'Sub-Header Menu', 'responsive' ), 'footer-menu' => __( 'Footer Menu', 'responsive' ) ) ); add_theme_support( 'custom-background' ); add_theme_support( 'custom-header', array( // Header text display default 'header-text' => false, // Header image flex width 'flex-width' => true, // Header image width (in pixels) 'width' => 300, // Header image flex height 'flex-height' => true, // Header image height (in pixels) 'height' => 100, // Admin header style callback 'admin-head-callback' => 'responsive_admin_header_style' ) ); // gets included in the admin header function responsive_admin_header_style() { ?> 0, 'sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'include' => '', 'exclude' => '', 'echo' => false, 'show_home' => true, 'link_before' => '', 'link_after' => '' ); $pages = wp_page_menu( $args ); $prepend = ''; $output = $prepend . $pages . $append; echo $output; } /** * A safe way of adding stylesheets to a WordPress generated page. */ if ( !function_exists( 'responsive_css' ) ) { function responsive_css() { $theme = wp_get_theme(); $responsive = wp_get_theme( 'responsive' ); $responsive_options = responsive_get_options(); if ( 1 == $responsive_options['minified_css'] ) { wp_enqueue_style( 'responsive-style', get_template_directory_uri() . '/core/css/style.min.css', false, $responsive['Version'] ); } else { wp_enqueue_style( 'responsive-style', get_template_directory_uri() . '/core/css/style.css', false, $responsive['Version'] ); wp_enqueue_style( 'responsive-media-queries', get_template_directory_uri() . '/core/css/responsive.css', false, $responsive['Version'] ); } if ( is_rtl() ) { wp_enqueue_style( 'responsive-rtl-style', get_template_directory_uri() . '/rtl.css', false, $responsive['Version'] ); } if ( is_child_theme() ) { wp_enqueue_style( 'responsive-child-style', get_stylesheet_uri(), false, $theme['Version'] ); } } } add_action( 'wp_enqueue_scripts', 'responsive_css' ); /** * A safe way of adding JavaScripts to a WordPress generated page. */ if ( !function_exists( 'responsive_js' ) ) { function responsive_js() { $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; $directory = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? 'js-dev' : 'js'; $template_directory_uri = get_template_directory_uri(); // JS at the bottom for fast page loading. // except for Modernizr which enables HTML5 elements & feature detects. wp_enqueue_script( 'modernizr', $template_directory_uri . '/core/' . $directory . '/responsive-modernizr' . $suffix . '.js', array( 'jquery' ), '2.6.1', false ); wp_enqueue_script( 'responsive-scripts', $template_directory_uri . '/core/' . $directory . '/responsive-scripts' . $suffix . '.js', array( 'jquery' ), '1.2.6', true ); if ( !wp_script_is( 'tribe-placeholder' ) ) { wp_enqueue_script( 'jquery-placeholder', $template_directory_uri . '/core/' . $directory . '/jquery.placeholder' . $suffix . '.js', array( 'jquery' ), '2.0.7', true ); } } } add_action( 'wp_enqueue_scripts', 'responsive_js' ); /** * A comment reply. */ function responsive_enqueue_comment_reply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'responsive_enqueue_comment_reply' ); /** * Front Page function starts here. The Front page overides WP's show_on_front option. So when show_on_front option changes it sets the themes front_page to 0 therefore displaying the new option */ function responsive_front_page_override( $new, $orig ) { global $responsive_options; if ( $orig !== $new ) { $responsive_options['front_page'] = 0; update_option( 'responsive_theme_options', $responsive_options ); } return $new; } add_filter( 'pre_update_option_show_on_front', 'responsive_front_page_override', 10, 2 ); /** * Funtion to add CSS class to body */ function responsive_add_class( $classes ) { // Get Responsive theme option. global $responsive_options; if ( $responsive_options['front_page'] == 1 && is_front_page() ) { $classes[] = 'front-page'; } return $classes; } add_filter( 'body_class', 'responsive_add_class' ); /** * This function prints post meta data. * * Ulrich Pogson Contribution * */ if ( !function_exists( 'responsive_post_meta_data' ) ) { function responsive_post_meta_data() { printf( __( 'Posted on %2$s by %4$s', 'responsive' ), 'meta-prep meta-prep-author posted', sprintf( '', esc_url( get_permalink() ), esc_attr( get_the_title() ), esc_html( get_the_date('c')), esc_html( get_the_date() ) ), 'byline', sprintf( '%4$s%3$s', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'responsive' ), get_the_author() ), esc_attr( get_the_author() ), get_avatar( get_the_author_meta( 'ID' ), 32) ) ); } } /** * Added the footer copyright setting to the theme customizer - starts */ function fetch_copyright(){ global $responsive_options; ?>