diff --git a/php/classes/controllers/class-episode-controller.php b/php/classes/controllers/class-episode-controller.php index c2880d2f..cb905f96 100644 --- a/php/classes/controllers/class-episode-controller.php +++ b/php/classes/controllers/class-episode-controller.php @@ -252,27 +252,29 @@ public function episode_list( $episode_ids, $include_title = false, $include_exc * * @param $settings * - * @return mixed|void + * @return string */ - public function render_episodes($settings) { + public function render_episodes( $settings ) { global $ss_podcasting; $player = $ss_podcasting->players_controller; + $paged = get_query_var( 'paged' ); - $args = array( + $args = array( 'post_type' => SSP_CPT_PODCAST, 'posts_per_page' => 10, + 'paged' => $paged ?: 1, ); $episodes = new WP_Query( $args ); $episodes_template_data = array( - 'player' => $player, + 'player' => $player, 'episodes' => $episodes, 'settings' => $settings, ); $episodes_template_data = apply_filters( 'episode_list_data', $episodes_template_data ); - return $this->renderer->render_deprecated( $episodes_template_data, 'episodes/all-episodes-list' ); + return $this->renderer->fetch( 'episodes/all-episodes-list', $episodes_template_data ); } /** diff --git a/php/classes/integrations/elementor/widgets/elementor-html-player-widget.php b/php/classes/integrations/elementor/widgets/elementor-html-player-widget.php index 4870d45a..d3f6240a 100644 --- a/php/classes/integrations/elementor/widgets/elementor-html-player-widget.php +++ b/php/classes/integrations/elementor/widgets/elementor-html-player-widget.php @@ -2,9 +2,10 @@ namespace SeriouslySimplePodcasting\Integrations\Elementor\Widgets; -use SeriouslySimplePodcasting\Controllers\Players_Controller; -class Elementor_Html_Player_Widget extends \Elementor\Widget_Base { +use Elementor\Widget_Base; + +class Elementor_Html_Player_Widget extends Widget_Base { /** * Class constructor.