Plugin Directory

Changeset 3422476


Ignore:
Timestamp:
12/18/2025 05:02:04 AM (3 months ago)
Author:
punitv342
Message:

update readme.txt

Location:
color-palette-block
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • color-palette-block/tags/1.1.0/color-palette-block.php

    r1901666 r3422476  
    11<?php
     2
    23/**
    34 * Contributors: lubus, ajitbohra
     
    1314 * Tags: gutenberg, block, animation
    1415 * Requires at least: 3.0.1
    15  * Tested up to:  4.9.4
     16 * Tested up to:  6.9
    1617 * Stable tag: 1.1.0
    1718 * License: GPLv3 or later
     
    2223
    2324// If this file is called directly, abort.
    24 if ( ! defined( 'WPINC' ) ) {
     25if (! defined('WPINC')) {
    2526    die;
    2627}
    2728
    28 if ( ! class_exists( 'lubusIN_Color_Palette_Block' ) ) :
    29 /**
    30  * lubusIN_Color_Palette_Block Class.
    31  *
    32  * Main Class.
    33  *
    34  * @since 1.0.0
    35  */
    36 class lubusIN_Color_Palette_Block {
     29if (! class_exists('lubusIN_Color_Palette_Block')) :
    3730    /**
    38      * Instance.
     31     * lubusIN_Color_Palette_Block Class.
    3932     *
    40      * @since
    41      * @access private
    42      * @var lubusIN_Color_Palette_Block
     33     * Main Class.
     34     *
     35     * @since 1.0.0
    4336     */
    44     static private $instance;
     37    class lubusIN_Color_Palette_Block
     38    {
     39        /**
     40         * Instance.
     41         *
     42         * @since
     43         * @access private
     44         * @var lubusIN_Color_Palette_Block
     45         */
     46        static private $instance;
    4547
    46     /**
    47      * Singleton pattern.
    48      *
    49      * @since
    50      * @access private
    51      */
    52     private function __construct() {
    53         $this->setup_constants();
    54         $this->init_hooks();
    55     }
     48        /**
     49         * Singleton pattern.
     50         *
     51         * @since
     52         * @access private
     53         */
     54        private function __construct()
     55        {
     56            $this->setup_constants();
     57            $this->init_hooks();
     58        }
    5659
    5760
    58     /**
    59      * Get instance.
    60      *
    61      * @since
    62      * @access public
    63      * @return lubusIN_Color_Palette_Block
    64      */
    65     public static function get_instance() {
    66         if ( null === static::$instance ) {
    67             self::$instance = new static();
     61        /**
     62         * Get instance.
     63         *
     64         * @since
     65         * @access public
     66         * @return lubusIN_Color_Palette_Block
     67         */
     68        public static function get_instance()
     69        {
     70            if (null === static::$instance) {
     71                self::$instance = new static();
     72            }
     73
     74            return self::$instance;
    6875        }
    6976
    70         return self::$instance;
    71     }
     77        /**
     78         * Hook into actions and filters.
     79         *
     80         * @since  1.0.0
     81         */
     82        private function init_hooks()
     83        {
     84            // Set up localization on init Hook.
     85            add_action('init', array($this, 'load_textdomain'), 0);
     86            add_action('init', array($this, 'register_color_palette'));
     87        }
    7288
    73     /**
    74      * Hook into actions and filters.
    75      *
    76      * @since  1.0.0
    77      */
    78     private function init_hooks() {
    79         // Set up localization on init Hook.
    80         add_action( 'init', array( $this, 'load_textdomain' ), 0 );
    81         add_action( 'init', array( $this, 'register_color_palette' ) );
    82     }
     89        /**
     90         * Setup plugin constants
     91         *
     92         * @since  1.0
     93         * @access private
     94         *
     95         * @return void
     96         */
     97        private function setup_constants()
     98        {
     99            // Plugin version
     100            if (! defined('CPB_VERSION')) {
     101                define('CPB_VERSION', '1.0.0');
     102            }
     103            // Plugin Root File
     104            if (! defined('CPB_PLUGIN_FILE')) {
     105                define('CPB_PLUGIN_FILE', __FILE__);
     106            }
     107            // Plugin Folder Path
     108            if (! defined('CPB_PLUGIN_DIR')) {
     109                define('CPB_PLUGIN_DIR', plugin_dir_path(CPB_PLUGIN_FILE));
     110            }
     111            // Plugin Folder URL
     112            if (! defined('CPB_PLUGIN_URL')) {
     113                define('CPB_PLUGIN_URL', plugin_dir_url(CPB_PLUGIN_FILE));
     114            }
     115            // Plugin Basename aka: "color-palette-block/color-palette-block.php"
     116            if (! defined('CPB_PLUGIN_BASENAME')) {
     117                define('CPB_PLUGIN_BASENAME', plugin_basename(CPB_PLUGIN_FILE));
     118            }
     119        }
    83120
    84     /**
    85      * Setup plugin constants
    86      *
    87      * @since  1.0
    88      * @access private
    89      *
    90      * @return void
    91      */
    92     private function setup_constants() {
    93         // Plugin version
    94         if ( ! defined( 'CPB_VERSION' ) ) {
    95             define( 'CPB_VERSION', '1.0.0' );
     121        /**
     122         * Loads the plugin language files.
     123         *
     124         * @since  1.0.0
     125         * @access public
     126         *
     127         * @return void
     128         */
     129        public function load_textdomain()
     130        {
     131            $locale = apply_filters('plugin_locale', get_locale(), 'cpb');
     132            // wp-content/languages/plugin-name/plugin-name-en_EN.mo.
     133            load_textdomain('cpb', trailingslashit(WP_LANG_DIR) . 'color-palette-block' . '/' . 'cpb' . '-' . $locale . '.mo');
     134            // wp-content/plugins/plugin-name/languages/plugin-name-en_EN.mo.
     135            load_plugin_textdomain('cpb', false, basename(CPB_PLUGIN_DIR) . '/languages/');
    96136        }
    97         // Plugin Root File
    98         if ( ! defined( 'CPB_PLUGIN_FILE' ) ) {
    99             define( 'CPB_PLUGIN_FILE', __FILE__ );
    100         }
    101         // Plugin Folder Path
    102         if ( ! defined( 'CPB_PLUGIN_DIR' ) ) {
    103             define( 'CPB_PLUGIN_DIR', plugin_dir_path( CPB_PLUGIN_FILE ) );
    104         }
    105         // Plugin Folder URL
    106         if ( ! defined( 'CPB_PLUGIN_URL' ) ) {
    107             define( 'CPB_PLUGIN_URL', plugin_dir_url( CPB_PLUGIN_FILE ) );
    108         }
    109         // Plugin Basename aka: "color-palette-block/color-palette-block.php"
    110         if ( ! defined( 'CPB_PLUGIN_BASENAME' ) ) {
    111             define( 'CPB_PLUGIN_BASENAME', plugin_basename( CPB_PLUGIN_FILE ) );
     137
     138        /**
     139         * Registers scripts
     140         *
     141         * @since 1.0.0
     142         * @access public
     143         *
     144         * @return void
     145         */
     146        public function register_color_palette()
     147        {
     148            $block_js   = 'build/script.js';
     149            $block_css  = 'build/style.css';
     150            $editor_css = 'build/editor.css';
     151
     152            // Script
     153            wp_register_script(
     154                'color-palette-block-js',
     155                CPB_PLUGIN_URL . $block_js,
     156                array(
     157                    'wp-blocks',
     158                    'wp-element',
     159                    'wp-components',
     160                    'wp-i18n',
     161                ),
     162                filemtime(CPB_PLUGIN_DIR . $block_js)
     163            );
     164
     165            // Common
     166            wp_register_style(
     167                'color-palette-block',
     168                CPB_PLUGIN_URL . $block_css,
     169                array(),
     170                filemtime(CPB_PLUGIN_DIR . $block_css)
     171            );
     172
     173            // Editor
     174            wp_register_style(
     175                'color-palette-block-editor',
     176                CPB_PLUGIN_URL . $editor_css,
     177                array(),
     178                filemtime(CPB_PLUGIN_DIR . $editor_css)
     179            );
     180
     181            // Register block type
     182            register_block_type('lubus/color-palette-block', array(
     183                'style'         => 'color-palette-block',
     184                'editor_style'         => 'color-palette-block-editor',
     185                'script'        => 'color-palette-block-js',
     186            ));
    112187        }
    113188    }
    114 
    115     /**
    116      * Loads the plugin language files.
    117      *
    118      * @since  1.0.0
    119      * @access public
    120      *
    121      * @return void
    122      */
    123     public function load_textdomain() {
    124         $locale = apply_filters( 'plugin_locale', get_locale(), 'cpb' );
    125         // wp-content/languages/plugin-name/plugin-name-en_EN.mo.
    126         load_textdomain( 'cpb', trailingslashit( WP_LANG_DIR ) . 'color-palette-block' . '/' . 'cpb' . '-' . $locale . '.mo' );
    127         // wp-content/plugins/plugin-name/languages/plugin-name-en_EN.mo.
    128         load_plugin_textdomain( 'cpb', false, basename( CPB_PLUGIN_DIR ) . '/languages/' );
    129     }
    130 
    131     /**
    132      * Registers scripts
    133      *
    134      * @since 1.0.0
    135      * @access public
    136      *
    137      * @return void
    138      */
    139     public function register_color_palette(){
    140         $block_js   = 'build/script.js';
    141         $block_css  = 'build/style.css';
    142         $editor_css = 'build/editor.css';
    143 
    144         // Script
    145         wp_register_script(
    146             'color-palette-block-js',
    147             CPB_PLUGIN_URL . $block_js,
    148             array(
    149                 'wp-blocks',
    150                 'wp-element',
    151                 'wp-components',
    152                 'wp-i18n',
    153             ),
    154             filemtime( CPB_PLUGIN_DIR . $block_js )
    155         );
    156 
    157         // Common
    158         wp_register_style(
    159             'color-palette-block',
    160             CPB_PLUGIN_URL . $block_css,
    161             array(),
    162             filemtime(CPB_PLUGIN_DIR . $block_css)
    163         );
    164 
    165         // Editor
    166         wp_register_style(
    167             'color-palette-block-editor',
    168             CPB_PLUGIN_URL . $editor_css,
    169             array(),
    170             filemtime(CPB_PLUGIN_DIR . $editor_css)
    171         );
    172 
    173         // Register block type
    174         register_block_type('lubus/color-palette-block', array(
    175             'style'         => 'color-palette-block',
    176             'editor_style'         => 'color-palette-block-editor',
    177             'script'        => 'color-palette-block-js',
    178         ));
    179     }
    180 }
    181189
    182190endif;
    183191
    184192lubusIN_Color_Palette_Block::get_instance();
    185 ?>
  • color-palette-block/tags/1.1.0/readme.txt

    r1901666 r3422476  
    11=== Color Palette ===
    2 Contributors: lubus,ajitbohra
     2Contributors: lubus,ajitbohra,punitv342
    33Donate link: http://www.lubus.in
    44Tags: gutenberg, block, color, palette
    55Requires at least: 3.0.1
    6 Tested up to:  4.9.4
     6Tested up to:  6.9
    77Stable tag: 1.1.0
    88License: GPLv3
  • color-palette-block/trunk/color-palette-block.php

    r1901666 r3422476  
    11<?php
     2
    23/**
    34 * Contributors: lubus, ajitbohra
     
    1314 * Tags: gutenberg, block, animation
    1415 * Requires at least: 3.0.1
    15  * Tested up to:  4.9.4
     16 * Tested up to:  6.9
    1617 * Stable tag: 1.1.0
    1718 * License: GPLv3 or later
     
    2223
    2324// If this file is called directly, abort.
    24 if ( ! defined( 'WPINC' ) ) {
     25if (! defined('WPINC')) {
    2526    die;
    2627}
    2728
    28 if ( ! class_exists( 'lubusIN_Color_Palette_Block' ) ) :
    29 /**
    30  * lubusIN_Color_Palette_Block Class.
    31  *
    32  * Main Class.
    33  *
    34  * @since 1.0.0
    35  */
    36 class lubusIN_Color_Palette_Block {
     29if (! class_exists('lubusIN_Color_Palette_Block')) :
    3730    /**
    38      * Instance.
     31     * lubusIN_Color_Palette_Block Class.
    3932     *
    40      * @since
    41      * @access private
    42      * @var lubusIN_Color_Palette_Block
     33     * Main Class.
     34     *
     35     * @since 1.0.0
    4336     */
    44     static private $instance;
     37    class lubusIN_Color_Palette_Block
     38    {
     39        /**
     40         * Instance.
     41         *
     42         * @since
     43         * @access private
     44         * @var lubusIN_Color_Palette_Block
     45         */
     46        static private $instance;
    4547
    46     /**
    47      * Singleton pattern.
    48      *
    49      * @since
    50      * @access private
    51      */
    52     private function __construct() {
    53         $this->setup_constants();
    54         $this->init_hooks();
    55     }
     48        /**
     49         * Singleton pattern.
     50         *
     51         * @since
     52         * @access private
     53         */
     54        private function __construct()
     55        {
     56            $this->setup_constants();
     57            $this->init_hooks();
     58        }
    5659
    5760
    58     /**
    59      * Get instance.
    60      *
    61      * @since
    62      * @access public
    63      * @return lubusIN_Color_Palette_Block
    64      */
    65     public static function get_instance() {
    66         if ( null === static::$instance ) {
    67             self::$instance = new static();
     61        /**
     62         * Get instance.
     63         *
     64         * @since
     65         * @access public
     66         * @return lubusIN_Color_Palette_Block
     67         */
     68        public static function get_instance()
     69        {
     70            if (null === static::$instance) {
     71                self::$instance = new static();
     72            }
     73
     74            return self::$instance;
    6875        }
    6976
    70         return self::$instance;
    71     }
     77        /**
     78         * Hook into actions and filters.
     79         *
     80         * @since  1.0.0
     81         */
     82        private function init_hooks()
     83        {
     84            // Set up localization on init Hook.
     85            add_action('init', array($this, 'load_textdomain'), 0);
     86            add_action('init', array($this, 'register_color_palette'));
     87        }
    7288
    73     /**
    74      * Hook into actions and filters.
    75      *
    76      * @since  1.0.0
    77      */
    78     private function init_hooks() {
    79         // Set up localization on init Hook.
    80         add_action( 'init', array( $this, 'load_textdomain' ), 0 );
    81         add_action( 'init', array( $this, 'register_color_palette' ) );
    82     }
     89        /**
     90         * Setup plugin constants
     91         *
     92         * @since  1.0
     93         * @access private
     94         *
     95         * @return void
     96         */
     97        private function setup_constants()
     98        {
     99            // Plugin version
     100            if (! defined('CPB_VERSION')) {
     101                define('CPB_VERSION', '1.0.0');
     102            }
     103            // Plugin Root File
     104            if (! defined('CPB_PLUGIN_FILE')) {
     105                define('CPB_PLUGIN_FILE', __FILE__);
     106            }
     107            // Plugin Folder Path
     108            if (! defined('CPB_PLUGIN_DIR')) {
     109                define('CPB_PLUGIN_DIR', plugin_dir_path(CPB_PLUGIN_FILE));
     110            }
     111            // Plugin Folder URL
     112            if (! defined('CPB_PLUGIN_URL')) {
     113                define('CPB_PLUGIN_URL', plugin_dir_url(CPB_PLUGIN_FILE));
     114            }
     115            // Plugin Basename aka: "color-palette-block/color-palette-block.php"
     116            if (! defined('CPB_PLUGIN_BASENAME')) {
     117                define('CPB_PLUGIN_BASENAME', plugin_basename(CPB_PLUGIN_FILE));
     118            }
     119        }
    83120
    84     /**
    85      * Setup plugin constants
    86      *
    87      * @since  1.0
    88      * @access private
    89      *
    90      * @return void
    91      */
    92     private function setup_constants() {
    93         // Plugin version
    94         if ( ! defined( 'CPB_VERSION' ) ) {
    95             define( 'CPB_VERSION', '1.0.0' );
     121        /**
     122         * Loads the plugin language files.
     123         *
     124         * @since  1.0.0
     125         * @access public
     126         *
     127         * @return void
     128         */
     129        public function load_textdomain()
     130        {
     131            $locale = apply_filters('plugin_locale', get_locale(), 'cpb');
     132            // wp-content/languages/plugin-name/plugin-name-en_EN.mo.
     133            load_textdomain('cpb', trailingslashit(WP_LANG_DIR) . 'color-palette-block' . '/' . 'cpb' . '-' . $locale . '.mo');
     134            // wp-content/plugins/plugin-name/languages/plugin-name-en_EN.mo.
     135            load_plugin_textdomain('cpb', false, basename(CPB_PLUGIN_DIR) . '/languages/');
    96136        }
    97         // Plugin Root File
    98         if ( ! defined( 'CPB_PLUGIN_FILE' ) ) {
    99             define( 'CPB_PLUGIN_FILE', __FILE__ );
    100         }
    101         // Plugin Folder Path
    102         if ( ! defined( 'CPB_PLUGIN_DIR' ) ) {
    103             define( 'CPB_PLUGIN_DIR', plugin_dir_path( CPB_PLUGIN_FILE ) );
    104         }
    105         // Plugin Folder URL
    106         if ( ! defined( 'CPB_PLUGIN_URL' ) ) {
    107             define( 'CPB_PLUGIN_URL', plugin_dir_url( CPB_PLUGIN_FILE ) );
    108         }
    109         // Plugin Basename aka: "color-palette-block/color-palette-block.php"
    110         if ( ! defined( 'CPB_PLUGIN_BASENAME' ) ) {
    111             define( 'CPB_PLUGIN_BASENAME', plugin_basename( CPB_PLUGIN_FILE ) );
     137
     138        /**
     139         * Registers scripts
     140         *
     141         * @since 1.0.0
     142         * @access public
     143         *
     144         * @return void
     145         */
     146        public function register_color_palette()
     147        {
     148            $block_js   = 'build/script.js';
     149            $block_css  = 'build/style.css';
     150            $editor_css = 'build/editor.css';
     151
     152            // Script
     153            wp_register_script(
     154                'color-palette-block-js',
     155                CPB_PLUGIN_URL . $block_js,
     156                array(
     157                    'wp-blocks',
     158                    'wp-element',
     159                    'wp-components',
     160                    'wp-i18n',
     161                ),
     162                filemtime(CPB_PLUGIN_DIR . $block_js)
     163            );
     164
     165            // Common
     166            wp_register_style(
     167                'color-palette-block',
     168                CPB_PLUGIN_URL . $block_css,
     169                array(),
     170                filemtime(CPB_PLUGIN_DIR . $block_css)
     171            );
     172
     173            // Editor
     174            wp_register_style(
     175                'color-palette-block-editor',
     176                CPB_PLUGIN_URL . $editor_css,
     177                array(),
     178                filemtime(CPB_PLUGIN_DIR . $editor_css)
     179            );
     180
     181            // Register block type
     182            register_block_type('lubus/color-palette-block', array(
     183                'style'         => 'color-palette-block',
     184                'editor_style'         => 'color-palette-block-editor',
     185                'script'        => 'color-palette-block-js',
     186            ));
    112187        }
    113188    }
    114 
    115     /**
    116      * Loads the plugin language files.
    117      *
    118      * @since  1.0.0
    119      * @access public
    120      *
    121      * @return void
    122      */
    123     public function load_textdomain() {
    124         $locale = apply_filters( 'plugin_locale', get_locale(), 'cpb' );
    125         // wp-content/languages/plugin-name/plugin-name-en_EN.mo.
    126         load_textdomain( 'cpb', trailingslashit( WP_LANG_DIR ) . 'color-palette-block' . '/' . 'cpb' . '-' . $locale . '.mo' );
    127         // wp-content/plugins/plugin-name/languages/plugin-name-en_EN.mo.
    128         load_plugin_textdomain( 'cpb', false, basename( CPB_PLUGIN_DIR ) . '/languages/' );
    129     }
    130 
    131     /**
    132      * Registers scripts
    133      *
    134      * @since 1.0.0
    135      * @access public
    136      *
    137      * @return void
    138      */
    139     public function register_color_palette(){
    140         $block_js   = 'build/script.js';
    141         $block_css  = 'build/style.css';
    142         $editor_css = 'build/editor.css';
    143 
    144         // Script
    145         wp_register_script(
    146             'color-palette-block-js',
    147             CPB_PLUGIN_URL . $block_js,
    148             array(
    149                 'wp-blocks',
    150                 'wp-element',
    151                 'wp-components',
    152                 'wp-i18n',
    153             ),
    154             filemtime( CPB_PLUGIN_DIR . $block_js )
    155         );
    156 
    157         // Common
    158         wp_register_style(
    159             'color-palette-block',
    160             CPB_PLUGIN_URL . $block_css,
    161             array(),
    162             filemtime(CPB_PLUGIN_DIR . $block_css)
    163         );
    164 
    165         // Editor
    166         wp_register_style(
    167             'color-palette-block-editor',
    168             CPB_PLUGIN_URL . $editor_css,
    169             array(),
    170             filemtime(CPB_PLUGIN_DIR . $editor_css)
    171         );
    172 
    173         // Register block type
    174         register_block_type('lubus/color-palette-block', array(
    175             'style'         => 'color-palette-block',
    176             'editor_style'         => 'color-palette-block-editor',
    177             'script'        => 'color-palette-block-js',
    178         ));
    179     }
    180 }
    181189
    182190endif;
    183191
    184192lubusIN_Color_Palette_Block::get_instance();
    185 ?>
  • color-palette-block/trunk/readme.txt

    r1901666 r3422476  
    11=== Color Palette ===
    2 Contributors: lubus,ajitbohra
     2Contributors: lubus,ajitbohra,punitv342
    33Donate link: http://www.lubus.in
    44Tags: gutenberg, block, color, palette
    55Requires at least: 3.0.1
    6 Tested up to:  4.9.4
     6Tested up to:  6.9
    77Stable tag: 1.1.0
    88License: GPLv3
Note: See TracChangeset for help on using the changeset viewer.