'ffffff', 'border' => 'e9e9e9', 'text' => '9d9d9d', 'link' => '000000', 'url' => '000000', ); } // Tell WordPress to run blogum_setup() when the 'after_setup_theme' hook is run. add_action( 'after_setup_theme', 'blogum_setup' ); if ( ! function_exists( 'blogum_setup' ) ): function blogum_setup() { load_theme_textdomain( 'blogum', get_template_directory() . '/languages' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); //Add support for the Aside, Gallery nad Image Post Formats add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image' ) ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'blogum' ) ); // Add support for custom backgrounds add_theme_support( 'custom-background' ); add_theme_support( 'custom-header', apply_filters( 'blogum_custom_header_args', array( 'default-image' => '', 'default-text-color' => '000', 'header-text' => false, 'width' => 945, 'height' => 150, 'flex-height' => true, 'admin-head-callback' => 'blogum_admin_header_style', ) ) ); } endif; // end blogum_setup /** * Enqueue scripts and styles */ function blogum_scripts() { wp_enqueue_style( 'blogum', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'blogum_scripts' ); /** * Styles the header image displayed on the Appearance > Header admin panel. */ function blogum_admin_header_style() { ?> */ function blogum_add_menu_class ( $page_markup ) { preg_match( '/^
/i', $page_markup, $matches ); $divclass = $matches[1]; $toreplace = array( '
', '
' ); $new_markup = str_replace( $toreplace, '', $page_markup ); $new_markup = preg_replace( '/^
' . __( 'Read More', 'blogum' ) . '

'; } // Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and blogum_continue_reading_link(). function blogum_auto_excerpt_more( $more ) { return ' …' . blogum_continue_reading_link(); } add_filter( 'excerpt_more', 'blogum_auto_excerpt_more' ); // Adds a pretty "Continue Reading" link to custom post excerpts. function blogum_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= blogum_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'blogum_custom_excerpt_more' ); function blogum_comments_popup_link() { if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?> tag based on what is being viewed. * * @since Blogum 1.0 */ function blogum_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'blogum' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'blogum_wp_title', 10, 2 );