Plugin Directory

Changeset 2740215


Ignore:
Timestamp:
06/10/2022 05:14:41 AM (4 years ago)
Author:
jahur
Message:

Fixed fatal error on plugin deactivation

Location:
wc-slider/trunk
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • wc-slider/trunk/wc-slider.php

    r2739415 r2740215  
    55Description: Woocommerce product slider. Shortcode [woowcms], [woowcms category="music,books,movie"]
    66Author: Jahur Ahmed
    7 Version: 1.1.0
     7Version: 1.1.1
    88Author URI: https://thetechydots.com
    99Text Domain: woowcms
     
    2020define( 'WOOWCMS_PHP_MINIMUM', '5.6.0' );
    2121define( 'WOOWCMS_DIR', plugin_dir_url(__FILE__) );
    22 
    23 
    24 /**
    25  * Handles plugin activation.
    26  *
    27  * Throws an error if the plugin is activated with an insufficient version of PHP.
    28  *
    29  * @since 1.1.0
    30  * @access private
    31  *
    32  * @param bool $network_wide Whether to activate network-wide.
    33  */
    34 function woowcms_activate_plugin( $network_wide ) {
    35     if ( version_compare( PHP_VERSION, WOOWCMS_PHP_MINIMUM, '<' ) ) {
    36         wp_die(
    37             /* translators: %s: version number */
    38             esc_html( sprintf( __( 'WC SLider requires PHP version %s', 'woowcms' ), WOOWCMS_PHP_MINIMUM ) ),
    39             esc_html__( 'Error Activating', 'woowcms' )
    40         );
    41     }
    42 
    43     if ( $network_wide ) {
    44         return;
    45     }
    46 
    47     do_action( 'woowcms_activation', $network_wide );
    48 }
    49 register_activation_hook( __FILE__, 'woowcms_activate_plugin' );
    50 
    51 /**
    52  * Handles plugin deactivation.
    53  *
    54  * @since 1.1.0
    55  * @access private
    56  *
    57  * @param bool $network_wide Whether to deactivate network-wide.
    58  */
    59 
    60 function woowcms_deactivate_plugin( $network_wide ) {
    61     if ( version_compare( PHP_VERSION, WOOWCMS_PHP_MINIMUM, '<' ) ) {
    62         return;
    63     }
    64 
    65     if ( $network_wide ) {
    66         return;
    67     }
    68 
    69     do_action( 'woowcms_deactivation', $network_wide );
    70 }
    71 register_deactivation_hook( __FILE__, 'woowcms_deactivate_plugin' );
    7222
    7323
Note: See TracChangeset for help on using the changeset viewer.