'eeeeee' ) ); add_theme_support( 'custom-header', array( 'default-image' => BITLUMEN_THEME_URI . 'img/header/default.png', 'random-default' => false, 'width' => 435, 'height' => 90, 'flex-height' => true, 'flex-width' => true, 'default-text-color' => '', 'header-text' => true, 'uploads' => true, 'admin-preview-callback' => 'bitLumen_preview_header_cb' ) ); /* =HEADERS ------------------------------------------------------------------------- */ // custom header preview function bitLumen_preview_header_cb() { // variables $text_color = get_header_textcolor(); $header_img = get_header_image(); $bg_color = get_background_color(); $height = get_custom_header()->height; $width = get_custom_header()->width; // background color $style = 'background-color:' . ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . ';'; // header image $style .= ( empty( $header_img ) ? 'min-height:' . $height . 'px; width:' . bitLumen_get_site_width() . 'px;' : 'background-image:url(\'' . $header_img . '\');background-size:' . $width . 'px ' . $height . 'px;background-position:top left;background-repeat:no-repeat;' ); // header font $style .= 'font-family:' . ( bitLumen_get_options( 'web_fonts' ) == 'none' ? 'Verdana,Geneva,sans-serif;' : '\'Droid Sans\';' ); // font // title & desc $class = ( $text_color == 'blank' || empty( $text_color ) ? 'assistive-text display-none' : 'fake-masthead' ); ?>
Hi there Administrator! Thanks for adding the bitLumen theme!
You will probably want to add some custom widgets and to get rid of the default ones. You should also checkout the theme options for some extra special settings.
'; $normal = 'The bitLumen theme!
'; if( current_user_can( 'manage_options' ) ) $admin; else return $normal; } /* =FILTERS ------------------------------------------------------------------------- */ // wp_title filter function bitLumen_title_filter( $title, $sep, $seplocation ) { $ssep = ' ' . $sep . ' '; $pre = $num = ''; if( !is_single() ) { if( is_category() ) $pre = $ssep . 'Category'; elseif( is_tag() ) $pre = $ssep . 'Tag'; elseif( is_author() ) $pre = $ssep . 'Author'; elseif( is_year() || is_month() || is_day() ) $pre = $ssep . 'Archives'; } // get the page number (index format) if( get_query_var( 'paged' ) ) $num = $ssep . get_query_var( 'paged' ); // get the page number (multipage post format) elseif( get_query_var( 'page' ) ) $num = $ssep . get_query_var( 'page' ); // concoct and return title return get_bloginfo( 'name' ) . $pre . $title . $num; } // wp_foot filter function bitLumen_footer_filter() { $items = array( 'Powered by WordPress', 'bitLumen theme', 'created by Shinra Web Holdings' ); $user_foot = bitLumen_get_option( 'extra_footer' ); if( !empty( $user_foot ) ) array_push( $items, bitLumen_get_option( 'extra_footer' ) ); // build footer links echo implode( bitLumen_get_option( 'footer_sep' ), $items ); } /* =TEMPLATE ------------------------------------------------------------------------- */ // safely print post title and link function bitLumen_post_title( $echo=true ) { $post_id = get_the_ID(); $permalink = get_permalink( $post_id ); $post_title = get_the_title( $post_id ); $post_title_clean = esc_attr( strip_tags( $post_title ) ); if( empty( $post_title_clean ) ) { $post_title_clean = 'this post'; $post_title = '(no title)'; } $output = sprintf( '%3$s', $permalink, $post_title_clean, $post_title ); if( $echo ) echo $output; else return $output; } // safely get (attachment) post title function bitLumen_attachment_title( $echo=true ) { $parent_title = get_the_title( $post->post_parent ); if( empty( $parent_title ) ) $parent_title = '(no title)'; $output = sprintf( 'From %4$s: %3$s', get_permalink( $post->post_parent ), get_permalink(), $parent_title, ( is_page( $post->post_parent ) ? 'Page' : 'Post' ), ( wp_attachment_is_image() ? 'image' : 'file' ) ); if( $echo ) echo $output; else return $output; } // selectively returns the chosen parts of the entry meta function bitLumen_entry_meta( $echo=true ) { $items = array( bitLumen_post_author(), bitLumen_post_date(), ( bitLumen_get_option( 'entry_edit_link' ) ? bitLumen_edit_post_link() : false ), ( bitLumen_get_option( 'entry_trash_link' ) ? bitLumen_trash_post_link() : false ) ); $items = array_filter( $items ); $output = implode( '', $items ); echo $output; } // post author meta item function bitLumen_post_author() { if( bitLumen_get_option( 'entry_post_author' ) == 'none' ) return false; $author_id = get_the_author_meta( 'ID' ); $author_name = get_the_author(); $author_nicename = get_the_author_meta( 'user_nicename' ); $author_url = get_author_posts_url( $author_id, $author_nicename ); if( bitLumen_get_option( 'entry_post_author' ) == 'link' ) $output = '' . $author_name . ''; else $output = '' . $author_name . ''; return $output; } // post date function bitLumen_post_date() { if( bitLumen_get_option( 'entry_post_date' ) == 'none' ) return false; elseif( bitLumen_get_option( 'entry_post_date' ) == 'updated' ) { $date = get_the_modified_date(); $time = get_the_modified_time(); } else { $date = get_the_date(); $time = get_the_time(); } if( !bitLumen_get_option( 'entry_post_time' ) ) $time = ''; else $time = ' at ' . $time; $output = $date . $time; if( !empty( $output ) ) return '' . $output . ''; } // edit link function bitLumen_edit_post_link() { if( current_user_can( 'edit_posts' ) ) return 'Edit'; } // trash link function bitLumen_trash_post_link() { if( current_user_can( 'delete_posts' ) ) return 'Trash'; } // equivalent of get_comments_popup_link function bitLumen_get_comments_popup_link() { if( !comment_open() ) return 'Comments Off'; $num = get_comments_number(); if( $num == 0 ) $text = 'Leave a Comment'; elseif( $num > 1 ) $text = $num . ' Comments'; else $text = '1 Comment'; return '' . $text . ''; } // special index page type function bitLumen_special_index_type( $post ) { if( is_category( $post ) ) { // category $title = 'Category'; $item = single_cat_title( '', false ); $message = 'You are now browsing all items filed in the “' . $item . '” category.'; } elseif( is_tag( $post ) ) { // tag $title = 'Tag'; $item = single_tag_title( '', false ); $message = 'You are now browsing all items tagged with “' . $item . '”'; } elseif( is_author() ) { // author $title = 'Author'; $item = get_the_author(); $message = 'You are now browsing all items authored by “' . $item . '.”'; } elseif( is_month() || is_day() ) { // archives (month or day) $title = 'Archives'; $item = substr( single_month_title(', ', false ), 2 ); $message = 'You are now browsing the archives for items from “' . $item . '.”'; } elseif( is_year() ) { // archive (year) $title = 'Archives'; $item = get_the_date( 'Y'); $message = 'You are now browsing the archives for posts from the year “' . $item . '.”'; } elseif( is_search() ) { // search $title = 'Search'; $item = get_search_query(); $message= 'You are now browsing our search results for “' . $item . '.”'; } else return false; // print content ?>%5$s