<?php
include 'theme_options.php';
include 'guide.php';
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', $post->post_content, $matches );
$first_img = $matches [1] [0];
if(empty($first_img)){
$first_img = "/images/default.jpg";
}
$first_img = str_replace('http://www.recursosdeautoayuda.com', '', $first_img);
return $first_img;
}
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '<div class="sidebox ">',
'after_widget' => '</div>',
'before_title' => '<h3 class="sidetitl">',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => 'Footer',
'before_widget' => '<div class="botwid">',
'after_widget' => '</div>',
'before_title' => '<h3 class="bothead">',
'after_title' => '</h3>',
));
register_nav_menus( array(
'primary' => __( 'Primary Navigation', '' ),
'secondary' => __( 'Secondary Navigation', '' ),
) );
function new_excerpt_more($more) {
return '<a href="'. get_permalink($post->ID) . '">' . ' [ Read More ]' . '</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
add_theme_support( 'post-thumbnails' );
add_image_size( 'clyp_slider', 650, 280, true );
}
function get_image_url(){
$image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id,'clyp_slider');
$image_url = $image_url[0];
echo $image_url;
}
?>