Changeset 1865568
- Timestamp:
- 04/27/2018 08:04:03 PM (8 years ago)
- File:
-
- 1 edited
-
simple-rating/tags/1.4.1/rating.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-rating/tags/1.4.1/rating.php
r1865564 r1865568 13 13 add_action('upgrader_process_complete', 'simple_rating_post_upgrade_compatibility_check', 10, 2); 14 14 add_action('admin_notices', 'simple_rating_incompatibility_notice'); 15 16 15 17 16 function simple_rating_pre_activation() … … 41 40 global $wp_version; 42 41 $plugin_basename = plugin_basename(__FILE__); 43 if (is_plugin_active($plugin_basename)) 42 $log = fopen('test', 'w'); 43 if ($options['action'] == 'update' && $options['type'] == 'plugin' && count($options['plugins']) > 0) 44 44 { 45 if ($options['action'] == 'update' && $options['type'] == 'plugin' && count($options['plugins']) > 0) 45 fwrite($log, 'Plugin is being updated' . PHP_EOL); 46 foreach ($options['plugins'] as $plugin) 46 47 { 47 foreach ($options['plugins'] as $plugin)48 if ($plugin == $plugin_basename) 48 49 { 49 if ($plugin == $plugin_basename) 50 fwrite($log, 'It\'s a plugin we need' . PHP_EOL); 51 if (version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION, '7.8', '<') || version_compare($wp_version, '3.7', '<')) 50 52 { 51 if (version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION, '7.8', '<') || version_compare($wp_version, '3.7', '<')) 52 { 53 set_transient('simple_rating_incompatible', 1); 54 } 53 set_transient('simple_rating_incompatible', 1); 54 fwrite($log, 'It\'s incompatible' . PHP_EOL); 55 55 } 56 56 } 57 57 } 58 58 } 59 fclose($log); 59 60 } 60 61
Note: See TracChangeset
for help on using the changeset viewer.