| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | * Plugin Name: GutSlider - All in One Block Slider for Gutenberg |
| 4 | 4 | * Description: A collection of custom Gutenberg Slider Blocks to slide your content. |
| 5 | 5 | * Requires at least: 6.5 |
| 6 | 6 | * Requires PHP: 7.4 |
| 7 | - * Version: 2.10.1 | |
| 7 | + * Version: 2.9.7 | |
| 8 | 8 | * Author: Gutenbergkits |
| 9 | 9 | * Author URI: https://gutenbergkits.com |
| 10 | 10 | * License: GPLv2 or later |
| 11 | 11 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| @@ -14,27 +14,16 @@ | ||
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | 16 | if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
| 17 | 17 | |
| 18 | - | |
| 19 | 18 | /** |
| 20 | - * GutSlider Blocks Final Class | |
| 21 | - * | |
| 22 | - * @package GutSliderBlocks | |
| 23 | - * @since 1.0.0 | |
| 19 | + * Blocks Final Class | |
| 20 | + * return GutSliderBlocks | |
| 24 | 21 | */ |
| 25 | - | |
| 26 | 22 | if( ! class_exists( 'GutSliderBlocks' ) ) { |
| 27 | 23 | |
| 28 | 24 | final class GutSliderBlocks { |
| 29 | 25 | |
| 30 | - // Plugin version | |
| 31 | - public $version = '2.10.1'; | |
| 32 | - | |
| 33 | - // Instance of the class | |
| 34 | - /** | |
| 35 | - * @var GutSliderBlocks | |
| 36 | - */ | |
| 37 | 26 | private static $instance = null; |
| 38 | 27 | |
| 39 | 28 | /** |
| 40 | 29 | * The constructor function initializes constants, includes necessary files, loads a text domain, and |
| @@ -42,8 +31,9 @@ | ||
| 42 | 31 | */ |
| 43 | 32 | private function __construct() { |
| 44 | 33 | $this->define_constants(); |
| 45 | 34 | $this->includes(); |
| 35 | + add_action( 'init', [ $this, 'load_textdomain' ] ); | |
| 46 | 36 | register_activation_hook( __FILE__, [ $this, 'set_activation_redirect' ] ); |
| 47 | 37 | add_action( 'admin_init', [ $this, 'redirect_to_welcome_page' ] ); |
| 48 | 38 | } |
| 49 | 39 | |
| @@ -51,9 +41,9 @@ | ||
| 51 | 41 | * Define the plugin constants |
| 52 | 42 | * return void |
| 53 | 43 | */ |
| 54 | 44 | private function define_constants() { |
| 55 | - define( 'GUTSLIDER_VERSION', $this->version ); | |
| 45 | + define( 'GUTSLIDER_VERSION', '2.9.7' ); | |
| 56 | 46 | define( 'GUTSLIDER_URL', plugin_dir_url( __FILE__ ) ); |
| 57 | 47 | define('GUTSLIDER_DIR_PATH', plugin_dir_path(__FILE__)); |
| 58 | 48 | define( 'GUTSLIDER_DIR', __DIR__ ); |
| 59 | 49 | } |
| @@ -75,8 +65,16 @@ | ||
| 75 | 65 | */ |
| 76 | 66 | public function includes() { |
| 77 | 67 | require_once GUTSLIDER_DIR . '/includes/init.php'; |
| 78 | 68 | require_once GUTSLIDER_DIR . '/admin/admin.php'; |
| 69 | + } | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * Load the plugin text domain | |
| 73 | + * return void | |
| 74 | + */ | |
| 75 | + public function load_textdomain() { | |
| 76 | + load_plugin_textdomain( 'slider-blocks', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); | |
| 79 | 77 | } |
| 80 | 78 | |
| 81 | 79 | /** |
| 82 | 80 | * Set the activation redirect |