PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php +2 -35 3.10.103.9.2 View file →
@@ -80,10 +80,8 @@
80 80 $this->feeds = apply_filters(
81 81 'themeisle_sdk_dashboard_widget_feeds',
82 82 [
83 83 'https://themeisle.com/blog/feed',
84 - 'https://www.codeinwp.com/blog/feed',
85 - 'https://wpshout.com/feed',
86 84 ]
87 85 );
88 86 add_action( 'wp_dashboard_setup', array( &$this, 'add_widget' ) );
89 87 add_action( 'wp_network_dashboard_setup', array( &$this, 'add_widget' ) );
@@ -312,37 +310,10 @@
312 310 * Setup feed items.
313 311 */
314 312 private function setup_feeds() {
315 313 if ( false === ( $items_normalized = get_transient( 'themeisle_sdk_feed_items' ) ) ) { //phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
316 - // Do not force the feed for the items in the sdk feeds list.
317 - // this prevents showing notices if another plugin will force all SimplePie feeds to load, instead it will
318 - // use the regular SimplePie validation and abort early if the feed is not valid.
319 - $sdk_feeds = $this->feeds;
320 - add_action(
321 - 'wp_feed_options',
322 - function ( $feed, $url ) use ( $sdk_feeds ) {
323 - if ( defined( 'TI_SDK_PHPUNIT' ) && true === TI_SDK_PHPUNIT ) {
324 - return;
325 - }
326 -
327 - if ( ! is_string( $url ) && in_array( $url, $sdk_feeds, true ) ) {
328 - $feed->force_feed( false );
329 - return;
330 - }
331 - if ( is_array( $url ) ) {
332 - foreach ( $url as $feed_url ) {
333 - if ( in_array( $feed_url, $sdk_feeds, true ) ) {
334 - $feed->force_feed( false );
335 - return;
336 - }
337 - }
338 - }
339 - },
340 - PHP_INT_MAX,
341 - 2
342 - );
343 314 // Load SimplePie Instance.
344 - $feed = fetch_feed( $sdk_feeds );
315 + $feed = fetch_feed( $this->feeds );
345 316 // TODO report error when is an error loading the feed.
346 317 if ( is_wp_error( $feed ) ) {
347 318 return;
348 319 }
@@ -347,13 +318,9 @@
347 318 return;
348 319 }
349 320
350 321 $items = $feed->get_items( 0, 5 );
351 - $items = is_array( $items ) ? $items : [];
352 -
353 - $items_normalized = [];
354 -
355 - foreach ( $items as $item ) {
322 + foreach ( (array) $items as $item ) {
356 323 $items_normalized[] = array(
357 324 'title' => $item->get_title(),
358 325 'date' => $item->get_date( 'U' ),
359 326 'link' => $item->get_permalink(),