Plugin Directory

Changeset 2848723


Ignore:
Timestamp:
01/15/2023 05:23:24 PM (3 years ago)
Author:
VBog
Message:

Version 1.6.3

Location:
bg-rutube-embed
Files:
14 added
3 edited

Legend:

Unmodified
Added
Removed
  • bg-rutube-embed/trunk/bg-rutube.php

    r2829606 r2848723  
    44    Plugin URI: http://bogaiskov.ru/plugin-bg-rutube-embed/
    55    Description: The plugin is the easiest way to embed RuTube videos in WordPress.
    6     Version: 1.6.2
     6    Version: 1.6.3
    77    Author: VBog
    88    Author URI: http://bogaiskov.ru
     
    1212*/
    1313
    14 /*  Copyright 2022  Vadim Bogaiskov  (email: vadim.bogaiskov@yandex.ru)
     14/*  Copyright 2022-2023  Vadim Bogaiskov  (email: vadim.bogaiskov@yandex.ru)
    1515
    1616    This program is free software; you can redistribute it and/or modify
     
    3939    die( 'Sorry, you are not allowed to access this page directly.' );
    4040}
    41 define('BG_RUTUBE_VERSION', '1.6.2');
     41define('BG_RUTUBE_VERSION', '1.6.3');
    4242
    4343// Подключаем CSS и JS
     
    6363    wp_embed_register_handler(
    6464        'bg_rutube_video',
    65         '~rutube\.ru/video/([a-f0-9]+)/?~i',
     65        '~rutube\.ru/video/([a-f0-9]+(\/?\?t=\d+)?)/?~i',
    6666        'bg_rutube_video_callback_oembed_provider'
    6767    );
     
    115115        'perpage' => '',
    116116        'limit' => '',
    117         'mode' => ''
     117        'mode' => '',
     118        'start'=> 0
    118119    ), $atts ) );
    119120
     
    137138            });
    138139        }   
    139         $quote = bg_rutube_playlist_show ( $playlist, $perpage, $mode );   
     140        $quote = bg_rutube_playlist_show ( $playlist, $perpage, $mode, $start );   
    140141    }
    141142    return $quote;
     
    373374       
    374375******************************************************************************************/
    375 function bg_rutube_playlist_show ( $playlist, $perpage = '', $mode = '') {
     376function bg_rutube_playlist_show ( $playlist, $perpage = '', $mode = '', $startTime = 0) {
    376377    static $id=999;
    377378
     
    415416   
    416417?>
    417 <div id="bg_rutube_playlistContainer<?php echo esc_attr($uuid); ?>" class="bg_rutube_playlistContainer" data-uuid="<?php echo esc_attr($uuid); ?>" data-movie="<?php echo esc_attr($playlist['tracks'][$track_no]['uuid']); ?>" data-mode="<?php echo esc_attr($startmode); ?>">
     418<div id="bg_rutube_playlistContainer<?php echo esc_attr($uuid); ?>" class="bg_rutube_playlistContainer" data-uuid="<?php echo esc_attr($uuid); ?>" data-movie="<?php echo esc_attr($playlist['tracks'][$track_no]['uuid']); ?>" data-mode="<?php echo esc_attr($startmode); ?>" data-start="<?php echo esc_attr($startTime); ?>">
    418419    <div class="bg_rutube_centerVideo">
    419420        <div id="bg_rutube_videoContainer<?php echo esc_attr($uuid); ?>" class="bg_rutube_videoContainer");"></div>
  • bg-rutube-embed/trunk/js/bg_rutube.js

    r2826261 r2848723  
    1111        var movieID = jQuery(this).attr('data-movie');
    1212        var mode = jQuery(this).attr('data-mode');
     13        var startTime = jQuery(this).attr('data-start');
     14        if (startTime) movieID += '/?t='+startTime;
    1315        jQuery('div#bg_rutube_videoContainer'+uuid).append('<iframe id="bg_rutube_player'+uuid+'" class="bg_rutube-video" webkitAllowFullScreen mozallowfullscreen allowfullscreen frameborder="0" allow="autoplay" loading="lazy"></iframe>');
    1416        var iframe = jQuery('iframe#bg_rutube_player'+uuid);
     
    105107            }, 800);
    106108        }
    107 
    108109    });
    109110});
    110 
  • bg-rutube-embed/trunk/readme.txt

    r2829606 r2848723  
    77Requires at least: 3.0.1
    88Tested up to: 6.1.1
    9 Stable tag: 1.6.2
     9Stable tag: 1.7
    1010License: GPLv2
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3030*    `"load"` - load video into the frame,
    3131*    `"play"` - load video into the frame and play,
    32 *    `''` (*empty*) - use plugin's settings (by default).
     32*    `''` (*empty*) - use plugin's settings (by default);
     33*   `start` - time in seconds when the video starts.
    3334
    3435
    3536To embed a single video or playlist, just enter its URL (https://rutube.ru/video/{**uuid**}/ or https://rutube.ru/plst/{**uuid**}/) оn a separate line.
     37
     38Optional parameter `?t={**time**}` in the URL is time in seconds when the video starts.
    3639
    3740You can choose mode of start video on page load in settings and shortcode.
     
    5962== Changelog ==
    6063
     64= 1.6.3 =
     65
     66* New shortcode parameter `start` - time in seconds when the video starts.
     67
    6168= 1.6.2 =
    6269
    63 * New plugin option and shortcode parameter: mode of start  video on page load.
     70* New plugin option and shortcode parameter: mode of start video on page load.
    6471
    6572= 1.6.1 =
Note: See TracChangeset for help on using the changeset viewer.