Plugin Directory

Changeset 2177688


Ignore:
Timestamp:
10/22/2019 04:56:14 PM (6 years ago)
Author:
libsyn
Message:

changes for version 1.2.2.3

Location:
libsyn-podcasting/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • libsyn-podcasting/trunk/admin/lib/Libsyn.php

    r2123292 r2177688  
    44    protected $text_dom = LIBSYN_TEXT_DOMAIN;
    55    protected $plugin_name = "Libsyn/Wordpress";
    6     protected $plugin_version = "1.2.2.2";
     6    protected $plugin_version = "1.2.2.3";
    77    protected $api_table_name = "libsyn_podcast_plugin";
    88    protected $api_base_uri = "https://api.libsyn.com";
    99    protected $minimum_php_version = 5.4;
    1010    protected $recommended_php_version = 5.6;
    11     protected $max_php_version = 7.3;
     11    protected $max_php_version = 7.4;
    1212    protected $wp_base_dir;
    1313    protected $plugin_base_dir;
  • libsyn-podcasting/trunk/admin/lib/Libsyn/Post.php

    r2123292 r2177688  
    19511951                    /* Remove and add FTP/Unreleased Media */
    19521952                    $get_ftpunreleased = $plugin->getFtpUnreleased($api);
    1953                     if ( !empty($ftp_unreleased) ) {
     1953                    if ( !empty($get_ftpunreleased) ) {
    19541954                        $ftp_unreleased = $get_ftpunreleased->{'ftp-unreleased'};
    19551955                    }
  • libsyn-podcasting/trunk/admin/lib/Libsyn/Post/Block.php

    r2123292 r2177688  
    1212     */
    1313    public static function initBlock() {
    14         register_block_type('libsyn-podcasting-gutenberg/block', array(
    15                 'editor_script' => 'cgb/block-libsyn-podcasting-gutenberg',
    16                 'render_callback' => '\Libsyn\Post\Block::shortcodeCallback',
    17                 'attributes' => array(
    18                     'currentPostId' => array(
    19                         'type'      => 'integer',
    20                         'source'    => 'html',
    21                         'default'   => 0
    22                     ),
    23                     'libsynItemId' => array(
    24                         'type'      => 'integer',
    25                         'source'    => 'html',
    26                         'default'   => 0
    27                     ),
    28                     'libsynEpisodeShortcode' => array(
    29                         'type'      => 'string',
    30                         'source'    => 'html',
    31                         'default'   => ''
    32                     ),
    33                     'libsynEpisodeEmbedurl' => array(
    34                         'type'      => 'string',
    35                         'source'    => 'html',
    36                         'default' => ''
    37                     )
    38                 )
    39         ));
     14        $plugin = new \Libsyn\Service();
     15        $current_user_id = $plugin->getCurrentUserId();
     16        $api = $plugin->retrieveApiById($current_user_id, true);
     17        $hasApi = (!empty($api) && $api instanceof \Libsyn\Api);
     18        if ( !$hasApi ) {
     19            $api = $plugin->getApi();
     20            $hasApi = (!empty($api) && $api instanceof \Libsyn\Api);
     21        }
     22
     23        if ( $hasApi !== false ) {
     24            $user_id = $api->getUserId();
     25            if(!empty($user_id)) {
     26                register_block_type('libsyn-podcasting-gutenberg/block', array(
     27                        'editor_script' => 'cgb/block-libsyn-podcasting-gutenberg',
     28                        'render_callback' => '\Libsyn\Post\Block::shortcodeCallback',
     29                        'attributes' => array(
     30                            'currentPostId' => array(
     31                                'type'      => 'integer',
     32                                'source'    => 'html',
     33                                'default'   => 0
     34                            ),
     35                            'libsynItemId' => array(
     36                                'type'      => 'integer',
     37                                'source'    => 'html',
     38                                'default'   => 0
     39                            ),
     40                            'libsynEpisodeShortcode' => array(
     41                                'type'      => 'string',
     42                                'source'    => 'html',
     43                                'default'   => ''
     44                            ),
     45                            'libsynEpisodeEmbedurl' => array(
     46                                'type'      => 'string',
     47                                'source'    => 'html',
     48                                'default' => ''
     49                            )
     50                        )
     51                ));
     52            }
     53        } else {
     54            if($plugin->hasLogger) $plugin->logger->error("Plugin:\t Libsyn User is not set");
     55        }
    4056    }
    4157
  • libsyn-podcasting/trunk/admin/lib/Libsyn/Utilities.php

    r2123292 r2177688  
    948948     * @return string
    949949     */
    950     public function pretty_print_array($arr){
     950    public static function pretty_print_array($arr){
    951951        $retStr = '<ul>';
    952952        if ( is_array($arr) ){
     
    984984     * @return bool
    985985     */
    986     public function is_gutenberg_editor_active() {
     986    public static function is_gutenberg_editor_active() {
    987987        // Gutenberg plugin is installed and activated.
    988988        $gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) );
     
    10121012     * @return bool
    10131013     */
    1014     public function is_classic_editor_plugin_active() {
     1014    public static function is_classic_editor_plugin_active() {
    10151015        if ( ! function_exists( 'is_plugin_active' ) ) {
    10161016            include_once ABSPATH . 'wp-admin/includes/plugin.php';
  • libsyn-podcasting/trunk/lib/css/libsyn/meta_boxes.css

    r2123292 r2177688  
    273273}
    274274
    275 div.stuffbox div.inside td,div.inside th {
     275div.inside td,div.inside th {
    276276    padding: 7px;
    277277}
    278278
    279 div.stuffbox div.inside ul {
     279div.inside ul {
    280280    padding: 0px 7px 7px 12px;
    281281}
    282282
    283 div.stuffbox div.inside div,p {
     283div.inside div,p {
    284284    padding: 2px 2px 2px 4px;
    285285}
  • libsyn-podcasting/trunk/lib/libsyn-podcasting-gutenberg/dist/blocks.style.build.css

    r2103491 r2177688  
    1 .wp-block-cgb-block-libsyn-podcasting-gutenberg{background:#ff4500;border:0.2rem solid #292929;color:#292929;margin:0 auto;max-width:740px;padding:2rem}
     1.wp-block-cgb-block-libsyn-podcasting-gutenberg{color:#292929;margin:0 auto;max-width:740px;padding:2rem}
  • libsyn-podcasting/trunk/libsyn-podcasting.php

    r2123292 r2177688  
    44Plugin URI: https://wordpress.org/plugins/libsyn-podcasting/
    55Description: Post or edit Libsyn Podcast episodes directly through Wordpress.
    6 Version: 1.2.2.2
     6Version: 1.2.2.3
    77Author: Libsyn
    88Author URI: https://www.libsyn.com
     
    9494        if($plugin->hasLogger) $plugin->logger->error("Plugin:\t Php version is lower than recommended version");
    9595    }
    96     $api = $plugin->getApi();
    97     $hasApi = (!empty($api) && $api instanceof \Libsyn\Api);
    98     if($hasApi !== false) {
    99         $user_id = $api->getUserId();
    100         if(!empty($user_id)) {
    10196
    102             //check for classic editor in settings
    103             if ( function_exists('get_option') ) {
    104                 $utilities = new \Libsyn\Utilities();
    105                 $classic_editor_override = get_option('libsyn-podcasting-settings_use_classic_editor');
    106                 $classic_editor_override = ( !empty($classic_editor_override) && $classic_editor_override == 'use_classic_editor' ) ? true : false;
    107                 $classic_editor_plugin_active = $utilities->is_classic_editor_plugin_active();
    108                 if ( !$classic_editor_override && !$classic_editor_plugin_active ) {
    109                     if( function_exists( 'register_block_type' ) ) {
    110                         add_action( 'init', '\Libsyn\Post\Block::initBlock' );
    111                         add_action( 'enqueue_block_editor_assets', '\Libsyn\Post\Block::addAssets' );
    112                         add_action( 'enqueue_block_assets', '\Libsyn\Post\Block::blockAssets' );
    113                     }
    114                 } else {//classic editor
    115                     add_action( 'add_meta_boxes_post', 'add_libsyn_post_meta');
    116                 }
    117             } else {
    118                 if($plugin->hasLogger) $plugin->logger->error("Could not load classic or block editor.");
     97    //check for classic editor in settings
     98    if ( function_exists('get_option') ) {
     99        $utilities = new \Libsyn\Utilities();
     100        $classic_editor_override = get_option('libsyn-podcasting-settings_use_classic_editor');
     101        $classic_editor_override = ( !empty($classic_editor_override) && $classic_editor_override == 'use_classic_editor' ) ? true : false;
     102        $classic_editor_plugin_active = $utilities->is_classic_editor_plugin_active();
     103        if ( !$classic_editor_override && !$classic_editor_plugin_active ) {
     104            if( function_exists( 'register_block_type' ) ) {
     105                add_action( 'init', '\Libsyn\Post\Block::initBlock' );
     106                add_action( 'enqueue_block_editor_assets', '\Libsyn\Post\Block::addAssets' );
     107                add_action( 'enqueue_block_assets', '\Libsyn\Post\Block::blockAssets' );
    119108            }
     109        } else {//classic editor
     110            add_action( 'add_meta_boxes_post', 'add_libsyn_post_meta');
     111        }
     112    } else {
     113        if($plugin->hasLogger) $plugin->logger->error("Could not load classic or block editor.");
     114    }
    120115
    121             \Libsyn\Post::actionsAndFilters();
    122             add_action('save_post', '\Libsyn\Post::handlePost', 100, 2);
    123             add_filter( 'show_post_locked_dialog', '__return_false' );
    124         } else {
    125             if($plugin->hasLogger) $plugin->logger->error("Plugin:\t Libsyn User is not set");
    126         }
    127     }
     116    \Libsyn\Post::actionsAndFilters();
     117    add_action('save_post', '\Libsyn\Post::handlePost', 100, 2);
     118    add_filter( 'show_post_locked_dialog', '__return_false' );
    128119
    129120    if ( function_exists('libsynActionsAndFilters') ) {
  • libsyn-podcasting/trunk/readme.txt

    r2123292 r2177688  
    33Tags: libsyn publisher hub, libsyn podcasting, libsyn publishing, libsyn, podcast, podcasting, audio, video, liberated syndication, hosting, libsyn podcast plugin, libsin, libsun, libson
    44Requires at least: 4.0
    5 Tested up to: 5.2.1
    6 Stable tag: 1.2.2.2
     5Tested up to: 5.2.4
     6Stable tag: 1.2.2.3
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4545
    4646== Changelog ==
     47
     48= 1.2.2.3 =
     49* Bug fix causing episode editor not to load on certain hosting environments.
     50* Bug fix causing ftp/unreleased media not to load properly on post editor.
    4751
    4852= 1.2.2.2 =
Note: See TracChangeset for help on using the changeset viewer.