980, 'height' => 250, 'default-image' => '', 'default-text-color' => '444', 'wp-head-callback' => 'codium_extend_header_style', 'admin-head-callback' => 'codium_extend_admin_header_style', ); $args = apply_filters( 'codium_extend_custom_header', $args ); if ( function_exists( 'get_custom_header' ) ) { add_theme_support( 'custom-header', $args ); } else { // Compat: Versions of WordPress prior to 3.4. define('HEADER_TEXTCOLOR', '444'); define('HEADER_IMAGE_WIDTH', 980); // use width and height appropriate for your theme define('HEADER_IMAGE_HEIGHT', 250); add_custom_image_header( $args['wp-head-callback'], $args['admin-head-callback'] ); } // gets included in the site header function codium_extend_header_style() { if (get_header_image() != ''){ ?>ID)) as $category) $classes[] = $category->category_nicename; return $classes; } add_filter('body_class', 'codium_extend_category_id_class'); function codium_extend_tag_id_class($classes) { global $post; if (!is_404() && isset($post)) if ( $tags = get_the_tags() ) foreach ( $tags as $tag ) $classes[] = 'tag-' . $tag->slug; return $classes; } add_filter('body_class', 'codium_extend_tag_id_class'); function codium_extend_author_id_class($classes) { global $post; if (!is_404() && isset($post)) $classes[] = 'author-' . sanitize_title_with_dashes(strtolower(get_the_author_meta('login'))); return $classes; } add_filter('post_class', 'codium_extend_author_id_class'); // count comment function codium_extend_comment_count( $print = true ) { global $comment, $post, $codium_extend_comment_alt; // Counts trackbacks and comments if ( $comment->comment_type == 'comment' ) { $count[] = "$codium_extend_comment_alt"; } else { $count[] = "$codium_extend_comment_alt"; } $count = join( ' ', $count ); // Available filter: comment_class // Tada again! echo $count; //return $print ? print($count) : $count; } // Generates time- and date-based classes for BODY, post DIVs, and comment LIs; relative to GMT (UTC) function codium_extend_date_classes( $t, &$c, $p = '' ) { $t = $t + ( get_option('gmt_offset') * 3600 ); $c[] = $p . 'y' . gmdate( 'Y', $t ); // Year $c[] = $p . 'm' . gmdate( 'm', $t ); // Month $c[] = $p . 'd' . gmdate( 'd', $t ); // Day $c[] = $p . 'h' . gmdate( 'H', $t ); // Hour } // For category lists on category archives: Returns other categories except the current one (redundant) function codium_extend_cats_meow($glue) { $current_cat = single_cat_title( '', false ); $separator = "\n"; $cats = explode( $separator, get_the_category_list($separator) ); foreach ( $cats as $i => $str ) { if ( strstr( $str, ">$current_cat<" ) ) { unset($cats[$i]); break; } } if ( empty($cats) ) return false; return trim(join( $glue, $cats )); } // For tag lists on tag archives: Returns other tags except the current one (redundant) function codium_extend_tag_ur_it($glue) { $current_tag = single_tag_title( '', '', false ); $separator = "\n"; $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) ); foreach ( $tags as $i => $str ) { if ( strstr( $str, ">$current_tag<" ) ) { unset($tags[$i]); break; } } if ( empty($tags) ) return false; return trim(join( $glue, $tags )); } if ( ! function_exists( 'codium_extend_posted_on' ) ) : // data before post function codium_extend_posted_on() { printf( __( 'Posted on %2$s by %3$s.', 'codium_extend' ), 'meta-prep meta-prep-author', sprintf( '%3$s', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'codium_extend' ), get_the_author() ), get_the_author() ) ); } endif; if ( ! function_exists( 'codium_extend_posted_in' ) ) : // data after post function codium_extend_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'codium_extend' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'codium_extend' ); } else { $posted_in = __( 'Bookmark the permalink.', 'codium_extend' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif; // Widgets plugin: intializes the plugin after the widgets above have passed snuff function codium_extend_widgets_init() { register_sidebar(array( 'name' => 'SidebarTop', 'description' => 'Top sidebar', 'id' => 'sidebartop', 'before_widget' => "\n\t\t\t" . '
  • ', 'after_widget' => "\n\t\t\t
  • \n", 'before_title' => "\n\t\t\t\t". '

    ', 'after_title' => "

    \n" .'' )); register_sidebar(array( 'name' => 'SidebarBottom', 'description' => 'Bottom sidebar', 'id' => 'sidebarbottom', 'before_widget' => "\n\t\t\t" . '
  • ', 'after_widget' => "\n\t\t\t
  • \n", 'before_title' => "\n\t\t\t\t". '

    ', 'after_title' => "

    \n" .'' )); } // Changes default [...] in excerpt to a real link function codium_extend_excerpt_more($more) { global $post; $readmore = __(' read more »', 'codium_extend' ); return ' ' . $readmore . ''; } add_filter('excerpt_more', 'codium_extend_excerpt_more'); // Runs our code at the end to check that everything needed has loaded add_action( 'init', 'codium_extend_widgets_init' ); // Adds filters for the description/meta content in archives.php add_filter( 'archive_meta', 'wptexturize' ); add_filter( 'archive_meta', 'convert_smilies' ); add_filter( 'archive_meta', 'convert_chars' ); add_filter( 'archive_meta', 'wpautop' ); // Remember: the codium_extend is for play. // footer link add_action('wp_footer', 'footer_link'); function footer_link() { if ( is_front_page() && !is_paged()) { $anchorthemeowner='code reduction'; $textfooter = __('Proudly powered by Wordpress and designed by ', 'codium_extend' ); $content = ''; echo $content; } else { $textfooter = __('Proudly powered by Wordpress', 'codium_extend' ); $content = ''; echo $content; } } //Remove

    in excerpt function codium_extend_strip_para_tags ($content) { if ( is_home() && ($paged < 2 )) { $content = str_replace( '

    ', '', $content ); $content = str_replace( '

    ', '', $content ); return $content; } } if ( ! function_exists( 'codium_extend_comment' ) ) : //Comment function function codium_extend_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • >
    %s
    '), get_comment_author_link()) ?> comment_approved == '0') : ?>
    | Permalink', 'codium_extend'), get_comment_date(), get_comment_time(), '#comment-' . get_comment_ID() ); edit_comment_link(__('Edit', 'codium_extend'), ' | ', ''); ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>