Plugin Directory

Changeset 2315108


Ignore:
Timestamp:
05/30/2020 05:07:36 PM (6 years ago)
Author:
motpr355
Message:

1.0.9 version

Location:
woo-new-product-info
Files:
4 added
4 deleted
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woo-new-product-info/tags/1.0.9/css/admin.css

    r1916016 r2315108  
    1 #motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic {
    2     background: black;color: white;border-radius: 25px;padding: 4px 10px;display: inline-block;
     1#motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic {
     2    background: black;
     3    color: white;
     4    border-radius: 25px;
     5    padding: 4px 10px;
     6    display: inline-block;
     7    margin-bottom: 3px;
    38}
    49
     
    2530    position: relative;
    2631    display: none;
     32    animation: motpr355_woo_new_product_info_activate_arrow_blink 1s infinite;
     33}
     34
     35@keyframes motpr355_woo_new_product_info_activate_arrow_blink {
     36    0% { opacity:0; }
     37    50% { opacity:1; }
     38    100% { opacity:0; }
    2739}
    2840
  • woo-new-product-info/tags/1.0.9/css/website.php

    r1916016 r2315108  
    1313        font-weight: <?php echo esc_html( $this->settings->{$this->settings_enum->font_weight} ) ?>;
    1414        text-transform: <?php echo esc_html( $this->settings->{$this->settings_enum->text_transform} ) ?>;
     15        text-align: center;
    1516        border-radius: 25px;
    1617        padding: 4px 10px;
    17         display: inline-block; 
     18        display: inline-block;
    1819    }
    1920</style>
  • woo-new-product-info/tags/1.0.9/html/admin.php

    r2019862 r2315108  
    239239            </span>
    240240            <span>
    241                 <span id="motpr355_woo_new_product_info_classic">
     241                <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new1">
    242242                    <?php _e( 'New', 'woo-new-product-info' ) ?>
     243                </span>
     244                <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new2">
     245                    <?php _e( 'New!', 'woo-new-product-info' ) ?>
    243246                </span>
    244247            </span>
  • woo-new-product-info/tags/1.0.9/js/admin.js

    r1916016 r2315108  
    121121
    122122        var set_preview = function( text, background_color, color, font_weight, text_transform ) {
     123            var new1 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new1';
     124            var new2 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new2';
     125            var show = '';
     126            var hide = '';
     127            if (text === 'New') {
     128                show = new1;
     129                hide = new2;
     130            } else {
     131                show = new2;
     132                hide = new1;
     133            }
     134            $( show ).show();
     135            $( hide ).hide();
    123136            if ( check_color_format( background_color ) && check_color_format( color ) ) {
    124                 var element = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic';
     137                var element = '#motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic';
    125138                $( element ).css( {
    126139                    backgroundColor: background_color,
     
    128141                    fontWeight: font_weight,
    129142                    textTransform: text_transform
    130                 } ).text( text );
     143                } );
    131144            }
    132145        };
  • woo-new-product-info/tags/1.0.9/readme.txt

    r2090703 r2315108  
    33Tags: WooCommerce, E-commerce, product, new product, new product list, product list, new product tag, new product info, WooCommerce product
    44Requires at least: 4.0
    5 Tested up to: 5.2
     5Tested up to: 5.4
    66Requires PHP : 5.4
    7 Stable tag: 1.0.8
     7Stable tag: 1.0.9
    88License: GPLv2 or later
    99
     
    6464== Changelog ==
    6565
    66 = 1.0.7 =
     66= 1.0.7 to 1.0.9 =
    6767* Translations update
    6868
  • woo-new-product-info/tags/1.0.9/woo-new-product-info.php

    r2090703 r2315108  
    33Plugin Name: WooCommerce new product info
    44Description: Differentiate WooCommerce new products by displaying a customizable "New" tag.
    5 Version: 1.0.8
     5Version: 1.0.9
    66Author: Motpr355
    77Text Domain: woo-new-product-info
     
    5757
    5858    private function init_data() {
    59         $this->configuration_saved = false;
    60         $this->settings = $this->get_settings();
    6159        $this->settings_enum = ( object ) array(
    6260            'nonce' => 'nonce',
     
    10098            'none' => 'none'
    10199        );
     100
     101        $this->configuration_saved = false;
     102        $this->settings = $this->get_settings();
    102103    }
    103104
     
    188189
    189190    public function installed( $plugin ) {
    190         if( $plugin === plugin_basename( __FILE__ ) ) {
    191         exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) );
     191        if( $plugin === plugin_basename( __FILE__ ) && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
     192            exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) );
    192193        }
    193194    }
     
    199200    public function update_plugin( $update, $item ) {
    200201        $plugins = array(
    201             'motpr355-woo-new-product-info/motpr355-woo-new-product-info.php',
    202             'woo-new-product-info/motpr355-woo-new-product-info.php',
    203202            'woo-new-product-info/woo-new-product-info.php',
    204             'motpr355-woo-new-product-info',
    205203            'woo-new-product-info',
    206             'motpr355-woo-new-product-info.php',
    207204            'woo-new-product-info.php'
    208205        );
     
    244241                    plugins_url( 'js/admin.js', __FILE__ ),
    245242                    array( 'wp-color-picker' ),
    246                     '1.0.0',
     243                    '1.0.9',
    247244                    true
    248245                );
     
    257254                    plugins_url( 'js/admin-extensions.js', __FILE__ ),
    258255                    array(),
    259                     '1.0.0',
     256                    '1.0.9',
    260257                    true
    261258                );
     
    264261                    'motpr355_woo_new_product_info_translations',
    265262                    array(
    266                         'woo_inactive' => __( 
     263                        'woo_inactive' => __(
    267264                            'WooCommerce must be actived',
    268265                            'woo-new-product-info'
     
    285282                plugins_url( 'css/admin.css', __FILE__ ),
    286283                array(),
    287                 '1.0.0'
     284                '1.0.9'
    288285            );
    289286            wp_enqueue_style( 'motpr355_woo_new_product_info_style' );
  • woo-new-product-info/trunk/css/admin.css

    r1916016 r2315108  
    1 #motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic {
    2     background: black;color: white;border-radius: 25px;padding: 4px 10px;display: inline-block;
     1#motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic {
     2    background: black;
     3    color: white;
     4    border-radius: 25px;
     5    padding: 4px 10px;
     6    display: inline-block;
     7    margin-bottom: 3px;
    38}
    49
     
    2530    position: relative;
    2631    display: none;
     32    animation: motpr355_woo_new_product_info_activate_arrow_blink 1s infinite;
     33}
     34
     35@keyframes motpr355_woo_new_product_info_activate_arrow_blink {
     36    0% { opacity:0; }
     37    50% { opacity:1; }
     38    100% { opacity:0; }
    2739}
    2840
  • woo-new-product-info/trunk/css/website.php

    r1916016 r2315108  
    1313        font-weight: <?php echo esc_html( $this->settings->{$this->settings_enum->font_weight} ) ?>;
    1414        text-transform: <?php echo esc_html( $this->settings->{$this->settings_enum->text_transform} ) ?>;
     15        text-align: center;
    1516        border-radius: 25px;
    1617        padding: 4px 10px;
    17         display: inline-block; 
     18        display: inline-block;
    1819    }
    1920</style>
  • woo-new-product-info/trunk/html/admin.php

    r2019862 r2315108  
    239239            </span>
    240240            <span>
    241                 <span id="motpr355_woo_new_product_info_classic">
     241                <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new1">
    242242                    <?php _e( 'New', 'woo-new-product-info' ) ?>
     243                </span>
     244                <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new2">
     245                    <?php _e( 'New!', 'woo-new-product-info' ) ?>
    243246                </span>
    244247            </span>
  • woo-new-product-info/trunk/js/admin.js

    r1916016 r2315108  
    121121
    122122        var set_preview = function( text, background_color, color, font_weight, text_transform ) {
     123            var new1 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new1';
     124            var new2 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new2';
     125            var show = '';
     126            var hide = '';
     127            if (text === 'New') {
     128                show = new1;
     129                hide = new2;
     130            } else {
     131                show = new2;
     132                hide = new1;
     133            }
     134            $( show ).show();
     135            $( hide ).hide();
    123136            if ( check_color_format( background_color ) && check_color_format( color ) ) {
    124                 var element = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic';
     137                var element = '#motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic';
    125138                $( element ).css( {
    126139                    backgroundColor: background_color,
     
    128141                    fontWeight: font_weight,
    129142                    textTransform: text_transform
    130                 } ).text( text );
     143                } );
    131144            }
    132145        };
  • woo-new-product-info/trunk/readme.txt

    r2090703 r2315108  
    33Tags: WooCommerce, E-commerce, product, new product, new product list, product list, new product tag, new product info, WooCommerce product
    44Requires at least: 4.0
    5 Tested up to: 5.2
     5Tested up to: 5.4
    66Requires PHP : 5.4
    7 Stable tag: 1.0.8
     7Stable tag: 1.0.9
    88License: GPLv2 or later
    99
     
    6464== Changelog ==
    6565
    66 = 1.0.7 =
     66= 1.0.7 to 1.0.9 =
    6767* Translations update
    6868
  • woo-new-product-info/trunk/woo-new-product-info.php

    r2090703 r2315108  
    33Plugin Name: WooCommerce new product info
    44Description: Differentiate WooCommerce new products by displaying a customizable "New" tag.
    5 Version: 1.0.8
     5Version: 1.0.9
    66Author: Motpr355
    77Text Domain: woo-new-product-info
     
    5757
    5858    private function init_data() {
    59         $this->configuration_saved = false;
    60         $this->settings = $this->get_settings();
    6159        $this->settings_enum = ( object ) array(
    6260            'nonce' => 'nonce',
     
    10098            'none' => 'none'
    10199        );
     100
     101        $this->configuration_saved = false;
     102        $this->settings = $this->get_settings();
    102103    }
    103104
     
    188189
    189190    public function installed( $plugin ) {
    190         if( $plugin === plugin_basename( __FILE__ ) ) {
    191         exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) );
     191        if( $plugin === plugin_basename( __FILE__ ) && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
     192            exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) );
    192193        }
    193194    }
     
    199200    public function update_plugin( $update, $item ) {
    200201        $plugins = array(
    201             'motpr355-woo-new-product-info/motpr355-woo-new-product-info.php',
    202             'woo-new-product-info/motpr355-woo-new-product-info.php',
    203202            'woo-new-product-info/woo-new-product-info.php',
    204             'motpr355-woo-new-product-info',
    205203            'woo-new-product-info',
    206             'motpr355-woo-new-product-info.php',
    207204            'woo-new-product-info.php'
    208205        );
     
    244241                    plugins_url( 'js/admin.js', __FILE__ ),
    245242                    array( 'wp-color-picker' ),
    246                     '1.0.0',
     243                    '1.0.9',
    247244                    true
    248245                );
     
    257254                    plugins_url( 'js/admin-extensions.js', __FILE__ ),
    258255                    array(),
    259                     '1.0.0',
     256                    '1.0.9',
    260257                    true
    261258                );
     
    264261                    'motpr355_woo_new_product_info_translations',
    265262                    array(
    266                         'woo_inactive' => __( 
     263                        'woo_inactive' => __(
    267264                            'WooCommerce must be actived',
    268265                            'woo-new-product-info'
     
    285282                plugins_url( 'css/admin.css', __FILE__ ),
    286283                array(),
    287                 '1.0.0'
     284                '1.0.9'
    288285            );
    289286            wp_enqueue_style( 'motpr355_woo_new_product_info_style' );
Note: See TracChangeset for help on using the changeset viewer.