| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
if ( ! class_exists( 'reduxLegacyDashboardWidget' ) ) { |
| 8 |
class reduxLegacyDashboardWidget { |
| 9 |
|
| 10 |
public function __construct( $parent ) { |
| 11 |
$fname = ReduxLegacy_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( |
| 27 |
array( |
| 28 |
'url' => 'http://ReduxFrameworkLegacy.com/feed/', |
| 29 |
'title' => 'REDUX_NEWS', |
| 30 |
'items' => 3, |
| 31 |
'show_summary' => 1, |
| 32 |
'show_author' => 0, |
| 33 |
'show_date' => 1, |
| 34 |
) |
| 35 |
); |
| 36 |
echo '</div>'; |
| 37 |
} |
| 38 |
} |
| 39 |
} |
| 40 |
|