__( 'Below Header', 'twentyten' ), 'secondary' => __( 'Above Header', 'twentyten' ), ) ); // This theme allows users to set a custom background add_custom_background(); // Your changeable header business starts here define( 'HEADER_TEXTCOLOR', 'F1F1F1' ); define( 'HEADER_IMAGE', '%s/images/header.jpg' ); define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 724 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 314 ) ); add_custom_image_header('header_style', 'admin_header_style'); } endif; if ( ! function_exists( 'header_style' ) ) : function header_style() { ?> $catName, 'description' => $catName); $temp = wp_insert_term($catName, $taxonomy, $cat_defaults); } } /* End add theme Category Defaults */ /* Start insert our Two new Theme Categories */ cms_insert_category('category','gallery'); cms_insert_category('category','asides'); /* End insert our Two new Theme Categories */ /* List all Images in a folder for social icons */ function list_images($path){ $list = array(); $dir_handle = @opendir($path) or die("Unable to open $path"); while($file = readdir($dir_handle)){ if($file == "." || $file == ".."){continue;} $filename = explode(".",$file); $cnt = count($filename); $cnt--; $ext = $filename[$cnt]; if(strtolower($ext) == ('png' || 'jpg')){ if (!strpos($file, '-thumbnail') > 0) { array_push($list, $file); } } } return $list; } /* load support files */ /* Only Admin can set the page Options */ if (is_admin() && file_exists(TEMPLATEPATH. '/admin-options.php')) include_once(TEMPLATEPATH. '/admin-options.php'); /* This flie cleans up the html in posts */ if (file_exists(STYLESHEETPATH. '/htmLawed.php')) include_once ( STYLESHEETPATH . '/htmLawed.php' ); /* End load support files */ /* This function cleans the html in the posts to limid bad html */ function clean_the_content( $content ) { $szPostContent = $content; $szRemoveFilter = array( "~
]*>\s?
~", "~]*>\s?~", "~]*>~", "~<\/font>~", "~]*>\s?~" ); $szPostContent = preg_replace( $szRemoveFilter, '' , $szPostContent); $szPostContent = htmLawed($szPostContent); return $szPostContent; } add_filter('the_content', 'clean_the_content'); /* End Section is for the Digital Raindrops Specific Changes */ /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * * To override this in a child theme, remove the filter and optionally add * your own function tied to the wp_page_menu_args filter hook. * * @since Twenty Ten 1.0 */ function twentyten_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' ); /** * Sets the post excerpt length to 40 characters. * * To override this length in a child theme, remove the filter and add your own * function tied to the excerpt_length filter hook. * * @since Twenty Ten 1.0 * @return int */ function twentyten_excerpt_length( $length ) { return 40; } add_filter( 'excerpt_length', 'twentyten_excerpt_length' ); /** * Returns a "Continue Reading" link for excerpts * * @since Twenty Ten 1.0 * @return string "Continue Reading" link */ function twentyten_continue_reading_link() { return ' ' . __( 'Read the rest of this entry ', 'twentyten' ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * * @since Twenty Ten 1.0 * @return string An ellipsis */ function twentyten_auto_excerpt_more( $more ) { return ' …' . twentyten_continue_reading_link(); } add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. * * @since Twenty Ten 1.0 * @return string Excerpt with a pretty "Continue Reading" link */ function twentyten_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= twentyten_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. * * Galleries are styled by the theme in Twenty Ten's style.css. * * @since Twenty Ten 1.0 * @return string The gallery style filter, with the styles themselves removed. */ function twentyten_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); if ( ! function_exists( 'twentyten_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own twentyten_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Twenty Ten 1.0 */ function twentyten_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
__( 'Primary Widget Area', 'twentyten' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area', 'twentyten' ), 'before_widget' => '