\n$text\n"; return $text; } /** * tarski_widget_links_args() - Removes navbar links from the links widget. * * @since 2.2 * @param array $args * @return array */ function tarski_widget_links_args($args) { $args['exclude_category'] = get_tarski_option('nav_extlinkcat'); return $args; } /** * tarski_recent_entries() - Recent entries รก la Tarski. * * Basically a ripoff of the WP widget function wp_widget_recent_entries(). * @since 2.0.5 * @see wp_widget_recent_entries() * @global object $posts * @return string */ function tarski_recent_entries($args) { if ( $output = wp_cache_get('tarski_recent_entries') ) return print($output); ob_start(); extract($args); global $posts; // Allow for configuration in the future $options = array(); // $options = get_option('tarski_recent_entries'); $title = empty($options['title']) ? __('Recent Articles','tarski') : $options['title']; if ( !$number = (int) $options['number'] ) $number = 5; elseif ( $number < 1 ) $number = 1; elseif ( $number > 10 ) $number = 10; if ( is_home() ) $offset = count($posts); else $offset = 0; $r = new WP_Query("showposts=$number&what_to_show=posts&nopaging=0&post_status=publish&offset=$offset"); if ( $r->have_posts() ) { ?>