"Sidebar",
'id' => 'sidebar',
'description' => 'Widgets presented in the main sidebar of the theme',
'before_widget' => '',
'before_title' => '
' ));
register_sidebar(array(
'name' => "Footer",
'id' => 'footer',
'description' => 'Widgets shown in the footer area of the theme',
'before_widget' => '',
'before_title' => '' ));
}
if(function_exists('register_nav_menus')) {
register_nav_menus(
array(
'primary-nav' => 'Primary Navigation',
'secondary-nav' => 'Secondary Navigation',
)
);
}
if(function_exists('add_theme_support')) {
add_theme_support( 'post-thumbnails' );
add_image_size( 'homepage_thumbnail', 300, 150, true );
add_image_size( 'feature_full', 1920, 850, true );
add_image_size( 'square', 100, 100, true );
add_theme_support( 'automatic-feed-links' );
}
if ( ! isset( $content_width ) ) $content_width = 586;
if ( is_singular() ) wp_enqueue_script( "comment-reply" );
// ============================================================
// Custom functions
// ============================================================
if(!function_exists('truncate_post')) {
function truncate_post($max_char, $more_link_text = '', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
if (isset($_GET['p']) && strlen($_GET['p']) > 0) {
echo "";
echo $content;
echo " ...";
}
else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "";
echo $content;
echo " ...";
}
else {
echo "";
echo $content;
}
}
}
function boloday_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
— @