__( 'Main Menu', 'required' ) ) ); // Feed Links, Post Thumbnails and Infinite Scroll add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'infinite-scroll', array( 'container' => 'main' ) ); // Default options for header images register_default_headers( array( 'Woods' => array( 'url' => '%s/images/headers/woods.jpg', 'thumbnail_url' => '%s/images/headers/woods-thumbnail.jpg', 'description' => __( 'Woods', 'required' ) ), 'City' => array( 'url' => '%s/images/headers/city.jpg', 'thumbnail_url' => '%s/images/headers/city-thumbnail.jpg', 'description' => __( 'City', 'required' ) ), 'Train Yard' => array( 'url' => '%s/images/headers/trainyard.jpg', 'thumbnail_url' => '%s/images/headers/trainyard-thumbnail.jpg', 'description' => __( 'Train Yard', 'required' ) ), 'Sunset' => array( 'url' => '%s/images/headers/sunset.jpg', 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', 'description' => __( 'Sunset', 'required' ) ), 'Gradient 1' => array( 'url' => '%s/images/headers/gradient1.jpg', 'thumbnail_url' => '%s/images/headers/gradient1-thumbnail.jpg', 'description' => __( 'Gradient 1', 'required' ) ), 'Gradient 2' => array( 'url' => '%s/images/headers/gradient2.jpg', 'thumbnail_url' => '%s/images/headers/gradient2-thumbnail.jpg', 'description' => __( 'Gradient 2', 'required' ) ) ) ); } // end required_setup } // end if add_action( 'after_setup_theme', 'required_setup' ); /** * Setup public-facing JavaScript and Stylesheets * * @since 1.0.0 */ function required_styles_and_scripts() { // Animate.css - http://daneden.me/animate/ wp_enqueue_style( 'animate-css', get_template_directory_uri() . '/css/animate.css' ); wp_enqueue_style( 'required-style', get_stylesheet_uri() ); // FitVids and Required Theme JavaScript wp_enqueue_script( 'fitvid-js', get_template_directory_uri() . '/js/lib/jquery.fitvids.js', array( 'jquery' ), REQUIRED_VERSION, true ); wp_enqueue_script( 'required', get_template_directory_uri() . '/js/theme.min.js', array( 'jquery', 'fitvid-js' ), REQUIRED_VERSION, true ); // If we're on a single post, the comments are open, and the user has threaded comments, and the comment reply script if ( ( ! is_admin() ) && is_singular() && comments_open() && get_option('thread_comments') ) { wp_enqueue_script( 'comment-reply' ); } // end if } // end required_styles_and_scripts add_action( 'wp_enqueue_scripts', 'required_styles_and_scripts' ); // Check to see if a child theme has implemented the template if ( ! function_exists( 'required_comment' ) ) { /** * Template for comments and pingbacks. * Used as a callback by wp_list_comments() for displaying the comments. * * @since 1.0.0 */ function required_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) { ?>
  • >
    ', '' ); ?>
  • >
    %s', get_comment_author_link() ) ); ?>
    comment_approved ) { ?>

    'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • $post->post_parent, 'fields' => 'ids', 'numberposts' => -1, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ); // If there is more than one attachment in a gallery... if ( count( $attachment_ids ) > 1 ) { foreach ( $attachment_ids as $attachment_id ) { if ( $attachment_id == $post->ID ) { $next_id = current( $attachment_ids ); break; } // end if } // end foreach // get the URL of the next image attachment... if ( $next_id ) { $next_attachment_url = get_attachment_link( $next_id ); // or get the URL of the first image attachment. } else { $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); } // end if/else } // end if printf( '%3$s', esc_url( $next_attachment_url ), the_title_attribute( array( 'echo' => false ) ), wp_get_attachment_image( $post->ID, $attachment_size ) ); } // end required_the_attached_image } // end if /* Features to be implemented in a future version: *------------------------------------------------------------------------*/ register_sidebar( array() ); dynamic_sidebar();