PluginProbe
Super RSS Reader – Add attractive RSS Feed Widget / 4.7
Super RSS Reader – Add attractive RSS Feed Widget v4.7
trunk 0.8 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 3.0 3.1 3.2 4.0 4.0.1 4.1 4.2 4.3 4.4 4.4.1 4.5 4.6 4.7 4.8 All 33 releases
← All changes | super-rss-reader.php +33 -513 2.54.7 View file →
@@ -1,528 +1,48 @@
1 1 <?php
2 2 /*
3 -Plugin Name: Super RSS Reader
4 -Plugin URI: http://www.aakashweb.com/wordpress-plugins/super-rss-reader/
5 -Author URI: http://www.aakashweb.com/
6 -Description: Super RSS Reader is jQuery based RSS reader widget, which displays the RSS feeds in the widget in an attractive way. It uses the jQuery easy ticker plugin to add a news ticker like effect to the RSS feeds. Multiple RSS feeds can be added for a single widget and they get separated in tabs. <a href="http://www.youtube.com/watch?v=02aOG_-98Tg" target="_blank" title="Super RSS Reader demo video">Check out the demo video</a>.
7 -Author: Aakash Chakravarthy
8 -Version: 2.5
9 -*/
3 + * Plugin Name: Super RSS Reader
4 + * Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
5 + * Description: Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
6 + * Author: Aakash Chakravarthy
7 + * Author URI: https://www.aakashweb.com/
8 + * Version: 4.7
9 + * Text Domain: super-rss-reader
10 + * Domain Path: /languages
11 + */
10 12
11 -if(!defined('WP_CONTENT_URL')) {
12 - $srr_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__)).'/';
13 -}else{
14 - $srr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
15 -}
13 +define( 'SRR_VERSION', '4.7' );
14 +define( 'SRR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15 +define( 'SRR_URL', plugin_dir_url( __FILE__ ) );
16 +define( 'SRR_BASE_NAME', plugin_basename( __FILE__ ) );
16 17
17 -define('SRR_VERSION', '2.5');
18 -define('SRR_AUTHOR', 'Aakash Chakravarthy');
19 -define('SRR_URL', $srr_url);
18 +final class Super_RSS_Reader{
20 19
21 -## Include the required scripts
22 -function srr_public_scripts(){
23 - // jQuery
24 - wp_enqueue_script('jquery');
25 -
26 - // Super RSS Reader JS and CSS
27 - wp_register_script('super-rss-reader-js', SRR_URL . 'public/srr-js.js');
28 - wp_enqueue_script(array('jquery', 'super-rss-reader-js'));
29 -}
30 -add_action('wp_enqueue_scripts', 'srr_public_scripts');
20 + public static function init(){
31 21
32 -## Include the required styles
33 -function srr_public_styles(){
34 - wp_register_style('super-rss-reader-css', SRR_URL . 'public/srr-css.css');
35 - wp_enqueue_style('super-rss-reader-css');
36 -}
37 -add_action('wp_enqueue_scripts', 'srr_public_styles');
22 + self::includes();
38 23
39 -## Default color styles
40 -$srr_color_styles = array(
41 - 'No style' => 'none',
42 - 'Grey' => 'grey',
43 - 'Dark' => 'dark',
44 - 'Orange' => 'orange',
45 - 'Simple modern' => 'smodern'
46 -);
24 + add_action( 'plugins_loaded', array( __CLASS__, 'load_text_domain' ) );
47 25
48 -## The main RSS Parser
49 -function srr_rss_parser($instance){
50 -
51 - $urls = stripslashes($instance['urls']);
52 - $tab_titles = stripslashes($instance['tab_titles']);
53 - $count = intval($instance['count']);
54 -
55 - $show_date = intval($instance['show_date']);
56 - $show_desc = intval($instance['show_desc']);
57 - $show_author = intval($instance['show_author']);
58 - $show_thumb = stripslashes($instance['show_thumb']);
59 - $open_newtab = intval($instance['open_newtab']);
60 - $strip_desc = intval($instance['strip_desc']);
61 - $strip_title = intval($instance['strip_title']);
62 - $read_more = htmlspecialchars($instance['read_more']);
63 - $rich_desc = intval($instance['rich_desc']);
64 -
65 - $color_style = stripslashes($instance['color_style']);
66 - $enable_ticker = intval($instance['enable_ticker']);
67 - $visible_items = intval($instance['visible_items']);
68 - $ticker_speed = intval($instance['ticker_speed']) * 1000;
69 -
70 - if(empty($urls)){
71 - return '';
72 - }
73 -
74 - $rand = array();
75 - $url = explode(',', $urls);
76 - $tab_title = explode(',', $tab_titles);
77 - $ucount = count($url);
78 -
79 - // Generate the Tabs
80 - if($ucount > 1){
81 - echo '<ul class="srr-tab-wrap srr-tab-style-' . $color_style . ' srr-clearfix">';
82 - for( $i=0; $i < $ucount; $i++ ){
83 - // Get the Feed URL
84 - $feedUrl = trim( $url[$i] );
85 - $rss = fetch_feed( $feedUrl );
86 - $rand[$i] = rand(0, 999);
87 -
88 - if (!is_wp_error($rss)){
89 -
90 - if( isset( $tab_title[$i] ) && !empty( $tab_title[$i]) ){
91 - $rss_title = $tab_title[$i];
92 - }else{
93 - $rss_title = esc_attr(strip_tags($rss->get_title()));
94 - }
95 -
96 - echo '<li data-tab="srr-tab-' . $rand[$i] . '">' . $rss_title . '</li>';
97 - }else{
98 - echo '<li data-tab="srr-tab-' . $rand[$i] . '">Error</li>';
99 - }
100 -
101 - }
102 - echo '</ul>';
103 - }
104 -
105 - for($i=0; $i<$ucount; $i++){
106 - // Get the Feed URL
107 - $feedUrl = trim($url[$i]);
108 - if(isset($url[$i])){
109 - $rss = fetch_feed($feedUrl);
110 - }else{
111 - return '';
112 - }
113 -
114 - if( method_exists( $rss, 'enable_order_by_date' ) ){
115 - $rss->enable_order_by_date(false);
116 - }
117 -
118 - // Check for feed errors
119 - if (!is_wp_error( $rss ) ){
120 - $maxitems = $rss->get_item_quantity($count);
121 - $rss_items = $rss->get_items(0, $maxitems);
122 - $rss_title = esc_attr(strip_tags($rss->get_title()));
123 - $rss_desc = esc_attr(strip_tags($rss->get_description()));
124 - }else{
125 - echo '<div class="srr-wrap srr-style-' . $color_style .'" data-id="srr-tab-' . $rand[$i] . '"><p>RSS Error: ' . $rss->get_error_message() . '</p></div>';
126 - continue;
127 - }
128 -
129 - $randAttr = isset($rand[$i]) ? ' data-id="srr-tab-' . $rand[$i] . '" ' : '';
130 -
131 - // Outer Wrap start
132 - echo '<div class="srr-wrap ' . (($enable_ticker == 1 ) ? 'srr-vticker' : '' ) . ' srr-style-' . $color_style . '" data-visible="' . $visible_items . '" data-speed="' . $ticker_speed . '"' . $randAttr . '><div>';
133 -
134 - // Check feed items
135 - if ($maxitems == 0){
136 - echo '<div>No items.</div>';
137 - }else{
138 - $j=1;
139 - // Loop through each feed item
140 - foreach ($rss_items as $item){
141 - // Get the link
142 - $link = $item->get_link();
143 - while ( stristr($link, 'http') != $link ){ $link = substr($link, 1); }
144 - $link = esc_url(strip_tags($link));
145 -
146 - // Get the item title
147 - $title = esc_attr(strip_tags($item->get_title()));
148 - if ( empty($title) )
149 - $title = __('No Title');
150 -
151 - if( $strip_title != 0 ){
152 - $titleLen = strlen($title);
153 - $title = wp_html_excerpt( $title, $strip_title );
154 - $title = ($titleLen > $strip_title) ? $title . ' ...' : $title;
155 - }
156 -
157 - // Open links in new tab
158 - $newtab = ($open_newtab) ? ' target="_blank"' : '';
159 -
160 - // Get the date
161 - $date = $item->get_date('j F Y');
162 -
163 - // Get thumbnail if present @since v2.2
164 - $thumb = '';
165 - if ($show_thumb == 1 && $enclosure = $item->get_enclosure()){
166 - $thumburl = $enclosure->get_thumbnail();
167 - if(!empty($thumburl))
168 - $thumb = '<img src="' . $thumburl . '" alt="' . $title . '" class="srr-thumb" align="left"/>';
169 - }
170 -
171 - // Get the description
172 - $desc = '';
173 - if( $rich_desc == 1 ){
174 -
175 - $desc = strip_tags( str_replace( 'eval', '', $item->get_description() ) , '<p><a><img><em><strong><font><strike><s><u><i>');
26 + }
176 27
177 - }else{
178 -
179 - $desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );
180 - if($strip_desc != 0){
181 - $desc = wp_html_excerpt( $desc, $strip_desc );
182 - $rmore = (!empty($read_more)) ? '<a href="' . $link . '" title="Read more"' . $newtab . '>' . $read_more . '</a>' : '';
183 -
184 - if ( '[...]' == substr( $desc, -5 ) )
185 - $desc = substr( $desc, 0, -5 );
186 - elseif ( '[&hellip;]' != substr( $desc, -10 ) )
187 - $desc .= '';
188 -
189 - $desc = esc_html( $desc );
190 - }
191 -
192 - $desc = $thumb . $desc . ' ' . $rmore;
193 -
194 - }
195 -
196 - // Get the author
197 - $author = $item->get_author();
198 - if ( is_object($author) ) {
199 - $author = $author->get_name();
200 - $author = esc_html(strip_tags($author));
201 - }
202 -
203 - echo "\n\n\t";
204 -
205 - // Display the feed items
206 - echo '<div class="srr-item ' . (($j%2 == 0) ? 'even' : 'odd') . '">';
207 - echo '<div class="srr-title"><a href="' . $link . '"' . $newtab . ' title="Posted on ' . $date . '">' . $title . '</a></div>';
208 - echo '<div class="srr-meta">';
209 -
210 - if($show_date && !empty($date))
211 - echo '<time class="srr-date">' . $date . '</time>';
212 -
213 - if($show_author && !empty($author))
214 - echo ' - <cite class="srr-author">' . $author . '</cite>';
215 -
216 - echo '</div>';
217 -
218 - if($show_desc)
219 - echo '<p class="srr-summary srr-clearfix">' . $desc . '</p>';
220 -
221 - echo '</div>';
222 - // End display
223 -
224 - $j++;
225 - }
226 - }
227 -
228 - // Outer wrap end
229 - echo "\n\n</div>
230 - </div> \n\n" ;
231 -
232 - $rss->__destruct();
233 - unset($rss);
234 -
235 - }
236 -}
28 + public static function includes(){
237 29
238 -class super_rss_reader_widget extends WP_Widget{
239 - ## Initialize
240 - function super_rss_reader_widget(){
241 - $widget_ops = array(
242 - 'classname' => 'widget_super_rss_reader',
243 - 'description' => "Enhanced RSS feed reader widget with advanced features."
244 - );
245 -
246 - $control_ops = array('width' => 430, 'height' => 500);
247 - parent::WP_Widget('super_rss_reader', 'Super RSS Reader', $widget_ops, $control_ops);
248 - }
249 -
250 - ## Display the Widget
251 - function widget($args, $instance){
252 - extract($args);
253 - if(empty($instance['title'])){
254 - $title = '';
255 - }else{
256 - $title = $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
257 - }
258 -
259 - echo $before_widget . $title;
260 - echo "\n" . '
261 - <!-- Start - Super RSS Reader v' . SRR_VERSION . '-->
262 - <div class="super-rss-reader-widget">' . "\n";
263 -
264 - srr_rss_parser($instance);
265 -
266 - echo "\n" . '</div>
267 - <!-- End - Super RSS Reader -->
268 - ' . "\n";
269 - echo $after_widget;
270 - }
271 -
272 - ## Save settings
273 - function update($new_instance, $old_instance){
274 - $instance = $old_instance;
275 - $instance['title'] = stripslashes($new_instance['title']);
276 - $instance['urls'] = stripslashes($new_instance['urls']);
277 - $instance['tab_titles'] = stripslashes($new_instance['tab_titles']);
278 -
279 - $instance['count'] = intval($new_instance['count']);
280 - $instance['show_date'] = intval($new_instance['show_date']);
281 - $instance['show_desc'] = intval($new_instance['show_desc']);
282 - $instance['show_author'] = intval($new_instance['show_author']);
283 - $instance['show_thumb'] = stripslashes($new_instance['show_thumb']);
284 - $instance['open_newtab'] = intval($new_instance['open_newtab']);
285 - $instance['strip_desc'] = intval($new_instance['strip_desc']);
286 - $instance['strip_title'] = intval($new_instance['strip_title']);
287 - $instance['read_more'] = stripslashes($new_instance['read_more']);
288 - $instance['rich_desc'] = stripslashes($new_instance['rich_desc']);
289 -
290 - $instance['color_style'] = stripslashes($new_instance['color_style']);
291 - $instance['enable_ticker'] = intval($new_instance['enable_ticker']);
292 - $instance['visible_items'] = intval($new_instance['visible_items']);
293 - $instance['ticker_speed'] = intval($new_instance['ticker_speed']);
294 -
295 - return $instance;
296 - }
297 -
298 - ## HJA Widget form
299 - function form($instance){
300 - global $srr_color_styles;
301 -
302 - $instance = wp_parse_args( (array) $instance, array(
303 - 'title' => '', 'urls' => '', 'tab_titles' => '',
304 - 'count' => 5, 'show_date' => 0, 'show_desc' => 1,
305 - 'show_author' => 0, 'show_thumb' => 1, 'open_newtab' => 1,
306 - 'strip_desc' => 100, 'read_more' => '[...]', 'rich_desc' => 0 ,
307 - 'color_style' => 'none', 'enable_ticker' => 1, 'visible_items' => 5,
308 - 'strip_title' => 0, 'ticker_speed' => 4,
309 - ));
310 -
311 - $title = htmlspecialchars($instance['title']);
312 - $urls = htmlspecialchars($instance['urls']);
313 - $tab_titles = htmlspecialchars($instance['tab_titles']);
314 -
315 - $count = intval($instance['count']);
316 - $show_date = intval($instance['show_date']);
317 - $show_desc = intval($instance['show_desc']);
318 - $show_author = intval($instance['show_author']);
319 - $show_thumb = intval($instance['show_thumb']);
320 - $open_newtab = intval($instance['open_newtab']);
321 - $strip_desc = intval($instance['strip_desc']);
322 - $strip_title = intval($instance['strip_title']);
323 - $read_more = htmlspecialchars($instance['read_more']);
324 - $rich_desc = htmlspecialchars($instance['rich_desc']);
325 -
326 - $color_style = stripslashes($instance['color_style']);
327 - $enable_ticker = intval($instance['enable_ticker']);
328 - $visible_items = intval($instance['visible_items']);
329 - $ticker_speed = intval($instance['ticker_speed']);
330 -
331 - ?>
332 - <div class="srr_settings">
333 - <table width="100%" height="72" border="0">
334 - <tr>
335 - <td width="13%" height="33"><label for="<?php echo $this->get_field_id('title'); ?>">Title: </label></td>
336 - <td width="87%"><input id="<?php echo $this->get_field_id('title');?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat"/></td>
337 - </tr>
338 - <tr>
339 - <td><label for="<?php echo $this->get_field_id('urls'); ?>">URLs: </label></td>
340 - <td><input id="<?php echo $this->get_field_id('urls');?>" name="<?php echo $this->get_field_name('urls'); ?>" type="text" value="<?php echo $urls; ?>" class="widefat"/>
341 - <small class="srr_smalltext">Can enter multiple RSS/atom feed URLs seperated by a comma.</small>
342 - </td>
343 - </tr>
344 -
345 - <tr>
346 - <td><label for="<?php echo $this->get_field_id('tab_titles'); ?>">Tab titles: </label></td>
347 - <td><input id="<?php echo $this->get_field_id('tab_titles');?>" name="<?php echo $this->get_field_name('tab_titles'); ?>" type="text" value="<?php echo $tab_titles; ?>" class="widefat"/>
348 - <small class="srr_smalltext">Enter corresponding tab titles seperated by a comma.</small>
349 - </td>
350 - </tr>
351 -
352 - </table>
353 - </div>
354 -
355 - <div class="srr_settings">
356 - <h4>Settings</h4>
357 - <table width="100%" border="0">
358 - <tr>
359 - <td width="7%" height="28"><input id="<?php echo $this->get_field_id('show_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_desc'); ?>" value="1" <?php echo $show_desc == "1" ? 'checked="checked"' : ""; ?> /></td>
360 - <td width="40%"><label for="<?php echo $this->get_field_id('show_desc'); ?>">Show Description</label></td>
361 - <td width="28%"><label for="<?php echo $this->get_field_id('count');?>">Count</label></td>
362 - <td width="25%"><input id="<?php echo $this->get_field_id('count');?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo $count; ?>" class="widefat" title="No of feed items to parse"/></td>
363 - </tr>
364 - <tr>
365 - <td height="32"><input id="<?php echo $this->get_field_id('show_date'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_date'); ?>" value="1" <?php echo $show_date == "1" ? 'checked="checked"' : ""; ?> /></td>
366 - <td><label for="<?php echo $this->get_field_id('show_date'); ?>">Show Date</label></td>
367 - <td><label for="<?php echo $this->get_field_id('strip_desc');?>">Strip description</label></td>
368 - <td><input id="<?php echo $this->get_field_id('strip_desc');?>" name="<?php echo $this->get_field_name('strip_desc'); ?>" type="text" value="<?php echo $strip_desc; ?>" class="widefat" title="The number of charaters to be displayed. Use 0 to disable stripping"/> </td>
369 - </tr>
370 - <tr>
371 - <td height="29"><input id="<?php echo $this->get_field_id('show_author'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_author'); ?>" value="1" <?php echo $show_author == "1" ? 'checked="checked"' : ""; ?> /></td>
372 - <td><label for="<?php echo $this->get_field_id('show_author'); ?>">Show Author</label></td>
373 - <td><label for="<?php echo $this->get_field_id('read_more'); ?>">Read more text</label></td>
374 - <td><input id="<?php echo $this->get_field_id('read_more'); ?>" name="<?php echo $this->get_field_name('read_more'); ?>" type="text" value="<?php echo $read_more; ?>" class="widefat" title="Leave blank to hide read more text"/></td>
375 - </tr>
376 - <tr>
377 - <td height="29"><input id="<?php echo $this->get_field_id('open_newtab'); ?>" type="checkbox" name="<?php echo $this->get_field_name('open_newtab'); ?>" value="1" <?php echo $open_newtab == "1" ? 'checked="checked"' : ""; ?> /></td>
378 - <td><label for="<?php echo $this->get_field_id('open_newtab'); ?>">Open links in new tab</label></td>
379 - <td><label for="<?php echo $this->get_field_id('strip_title'); ?>">Strip Title</label></td>
380 - <td><input id="<?php echo $this->get_field_id('strip_title');?>" name="<?php echo $this->get_field_name('strip_title'); ?>" type="text" value="<?php echo $strip_title; ?>" class="widefat" title="The number of charaters to be displayed. Use 0 to disable stripping"/></td>
381 - </tr>
382 - <tr>
383 - <td height="29"><input id="<?php echo $this->get_field_id('show_thumb'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_thumb'); ?>" value="1" <?php echo $show_thumb == "1" ? 'checked="checked"' : ""; ?> /></td>
384 - <td><label for="<?php echo $this->get_field_id('show_thumb'); ?>">Show thumbnail if present</label></td>
385 - <td>&nbsp;</td>
386 - <td>&nbsp;</td>
387 - </tr>
388 -
389 - <tr>
390 - <td height="29"><input id="<?php echo $this->get_field_id('rich_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('rich_desc'); ?>" value="1" <?php echo $rich_desc == "1" ? 'checked="checked"' : ""; ?> /></td>
391 - <td><label for="<?php echo $this->get_field_id('rich_desc'); ?>">Enable full or rich description</label></td>
392 - <td>&nbsp;</td>
393 - <td>&nbsp;</td>
394 - </tr>
395 -
396 - </table>
397 - </div>
398 -
399 - <?php if( $rich_desc == 1 ): ?>
400 - <span class="srr_note">Note: You have enabled "Full/Rich HTML" Please make sure that the feed(s) are from trusted sources and do not contain any harmful scripts. If there are some aligment issues in the description, please use custom CSS to fix that. </span>
401 - <?php endif; ?>
402 -
403 - <div class="srr_settings">
404 - <h4>Other settings</h4>
405 - <table width="100%" height="109" border="0">
406 - <tr>
407 - <td height="32"><label>Color style: </label></td>
408 - <td>
409 - <?php
410 - echo '<select name="' . $this->get_field_name('color_style') . '" id="' . $this->get_field_id('color_style') . '">';
411 - foreach($srr_color_styles as $k => $v){
412 - echo '<option value="' . $v . '" ' . ($color_style == $v ? 'selected="selected"' : "") . '>' . $k . '</option>';
413 - }
414 - echo '</select>';
415 - ?>
416 - </td>
417 - </tr>
418 - <tr>
419 - <td height="33"><label for="<?php echo $this->get_field_id('enable_ticker'); ?>">Ticker animation:</label> </td>
420 - <td><input id="<?php echo $this->get_field_id('enable_ticker'); ?>" type="checkbox" name="<?php echo $this->get_field_name('enable_ticker'); ?>" value="1" <?php echo $enable_ticker == "1" ? 'checked="checked"' : ""; ?> /></td>
421 - </tr>
422 - <tr>
423 - <td height="36"><label for="<?php echo $this->get_field_id('visible_items');?>">Visible items: </label></td>
424 - <td><input id="<?php echo $this->get_field_id('visible_items');?>" name="<?php echo $this->get_field_name('visible_items'); ?>" type="text" value="<?php echo $visible_items; ?>" class="widefat" title="The no of feed items to be visible."/>
425 - </td>
426 - </tr>
427 - <tr>
428 - <td height="36"><label for="<?php echo $this->get_field_id('ticker_speed');?>">Ticker speed: </label></td>
429 - <td><input id="<?php echo $this->get_field_id('ticker_speed');?>" name="<?php echo $this->get_field_name('ticker_speed'); ?>" type="text" value="<?php echo $ticker_speed; ?>" title="Speed of the ticker in seconds"/> seconds
430 - </td>
431 - </tr>
432 - </table>
433 - </div>
434 -
435 - <div class="srr_support"> <a href="http://facebook.com/aakashweb" class="srr_fblike" target="_blank">Like</a> <a href="http://bit.ly/srrDonation" target="_blank" class="srr_donatebtn" title="If you like this plugin, then just make a small donation and it will be helpful for the plugin's development.">Donate</a> <a href="http://www.aakashweb.com/wordpress-plugins/super-rss-reader/" target="_blank">Support</a></div>
436 - <small>Please donate and share this plugin to show your support. Thank you :)</small>
437 -
438 - <?php
439 - }
440 -}
30 + include_once( SRR_PATH . 'includes/utilities.php' );
31 + include_once( SRR_PATH . 'includes/options.php' );
32 + include_once( SRR_PATH . 'includes/feed.php' );
33 + include_once( SRR_PATH . 'includes/widget.php' );
34 + include_once( SRR_PATH . 'includes/widget-admin.php' );
441 35
442 -function super_rss_reader_init(){
443 - register_widget('super_rss_reader_widget');
36 + }
37 +
38 + public static function load_text_domain(){
39 +
40 + load_plugin_textdomain( 'super-rss-reader', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
41 +
42 + }
43 +
444 44 }
445 -add_action('widgets_init', 'super_rss_reader_init');
446 45
447 -function srr_widget_scripts(){
448 - if(in_array($GLOBALS['pagenow'], array('widgets.php'))){
449 - ?>
450 - <style type="text/css">
451 - .srr_settings h4{
452 - border-bottom: 1px solid #DFDFDF;
453 - margin: 20px -11px 10px -11px;
454 - padding: 5px 11px 5px 11px;
455 - border-top: 1px solid #DFDFDF;
456 - background-color: #fff;
457 - background-image: -ms-linear-gradient(top,#fff,#f9f9f9);
458 - background-image: -moz-linear-gradient(top,#fff,#f9f9f9);
459 - background-image: -webkit-linear-gradient(top,#fff,#f9f9f9);
460 - background-image: linear-gradient(top,#fff,#f9f9f9);
461 - }
462 - .srr_smalltext{
463 - font-size: 11px;
464 - color: #666666;
465 - }
466 - .srr_support{
467 - border: 1px solid #DFDFDF;
468 - padding: 10px 13px;
469 - background: #F9F9F9;
470 - text-decoration: none;
471 - margin: 10px -13px;
472 - }
473 - .srr_support a{
474 - text-decoration: none;
475 - margin: 0 5px;
476 - }
477 - .srr_support a:hover{
478 - text-decoration: underline;
479 - }
480 - .srr_donatebtn{
481 - background: url('<?php echo SRR_URL; ?>images/donate.png') left center no-repeat;
482 - color: #f60;
483 - padding-left: 20px;
484 - }
485 - .srr_fblike{
486 - background: url('<?php echo SRR_URL; ?>images/like-button.png') left center no-repeat;
487 - padding-left: 19px;
488 - }
489 - .srr_fblike span{
490 - display: none;
491 - }
492 - .srr_fblike:hover span{
493 - display: inline;
494 - padding:10px;
495 - margin: -15px 0px 0px -50px;
496 - position:absolute;
497 - background:#ffffff;
498 - border:1px solid #cccccc;
499 - box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
500 - border-radius: 5px;
501 - }
502 - .srr_note{
503 - border: 1px solid #FFD893;
504 - padding: 5px;
505 - background: #FFFEDA;
506 - margin: 10px 0 0;
507 - display: block;
508 - }
509 - </style>
510 -
511 - <script type="text/javascript">
512 - jQuery(document).ready(function(){
513 - var social = '<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Faakashweb&amp;send=false&amp;layout=button_count&amp;width=75&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=106994469342299" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>';
514 -
515 - jQuery('.srr_fblike').live('mouseenter', function(){
516 - if(jQuery('.srr_fblike span').length == 0)
517 - jQuery(this).prepend('<span>' + social + '</span>');
518 - });
519 -
520 - });
521 - </script>
522 -
523 - <?php
524 - }
525 -}
526 -add_action('admin_footer', 'srr_widget_scripts');
46 +Super_RSS_Reader::init();
527 47
528 48 ?>