for posts and comments. add_theme_support( 'automatic-feed-links' ); // Register Menu Locations. register_nav_menus( array( 'main' => __( 'Main Menu', 'cafe-faucher' ), 'footer' => __( 'Footer Menu', 'cafe-faucher' ), 'sitemap' => __( 'Sitemap Menu', 'cafe-faucher' ) ) ); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support( 'custom-background', array( 'default-color' => 'e6e6e6', ) ); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop } add_action( 'after_setup_theme', 'cafefaucher_setup' ); /** * Enqueues scripts and styles for front-end. * * @since Cafe Faucher 1.0 */ function cafe_faucher_enqueue() { // Add Site CSS wp_enqueue_style( 'bootstrap-css-3.3.7', get_template_directory_uri() . '/css/bootstrap.min.css'); wp_enqueue_style( 'cafefaucher-style-css', get_template_directory_uri() . '/style.css'); add_editor_style( 'editor-styling-css', get_template_directory_uri() . '/css/editor-style.css'); wp_enqueue_style( 'bootstrap-social-css', get_template_directory_uri() . '/css/bootstrap-social.css'); wp_enqueue_style( 'fontawesome-icon-css', get_template_directory_uri() . '/css/font-awesome.min.css' ); wp_enqueue_script( 'bootstrap-jquery', get_template_directory_uri() . '/js/jquery-1.12.3.min.js', array( 'jquery' ), '1.12.3', true ); wp_enqueue_script( 'bootstrap-js-3.3.7', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true ); wp_enqueue_script( 'isInViewport-js', get_template_directory_uri() . '/js/isInViewport.min.js', array( 'jquery' ), '3.3.6', true ); wp_enqueue_script( 'cafefaucher-scripts', get_template_directory_uri() . '/js/cf-scripts.js', array('bootstrap-jquery'), '1.1.5', true ); } if (!is_admin()) add_action( "wp_enqueue_scripts", "cafe_faucher_enqueue" ); /** * Enqueue Javascript postMessage handlers for the Customizer. * * Binds JS handlers to make the Customizer preview reload changes asynchronously. * * @since Cafe Faucher 1.0 */ function cafe_faucher_customize_preview_js() { wp_enqueue_script( 'cafe-faucher-customizer', get_template_directory_uri() . '/js/cf-customizer.js', array( 'customize-preview' ), '20141120', true ); } add_action( 'customize_preview_init', 'cafe_faucher_customize_preview_js' ); /** * Site tile tag setup * * @since Cafe Faucher 1.0 */ add_action( 'after_setup_theme', 'theme_functions' ); function theme_functions() { add_theme_support( 'title-tag' ); } /** * Custom Header defaults * * @since Cafe Faucher 1.1.7 */ function cafefaucher_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'cafefaucher_header_args', array( 'default-text-color' => '0B4B72', 'width' => 313, 'height' => 176, 'flex-width' => true, 'flex-height' => true, ) ) ); } add_action( 'after_setup_theme', 'cafefaucher_custom_header_setup' ); /** * Displays navigation to next/previous pages when applicable. * * @since Cafe Faucher 1.0 */ if ( ! function_exists( 'cafefaucher_content_nav' ) ) : function cafefaucher_content_nav( $html_id ) { global $wp_query; $html_id = esc_attr( $html_id ); if ( $wp_query->max_num_pages > 1 ) : ?> comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    user_id != '0' ) { echo '' . get_user_meta( $comment->user_id, 'nickname', true ) . ''; } else { echo '' . get_comment_author_link() . ''; } printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'cafe-faucher' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    ' ); ?>
    __( 'Reply', 'cafe-faucher' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'cafe-faucher' ), get_the_author() ) ), get_the_author() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ( $tag_list ) { $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'cafe-faucher' ); } elseif ( $categories_list ) { $utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'cafe-faucher' ); } else { $utility_text = __( 'This entry was posted on %3$s by %4$s.', 'cafe-faucher' ); } printf( $utility_text, $categories_list, $tag_list, $date, $author ); } endif; /** * Declare Woocommerce Support. */ add_action( 'after_setup_theme', 'woocommerce_support' ); function woocommerce_support() { add_theme_support( 'woocommerce' ); } // Page Linking Filter To Keep Page Linking Righ Under Content add_filter( 'the_content', function( $content ) { return $content . wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', 'pagelink' => '%', 'echo' => false ) ); }, -1 ); // Lower number = higher priority. /** * Theme Includes */ // Cafe Faucher customizer additions. require get_template_directory() . '/include/customizer.php'; // Widgets additions. require get_template_directory() . '/include/widgets.php'; // Widgets additions. require get_template_directory() . '/include/cf-woocommerce.php';