Plugin Directory

Changeset 2908117


Ignore:
Timestamp:
05/04/2023 03:42:37 PM (3 years ago)
Author:
RAD_
Message:

v1.1.0

Location:
simple-lazy-load-videos/trunk
Files:
1 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • simple-lazy-load-videos/trunk/includes/class-actions.php

    r2882593 r2908117  
    11<?php
    2 if ( ! class_exists( 'SLLV_Actions' ) ) {
     2/**
     3 * Class Actions
     4 *
     5 * @package simple-lazy-load-videos
     6 * @since 0.6.0
     7 */
     8
     9namespace SLLV;
     10
     11if ( ! class_exists( '\SLLV\Actions' ) ) {
    312    /**
    413     * Plugin actions
    514     *
    6      * Activation, deactivation, uninstalling
     15     * Activation, deactivation and uninstalling actions
    716     *
    817     * @since 0.6.0
    918     */
    10     class SLLV_Actions {
     19    class Actions {
    1120
    1221        /**
  • simple-lazy-load-videos/trunk/includes/class-functions.php

    r2882593 r2908117  
    11<?php
    2 if ( ! class_exists( 'SLLV_Functions' ) ) {
     2/**
     3 * Class Functions
     4 *
     5 * @package simple-lazy-load-videos
     6 * @since 0.8.0
     7 */
     8
     9namespace SLLV;
     10
     11if ( ! class_exists( '\SLLV\Functions' ) ) {
    312    /**
    413     * Functions
     
    615     * @since 0.8.0
    716     */
    8     class SLLV_Functions {
     17    class Functions {
    918
    1019        /**
  • simple-lazy-load-videos/trunk/includes/class-oembed-cache.php

    r2882593 r2908117  
    11<?php
    2 if ( ! class_exists( 'SLLV_Oembed_Cache' ) ) {
     2/**
     3 * Class Oembed_Cache
     4 *
     5 * @package simple-lazy-load-videos
     6 * @since 0.2.0
     7 */
     8
     9namespace SLLV;
     10
     11if ( ! class_exists( '\SLLV\Oembed_Cache' ) ) {
    312    /**
    413     * Oembed Cache
     
    615     * @since 0.2.0
    716     */
    8     class SLLV_Oembed_Cache {
     17    class Oembed_Cache {
    918
    1019        /**
  • simple-lazy-load-videos/trunk/includes/class-options.php

    r2882593 r2908117  
    11<?php
    2 if ( ! class_exists( 'SLLV_Options' ) ) {
     2/**
     3 * Class Options
     4 *
     5 * @package simple-lazy-load-videos
     6 * @since 0.7.0
     7 */
     8
     9namespace SLLV;
     10
     11if ( ! class_exists( '\SLLV\Options' ) ) {
    312    /**
    413     * Options page
     
    615     * @since 0.7.0
    716     */
    8     class SLLV_Options {
     17    class Options {
    918
    1019        /**
     
    3443         */
    3544        public function plugin_action_links( $actions, $plugin_file ) {
    36             if ( false === strpos( $plugin_file, SLLV_PLUGIN_FILE ) ) {
     45            if ( false === strpos( $plugin_file, SLLV_PLUGIN_BASENAME ) ) {
    3746                return $actions;
    3847            }
  • simple-lazy-load-videos/trunk/includes/class-resources.php

    r2882593 r2908117  
    11<?php
    2 if ( ! class_exists( 'SLLV_Resources' ) ) {
     2/**
     3 * Class Resources
     4 *
     5 * @package simple-lazy-load-videos
     6 * @since 0.7.2
     7 */
     8
     9namespace SLLV;
     10
     11if ( ! class_exists( '\SLLV\Resources' ) ) {
    312    /**
    413     * Resources
     
    615     * @since 0.7.2
    716     */
    8     class SLLV_Resources {
     17    class Resources {
    918
    1019        /**
  • simple-lazy-load-videos/trunk/includes/class-template.php

    r2882593 r2908117  
    11<?php
    2 if ( ! class_exists( 'SLLV_Template' ) ) {
     2/**
     3 * Class Template
     4 *
     5 * @package simple-lazy-load-videos
     6 * @since 0.2.0
     7 */
     8
     9namespace SLLV;
     10
     11if ( ! class_exists( '\SLLV\Template' ) ) {
    312    /**
    413     * Template
     
    615     * @since 0.2.0
    716     */
    8     class SLLV_Template {
     17    class Template {
    918
    1019        /**
     
    7180            ) );
    7281
    73             $functions = new SLLV_Functions();
     82            $functions = new \SLLV\Functions();
    7483
    7584            $output = false;
  • simple-lazy-load-videos/trunk/languages/simple-lazy-load-videos.pot

    r2874846 r2908117  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: Simple Lazy Load Videos\n"
    6 "POT-Creation-Date: 2023-03-05 03:43+0200\n"
     6"POT-Creation-Date: 2023-05-04 18:25+0300\n"
    77"PO-Revision-Date: 2020-01-08 15:52+0200\n"
    88"Last-Translator: \n"
     
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: includes/class-main.php:130 includes/class-main.php:208
    25 msgid "Video"
    26 msgstr ""
    27 
    28 #: includes/class-options.php:40 includes/class-options.php:98
     24#: includes/class-options.php:49 includes/class-options.php:107
    2925msgid "Settings"
    3026msgstr ""
    3127
    3228#. Plugin Name of the plugin/theme
    33 #: includes/class-options.php:53 includes/class-options.php:54
     29#: includes/class-options.php:62 includes/class-options.php:63
    3430msgid "Simple Lazy Load Videos"
    3531msgstr ""
    3632
    37 #: includes/class-options.php:103
     33#: includes/class-options.php:112
    3834msgid "YouTube Thumbnail Size"
    3935msgstr ""
    4036
    41 #: includes/class-options.php:111
     37#: includes/class-options.php:120
    4238msgid "Vimeo Thumbnail Size"
    4339msgstr ""
    4440
    45 #: includes/class-template.php:83
     41#: includes/class-plugin.php:213
     42msgid "GitHub"
     43msgstr ""
     44
     45#: includes/class-template.php:102
     46msgid "Video"
     47msgstr ""
     48
     49#: includes/class-template.php:140
    4650msgid "Play Video"
    4751msgstr ""
     
    5256
    5357#. Description of the plugin/theme
    54 msgid "Simple Lazy Load for embedded video from Youtube and Vimeo"
     58msgid "Simple Lazy Load for embedded video from Youtube and Vimeo."
    5559msgstr ""
    5660
  • simple-lazy-load-videos/trunk/readme.txt

    r2882593 r2908117  
    66Tested up to: 6.2
    77Requires PHP: 5.6
    8 Stable tag: 1.0.0
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4141
    4242== Changelog ==
     43= 1.1.0 =
     44* Refactoring
     45* Add GitHub link to plugin meta
     46
    4347= 1.0.0 =
    4448* Add Gutenberg support
  • simple-lazy-load-videos/trunk/simple-lazy-load-videos.php

    r2882593 r2908117  
    33 * Plugin Name:       Simple Lazy Load Videos
    44 * Plugin URI:        https://github.com/radkill/simple-lazy-load-videos
    5  * Description:       Simple Lazy Load for embedded video from Youtube and Vimeo
    6  * Version:           1.0.0
     5 * Description:       Simple Lazy Load for embedded video from Youtube and Vimeo.
     6 * Version:           1.1.0
    77 * Requires at least: 4.9
    88 * Requires PHP:      5.6
     
    1515 */
    1616
    17 defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); // Exit if accessed directly
     17/**
     18 * Exit if accessed directly
     19 */
     20defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    1821
     22
     23/**
     24 * Exit if a duplicate of plugin is activated
     25 */
    1926if ( isset( $sllv ) ) {
    2027    return;
     28}
     29
     30
     31/**
     32 * Constants
     33 *
     34 * SLLV_PATH            = plugin dir path, like '/var/www/html/wp-content/plugins/simple-lazy-load-videos/'
     35 * SLLV_URL             = plugin url, like 'https://sitename.com/wp-content/plugins/simple-lazy-load-videos/'
     36 * SLLV_PLUGIN_DIRNAME  = plugin dirname, like 'simple-lazy-load-videos'
     37 * SLLV_PLUGIN_BASENAME = plugin main file basename, like 'simple-lazy-load-videos.php'
     38 * SLLV_VERSION         = plugin version
     39 */
     40if ( ! defined( 'SLLV_PATH' ) ) {
     41    define( 'SLLV_PATH', plugin_dir_path( __FILE__ ) );
    2142}
    2243
     
    2546}
    2647
    27 if ( ! defined( 'SLLV_PATH' ) ) {
    28     define( 'SLLV_PATH', plugin_dir_path( __FILE__ ) );
    29 }
    30 
    3148if ( ! defined( 'SLLV_PLUGIN_DIRNAME' ) ) {
    3249    define( 'SLLV_PLUGIN_DIRNAME', dirname( plugin_basename( __FILE__ ) ) );
    3350}
    3451
    35 if ( ! defined( 'SLLV_PLUGIN_FILE' ) ) {
    36     define( 'SLLV_PLUGIN_FILE', basename( __FILE__ ) );
     52if ( ! defined( 'SLLV_PLUGIN_BASENAME' ) ) {
     53    define( 'SLLV_PLUGIN_BASENAME', basename( __FILE__ ) );
    3754}
    3855
    3956if ( ! defined( 'SLLV_VERSION' ) ) {
    40     require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     57    // include file with function 'get_plugin_data' if not exists
     58    if ( ! function_exists( 'get_plugin_data' ) ) {
     59        require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     60    }
     61
     62    // get plugin version from main plugin file
    4163    $plugin_data = get_plugin_data( __FILE__ );
    4264    define( 'SLLV_VERSION', $plugin_data['Version'] );
     
    4870 */
    4971require_once( SLLV_PATH . 'includes/class-actions.php' );
    50 require_once( SLLV_PATH . 'includes/class-main.php' );
     72require_once( SLLV_PATH . 'includes/class-plugin.php' );
     73require_once( SLLV_PATH . 'includes/class-resources.php' );
    5174require_once( SLLV_PATH . 'includes/class-oembed-cache.php' );
    52 require_once( SLLV_PATH . 'includes/class-resources.php' );
    5375require_once( SLLV_PATH . 'includes/class-template.php' );
    5476require_once( SLLV_PATH . 'includes/class-options.php' );
     
    5981 * Activation, deactivation and uninstalling actions
    6082 */
    61 register_activation_hook( __FILE__, array( 'SLLV_Actions', 'activate' ) );
    62 register_deactivation_hook( __FILE__, array( 'SLLV_Actions', 'deactivate' ) );
    63 register_uninstall_hook( __FILE__, array( 'SLLV_Actions', 'uninstall' ) );
     83register_activation_hook( __FILE__, array( 'SLLV\Actions', 'activate' ) );
     84register_deactivation_hook( __FILE__, array( 'SLLV\Actions', 'deactivate' ) );
     85register_uninstall_hook( __FILE__, array( 'SLLV\Actions', 'uninstall' ) );
    6486
    6587
     
    7092    global $sllv;
    7193
    72     $sllv = new SLLV_Main();
     94    $sllv = new \SLLV\Plugin();
    7395} );
Note: See TracChangeset for help on using the changeset viewer.