array( 'sidebar-1', 'sidebar-2', 'sidebar-3', 'sidebar-4' ), 'container' => 'content', 'footer' => 'page', 'wrapper' => false, ) ); add_theme_support( 'featured-content', array( 'featured_content_filter' => 'widely_get_featured_posts', 'description' => __( 'The featured content section displays on the front page above the content area.', 'widely' ), 'max_posts' => 10, 'post_types' => array( 'post', 'page' ), ) ); } add_action( 'after_setup_theme', 'widely_wpcom_setup' ); /** * Enqueue scripts and styles */ function widely_jetpack_scripts() { if ( function_exists ( 'widely_has_featured_posts' ) ) : if ( is_front_page() && widely_has_featured_posts() ) { wp_enqueue_script( 'nivo-slider', get_template_directory_uri() . '/js/nivo-slider/jquery.nivo.slider.pack.js', array( 'jquery' ), '3.1', true ); wp_enqueue_script( 'widely-slider', get_template_directory_uri() . '/js/nivo-slider/nivo.slider.js', array( 'nivo-slider' ), '20120927', true ); wp_enqueue_style( 'nivo-slider-default', get_template_directory_uri() . '/js/nivo-slider/default.css', array(), '1.3' ); wp_enqueue_style( 'nivo-slider', get_template_directory_uri() . '/js/nivo-slider/nivo-slider.css', array( 'nivo-slider-default' ), '3.1' ); } endif; } add_action( 'wp_enqueue_scripts', 'widely_jetpack_scripts' ); /** * Returns whether there are featured posts available * * @return bool * * @since Widely 2.0.1-wpcom */ function widely_has_featured_posts() { return (bool) apply_filters( 'widely_get_featured_posts', false ); } /** * Returns an array with post objects * * @return array * * @since Widely 2.0.1-wpcom */ function widely_get_featured_posts() { return apply_filters( 'widely_get_featured_posts', array() ); }