Plugin Directory

Changeset 3083053


Ignore:
Timestamp:
05/08/2024 08:19:58 AM (2 years ago)
Author:
codeflavors
Message:

Version 2.3.1

Location:
codeflavors-vimeo-video-post-lite/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • codeflavors-vimeo-video-post-lite/trunk/CHANGELOG.md

    r3075417 r3083053  
    11*** Vimeotheque Lite Changelog ***
    22
    3 - Version 2.3
     32024-05-08 - Version 2.3.1
     4- Introduced option for customizable Series slug;
     5- Solved a bug that generated "404 - Not found" pages when changing slugs for post type, tag or video category from the Vimeotheque Settings page.
     6
     72024-04-23 - Version 2.3
    48- Introduced Series, a feature that allow you to create video galleries from imported videos and display them in posts or pages using the Block Editor;
    59- Solved issues with translations missing domain or having mismatched domain name;
  • codeflavors-vimeo-video-post-lite/trunk/includes/libs/admin/admin.class.php

    r3075417 r3083053  
    121121            }
    122122        );
     123
     124        /**
     125         * Flush rewrite rules if slugs were changed.
     126         * @see Settings_Page::update_settings()
     127         */
     128        add_action(
     129            'init',
     130            function(){
     131                if( get_transient('vimeotheque_updated_slugs') ){
     132                    flush_rewrite_rules();
     133                    delete_transient('vimeotheque_updated_slugs');
     134                }
     135            }
     136        );
    123137    }
    124138
  • codeflavors-vimeo-video-post-lite/trunk/includes/libs/admin/page/settings-page.class.php

    r3075417 r3083053  
    210210        }
    211211
     212        if( isset( $_POST['series_slug'] ) ){
     213            $series_slug = sanitize_title( $_POST['series_slug'] );
     214            if( !empty( $_POST['series_slug'] ) && $plugin_settings['series_slug'] !== $series_slug ){
     215                $defaults['series_slug'] = $series_slug;
     216                $flush_rules = true;
     217            }else{
     218                $defaults['series_slug'] = $plugin_settings['series_slug'];
     219            }
     220        }
     221
    212222        // reset OAuth if user changes the keys
    213223        if( isset( $_POST['vimeo_consumer_key'] ) && isset( $_POST['vimeo_secret_key'] ) ){
     
    229239
    230240        if( $flush_rules ){
    231             // create rewrite ( soft )
    232             // register custom post
    233             Plugin::instance()->get_cpt()->register_post();
    234             flush_rewrite_rules();
     241            // Set transient to signal that slugs were updated.
     242            set_transient( 'vimeotheque_updated_slugs', 1 );
    235243        }
    236244
  • codeflavors-vimeo-video-post-lite/trunk/includes/libs/plugin.class.php

    r3075417 r3083053  
    340340            'taxonomy_slug' => 'vimeo-videos',
    341341            'tag_slug' => 'vimeo-tag',
     342            'series_slug' => 'series',
    342343            'import_tags' => true, // import tags retrieved from Vimeo
    343344            'max_tags' => 3, // how many tags to import
  • codeflavors-vimeo-video-post-lite/trunk/includes/libs/series/Post_Type/Series.php

    r3075417 r3083053  
    2525    public function register_post_type(){
    2626
     27        $slug = \Vimeotheque\Plugin::instance()->get_options_obj()->get_option( 'series_slug' );
     28
    2729        register_post_type(
    2830            parent::get_post_name(),
     
    4547
    4648                'show_in_rest' => true,
     49
     50                'rewrite'               => [
     51                    'slug' => $slug
     52                ],
    4753
    4854                'supports' => [
  • codeflavors-vimeo-video-post-lite/trunk/main.php

    r3075417 r3083053  
    55 * Description: Vimeotheque imports public Vimeo videos as WordPress posts. It is a perfect fit for membership, portfolio, online courses or any type of video collection.
    66 * Author: CodeFlavors
    7  * Version: 2.3
     7 * Version: 2.3.1
    88 * Author URI: https://codeflavors.com
    99 * Text Domain: codeflavors-vimeo-video-post-lite
     
    1717define( 'VIMEOTHEQUE_PATH', plugin_dir_path( __FILE__ ) );
    1818define( 'VIMEOTHEQUE_URL', plugin_dir_url( __FILE__ ) );
    19 define( 'VIMEOTHEQUE_VERSION', '2.3' );
     19define( 'VIMEOTHEQUE_VERSION', '2.3.1' );
    2020define( 'VIMEOTHEQUE_TEMPLATE_DEBUG_MODE', false );
    2121/**
  • codeflavors-vimeo-video-post-lite/trunk/readme.txt

    r3075417 r3083053  
    33Tags: vimeo, video embed, video gallery, featured video, video post
    44Requires at least: 5.2
    5 Tested up to: 6.5.2
     5Tested up to: 6.5.3
    66Requires PHP: 7.4
    7 Stable tag: 2.3
     7Stable tag: 2.3.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    136136
    137137== Changelog ==
     138= 2.3.1=
     139- Introduced option for customizable Series slug;
     140- Solved a bug that generated "404 - Not found" pages when changing slugs for post type, tag or video category from the Vimeotheque Settings page.
     141
    138142= 2.3 =
    139143- Introduced Series, a feature that allow you to create video galleries from imported videos and display them in posts or pages using the Block Editor;
  • codeflavors-vimeo-video-post-lite/trunk/views/plugin_settings.php

    r3075417 r3083053  
    162162                            </td>
    163163                        </tr>
     164                        <tr>
     165                            <th scope="row"><label for="series_slug"><?php _e('Series slug', 'codeflavors-vimeo-video-post-lite')?> :</label></th>
     166                            <td>
     167                                <input type="text" id="series_slug" name="series_slug" value="<?php echo $options['series_slug'];?>" />
     168                            </td>
     169                        </tr>
    164170                    </tbody>
    165171                </table>
Note: See TracChangeset for help on using the changeset viewer.