__( 'Get the latset news from aljazzera.net RSS', 'text_domain' ), ) // Args ); } function widget($args, $instance) { extract($args); // Get the variables $rss_url = esc_url(strip_tags($instance['rss_url'])); $display_logo = isset($instance['display_logo']) ? $instance['display_logo'] : false; $display_link = isset($instance['display_link']) ? $instance['display_link'] : false; $num_items = (int) $instance['num_items']; $display_news_description = isset($instance['display_news_description']) ? $instance['display_news_description'] : false; // If the url is empty, abort if (empty($rss_url)) return; // Make sure num_items is between limits if ($num_items > $this->max_items_allowed) { $num_items = $this->max_items_allowed; } elseif ($num_items < 1) { $num_items = 1; } // Add variables to the class properties as we will need them while outputting the feed $this->desc_on = $display_news_description; $this->num_items = $num_items; $logo_src = plugins_url('/aljazeera_rss/aljazeera_logo.png'); echo $before_widget; if (isset($title)) echo $before_title . $title . $after_title; echo "
>
>
>
عذرا حدثت مشكلة فى إحضار الأخبار"; return; } // Limit the items to the number we need $num_items_available = $rss->get_item_quantity($this->num_items); // Build an array of all the items objects, starting with element 0. $rss_items = $rss->get_items(0, $num_items_available); ?>