function widget($args, $instance) { $cache = wp_cache_get('widget_easy_nivo_slider_nextgen', 'widget'); if (!is_array($cache)) { $cache = array(); } if (isset($cache[$args['widget_id']])) { echo $cache[$args['widget_id']]; return; } ob_start(); extract($args); echo $before_widget; if ($instance['title']) { echo $before_title . $instance['title'] . $after_title; } echo get_easy_nivo_slider_for_nextgen($instance); echo $after_widget; $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('widget_easy_nivo_slider_nextgen', $cache, 'widget'); }
function easy_nivo_slider_for_nextgen($parms = NULL) { echo get_easy_nivo_slider_for_nextgen($parms); }
function get_easy_nivo_slider($atts) { if (!$atts) { $atts = array(); $atts['post_type'] = 'post'; } if ('' != $atts['category']) { $atts['taxonomy'] = 'category'; $atts['term'] = $atts['category']; } switch ($atts['source']) { // ---------------- // // ---------------- case 'current-post': return get_easy_nivo_slider_for_current_post($atts); break; // ---------------- // Handle NextGen gallery. // If Nivo-NextGen was deactivated, reactivate it rather than throw an error message // ---------------- // ---------------- // Handle NextGen gallery. // If Nivo-NextGen was deactivated, reactivate it rather than throw an error message // ---------------- case 'nextgen': if (!function_exists('get_easy_nivo_slider_for_nextgen')) { include_once 'nextgen/functions.php'; include_once 'nextgen/list-images.php'; } return get_easy_nivo_slider_for_nextgen($atts); break; // ---------------- // // ---------------- // ---------------- // // ---------------- default: return get_easy_nivo_slider_for_featured_images($atts); } }