Plugin Directory

Changeset 2149744


Ignore:
Timestamp:
09/02/2019 06:55:20 PM (7 years ago)
Author:
labs64
Message:

Preparing for 0.9.6 release

Location:
pluginpass-pro-plugintheme-licensing/trunk
Files:
2 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • pluginpass-pro-plugintheme-licensing/trunk/README.txt

    r2148795 r2149744  
    88Tested up to: 5.2.2
    99Requires PHP: 5.6
    10 Stable tag: 0.9.5
     10Stable tag: 0.9.6
    1111License: GPLv2 or later
    1212License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    129129== Changelog ==
    130130
     131= 0.9.6 =
     132* TODO
     133
    131134= 0.9.5 =
    132135* Update: plugin documentation
  • pluginpass-pro-plugintheme-licensing/trunk/constants.php

    r2148795 r2149744  
    88define( __NAMESPACE__ . '\NS', __NAMESPACE__ . '\\' );
    99
    10 define( NS . 'PLUGIN_VERSION', '0.9.5' );
     10define( NS . 'PLUGIN_VERSION', '0.9.6' );
    1111
    1212define( NS . 'PLUGIN_NAME', 'pluginpass' );
  • pluginpass-pro-plugintheme-licensing/trunk/inc/admin/class-pluginpass-table.php

    r2146523 r2149744  
    1313use Exception;
    1414use DateTime;
     15use PluginPass as NS;
    1516
    1617/**
     
    5354            'ajax'     => false,        // If true, the parent class will call the _js_vars() method in the footer
    5455        ) );
     56
     57        NetLicensingService::getInstance()->curl()->setUserAgent( 'NetLicensing/PHP/' . NS\PLUGIN_NAME . ' ' . PHP_VERSION . '/' . NS\PLUGIN_VERSION . ' (https://netlicensing.io)' . '; ' . $_SERVER['HTTP_USER_AGENT'] );
     58
    5559    }
    5660
  • pluginpass-pro-plugintheme-licensing/trunk/inc/common/class-pluginpass-guard.php

    r2148795 r2149744  
    44
    55use NetLicensing\Constants;
     6use NetLicensing\NetLicensingService;
    67use NetLicensing\Token;
    78use NetLicensing\TokenService;
     
    910use PluginPass\Inc\Common\Traits\PluginPass_Plugable;
    1011use PluginPass\Inc\Common\Traits\PluginPass_Validatable;
     12use PluginPass as NS;
    1113
    1214class PluginPass_Guard {
     
    4749            ? $this->create_plugin( $data )
    4850            : $this->update_plugin( $data, [ 'product_number' => $product_number ] );
     51
     52        NetLicensingService::getInstance()->curl()->setUserAgent( 'NetLicensing/PHP/' . NS\PLUGIN_NAME . ' ' . PHP_VERSION . '/' . NS\PLUGIN_VERSION . ' (https://netlicensing.io)' . '; ' . $_SERVER['HTTP_USER_AGENT'] );
    4953    }
    5054
     
    7377     * Validate plugin feature for the current wordpress instance.
    7478     *
    75      * @param string $feature The plugin feature to be checked.
     79     * @param string $module The plugin module to be checked.
    7680     *
    7781     * @return   boolean The status, whether this feature is available.
     
    8084     * @access   public
    8185     */
    82     public function validate( $feature ) {
     86    public function validate( $module ) {
    8387
    8488        if ( ! $this->has_consent() ) {
     
    108112        }
    109113
    110         if ( ! $this->plugin->validation_result || ! PluginPass_Dot::has( $this->plugin->validation_result, $feature ) ) {
     114        if ( ! $this->plugin->validation_result || ! PluginPass_Dot::has( $this->plugin->validation_result, $module ) ) {
    111115            return false;
    112116        }
    113117
    114         $feature_parsed = explode( '.', $feature );
    115         $product_module = reset( $feature_parsed );
     118        $module_parsed = explode( '.', $module );
     119        $product_module = reset( $module_parsed );
    116120        $licensingModel = PluginPass_Dot::get( $this->plugin->validation_result, "$product_module.licensingModel" );
    117121
     
    120124        }
    121125
    122         $feature .= ( $licensingModel === Constants::LICENSING_MODEL_MULTI_FEATURE )
     126        $module .= ( $licensingModel === Constants::LICENSING_MODEL_MULTI_FEATURE )
    123127            ? '.0.valid' : '.valid';
    124128
    125         return PluginPass_Dot::get( $this->plugin->validation_result, $feature ) === 'true';
    126     }
    127 
    128     /**
    129      * Get validation result for feature
    130      *
    131      * @param null $feature
     129        return PluginPass_Dot::get( $this->plugin->validation_result, $module ) === 'true';
     130    }
     131
     132    /**
     133     * Get validation result for module
     134     *
     135     * @param null $module
    132136     *
    133137     * @return mixed
    134138     */
    135     public function validation_result( $feature = null ) {
    136         if ( ! $feature ) {
     139    public function validation_result( $module = null ) {
     140        if ( ! $module ) {
    137141            return $this->plugin->validation_result;
    138142        }
    139143
    140         return PluginPass_Dot::get( $this->plugin->validation_result, $feature );
     144        return PluginPass_Dot::get( $this->plugin->validation_result, $module );
    141145    }
    142146
  • pluginpass-pro-plugintheme-licensing/trunk/inc/common/traits/class-pluginpass-validatable.php

    r2146523 r2149744  
    66use NetLicensing\Context;
    77use NetLicensing\LicenseeService;
    8 use NetLicensing\NetLicensingService;
    98use NetLicensing\ValidationParameters;
    10 use PluginPass as NS;
    119
    1210trait PluginPass_Validatable {
     
    2725        $validation_parameters->setLicenseeName( get_bloginfo( 'name' ) );
    2826
    29 
    30         NetLicensingService::getInstance()->curl()->setUserAgent( 'NetLicensing/PHP/' . NS\PLUGIN_NAME . ' ' . PHP_VERSION . '/' . NS\PLUGIN_VERSION . ' (https://netlicensing.io)' . '; ' . $_SERVER['HTTP_USER_AGENT'] );
    31 
    3227        return LicenseeService::validate( $context, self::get_licensee_number(), $validation_parameters );
    3328    }
  • pluginpass-pro-plugintheme-licensing/trunk/pluginpass.php

    r2148795 r2149744  
    1616 * Plugin URI:        https://github.com/Labs64/PluginPass
    1717 * Description:       WordPress Plugin/Theme Licensing powered by Labs64 NetLicensing
    18  * Version:           0.9.5
     18 * Version:           0.9.6
    1919 * Author:            Labs64
    2020 * Author URI:        https://netlicensing.io
Note: See TracChangeset for help on using the changeset viewer.