$is_val ) if( $wp_ver[$i] < $is_val ) return false; return true; } $evl_layout = evl_get_option('evl_layout','2cr'); $evl_width_layout = evl_get_option('evl_width_layout','fixed'); $evl_header_slider = evl_get_option('evl_header_slider', 'disable'); if ( ($evl_layout == "2cl" || $evl_layout == "2cr" ) && $evl_width_layout == "fixed") { if ( ! isset( $content_width ) ) $content_width = 620; } if ( ( ($evl_layout == "3cl" || $evl_layout == "3cr" ) && $evl_width_layout == "fixed") || ( ($evl_layout == "3cm" ) && $evl_width_layout == "fixed") ) { if ( ! isset( $content_width ) ) $content_width = 506; } if ( $evl_width_layout == "fixed" && $evl_layout == "1c" ) { if ( ! isset( $content_width ) ) $content_width = 960; } if ( $evl_width_layout == "fluid" ) { if ( ! isset( $content_width ) ) $content_width = 700; } else { if ( ! isset( $content_width ) ) $content_width = 620; } load_theme_textdomain( 'evolve', get_template_directory() . '/languages' ); $locale = get_locale(); $locale_file = get_template_directory() . "/languages/$locale.php"; if ( is_readable( $locale_file ) ) require_once( $locale_file ); /** * Functions - Evolve gatekeeper * * This file defines a few constants variables, loads up the core Evolve file, * and finally initialises the main WP Evolve Class. * * @package EvoLve * @subpackage Functions */ define( 'WP_Evolve', '0.2.4' ); // Defines current version for WP Evolve /* Blast you red baron! Initialise WP Evolve */ require_once( get_template_directory() . '/library/evolve.php' ); WPevolve::init(); /* evltruncate */ function evltruncate ($str, $length=10, $trailing='..') { $length-=mb_strlen($trailing); if (mb_strlen($str)> $length) { return mb_substr($str,0,$length).$trailing; } else { $res = $str; } return $res; } /* Get first image */ function evlget_first_image() { global $post, $posts; $first_img = ''; $output = preg_match_all('//i', $post->post_content, $matches); if(isset($matches[1][0])){ $first_img = $matches [1][0]; return $first_img; } } /* Custom Menu */ add_action( 'after_setup_theme', 'evlregister_my_menu' ); function evlregister_my_menu() { register_nav_menu( 'primary-menu', __( 'Primary Menu', 'evolve' ) ); } // Tiny URL function evolve_tinyurl($url) { $response = esc_url(wp_remote_retrieve_body(wp_remote_get('http://tinyurl.com/api-create.php?url='.$url))); return $response; } // Similar Posts function evlsimilar_posts() { $post = ''; $orig_post = $post; global $post; $evloptions = get_option('evolve'); if ($evloptions['evl_similar_posts'] == "category") { $matchby = get_the_category($post->ID); $matchin = 'category'; } else { $matchby = wp_get_post_tags($post->ID); $matchin = 'tag'; } if ($matchby) { $matchby_ids = array(); foreach($matchby as $individual_matchby) $matchby_ids[] = $individual_matchby->term_id; $args=array( $matchin.'__in' => $matchby_ids, 'post__not_in' => array($post->ID), 'showposts'=>5, // Number of related posts that will be shown. 'ignore_sticky_posts'=>1 ); $my_query = new wp_query($args); if( $my_query->have_posts() ) { _e( '
Similar posts
'; } } $post = $orig_post; wp_reset_query(); } function evlfooter_hooks() { ?> $v) { $amount = $v / 100; $amount = round($amount * $factor); $new_decimal = $v - $amount; $new_hex_component = dechex($new_decimal); if(strlen($new_hex_component) < 2) { $new_hex_component = "0".$new_hex_component; } $new_hex .= $new_hex_component; } return $new_hex; } function evolve_filter_wp_title( $title ) { global $page, $paged; // Get the Site Name $site_name = get_bloginfo( 'name' ); // Prepend name $filtered_title = $site_name . $title; // Get the Site Description $site_description = get_bloginfo( 'description' ); // If site front page, append description if ( $site_description && ( is_home() || is_front_page() ) ) { // Append Site Description to title $filtered_title .= ' - ' .$site_description; } if ( $paged >= 2 || $page >= 2 ) { $filtered_title .= ' - ' . sprintf( __( 'Page %s', 'pure-line' ), max( $paged, $page ) ); } // Return the modified title return $filtered_title; } // Hook into 'wp_title' add_filter( 'wp_title', 'evolve_filter_wp_title' ); function evolve_enqueue_comment_reply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'evolve_enqueue_comment_reply' ); // Share This Buttons function evolve_sharethis() { ?>

Theme4Press Themes

get_error_code(); echo "

An error has occured with the RSS feed. (". $error .")

"; return; } $output .= ''; $maxitems = $rss->get_item_quantity(10); $items = $rss->get_items(0, 10); $output .= ''; echo $output; ?>