Plugin Directory

Changeset 1755448


Ignore:
Timestamp:
10/30/2017 06:51:10 PM (8 years ago)
Author:
wpnook
Message:

Prevents enqueuing of script if no announcements are present

Location:
site-announcements/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • site-announcements/trunk/README.txt

    r1702834 r1755448  
    44Tags: announcements, news, users, messages
    55Requires at least: 4.0
    6 Tested up to: 4.8
     6Tested up to: 4.8.2
    77Stable tag: trunk
    88License: GPLv2 or later
     
    4444== Changelog ==
    4545
     46= 1.0.2 =
     47* Prevent script enqueue if there are no announcements
     48* Removes erroneous admin output
     49
    4650= 1.0.1 =
    4751* Update for plugin assets
  • site-announcements/trunk/admin/class-cw-site-announcements-admin.php

    r1702794 r1755448  
    111111        if( '' == $a->closable ) {
    112112            $a->closable = true;
    113             echo 'emty';
    114113            $checked = true;
    115114        } else {
    116             if( $a->closable == 1) {
     115            if( $a->closable == 1 ) {
    117116                $a->closable = true;
    118117                $checked = true;
  • site-announcements/trunk/includes/class-cw-site-announcements.php

    r1702794 r1755448  
    7070
    7171        $this->plugin_name = 'cw-site-announcements';
    72         $this->version = '1.0.0';
     72        $this->version = '1.0.2';
    7373
    7474        $this->load_dependencies();
  • site-announcements/trunk/public/class-cw-site-announcements-public.php

    r1702794 r1755448  
    182182
    183183        wp_enqueue_script( $this->plugin_name . 'js-cookie', plugin_dir_url( __FILE__ ) . 'js/js.cookie.js', array(), $this->version, false );
    184         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cw-site-announcements-public.js', array( 'jquery', $this->plugin_name . 'js-cookie' ), $this->version, false );
    185184
    186185        $a = $this->get_announcement();
     
    193192                'closable_duration' => $a->closable_duration,
    194193            );
     194            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cw-site-announcements-public.js', array( 'jquery', $this->plugin_name . 'js-cookie' ), $this->version, false );
    195195            wp_localize_script( $this->plugin_name, 'CW', $cw_data );
    196196        }
  • site-announcements/trunk/site-announcements.php

    r1702834 r1755448  
    1717 * Plugin URI:        https://codewrangler.io
    1818 * Description:       This is a short description of what the plugin does. It's displayed in the WordPress admin area.
    19  * Version:           1.0.1
     19 * Version:           1.0.2
    2020 * Author:            CodeWrangler, Inc.
    2121 * Author URI:        https://codewrangler.io
Note: See TracChangeset for help on using the changeset viewer.