public static function generate_js($testimonials, $atts, $widget_number = null) { $atts['subtype'] = 'js'; $js = apply_filters('tw_cache_get', false, $atts); if (false === $js) { $js = self::get_testimonials_html_js($testimonials, $atts, $widget_number); $js = apply_filters('tw_cache_set', $js, $atts); } if (!empty($js)) { self::$scripts = array_merge($js, self::$scripts); add_action('wp_footer', array(__CLASS__, 'get_testimonials_scripts'), 20); } }