You've already forked wp-fedistream
39 lines
776 B
PHP
39 lines
776 B
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* Widgets handler.
|
||
|
|
*
|
||
|
|
* @package WP_FediStream
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace WP_FediStream\Frontend;
|
||
|
|
|
||
|
|
// Prevent direct file access.
|
||
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Registers and manages all plugin widgets.
|
||
|
|
*/
|
||
|
|
class Widgets {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Constructor.
|
||
|
|
*/
|
||
|
|
public function __construct() {
|
||
|
|
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Register all widgets.
|
||
|
|
*
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function register_widgets(): void {
|
||
|
|
register_widget( Widgets\RecentReleasesWidget::class );
|
||
|
|
register_widget( Widgets\PopularTracksWidget::class );
|
||
|
|
register_widget( Widgets\FeaturedArtistWidget::class );
|
||
|
|
register_widget( Widgets\NowPlayingWidget::class );
|
||
|
|
}
|
||
|
|
}
|