Plugin Directory

Changeset 2767085


Ignore:
Timestamp:
08/05/2022 11:11:36 PM (4 years ago)
Author:
nusert
Message:

update

Location:
word-count-analysis/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • word-count-analysis/trunk/wca_hook.php

    r2767050 r2767085  
    210210add_action('wp_dashboard_setup', 'wca_add_dashboard_widgets');
    211211
    212 add_action( 'upgrader_process_complete', 'wca_upgrade_function',10, 2);
    213 
    214 function wca_upgrade_function( $upgrader_object, $options ) {
    215     $current_plugin_path_name = plugin_basename( __FILE__ );
    216 
    217     if ($options['action'] == 'update' && $options['type'] == 'plugin' ) {
    218         foreach($options['plugins'] as $each_plugin) {
    219             if ($each_plugin==$current_plugin_path_name) {
    220                 $updated = update_option('wca_version', WORD_COUNT_ANALYSIS_VERSION);
    221             }
    222         }
    223     }
    224 }
  • word-count-analysis/trunk/word-count-analysis.php

    r2767054 r2767085  
    6969}
    7070
     71add_action('upgrader_process_complete', 'wca_upgrade_function', 10, 2);
     72
     73function wca_upgrade_function($upgrader_object, $options)
     74{
     75    $current_plugin_path_name = plugin_basename(__FILE__);
     76
     77    if ($options['action'] == 'update' && $options['type'] == 'plugin') {
     78        foreach ($options['plugins'] as $each_plugin) {
     79            if ($each_plugin == $current_plugin_path_name) {
     80                $updated = update_option('wca_version', WORD_COUNT_ANALYSIS_VERSION);
     81            }
     82        }
     83    }
     84}
Note: See TracChangeset for help on using the changeset viewer.