Plugin Directory

Changeset 2855310


Ignore:
Timestamp:
01/26/2023 05:05:00 PM (3 years ago)
Author:
nusert
Message:

Add: freemius

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

Legend:

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

    r2820461 r2855310  
    66Tested up to: 6.1
    77Requires PHP: 5.6
    8 Stable tag: 1.0.7
     8Stable tag: 1.0.8
    99Requires PHP: 7.0
    1010License: GPLv2 or later
     
    107107= 1.0.7 =
    108108* Fix: Plugin version written to database.
     109
     110= 1.0.8 =
     111* Add: Freemius
  • word-count-analysis/trunk/word-count-analysis.php

    r2767091 r2855310  
    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.7
     19 * Version:           1.0.8
    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.7');
     32define('WORD_COUNT_ANALYSIS_VERSION', '1.0.8');
     33
     34
     35if ( ! function_exists( 'wca_fs' ) ) {
     36    // Create a helper function for easy SDK access.
     37    function wca_fs() {
     38        global $wca_fs;
     39
     40        if ( ! isset( $wca_fs ) ) {
     41            // Include Freemius SDK.
     42            require_once dirname(__FILE__) . '/freemius/start.php';
     43
     44            $wca_fs = fs_dynamic_init( array(
     45                'id'                  => '11931',
     46                'slug'                => 'word-count-analysis',
     47                'type'                => 'plugin',
     48                'public_key'          => 'pk_1833635772e9e1ede1520134bca2c',
     49                'is_premium'          => false,
     50                'has_addons'          => false,
     51                'has_paid_plans'      => false,
     52                'menu'                => array(
     53                    'first-path'     => 'admin.php?page=wca_dashboard',
     54                    'account'        => false,
     55                ),
     56            ) );
     57        }
     58
     59        return $wca_fs;
     60    }
     61
     62    // Init Freemius.
     63    wca_fs();
     64    // Signal that SDK was initiated.
     65    do_action( 'wca_fs_loaded' );
     66}
     67
    3368
    3469include(WCA_PATH . 'wca_hook.php');
    35 add_action('upgrader_process_complete', 'wca_upgrade_function', 10, 2);
    3670
    37 function wca_upgrade_function($upgrader_object, $options)
    38 {
    39     $current_plugin_path_name = plugin_basename(__FILE__);
    4071
    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 }
     72/*if (WORD_COUNT_ANALYSIS_VERSION !== get_option('my_awesome_plugin_version'))
     73    update_option('wca_version', WORD_COUNT_ANALYSIS_VERSION);*/
     74
     75
    4976
    5077// If this file is called directly, abort.
Note: See TracChangeset for help on using the changeset viewer.