__( 'Primary Menu', 'aster' ) ) ); // 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', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'aster_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Post Formats add_theme_support( 'post-formats', array( 'gallery', 'video', 'audio' ) ); // Post thumbnails add_theme_support( 'post-thumbnails' ); add_image_size( 'aster-post-thumbnails', 750, 450, true ); add_image_size( 'aster-recent-post', 110, 80, true ); } endif; // aster_theme_setup add_action( 'after_setup_theme', 'aster_theme_setup' ); // SoundCloud add_filter( 'oembed_fetch_url', 'aster_soundcloud_no_width', 10, 3 ); function aster_soundcloud_no_width( $provider, $url, $args ) { if ( 'soundcloud.com' == parse_url( $url, PHP_URL_HOST ) ) { $provider = remove_query_arg( 'maxwidth', $provider ); } return $provider; } ////////////////////////////////////////////////////////////////// // Register widget ////////////////////////////////////////////////////////////////// if ( function_exists( 'register_sidebar' ) ) { register_sidebar( array( 'name' => __( 'Sidebar', 'aster' ), 'id' => 'blog-sidebar', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } ////////////////////////////////////////////////////////////////// // Enqueue scripts and styles. ////////////////////////////////////////////////////////////////// function aster_all_scripts_and_css() { // CSS File wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '3.3.6', 'all' ); wp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '4.4.0', 'all' ); wp_enqueue_style( 'slicknav-css', get_template_directory_uri() . '/assets/css/slicknav.css', array(), null ); wp_enqueue_style( 'aster-stylesheet', get_stylesheet_uri() ); wp_enqueue_style( 'aster-responsive', get_template_directory_uri() . '/assets/css/responsive.css', array(), null ); // Google Fonts wp_enqueue_style( 'google-font-open-sans', '//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic', array(), null ); // JS Files wp_enqueue_script( 'jquery-bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true ); wp_enqueue_script( 'jquery-smoothscroll', get_template_directory_uri() . '/assets/js/smoothscroll.js', array( 'jquery' ), '0.9.9', true ); wp_enqueue_script( 'jquery-slicknav', get_template_directory_uri() . '/assets/js/jquery.slicknav.js', array( 'jquery' ), null, true ); wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/assets/js/jquery.fitvids.js', array( 'jquery' ), '1.1', true ); wp_enqueue_script( 'jquery-masonry', array( 'jquery' ), null, true); wp_enqueue_script( 'aster-scripts', get_template_directory_uri() . '/assets/js/scripts.js', array( 'jquery' ), null, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'aster_all_scripts_and_css' ); ////////////////////////////////////////////////////////////////// // Woocommerce support ////////////////////////////////////////////////////////////////// add_action( 'after_setup_theme', 'aster_woocommerce_support' ); function aster_woocommerce_support() { add_theme_support( 'woocommerce' ); } ////////////////////////////////////////////////////////////////// // Widget categories post counter ////////////////////////////////////////////////////////////////// function aster_categories_post_count_filter( $cat_post_count ) { $cat_post_count = str_replace( '(', ' (', $cat_post_count ); $cat_post_count = str_replace( ')', ' )', $cat_post_count ); return $cat_post_count; } add_filter( 'wp_list_categories', 'aster_categories_post_count_filter' ); ////////////////////////////////////////////////////////////////// // THE EXCERPT ////////////////////////////////////////////////////////////////// function aster_custom_excerpt_length( $length ) { return 46; } add_filter( 'excerpt_length', 'aster_custom_excerpt_length', 999 ); function aster_new_excerpt_more( $more ) { return '…'; } add_filter( 'excerpt_more', 'aster_new_excerpt_more' ); ////////////////////////////////////////////////////////////////// // COMMENTS LAYOUT ////////////////////////////////////////////////////////////////// if ( ! function_exists( 'aster_comment' ) ): function aster_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s', get_comment_author_link() ); ?>
    comment_approved ) : ?>

    ', '' ); ?> __( 'Reply', 'aster' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>