| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
if (!class_exists('reduxDashboardWidget')) { |
| 8 |
class reduxDashboardWidget { |
| 9 |
|
| 10 |
public function __construct ($parent) { |
| 11 |
$fname = Redux_Functions::dat( 'add_redux_dashboard', $parent->args['opt_name'] ); |
| 12 |
|
| 13 |
add_action('wp_dashboard_setup', array($this, $fname)); |
| 14 |
} |
| 15 |
|
| 16 |
public function add_redux_dashboard() { |
| 17 |
add_meta_box('redux_dashboard_widget', 'Redux Framework News', array($this,'redux_dashboard_widget'), 'dashboard', 'side', 'high'); |
| 18 |
} |
| 19 |
|
| 20 |
public function dat() { |
| 21 |
return; |
| 22 |
} |
| 23 |
|
| 24 |
public function redux_dashboard_widget() { |
| 25 |
echo '<div class="rss-widget">'; |
| 26 |
wp_widget_rss_output(array( |
| 27 |
'url' => 'http://reduxframework.com/feed/', |
| 28 |
'title' => 'REDUX_NEWS', |
| 29 |
'items' => 3, |
| 30 |
'show_summary' => 1, |
| 31 |
'show_author' => 0, |
| 32 |
'show_date' => 1 |
| 33 |
)); |
| 34 |
echo '</div>'; |
| 35 |
} |
| 36 |
} |
| 37 |
} |
| 38 |
|