%3$s', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_html( get_the_date() ) ), 'byline', sprintf( '', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'optimize' ), get_the_author() ), esc_attr( get_the_author() ) ) ); } function optimize_theme_setup() { add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts set_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails, 200 pixels wide by 200 pixels tall, hard crop mode load_theme_textdomain('optimize', get_template_directory() . '/languages'); //woocommerce plugin support add_theme_support( 'woocommerce' ); add_editor_style(); add_theme_support( 'title-tag' ); add_theme_support('automatic-feed-links'); register_nav_menu( 'primary', __( 'Navigation Menu', 'optimize' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'esell_custom_background_args', array( 'default-color' => 'F3F3F3', 'default-image' => '', ) ) ); // Sets up the content width value based on the theme's design. global $content_width; if ( ! isset( $content_width ) ){ $content_width = 770; } } /* Excerpt ********************************************/ function optimize_excerptlength_teaser($length) { return 10; } function optimize_excerptlength_index($length) { return 45; } function optimize_excerptmore($more) { return '...'; } function optimize_excerpt($length_callback='', $more_callback='') { global $post; add_filter('excerpt_length', $length_callback); add_filter('excerpt_more', $more_callback); $output = get_the_excerpt(); $output = apply_filters('wptexturize', $output); $output = apply_filters('convert_chars', $output); $output = ''.$output.''; echo $output; } add_action( 'after_setup_theme', 'optimize_theme_setup' ); /* Widgets ********************************************/ function optimize_widgets_init() { register_sidebar(array( 'name' => __( 'Sidebar Right', 'optimize' ), 'before_widget' => '