Plugin Directory

Changeset 3028347


Ignore:
Timestamp:
01/29/2024 04:09:12 PM (2 years ago)
Author:
JDAdmin
Message:

Pushing version 2.1.0

Location:
smartvideo/trunk
Files:
174 added
21 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • smartvideo/trunk/LICENSE.txt

    r1829395 r3028347  
    22                       Version 3, 19 November 2007
    33
    4  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
     4 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
    55 Everyone is permitted to copy and distribute verbatim copies
    66 of this license document, but changing it is not allowed.
     
    634634
    635635    This program is free software: you can redistribute it and/or modify
    636     it under the terms of the GNU Affero General Public License as published
    637     by the Free Software Foundation, either version 3 of the License, or
     636    it under the terms of the GNU Affero General Public License as published by
     637    the Free Software Foundation, either version 3 of the License, or
    638638    (at your option) any later version.
    639639
     
    644644
    645645    You should have received a copy of the GNU Affero General Public License
    646     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     646    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    647647
    648648Also add information on how to contact you by electronic and paper mail.
     
    659659if any, to sign a "copyright disclaimer" for the program, if necessary.
    660660For more information on this, and how to apply and follow the GNU AGPL, see
    661 <http://www.gnu.org/licenses/>.
     661<https://www.gnu.org/licenses/>.
  • smartvideo/trunk/SmartVideo.php

    r2943257 r3028347  
    11<?php
    2 
    32/**
     3 * Plugin Name: SmartVideo
     4 * Description: SmartVideo makes building a beautiful, professional video experience for your site effortless.
     5 * Version: 2.1.0
     6 * Requires at least: 3.0.1
     7 * Requires PHP: 7.3
     8 * Author: Swarmify
     9 * Author URI: https://swarmify.idevaffiliate.com/idevaffiliate.php?id=10275&url=48
     10 * Developer: Matthew Davidson
     11 * Developer URI: https://swarmify.idevaffiliate.com/idevaffiliate.php?id=10275&url=48
     12 * Text Domain: swarmify
     13 * Domain Path: /languages
    414 *
    5  * @link              https://swarmify.com/
    6  * @since             1.0.0
    7  * @package           Swarmify
     15 * License: GNU Affero General Public License v3.0
     16 * License URI: https://www.gnu.org/licenses/agpl-3.0.en.html
    817 *
    9  * @wordpress-plugin
    10  * Plugin Name:       SmartVideo
    11  * Plugin URI:        https://swarmify.com/wordpress-plugin/
    12  * Description:       SmartVideo makes building a beautiful, professional video experience for your site effortless.
    13  * Version:           2.0.25
    14  * Author:            Swarmify
    15  * Author URI:        https://swarmify.com/
    16  * License:           AGPL-3.0
    17  * License URI:       https://www.gnu.org/licenses/agpl.txt
    18  * Text Domain:       swarmify
    19  * Domain Path:       /languages
    2018 */
    2119
    22 // If this file is called directly, abort.
    23 if ( ! defined( 'WPINC' ) ) {
    24     die;
     20defined( 'ABSPATH' ) || exit;
     21
     22if ( ! defined( 'SMARTVIDEO_PLUGIN_FILE' ) ) {
     23    define( 'SMARTVIDEO_PLUGIN_FILE', __FILE__ );
    2524}
    2625
    27 /**
    28  * Currently plugin version.
    29  * Start at version 1.0.0 and use SemVer - https://semver.org
    30  * Rename this for your plugin and update it as you release new versions.
    31  */
    32 define( 'SWARMIFY_PLUGIN_VERSION', '2.0.25' );
     26define( 'SWARMIFY_PLUGIN_VERSION', '2.1.0' );
    3327
    34 /**
    35  * The code that runs during plugin activation.
    36  * This action is documented in includes/class-swarmify-activator.php
    37  */
    38 function activate_swarmify() {
    39     require_once plugin_dir_path( __FILE__ ) . 'includes/class-swarmify-activator.php';
    40     Swarmify_Activator::activate();
     28require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';
     29
     30use Swarmify\Smartvideo as Smartvideo;
     31
     32
     33// phpcs:disable WordPress.Files.FileName
     34
     35
     36if ( ! function_exists( 'activate_smartvideo' ) ) {
     37    function activate_smartvideo() {
     38        Smartvideo\Activator::activate();
     39    }
    4140}
    4241
    4342/**
    4443 * The code that runs during plugin deactivation.
    45  * This action is documented in includes/class-swarmify-deactivator.php
    4644 */
    47 function deactivate_swarmify() {
    48     require_once plugin_dir_path( __FILE__ ) . 'includes/class-swarmify-deactivator.php';
    49     Swarmify_Deactivator::deactivate();
     45if ( ! function_exists( 'deactivate_smartvideo' ) ) {
     46    function deactivate_smartvideo() {
     47        Smartvideo\Deactivator::deactivate();
     48    }
    5049}
    5150
    52 register_activation_hook( __FILE__, 'activate_swarmify' );
    53 register_deactivation_hook( __FILE__, 'deactivate_swarmify' );
     51register_activation_hook( __FILE__, 'activate_smartvideo' );
     52register_deactivation_hook( __FILE__, 'deactivate_smartvideo' );
     53
     54
     55if ( ! class_exists( 'SmartVideo_Bootstrap' ) ) {
     56    /**
     57     * The SmartVideo_Bootstrap class.
     58     */
     59    class SmartVideo_Bootstrap {
     60        /**
     61         * This class instance.
     62         *
     63         * @var \SmartVideo_Bootstrap single instance of this class.
     64         */
     65        private static $instance;
     66
     67        /**
     68         * Constructor.
     69         */
     70        public function __construct() {
     71            // $plugin_name = dirname( plugin_basename( SMARTVIDEO_PLUGIN_FILE ) );
     72            // $plugin      = new Smartvideo\Swarmify( $plugin_name );
     73
     74            $plugin      = new Smartvideo\Swarmify( 'SmartVideo' );
     75            $plugin->run();
     76        }
     77
     78        /**
     79         * Cloning is forbidden.
     80         */
     81        public function __clone() {
     82            _doing_it_wrong( __FUNCTION__, __( 'Cloning is forbidden.', 'swarmify' ), $this->version );
     83        }
     84
     85        /**
     86         * Unserializing instances of this class is forbidden.
     87         */
     88        public function __wakeup() {
     89            _doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'swarmify' ), $this->version );
     90        }
     91
     92        /**
     93         * Gets the main instance.
     94         *
     95         * Ensures only one instance can be loaded.
     96         *
     97         * @return \SmartVideo_Bootstrap
     98         */
     99        public static function instance() {
     100
     101            if ( null === self::$instance ) {
     102                self::$instance = new self();
     103            }
     104
     105            return self::$instance;
     106        }
     107    }
     108}
     109
    54110
    55111/**
    56  * The core plugin class that is used to define internationalization,
    57  * admin-specific hooks, and public-facing site hooks.
     112 *  Load page builders
    58113 */
    59 require plugin_dir_path( __FILE__ ) . 'includes/class-swarmify.php';
     114require_once plugin_dir_path( __FILE__ ) . 'includes/page-builders/elementor/class-elementor-swarmify.php';
     115require_once plugin_dir_path( __FILE__ ) . 'includes/page-builders/gutenberg/src/init.php';
     116
     117if ( ! function_exists( 'smartvideo_load_beaver_builder' ) ) {
     118    function smartvideo_load_beaver_builder() {
     119        if ( class_exists( 'FLBuilder' ) ) {
     120            require plugin_dir_path( __FILE__ ) . 'includes/page-builders/beaverbuilder/class-beaverbuilder-smartvideo.php';
     121        }
     122    }
     123    add_action( 'init', 'smartvideo_load_beaver_builder' );
     124} else {
     125    error_log( 'Smartvideo: Unable to initialize Beaver Builder integration' );
     126}
     127
     128if ( ! function_exists( 'smartvideo_load_divi_builder' ) ) {
     129    function smartvideo_load_divi_builder() {
     130        require_once plugin_dir_path( __FILE__ ) . 'includes/page-builders/divi-builder/includes/DiviBuilder.php';
     131    }
     132
     133    add_action( 'divi_extensions_init', 'smartvideo_load_divi_builder' );
     134} else {
     135    error_log( 'Smartvideo: Unable to initialize Divi integration' );
     136}
     137
     138
    60139
    61140/**
    62  * Page builder - elementor
     141 * Initialize the plugin.
     142 *
     143 * @since 2.1.0
    63144 */
    64 require plugin_dir_path( __FILE__ ) . 'page-builders/elementor/class-elementor-swarmify.php';
     145function SmartVideo_init() {
     146    load_plugin_textdomain( 'swarmify', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
    65147
    66 /**
    67  * Page builder - Gutenberg
    68  */
    69 require_once plugin_dir_path( __FILE__ ) . 'page-builders/gutenberg/src/init.php';
     148    SmartVideo_Bootstrap::instance();
     149}
    70150
    71 /**
    72  * Page builder - beaver builder
    73  */
    74 function my_load_module_examples() {
    75     if ( class_exists( 'FLBuilder' ) ) {
    76         require plugin_dir_path( __FILE__ ) . 'page-builders/beaverbuilder/class-beaverbuilder-smartvideo.php';
    77     }
    78 }
    79 add_action( 'init', 'my_load_module_examples' );
    80 
    81 /**
    82  * divi
    83  *
    84 */
    85 
    86 if ( ! function_exists( 'smartvideo_initialize_extension' ) ):
    87     /**
    88      * Creates the extension's main class instance.
    89      *
    90      * @since 1.0.0
    91      */
    92     function smartvideo_initialize_extension() {
    93         require_once plugin_dir_path( __FILE__ ) . 'page-builders/divi-builder/includes/DiviBuilder.php';
    94     }
    95     add_action( 'divi_extensions_init', 'smartvideo_initialize_extension' );
    96     endif;
    97    
    98 /**
    99  * Begins execution of the plugin.
    100  *
    101  * Since everything within the plugin is registered via hooks,
    102  * then kicking off the plugin from this point in the file does
    103  * not affect the page life cycle.
    104  *
    105  * @since    1.0.0
    106  */
    107 function run_swarmify() {
    108 
    109     $plugin = new Swarmify();
    110     $plugin->run();
    111 
    112 }
    113 run_swarmify();
    114 
    115 
     151add_action( 'plugins_loaded', 'SmartVideo_init', 10 );
  • smartvideo/trunk/admin/partials/add-video-lightbox-display.php

    r2226816 r3028347  
     1<!-- This file is unused, and exists only to prevent an error message when upgrading from versions below 2.1.0 -->
     2
    13<div id="swarmify-modal-content" style="display: none;">
    24    <div class="swarmify-widget-div">
     
    810        <div class="swarmify-main">
    911            <p>
    10                 <label
    11                     for="swarmify_url" style="display: block;">
    12                     <?php _e('Add a video:', $this->plugin_name); ?>
     12                <label for="swarmify_url" style="display: block;">
     13                    <?php esc_html_e( 'Add a video:', 'swarmify' ); ?>
    1314                </label>
    1415                <button class="swarmify_add_video button">Add video from WordPress Media Library</button>
     
    2122                    <p class="other" style="display: none;">To add a video from another source (like Amazon S3, Google Drive, Dropbox, etc.), paste the URL ending in ".mp4" here:</p>
    2223                    <input class="swarmify_url widefat" id="swarmify_url" placeholder="Video URL" type="text"/>
    23                     <button data-fancybox-close class="swarmify-lightbox-button">Save</button>
     24                    <button data-fancybox-close class="swarmify-lightbox-button"> Save </button>
    2425                </div>
    2526            </p>
     
    2930                <label
    3031                    for="swarmify_poster">
    31                     <?php _e('Add an optional poster image:', $this->plugin_name); ?>
     32                    <?php esc_html_e( 'Add an optional poster image:', 'swarmify' ); ?>
    3233                </label>
    3334                <button class="swarmify_add_image button ">Add image from WordPress Media Library</button>
     
    3738                    <p>Add an image from another source (like Amazon S3, Google Drive, Dropbox, etc.), paste the URL here.</p>
    3839                    <input class="swarmify_poster widefat" id="swarmify_poster" placeholder="Image URL" type="text"/>
    39                     <button data-fancybox-close class="swarmify-lightbox-button">Save</button>
     40                    <button data-fancybox-close class="swarmify-lightbox-button"> Save </button>
    4041                </div>
    4142            </p>
     
    4344                <label
    4445                    for="swarmify_height">
    45                     <?php _e('Height:', $this->plugin_name); ?>
     46                    <?php esc_html_e( 'Height:', 'swarmify' ); ?>
    4647                </label>
    4748                <input class="swarmify_height widefat" id="swarmify_height" value="720" type="number"/>
     
    5051                <label
    5152                    for="swarmify_width">
    52                     <?php _e('Width:', $this->plugin_name); ?>
     53                    <?php esc_html_e( 'Width:', 'swarmify' ); ?>
    5354                </label>
    5455                <input class="swarmify_width widefat" id="swarmify_width" value="1280" type="number"/>
     
    6263                <label
    6364                    for="autoplay">
    64                     <?php _e('Autoplay:', $this->plugin_name); ?>
     65                    <?php esc_html_e( 'Autoplay:', 'swarmify' ); ?>
    6566                </label>
    6667                <label class="wp_switch">
     
    7374                <i class="swarmify_info">i</i>
    7475                <small class="swarmify_info_tooltip">Player will begin playback with audio muted.</small>
    75                 <?php _e('Muted:', $this->plugin_name); ?>
     76                <?php esc_html_e( 'Muted:', 'swarmify' ); ?>
    7677                <label
    7778                    for="muted">
     
    8788                <label
    8889                    for="loop">
    89                     <?php _e('Loop:', $this->plugin_name); ?>
     90                    <?php esc_html_e( 'Loop:', 'swarmify' ); ?>
    9091                </label>
    9192                <label class="wp_switch">
     
    101102                <label
    102103                    for="controls">
    103                     <?php _e('Controls:', $this->plugin_name); ?>
     104                    <?php esc_html_e( 'Controls:', 'swarmify' ); ?>
    104105                </label>
    105106                <label class="wp_switch">
     
    113114                <label
    114115                    for="video_inline">
    115                     <?php _e('Play video inline:', $this->plugin_name); ?>
     116                    <?php esc_html_e( 'Play video inline:', 'swarmify' ); ?>
    116117                </label>
    117118                <label class="wp_switch">
     
    123124                <i class="swarmify_info">i</i>
    124125                <small class="swarmify_info_tooltip">The player is responsive by default. If you toggle this option off, the player will maintain height and width no matter what changes are made to the size of the browser window.</small>
    125                 <label
    126                     for="unresponsive">
    127                     <?php _e('Responsive:', $this->plugin_name); ?>
     126                <label for="unresponsive">
     127                    <?php esc_html_e( 'Responsive:', 'swarmify' ); ?>
    128128                </label>
    129129                <label class="wp_switch">
Note: See TracChangeset for help on using the changeset viewer.