Blu Mag Theme Settings
'Sidebar Top','before_widget' => '','before_title' => '','after_title' => '
'));
register_sidebar(array('name' => 'Sidebar Left','before_widget' => '','before_title' => '','after_title' => '
'));
register_sidebar(array('name' => 'Sidebar Right','before_widget' => '','before_title' => '','after_title' => '
'));
register_sidebar(array('name' => 'Sidebar Bottom','before_widget' => '','before_title' => '','after_title' => '
'));
register_sidebar(array('name' => 'Footer Left','before_widget' => '','before_title' => '','after_title' => '
'));
register_sidebar(array('name' => 'Footer Center','before_widget' => '','before_title' => '','after_title' => '
'));
register_sidebar(array('name' => 'Footer Right','before_widget' => '','before_title' => '','after_title' => '
'));
}
function get_thumbnail($postId) {
// Get the post ID
$ID = $postId;//$post->ID;
// Get images for this ID
$arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $ID );
// If images exist for this page
if($arrImages) {
// Get array keys representing attached image numbers
$arrKeys = array_keys($arrImages);
// Get the first image attachment
$iNum = $arrKeys[0];
// Get the thumbnail url for the attachment
$sThumbUrl = wp_get_attachment_thumb_url($iNum);
// UNCOMMENT THIS IF YOU WANT THE FULL SIZE IMAGE INSTEAD OF THE THUMBNAIL
//$sImageUrl = wp_get_attachment_url($iNum);
// Build the
string
$sImgString = '' .
'
' .
'';
// Print the image
echo $sImgString;
}
}
add_filter('login_errors',create_function('$a', "return null;")); /*For WP security - Does not expose username in case of any login error*/
/*remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'custom_trim_excerpt');
function custom_trim_excerpt($text) { // Fakes an excerpt if needed
if ( '' == $text ) {
$text = get_the_content('');
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$text = strip_tags($text);
$excerpt_length = apply_filters('excerpt_length', 90);
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, '[...]');
$text = implode(' ', $words);
}
}
return $text;
}*/
add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if(!function_exists('wp_list_comments')) : // WP 2.7-only check
$file = TEMPLATEPATH . '/legacycomments.php';
endif;
return $file;
}
function theme_comments ($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
id="comment-">