__( 'Below Header', 'atmosphere' ),
'secondary' => __( 'Above Header', 'atmosphere' ),
) );
add_custom_background();
define( 'HEADER_TEXTCOLOR', '' );
define( 'HEADER_IMAGE', '%s/images/header.jpg' );
define( 'HEADER_IMAGE_WIDTH', apply_filters( 'atmosphere_header_image_width', 724 ) );
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'atmosphere_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);
}
}
drcms_insert_category('category','gallery');
drcms_insert_category('category','asides');
function drcms_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;
}
if (is_admin() && file_exists(TEMPLATEPATH. '/theme-options.php')) include_once(TEMPLATEPATH. '/theme-options.php');
if (file_exists(STYLESHEETPATH. '/htmLawed.php')) include_once ( STYLESHEETPATH . '/htmLawed.php' );
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');
function atmosphere_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'atmosphere_page_menu_args' );
function atmosphere_excerpt_length( $length ) {
return 40;
}
add_filter( 'excerpt_length', 'atmosphere_excerpt_length' );
function atmosphere_continue_reading_link() {
return ' ' . __( 'Read the rest of this entry →', 'atmosphere' ) . '';
}
function atmosphere_auto_excerpt_more( $more ) {
return ' …' . atmosphere_continue_reading_link();
}
add_filter( 'excerpt_more', 'atmosphere_auto_excerpt_more' );
function atmosphere_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
$output .= atmosphere_continue_reading_link();
}
return $output;
}
add_filter( 'get_the_excerpt', 'atmosphere_custom_excerpt_more' );
function atmosphere_remove_gallery_css( $css ) {
return preg_replace( "##s", '', $css );
}
add_filter( 'gallery_style', 'atmosphere_remove_gallery_css' );
if ( ! function_exists( 'atmosphere_comment' ) ) :
function atmosphere_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
id="li-comment-">
__( 'Primary Widget Area', 'atmosphere' ),
'id' => 'primary-widget-area',
'description' => __( 'The primary widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Secondary Widget Area', 'atmosphere' ),
'id' => 'secondary-widget-area',
'description' => __( 'The secondary widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Tertiary Widget Area', 'atmosphere' ),
'id' => 'tertiary-widget-area',
'description' => __( 'The tertiary widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'First Footer Widget Area', 'atmosphere' ),
'id' => 'first-footer-widget-area',
'description' => __( 'The first footer widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Second Footer Widget Area', 'atmosphere' ),
'id' => 'second-footer-widget-area',
'description' => __( 'The second footer widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Third Footer Widget Area', 'atmosphere' ),
'id' => 'third-footer-widget-area',
'description' => __( 'The third footer widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Fourth Footer Widget Area', 'atmosphere' ),
'id' => 'fourth-footer-widget-area',
'description' => __( 'The fourth footer widget area', 'atmosphere' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'atmosphere_widgets_init' );
function atmosphere_remove_recent_comments_style() {
global $wp_widget_factory;
remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
}
add_action( 'widgets_init', 'atmosphere_remove_recent_comments_style' );
if ( ! function_exists( 'atmosphere_posted_in' ) ) :
function atmosphere_posted_in() {
$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.', 'atmosphere' );
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'atmosphere' );
} else {
$posted_in = __( 'Bookmark the permalink.', 'atmosphere' );
}
printf(
$posted_in,
get_the_category_list( ', ' ),
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
}
endif;
if ( ! function_exists( 'atmosphere_posted_on' ) ) :
function atmosphere_posted_on() {
printf( __( 'Posted on %2$s by %3$s', 'atmosphere' ),
'meta-prep meta-prep-author',sprintf( '%3$s',
get_permalink(),esc_attr( get_the_time() ),
get_the_date()),
sprintf( '%3$s',
get_author_posts_url( get_the_author_meta( 'ID' ) ),
sprintf( esc_attr__( 'View all posts by %s', 'atmosphere' ), get_the_author() ),
get_the_author()));
}
endif;