Plugin Directory

Changeset 2767091


Ignore:
Timestamp:
08/06/2022 12:14:42 AM (4 years ago)
Author:
nusert
Message:

Fixed

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

Legend:

Unmodified
Added
Removed
  • word-count-analysis/trunk/README.txt

    r2767069 r2767091  
    22Contributors: nusert
    33Donate link: https://nurullah.org
    4 Tags: post word count, word count
     4Tags: post word count, word count, word, post, count, characters
    55Requires at least: 4.7
    66Tested up to: 6.0
    77Requires PHP: 5.6
    8 Stable tag: 1.0.6
     8Stable tag: 1.0.7
    99Requires PHP: 7.0
    1010License: GPLv2 or later
     
    104104* Tag update
    105105* Plugin version written to database.
     106
     107= 1.0.7 =
     108* Fix: Plugin version written to database.
  • word-count-analysis/trunk/uninstall.php

    r2736454 r2767091  
    3434$redirect_table = $wpdb->prefix . "wpwc_posts";
    3535$wpdb->query('DROP TABLE IF EXISTS ' . $redirect_table);
    36 delete_option( 'word_count_and_analaysis_version' );
     36delete_option( 'wca_version' );
  • word-count-analysis/trunk/word-count-analysis.php

    r2767085 r2767091  
    1717 * Plugin URI:        https://nurullah.org
    1818 * Description:       See the word counts of your posts and pages and their analysis for seo. Optimize your articles with reports such as unique word and sentence length.
    19  * Version:           1.0.6
     19 * Version:           1.0.7
    2020 * Author:            Nurullah SERT
    2121 * Author URI:        https://nurullah.org
     
    3030define('WCA_LIBS', plugin_dir_path(__FILE__) . '/libs/');
    3131define('WCA_VENDOR', plugin_dir_path(__FILE__) . '/vendor/');
    32 define('WORD_COUNT_ANALYSIS_VERSION', '1.0.6');
     32define('WORD_COUNT_ANALYSIS_VERSION', '1.0.7');
    3333
    3434include(WCA_PATH . 'wca_hook.php');
     35add_action('upgrader_process_complete', 'wca_upgrade_function', 10, 2);
     36
     37function wca_upgrade_function($upgrader_object, $options)
     38{
     39    $current_plugin_path_name = plugin_basename(__FILE__);
     40
     41    if ($options['action'] == 'update' && $options['type'] == 'plugin') {
     42        foreach ($options['plugins'] as $each_plugin) {
     43            if ($each_plugin == $current_plugin_path_name) {
     44                $updated = update_option('wca_version', WORD_COUNT_ANALYSIS_VERSION);
     45            }
     46        }
     47    }
     48}
    3549
    3650// If this file is called directly, abort.
     
    6983}
    7084
    71 add_action('upgrader_process_complete', 'wca_upgrade_function', 10, 2);
    72 
    73 function 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.