8889841cwp-content/plugins/yith-woocommerce-compare/plugin-fw/includes/class-yith-dashboard.php000064400000011605150514401040033320 0ustar00home/clixcotz/lions.clix.co.tz' . esc_html__( 'RSS Error:', 'yith-plugin-fw' ) . ' ' . wp_kses_post( $rss->get_error_message() ) . '

'; } return; } if ( ! $rss->get_item_quantity() ) { echo ''; $rss->__destruct(); unset( $rss ); return; } /** * The feed items. * * @var SimplePie_Item[] $last_updates */ $last_updates = $rss->get_items( 0, $items ); $html_classes = 'rsswidget yith-update-feeds'; $output = ''; if ( count( $last_updates ) > 0 ) { $output = ''; } echo wp_kses_post( $output ); $rss->__destruct(); unset( $rss ); } /** * Blog news Widget */ public static function dashboard_blog_news() { $args = array( 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1, 'items' => 3, ); $feed = static::$blog_feed; wp_widget_rss_output( $feed, $args ); } /** * Enqueue Styles and Scripts for View Last Changelog widget */ public static function enqueue_scripts() { if ( function_exists( 'get_current_screen' ) && get_current_screen() && 'dashboard' === get_current_screen()->id ) { $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw'; $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'yith-dashboard', $script_path . '/assets/js/yith-dashboard' . $suffix . '.js', array( 'jquery-ui-dialog' ), yith_plugin_fw_get_version(), true ); wp_enqueue_style( 'wp-jquery-ui-dialog' ); $l10n = array( 'buttons' => array( 'close' => _x( 'Close', 'Button label', 'yith-plugin-fw' ), ), ); wp_localize_script( 'yith-dashboard', 'yith_dashboard', $l10n ); } } } if ( apply_filters( 'yith_plugin_fw_show_dashboard_widgets', true ) ) { add_action( 'wp_dashboard_setup', 'YITH_Dashboard::dashboard_widget_setup' ); add_action( 'admin_enqueue_scripts', 'YITH_Dashboard::enqueue_scripts', 20 ); } }