__( 'Get the latset news from aljazzera.net RSS', 'text_domain' ), ) ); } 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_description = isset( $instance['display_description']) ? $instance['display_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 $this->desc_on = $display_description; $this->num_items = $num_items; $logo_src = plugins_url( '/aljazeera-logo.png', __FILE__ ); 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 ); ?>