Plugin Directory

Changeset 3246867


Ignore:
Timestamp:
02/26/2025 07:08:06 AM (12 months ago)
Author:
eteubert
Message:

Update to version 4.2.3 from GitHub

Location:
podlove-podcasting-plugin-for-wordpress
Files:
2 added
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/includes/api/api.php

    r3217075 r3246867  
    1414require_once \Podlove\PLUGIN_DIR.'includes/api/episodes/related_episodes.php';
    1515require_once \Podlove\PLUGIN_DIR.'includes/api/chapters.php';
     16require_once \Podlove\PLUGIN_DIR.'includes/api/feeds.php';
    1617require_once \Podlove\PLUGIN_DIR.'includes/api/tools.php';
    1718require_once \Podlove\PLUGIN_DIR.'includes/api/admin/onboarding.php';
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/lib/modules/transcripts/transcripts.php

    r3199134 r3246867  
    2222        add_action('podlove_module_was_activated_transcripts', [$this, 'was_activated']);
    2323        add_filter('podlove_episode_form_data', [$this, 'extend_episode_form'], 10, 2);
    24         add_action('wp_ajax_podlove_transcript_import', [$this, 'ajax_transcript_import']);
    25         add_action('wp_ajax_podlove_transcript_asset_import', [$this, 'ajax_transcript_asset_import']);
    26         add_action('wp_ajax_podlove_transcript_delete', [$this, 'ajax_transcript_delete']);
    27         add_action('wp_ajax_podlove_transcript_get_contributors', [$this, 'ajax_transcript_get_contributors']);
    28         add_action('wp_ajax_podlove_transcript_get_voices', [$this, 'ajax_transcript_get_voices']);
    29 
    30         // add_filter('podlove_episode_data_before_save', [$this, 'save_episode_voice_assignments']);
     24
    3125        add_filter('mime_types', [$this, 'ensure_vtt_mime_type_is_known'], 20);
    3226
     
    136130    }
    137131
    138     public function ajax_transcript_import()
    139     {
    140         if (!isset($_FILES['transcript'])) {
    141             wp_die();
    142         }
    143 
    144         // allow vtt uploads
    145         add_filter('mime_types', function ($mimes) {
    146             $mimes['vtt'] = 'text/vtt';
    147             $mimes['webvtt'] = 'text/vtt';
    148 
    149             return $mimes;
    150         });
    151 
    152         add_filter('upload_mimes', function ($mimes_types) {
    153             $mimes_types['vtt'] = 'text/vtt';
    154             $mimes_types['webvtt'] = 'text/vtt';
    155 
    156             return $mimes_types;
    157         }, 99);
    158 
    159         add_filter('wp_check_filetype_and_ext', function ($types, $file, $filename, $mimes) {
    160             $wp_filetype = wp_check_filetype($filename, $mimes);
    161             $ext = $wp_filetype['ext'];
    162             $type = $wp_filetype['type'];
    163             if (in_array($ext, ['vtt', 'webvtt'])) {
    164                 $types['ext'] = $ext;
    165                 $types['type'] = $type;
    166             }
    167 
    168             return $types;
    169         }, 99, 4);
    170 
    171         // todo: I don't really want it permanently uploaded, so ... delete when done
    172         $file = wp_handle_upload($_FILES['transcript'], ['test_form' => false]);
    173 
    174         if (!$file || isset($file['error'])) {
    175             $error = 'Could not upload transcript file. Reason: '.$file['error'];
    176             \Podlove\Log::get()->addError($error);
    177             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    178         }
    179 
    180         if (stripos($file['type'], 'vtt') === false) {
    181             $error = 'Transcript file must be webvtt. Is: '.$file['type'];
    182             \Podlove\Log::get()->addError($error);
    183             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    184         }
    185 
    186         $post_id = intval($_POST['post_id'], 10);
    187         $episode = Model\Episode::find_one_by_post_id($post_id);
    188 
    189         if (!$episode) {
    190             $error = 'Could not find episode for this post object.';
    191             \Podlove\Log::get()->addError($error);
    192             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    193         }
    194 
    195         $content = file_get_contents($file['file']);
    196 
    197         self::parse_and_import_webvtt($episode, $content);
    198 
    199         wp_die();
    200     }
    201 
    202     public function ajax_transcript_asset_import()
    203     {
    204         $post_id = intval($_GET['post_id'], 10);
    205         $episode = Model\Episode::find_one_by_post_id($post_id);
    206 
    207         if (!$episode) {
    208             $error = 'Could not find episode for this post object.';
    209             \Podlove\Log::get()->addError($error);
    210             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    211         }
    212 
    213         if (($return = $this->transcript_import_from_asset($episode)) !== true) {
    214             if (is_array($return) && isset($return['error'])) {
    215                 \Podlove\Log::get()->addError($return['error']);
    216                 \Podlove\AJAX\Ajax::respond_with_json($return);
    217             }
    218         }
    219 
    220         wp_die();
    221     }
    222 
    223     public function ajax_transcript_delete()
    224     {
    225         $post_id = intval($_GET['post_id'], 10);
    226         $episode = Model\Episode::find_one_by_post_id($post_id);
    227 
    228         if (!$episode) {
    229             $error = 'Could not find episode for this post object.';
    230             \Podlove\Log::get()->addError($error);
    231             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    232         }
    233 
    234         Transcript::delete_for_episode($episode->id);
    235 
    236         echo 'ok';
    237         wp_die();
    238     }
    239 
    240132    /**
    241133     * Import transcript from remote file.
     
    335227    }
    336228
    337     public function ajax_transcript_get_contributors()
    338     {
    339         $contributors = Contributor::all();
    340         $contributors = array_map(function ($c) {
    341             return [
    342                 'id' => $c->id,
    343                 'name' => $c->getName(),
    344                 'identifier' => $c->identifier,
    345                 'avatar' => $c->avatar()->url(),
    346             ];
    347         }, $contributors);
    348 
    349         \Podlove\AJAX\Ajax::respond_with_json(['contributors' => $contributors]);
    350     }
    351 
    352     public function ajax_transcript_get_voices()
    353     {
    354         $post_id = intval($_GET['post_id'], 10);
    355         $episode = Model\Episode::find_one_by_post_id($post_id);
    356         $voices = Transcript::get_voices_for_episode_id($episode->id);
    357         \Podlove\AJAX\Ajax::respond_with_json(['voices' => $voices]);
    358     }
    359 
    360229    public function serve_transcript_file()
    361230    {
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/podlove.php

    r3240397 r3246867  
    33 * Plugin Name: Podlove Podcast Publisher
    44 * Plugin URI:  https://podlove.org/podlove-podcast-publisher/
    5  * Version: 4.2.2
     5 * Version: 4.2.3
    66 * Requires at least: 4.9.6
    77 * Requires PHP: 8.0
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/readme.txt

    r3240397 r3246867  
    44Tags: podlove, podcast, publishing, rss, audio
    55Tested up to: 6.7.2
    6 Stable tag: 4.2.2
     6Stable tag: 4.2.3
    77Requires at least: 4.9.6
    88Requires PHP: 8.0
     
    115115
    116116== Changelog ==
     117
     118= 4.2.3 =
     119
     120- feat: add API route to list public feeds: `GET podlove/v2/feeds`
     121- security: remove unused code (which contained an XSS vulnerability)
    117122
    118123= 4.2.2 =
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/vendor/composer/autoload_classmap.php

    r3217075 r3246867  
    480480    'Podlove\\Api\\Error\\NotFoundEpisode' => $baseDir . '/lib/api/error.php',
    481481    'Podlove\\Api\\Error\\NotSupported' => $baseDir . '/lib/api/error.php',
     482    'Podlove\\Api\\Feeds\\WP_REST_PodloveFeed_Controller' => $baseDir . '/includes/api/feeds.php',
    482483    'Podlove\\Api\\Permissons' => $baseDir . '/lib/api/permissions.php',
    483484    'Podlove\\Api\\Podcast\\WP_REST_Podlove_Controller' => $baseDir . '/includes/api/podcast.php',
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/vendor/composer/autoload_static.php

    r3217075 r3246867  
    625625        'Podlove\\Api\\Error\\NotFoundEpisode' => __DIR__ . '/../..' . '/lib/api/error.php',
    626626        'Podlove\\Api\\Error\\NotSupported' => __DIR__ . '/../..' . '/lib/api/error.php',
     627        'Podlove\\Api\\Feeds\\WP_REST_PodloveFeed_Controller' => __DIR__ . '/../..' . '/includes/api/feeds.php',
    627628        'Podlove\\Api\\Permissons' => __DIR__ . '/../..' . '/lib/api/permissions.php',
    628629        'Podlove\\Api\\Podcast\\WP_REST_Podlove_Controller' => __DIR__ . '/../..' . '/includes/api/podcast.php',
  • podlove-podcasting-plugin-for-wordpress/tags/4.2.3/vendor/composer/installed.php

    r3240397 r3246867  
    22    'root' => array(
    33        'name' => 'podlove/podcast-publisher',
    4         'pretty_version' => '4.2.2',
    5         'version' => '4.2.2.0',
    6         'reference' => '24877eaa382d293c8ede303e212b76b3c2dd3e75',
     4        'pretty_version' => '4.2.3',
     5        'version' => '4.2.3.0',
     6        'reference' => '3f37989e000f406ec7a484490a3d0549bb06ac91',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    144144        ),
    145145        'podlove/podcast-publisher' => array(
    146             'pretty_version' => '4.2.2',
    147             'version' => '4.2.2.0',
    148             'reference' => '24877eaa382d293c8ede303e212b76b3c2dd3e75',
     146            'pretty_version' => '4.2.3',
     147            'version' => '4.2.3.0',
     148            'reference' => '3f37989e000f406ec7a484490a3d0549bb06ac91',
    149149            'type' => 'library',
    150150            'install_path' => __DIR__ . '/../../',
  • podlove-podcasting-plugin-for-wordpress/trunk/includes/api/api.php

    r3217075 r3246867  
    1414require_once \Podlove\PLUGIN_DIR.'includes/api/episodes/related_episodes.php';
    1515require_once \Podlove\PLUGIN_DIR.'includes/api/chapters.php';
     16require_once \Podlove\PLUGIN_DIR.'includes/api/feeds.php';
    1617require_once \Podlove\PLUGIN_DIR.'includes/api/tools.php';
    1718require_once \Podlove\PLUGIN_DIR.'includes/api/admin/onboarding.php';
  • podlove-podcasting-plugin-for-wordpress/trunk/lib/modules/transcripts/transcripts.php

    r3199134 r3246867  
    2222        add_action('podlove_module_was_activated_transcripts', [$this, 'was_activated']);
    2323        add_filter('podlove_episode_form_data', [$this, 'extend_episode_form'], 10, 2);
    24         add_action('wp_ajax_podlove_transcript_import', [$this, 'ajax_transcript_import']);
    25         add_action('wp_ajax_podlove_transcript_asset_import', [$this, 'ajax_transcript_asset_import']);
    26         add_action('wp_ajax_podlove_transcript_delete', [$this, 'ajax_transcript_delete']);
    27         add_action('wp_ajax_podlove_transcript_get_contributors', [$this, 'ajax_transcript_get_contributors']);
    28         add_action('wp_ajax_podlove_transcript_get_voices', [$this, 'ajax_transcript_get_voices']);
    29 
    30         // add_filter('podlove_episode_data_before_save', [$this, 'save_episode_voice_assignments']);
     24
    3125        add_filter('mime_types', [$this, 'ensure_vtt_mime_type_is_known'], 20);
    3226
     
    136130    }
    137131
    138     public function ajax_transcript_import()
    139     {
    140         if (!isset($_FILES['transcript'])) {
    141             wp_die();
    142         }
    143 
    144         // allow vtt uploads
    145         add_filter('mime_types', function ($mimes) {
    146             $mimes['vtt'] = 'text/vtt';
    147             $mimes['webvtt'] = 'text/vtt';
    148 
    149             return $mimes;
    150         });
    151 
    152         add_filter('upload_mimes', function ($mimes_types) {
    153             $mimes_types['vtt'] = 'text/vtt';
    154             $mimes_types['webvtt'] = 'text/vtt';
    155 
    156             return $mimes_types;
    157         }, 99);
    158 
    159         add_filter('wp_check_filetype_and_ext', function ($types, $file, $filename, $mimes) {
    160             $wp_filetype = wp_check_filetype($filename, $mimes);
    161             $ext = $wp_filetype['ext'];
    162             $type = $wp_filetype['type'];
    163             if (in_array($ext, ['vtt', 'webvtt'])) {
    164                 $types['ext'] = $ext;
    165                 $types['type'] = $type;
    166             }
    167 
    168             return $types;
    169         }, 99, 4);
    170 
    171         // todo: I don't really want it permanently uploaded, so ... delete when done
    172         $file = wp_handle_upload($_FILES['transcript'], ['test_form' => false]);
    173 
    174         if (!$file || isset($file['error'])) {
    175             $error = 'Could not upload transcript file. Reason: '.$file['error'];
    176             \Podlove\Log::get()->addError($error);
    177             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    178         }
    179 
    180         if (stripos($file['type'], 'vtt') === false) {
    181             $error = 'Transcript file must be webvtt. Is: '.$file['type'];
    182             \Podlove\Log::get()->addError($error);
    183             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    184         }
    185 
    186         $post_id = intval($_POST['post_id'], 10);
    187         $episode = Model\Episode::find_one_by_post_id($post_id);
    188 
    189         if (!$episode) {
    190             $error = 'Could not find episode for this post object.';
    191             \Podlove\Log::get()->addError($error);
    192             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    193         }
    194 
    195         $content = file_get_contents($file['file']);
    196 
    197         self::parse_and_import_webvtt($episode, $content);
    198 
    199         wp_die();
    200     }
    201 
    202     public function ajax_transcript_asset_import()
    203     {
    204         $post_id = intval($_GET['post_id'], 10);
    205         $episode = Model\Episode::find_one_by_post_id($post_id);
    206 
    207         if (!$episode) {
    208             $error = 'Could not find episode for this post object.';
    209             \Podlove\Log::get()->addError($error);
    210             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    211         }
    212 
    213         if (($return = $this->transcript_import_from_asset($episode)) !== true) {
    214             if (is_array($return) && isset($return['error'])) {
    215                 \Podlove\Log::get()->addError($return['error']);
    216                 \Podlove\AJAX\Ajax::respond_with_json($return);
    217             }
    218         }
    219 
    220         wp_die();
    221     }
    222 
    223     public function ajax_transcript_delete()
    224     {
    225         $post_id = intval($_GET['post_id'], 10);
    226         $episode = Model\Episode::find_one_by_post_id($post_id);
    227 
    228         if (!$episode) {
    229             $error = 'Could not find episode for this post object.';
    230             \Podlove\Log::get()->addError($error);
    231             \Podlove\AJAX\Ajax::respond_with_json(['error' => $error]);
    232         }
    233 
    234         Transcript::delete_for_episode($episode->id);
    235 
    236         echo 'ok';
    237         wp_die();
    238     }
    239 
    240132    /**
    241133     * Import transcript from remote file.
     
    335227    }
    336228
    337     public function ajax_transcript_get_contributors()
    338     {
    339         $contributors = Contributor::all();
    340         $contributors = array_map(function ($c) {
    341             return [
    342                 'id' => $c->id,
    343                 'name' => $c->getName(),
    344                 'identifier' => $c->identifier,
    345                 'avatar' => $c->avatar()->url(),
    346             ];
    347         }, $contributors);
    348 
    349         \Podlove\AJAX\Ajax::respond_with_json(['contributors' => $contributors]);
    350     }
    351 
    352     public function ajax_transcript_get_voices()
    353     {
    354         $post_id = intval($_GET['post_id'], 10);
    355         $episode = Model\Episode::find_one_by_post_id($post_id);
    356         $voices = Transcript::get_voices_for_episode_id($episode->id);
    357         \Podlove\AJAX\Ajax::respond_with_json(['voices' => $voices]);
    358     }
    359 
    360229    public function serve_transcript_file()
    361230    {
  • podlove-podcasting-plugin-for-wordpress/trunk/podlove.php

    r3240397 r3246867  
    33 * Plugin Name: Podlove Podcast Publisher
    44 * Plugin URI:  https://podlove.org/podlove-podcast-publisher/
    5  * Version: 4.2.2
     5 * Version: 4.2.3
    66 * Requires at least: 4.9.6
    77 * Requires PHP: 8.0
  • podlove-podcasting-plugin-for-wordpress/trunk/readme.txt

    r3240397 r3246867  
    44Tags: podlove, podcast, publishing, rss, audio
    55Tested up to: 6.7.2
    6 Stable tag: 4.2.2
     6Stable tag: 4.2.3
    77Requires at least: 4.9.6
    88Requires PHP: 8.0
     
    115115
    116116== Changelog ==
     117
     118= 4.2.3 =
     119
     120- feat: add API route to list public feeds: `GET podlove/v2/feeds`
     121- security: remove unused code (which contained an XSS vulnerability)
    117122
    118123= 4.2.2 =
  • podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/autoload_classmap.php

    r3217075 r3246867  
    480480    'Podlove\\Api\\Error\\NotFoundEpisode' => $baseDir . '/lib/api/error.php',
    481481    'Podlove\\Api\\Error\\NotSupported' => $baseDir . '/lib/api/error.php',
     482    'Podlove\\Api\\Feeds\\WP_REST_PodloveFeed_Controller' => $baseDir . '/includes/api/feeds.php',
    482483    'Podlove\\Api\\Permissons' => $baseDir . '/lib/api/permissions.php',
    483484    'Podlove\\Api\\Podcast\\WP_REST_Podlove_Controller' => $baseDir . '/includes/api/podcast.php',
  • podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/autoload_static.php

    r3217075 r3246867  
    625625        'Podlove\\Api\\Error\\NotFoundEpisode' => __DIR__ . '/../..' . '/lib/api/error.php',
    626626        'Podlove\\Api\\Error\\NotSupported' => __DIR__ . '/../..' . '/lib/api/error.php',
     627        'Podlove\\Api\\Feeds\\WP_REST_PodloveFeed_Controller' => __DIR__ . '/../..' . '/includes/api/feeds.php',
    627628        'Podlove\\Api\\Permissons' => __DIR__ . '/../..' . '/lib/api/permissions.php',
    628629        'Podlove\\Api\\Podcast\\WP_REST_Podlove_Controller' => __DIR__ . '/../..' . '/includes/api/podcast.php',
  • podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/installed.php

    r3240397 r3246867  
    22    'root' => array(
    33        'name' => 'podlove/podcast-publisher',
    4         'pretty_version' => '4.2.2',
    5         'version' => '4.2.2.0',
    6         'reference' => '24877eaa382d293c8ede303e212b76b3c2dd3e75',
     4        'pretty_version' => '4.2.3',
     5        'version' => '4.2.3.0',
     6        'reference' => '3f37989e000f406ec7a484490a3d0549bb06ac91',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    144144        ),
    145145        'podlove/podcast-publisher' => array(
    146             'pretty_version' => '4.2.2',
    147             'version' => '4.2.2.0',
    148             'reference' => '24877eaa382d293c8ede303e212b76b3c2dd3e75',
     146            'pretty_version' => '4.2.3',
     147            'version' => '4.2.3.0',
     148            'reference' => '3f37989e000f406ec7a484490a3d0549bb06ac91',
    149149            'type' => 'library',
    150150            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.