__( 'Primary Menu', 'areview' ), 'social' => __( 'Social', 'areview' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'areview_custom_background_args', array( 'default-color' => '222e38', 'default-image' => get_template_directory_uri() . '/pattern.png', ) ) ); } endif; // areview_setup add_action( 'after_setup_theme', 'areview_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function areview_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'areview' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer A', 'areview' ), 'id' => 'sidebar-4', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer B', 'areview' ), 'id' => 'sidebar-5', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer C', 'areview' ), 'id' => 'sidebar-6', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Register the widgets register_widget( 'aReview_Recent_Posts' ); register_widget( 'aReview_Recent_Comments' ); register_widget( 'aReview_Social_Profile' ); register_widget( 'aReview_Video_Widget' ); register_widget( 'aReview_Top_Rated_Posts' ); } add_action( 'widgets_init', 'areview_widgets_init' ); /** * Load the widgets. */ require get_template_directory() . "/widgets/recent-posts.php"; require get_template_directory() . "/widgets/recent-comments.php"; require get_template_directory() . "/widgets/video-widget.php"; require get_template_directory() . "/widgets/social-profile.php"; require get_template_directory() . "/widgets/top-rated-posts.php"; /** * Enqueue scripts and styles. */ function areview_scripts() { wp_enqueue_style( 'areview-bootstrap', get_template_directory_uri() . '/bootstrap/bootstrap.min.css', array(), true ); wp_enqueue_style( 'areview-style', get_stylesheet_uri() ); wp_enqueue_style( 'areview-font-awesome', get_template_directory_uri() . '/fonts/font-awesome.min.css' ); //Load the fonts $headings_font = esc_html(get_theme_mod('headings_fonts')); $body_font = esc_html(get_theme_mod('body_fonts')); if( $headings_font ) { wp_enqueue_style( 'areview-headings-fonts', '//fonts.googleapis.com/css?family='. $headings_font ); } else { wp_enqueue_style( 'areview-headings-fonts', '//fonts.googleapis.com/css?family=Roboto+Condensed:700'); } if( $body_font ) { wp_enqueue_style( 'areview-body-fonts', '//fonts.googleapis.com/css?family='. $body_font ); } else { wp_enqueue_style( 'areview-body-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic'); } if ( get_theme_mod('areview_scroller') != 1 ) { wp_enqueue_script( 'areview-nicescroll', get_template_directory_uri() . '/js/jquery.nicescroll.min.js', array('jquery'), true ); wp_enqueue_script( 'areview-nicescroll-init', get_template_directory_uri() . '/js/nicescroll-init.js', array('jquery'), true ); } wp_enqueue_script( 'areview-scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), true ); wp_enqueue_script( 'areview-fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), true ); wp_enqueue_script( 'areview-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'areview-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'areview_scripts' ); function areview_excerpt_length( $length ) { return 35; } add_filter( 'excerpt_length', 'areview_excerpt_length', 999 ); /** * Adds more contact methods in the User profile screen (links used for the author bio). */ function areview_contactmethods( $contactmethods ) { $contactmethods['areview_facebook'] = __( 'Author Bio: Facebook', 'areview' ); $contactmethods['areview_twitter'] = __( 'Author Bio: Twitter', 'areview' ); $contactmethods['areview_googleplus'] = __( 'Author Bio: Google Plus', 'areview' ); $contactmethods['areview_linkedin'] = __( 'Author Bio: Linkedin', 'areview' ); return $contactmethods; } add_filter( 'user_contactmethods', 'areview_contactmethods', 10, 1); /** * Load html5shiv */ function areview_html5shiv() { echo '' . "\n"; } add_action( 'wp_head', 'areview_html5shiv' ); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Load the carousel. */ require get_template_directory() . '/inc/carousel/carousel.php'; /** * Load the dynamic styles */ require get_template_directory() . '/styles.php'; /** *TGM Plugin activation. */ /* require_once dirname( __FILE__ ) . '/plugins/class-tgm-plugin-activation.php'; add_action( 'tgmpa_register', 'areview_recommend_plugin' ); function areview_recommend_plugin() { $plugins = array( array( 'name' => 'Custom Field Suite', 'slug' => 'custom-field-suite', 'required' => false, ), array( 'name' => 'Yasr - Yet Another Stars Rating', 'slug' => 'yet-another-stars-rating', 'required' => false, ), ); tgmpa( $plugins); } */