Plugin Directory

Changeset 2452074


Ignore:
Timestamp:
01/07/2021 05:33:06 PM (5 years ago)
Author:
seanchayes
Message:

Updating with version variable fix, swapping screenshot images, updating readme

Location:
post-status-indicator/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • post-status-indicator/trunk/post-status-indicator.php

    r2448846 r2452074  
    5151
    5252        static $instance = false;
     53        private $version;
    5354
    5455        private function __construct() {
     
    5859            add_action( 'admin_menu', array( $this, 'psi_options_page' ) );
    5960            add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
     61
     62            $this->version = PSI_VERSION;
     63
     64            if( defined('WP_DEBUG') && true === WP_DEBUG ){
     65                $this->version = time();
     66            }
    6067        }
    6168
     
    7986            }
    8087
    81             $version = PSI_VERSION;
    82 
    83             if( defined('WP_DEBUG') && true === WP_DEBUG ){
    84                 $version = time();
    85             }
    86 
    87             wp_enqueue_script('psi-dashboard', PSI_PLUGIN_URL . 'psi-dashboard/dist/js/post-status-indicator.js', array( 'wp-api', 'wp-i18n', 'wp-components', 'wp-element' ), $version, true);
     88            wp_enqueue_script('psi-dashboard', PSI_PLUGIN_URL . 'psi-dashboard/dist/js/post-status-indicator.js', array( 'wp-api', 'wp-i18n', 'wp-components', 'wp-element' ), $this->version, true);
    8889            //  wp_enqueue_style('psi-dashboard', PSI_PLUGIN_URL . 'psi-dashboard/dist/css/style.bundle.css', array(), PSI_VERSION);
    8990
     
    104105            );
    105106            wp_localize_script('psi-dashboard', 'psi_config', $config);
    106             wp_enqueue_style( 'post-status-indicator', PSI_PLUGIN_URL . 'css/post-status-indicator.css', array( 'wp-components', 'dashicons' ), $version );
     107            wp_enqueue_style( 'post-status-indicator', PSI_PLUGIN_URL . 'css/post-status-indicator.css', array( 'wp-components', 'dashicons' ), $this->version );
    107108
    108109        }
     
    118119            }
    119120
    120             wp_register_style( 'post-status-indicator', PSI_PLUGIN_URL . 'css/post-status-indicator.css', array( 'wp-components' ), $version );
     121            wp_register_style( 'post-status-indicator', PSI_PLUGIN_URL . 'css/post-status-indicator.css', array( 'wp-components' ), $this->version );
    121122            wp_enqueue_style( 'post-status-indicator' );
    122123
Note: See TracChangeset for help on using the changeset viewer.