$is_val ) if( $wp_ver[$i] < $is_val ) return false; return true; } $purelineoptions = get_option('pureline'); $pureline_layout = pureline_get_option('pureline_layout','2cl'); $pureline_width_layout = pureline_get_option('pureline_width_layout','fixed'); if ( ($pureline_layout == "2cl" || $pureline_layout == "2cr" ) && $pureline_width_layout == "fixed") { if ( ! isset( $content_width ) ) $content_width = 620; } if ( ( ($pureline_layout == "3cl" || $pureline_layout == "3cr" ) && $pureline_width_layout == "fixed") || ( ($pureline_layout == "3cm" ) && $pureline_width_layout == "fixed") ) { if ( ! isset( $content_width ) ) $content_width = 506; } if ( $pureline_width_layout == "fixed" && $pureline_layout == "1c" ) { if ( ! isset( $content_width ) ) $content_width = 960; } if ( $pureline_width_layout == "fluid" ) { if ( ! isset( $content_width ) ) $content_width = 700; } else { if ( ! isset( $content_width ) ) $content_width = 620; } load_theme_textdomain( 'pure-line', 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 - pureline gatekeeper * * This file defines a few constants variables, loads up the core pureline file, * and finally initialises the main WP pureline Class. * * @package pureline * @subpackage Functions */ define( 'WP_pureline', '0.2.4' ); // Defines current version for WP pureline /* Blast you red baron! Initialise WP pureline */ require_once( get_template_directory() . '/library/pureline.php' ); WPpureline::pureline_init(); /* pureline_truncate */ function pureline_truncate ($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 pureline_get_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', 'pureline_register_my_menu' ); function pureline_register_my_menu() { register_nav_menu( 'primary-menu', __( 'Primary Menu', 'pure-line' ) ); } // Tiny URL function pureline_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 pureline_similar_posts() { $post = ''; $orig_post = $post; global $post; $pureline_options = get_option('pureline'); if ($pureline_options['pureline_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 pureline_footer_hooks() { ?> = 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', 'pureline_filter_wp_title' ); function pureline_enqueue_comment_reply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'pureline_enqueue_comment_reply' ); // Share This Buttons function pureline_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; ?>