' . "\n"; } add_action('wp_head', 'blog_favicon'); */ /* * Add version number to main style.css file with version number that matches the * last modified time of the file. This helps when making frequent changes to the * CSS file as the browser will always load the newest version. */ /* function independent_publisher_stylesheet() { wp_enqueue_style( 'independent-publisher-style', get_stylesheet_uri(), '', filemtime( get_stylesheet_directory() . '/style.css') ); } */ /* * Modifies the default theme footer. * This also applies the changes to JetPack's Infinite Scroll footer, if you're using that module. */ /* function independent_publisher_footer_credits() { $my_custom_footer = 'This is my custom footer.'; return $my_custom_footer; } */ /* * * * * * * Authors * * * * * * */ function independent_publisher_posted_author() { /** * This function gets called outside the loop (in header.php), * so we need to figure out the post author ID and Nice Name manually. */ global $wp_query; if ( function_exists( 'get_coauthors') ) { $coauthors = get_coauthors( $wp_query->post->ID ); printf(''); $i = 0; foreach($coauthors as $author) { $i++; // keep track of how many we've processed $post_author_id = $author->ID; $post_author_nice_name = get_the_author_meta( 'display_name', $post_author_id ); printf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID', $post_author_id ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'independent-publisher' ), $post_author_nice_name ) ), esc_html( $post_author_nice_name ) ); if ( $i < (sizeof($coauthors) - 1) ) { // Add comma for all but last two authors. printf(', '); } else if ( $i == (sizeof($coauthors) - 1) ) { // Add "and" for second-last authors printf(' and '); } printf('Size: %$1d', sizeof($coauthors)); // if last author, do nothing } printf(''); } else { $post_author_id = $wp_query->post->post_author; $post_author_nice_name = get_the_author_meta( 'display_name', $post_author_id ); printf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID', $post_author_id ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'independent-publisher' ), $post_author_nice_name ) ), esc_html( $post_author_nice_name ) ); } } /* * * * * * * * * * Author cards * * * * * * * * * */ function independent_publisher_posted_author_card() { /** * This function gets called outside the loop (in header.php), * so we need to figure out the post author ID and Nice Name manually. */ global $wp_query; $post_author_id = $wp_query->post->post_author; $show_avatars = get_option( 'show_avatars' ); ?>

'ffffff', 'default-image' => '', ) ) ); // Enable support for HTML5 markup. add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', 'gallery', ) ); /** * Enable Post Thumbnails */ add_theme_support( 'post-thumbnails' ); /* * Add custom thumbnail size for use with featured images */ add_image_size( 'independent_publisher_post_thumbnail', 700, 700 ); /** * Enable editor style */ add_editor_style(); /** * Set max width of full screen visual editor to match content width */ set_user_setting( 'dfw_width', 700 ); /** * Set default value for Show Post Word Count theme option */ add_option( 'independent_publisher_general_options', array( 'show_post_word_count' => true ) ); /** * Set default value for Show Author Card theme option */ add_option( 'independent_publisher_general_options', array( 'show_author_card' => true ) ); /** * Set default value for Show Post Thumbnails theme option */ add_option( 'independent_publisher_excerpt_options', array( 'show_post_thumbnails' => false ) ); /** * This theme uses wp_nav_menu() in two locations. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'independent-publisher' ), 'single' => __( 'Single Posts Menu', 'independent-publisher' ), 'social' => __( 'Social', 'independent-publisher' ), 'topbar' => __( 'Topbar Menu', 'independent-snipette' ), ) ); /** * Add support for the Aside Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'chat', 'image', 'video', 'audio' ) ); }