Version ) ); define( 'ABC_THEME_NAME', $abc_theme_data->Name ); if ( ! isset( $content_width ) ) $content_width = 860; add_action( 'after_setup_theme', 'abc_setup' ); if ( ! function_exists( 'abc_setup' ) ) { function abc_setup() { load_theme_textdomain( 'abacus', ABC_THEME_TEMPLATE . '/languages' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'woocommerce' ); add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) ); add_theme_support( 'custom-header', array( 'header-text' => false, 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'width' => apply_filters( 'abc_header_image_width', 1400 ), 'height' => apply_filters( 'abc_header_image_height', 600 ), ) ); add_theme_support( 'custom-background', apply_filters( 'abc_custom_background_args', array( 'default-color' => '2E3739', ) ) ); add_theme_support( 'jetpack-testimonial' ); add_editor_style( array( 'css/admin/editor-style.css', '/css/font-awesome.css', abc_fonts_url() ) ); register_nav_menu( 'top', __( 'Top Menu', 'abacus' ) ); register_nav_menu( 'primary', __( 'Primary Menu', 'abacus' ) ); add_image_size( 'abacus-testimonial-thumbnail', 60, 60, true ); add_filter( 'use_default_gallery_style', '__return_false' ); foreach ( glob( ABC_THEME_TEMPLATE . '/inc/*' ) as $filename ) { include $filename; } } } add_action( 'wp_enqueue_scripts', 'abc_enqueue' ); if ( ! function_exists( 'abc_enqueue' ) ) { function abc_enqueue() { wp_enqueue_script( 'jquery-mobile', ABC_THEME_URL .'/js/jquery.mobile.custom.js', array( 'jquery' ), '4.1.2', true ); wp_enqueue_script( 'theme', ABC_THEME_URL .'/js/theme.js', array( 'jquery', 'jquery-mobile' ), '', true ); wp_enqueue_style( 'theme-stylesheet', get_stylesheet_uri() ); wp_enqueue_style( 'abc-google-fonts', abc_fonts_url(), array(), null ); wp_enqueue_style( 'font-awesome', ABC_THEME_URL .'/css/font-awesome.css', false, '4.4.0', 'all' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } } if ( ! function_exists( 'abc_fonts_url' ) ) { function abc_fonts_url() { $fonts = array(); $subsets = 'latin,latin-ext'; /* * Translators: If there are characters in your language that are not supported * by Roboto, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Roboto font: on or off', 'abacus' ) ) { $fonts[] = 'Roboto:300,400italic,700italic,400,700'; } /* * Translators: To add an additional character subset specific to your language, * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'abacus' ); if ( 'cyrillic' == $subset ) { $subsets .= ',cyrillic,cyrillic-ext'; } elseif ( 'greek' == $subset ) { $subsets .= ',greek,greek-ext'; } elseif ( 'devanagari' == $subset ) { $subsets .= ',devanagari'; } elseif ( 'vietnamese' == $subset ) { $subsets .= ',vietnamese'; } return ( $fonts ) ? add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ) : ''; } } add_action( 'widgets_init', 'abc_widgets_init' ); if ( ! function_exists( 'abc_widgets_init' ) ) { function abc_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'abacus' ), 'id' => 'sidebar', 'description' => __( 'This section appears on the right of the main content on every page.', 'abacus' ), 'before_widget' => '', 'before_title' => '