Plugin Directory

Changeset 2362481


Ignore:
Timestamp:
08/16/2020 05:55:11 PM (6 years ago)
Author:
10quality
Message:

Updated to version 1.4.1

Location:
woo-license-keys/trunk
Files:
6 added
34 edited

Legend:

Unmodified
Added
Removed
  • woo-license-keys/trunk/README.txt

    r2274899 r2362481  
    66Requires at least: 3.2
    77Requires PHP: 5.4
    8 Tested up to: 5.4
    9 Stable tag: 1.4.0
     8Tested up to: 5.5
     9Stable tag: 1.4.1
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    8686== Changelog ==
    8787
     88= 1.4.1 =
     89*Release Date - 16 Aug 2020*
     90* Framework files updated.
     91* Tested with WooCommerce 4.3.
     92* Updated JS dependencies.
     93* Added assets.
     94
    8895= 1.4.0 =
    8996*Release Date - 03 Apr 2020*
  • woo-license-keys/trunk/app/Config/app.php

    r2274899 r2362481  
    1919    ],
    2020
    21     'version' => '1.4.0',
     21    'version' => '1.4.1',
    2222
    2323    'author' => '10 Quality Studio <https://www.10quality.com/>',
  • woo-license-keys/trunk/app/Controllers/AccountController.php

    r2274899 r2362481  
    239239            assets_url( 'js/clipboard.min.js', __DIR__ ),
    240240            [],
    241             '2.0.4',
     241            '2.0.6',
    242242            true
    243243        );
  • woo-license-keys/trunk/app/Controllers/ConfigController.php

    r2215470 r2362481  
    77
    88/**
    9  * ConfigController controller.
     9 * Configuration hooks.
    1010 * Handles all configuration related business logic.
    1111 *
     
    1414 * @license GPLv3
    1515 * @package woo-license-keys
    16  * @version 1.3.5
     16 * @version 1.4.1
    1717 */
    1818class ConfigController extends Controller
     
    7171        return $meta;
    7272    }
     73    /**
     74     * Returns image url for reviewer addon.
     75     * @since 1.4.1
     76     *
     77     * @hook wpmvc_addon_reviewer_img_LicenseKeys
     78     *
     79     * @return string
     80     */
     81    public function reviewer_img()
     82    {
     83        return assets_url( 'svgs/woo-license-keys-reviewer-logo.svg', __DIR__ );
     84    }
    7385}
  • woo-license-keys/trunk/app/Main.php

    r2241305 r2362481  
    1515 * @license GPLv3
    1616 * @package woo-license-keys
    17  * @version 1.3.8
     17 * @version 1.4.1
    1818 */
    1919class Main extends Bridge
     
    2525    {
    2626        // General
    27         $this->add_filter('woocommerce_license_key_types', 'WooCommerceController@types', 1);
     27        $this->add_filter( 'woocommerce_license_key_types', 'WooCommerceController@types', 1 );
    2828        // Product related
    29         $this->add_action('woocommerce_license_key_add_to_cart', 'WooCommerceController@add_to_cart_template');
    30         $this->add_filter('woocommerce_product_tabs', 'WooCommerceController@product_tabs');
    31         $this->add_action('woocommerce_license_keys_licensed_option', 'view@purchase-notice-option');
    32         $this->add_action('woocommerce_license_key_details_table', 'WooCommerceController@details_table', 1, 3);
     29        $this->add_action( 'woocommerce_license_key_add_to_cart', 'WooCommerceController@add_to_cart_template' );
     30        $this->add_filter( 'woocommerce_product_tabs', 'WooCommerceController@product_tabs' );
     31        $this->add_action( 'woocommerce_license_keys_licensed_option', 'view@purchase-notice-option' );
     32        $this->add_action( 'woocommerce_license_key_details_table', 'WooCommerceController@details_table', 1, 3 );
    3333        // Order related
    34         $this->add_action('woocommerce_order_status_completed', 'WooCommerceController@order_completed');
    35         $this->add_action('woocommerce_order_status_cancelled', 'WooCommerceController@order_cancelled');
    36         $this->add_action('woocommerce_order_status_refunded', 'WooCommerceController@order_cancelled');
    37         $this->add_action('woocommerce_order_status_failed', 'WooCommerceController@order_cancelled');
     34        $this->add_action( 'woocommerce_order_status_completed', 'WooCommerceController@order_completed' );
     35        $this->add_action( 'woocommerce_order_status_cancelled', 'WooCommerceController@order_cancelled' );
     36        $this->add_action( 'woocommerce_order_status_refunded', 'WooCommerceController@order_cancelled' );
     37        $this->add_action( 'woocommerce_order_status_failed', 'WooCommerceController@order_cancelled' );
    3838        // Payment related
    39         $this->add_action('woocommerce_thankyou', 'WooCommerceController@thankyou', 10);
    40         $this->add_action('woocommerce_email_after_order_table', 'WooCommerceController@email', 30, 4);
     39        $this->add_action( 'woocommerce_thankyou', 'WooCommerceController@thankyou', 10 );
     40        $this->add_action( 'woocommerce_email_after_order_table', 'WooCommerceController@email', 30, 4 );
    4141        // My account related
    42         $this->add_action('init', 'AccountController@add_endpoint');
    43         $this->add_filter('query_vars', 'AccountController@query_vars');
    44         $this->add_filter('the_title', 'AccountController@title');
    45         $this->add_action('woocommerce_license_key_enqueue', 'AccountController@view_enqueue');
    46         $this->add_filter('woocommerce_account_menu_items', 'AccountController@menu_items');
    47         $this->add_action('woocommerce_account_' . Account::ENDPOINT . '_endpoint', 'AccountController@endpoint');
    48         $this->add_action('woocommerce_account_' . Account::VIEW_ENDPOINT . '_endpoint', 'AccountController@view_endpoint');
     42        $this->add_action( 'init', 'AccountController@add_endpoint' );
     43        $this->add_filter( 'query_vars', 'AccountController@query_vars' );
     44        $this->add_filter( 'the_title', 'AccountController@title' );
     45        $this->add_action( 'woocommerce_license_key_enqueue', 'AccountController@view_enqueue' );
     46        $this->add_filter( 'woocommerce_account_menu_items', 'AccountController@menu_items' );
     47        $this->add_action( 'woocommerce_account_' . Account::ENDPOINT . '_endpoint', 'AccountController@endpoint' );
     48        $this->add_action( 'woocommerce_account_' . Account::VIEW_ENDPOINT . '_endpoint', 'AccountController@view_endpoint' );
    4949        // Cart related
    50         $this->add_filter('woocommerce_get_item_data', 'CartController@license_key_details', 30, 2);
     50        $this->add_filter( 'woocommerce_get_item_data', 'CartController@license_key_details', 30, 2 );
    5151        // Validations
    52         $this->add_filter('woocommerce_license_keys_enable_sku_validation', 'ValidatorController@enable_sku_validation', 1);
    53         $this->add_filter('woocommerce_license_keys_enable_domain_validation', 'ValidatorController@enable_domain_validation', 1);
     52        $this->add_filter( 'woocommerce_license_keys_enable_sku_validation', 'ValidatorController@enable_sku_validation', 1 );
     53        $this->add_filter( 'woocommerce_license_keys_enable_domain_validation', 'ValidatorController@enable_domain_validation', 1 );
    5454        // Validator endpoints
    55         $this->add_action('woocommerce_license_key_api_headers', 'ValidatorController@set_headers');
     55        $this->add_action( 'woocommerce_license_key_api_headers', 'ValidatorController@set_headers' );
    5656        // API Handler
    5757        $handler = get_option( 'license_keys_api_handler', 'wp_ajax' );
    5858        switch ( $handler ) {
    5959            case 'wp_rest':
    60                 $this->add_action('rest_api_init', 'WPRestController@init');
     60                $this->add_action( 'rest_api_init', 'WPRestController@init' );
    6161                break;
    6262            case 'wp_ajax':
    6363                // - Activate
    64                 $this->add_action('wp_ajax_license_key_activate', 'WPAjaxController@activate');
    65                 $this->add_action('wp_ajax_nopriv_license_key_activate', 'WPAjaxController@activate');
     64                $this->add_action( 'wp_ajax_license_key_activate', 'WPAjaxController@activate' );
     65                $this->add_action( 'wp_ajax_nopriv_license_key_activate', 'WPAjaxController@activate' );
    6666                // - Validate
    67                 $this->add_action('wp_ajax_license_key_validate', 'WPAjaxController@validate');
    68                 $this->add_action('wp_ajax_nopriv_license_key_validate', 'WPAjaxController@validate');
     67                $this->add_action( 'wp_ajax_license_key_validate', 'WPAjaxController@validate' );
     68                $this->add_action( 'wp_ajax_nopriv_license_key_validate', 'WPAjaxController@validate' );
    6969                // - Deactivate
    70                 $this->add_action('wp_ajax_license_key_deactivate', 'WPAjaxController@deactivate');
    71                 $this->add_action('wp_ajax_nopriv_license_key_deactivate', 'WPAjaxController@deactivate');
     70                $this->add_action( 'wp_ajax_license_key_deactivate', 'WPAjaxController@deactivate' );
     71                $this->add_action( 'wp_ajax_nopriv_license_key_deactivate', 'WPAjaxController@deactivate' );
    7272                break;
    7373            default:
     
    8383    {
    8484        // Config
    85         $this->add_action('admin_init', 'ConfigController@setup');
    86         $this->add_filter('plugin_action_links_woo-license-keys/plugin.php', 'ConfigController@action_links');
    87         $this->add_filter('plugin_row_meta', 'ConfigController@row_meta', 10, 2);
     85        $this->add_action( 'admin_init', 'ConfigController@setup' );
     86        $this->add_filter( 'plugin_action_links_woo-license-keys/plugin.php', 'ConfigController@action_links' );
     87        $this->add_filter( 'plugin_row_meta', 'ConfigController@row_meta', 10, 2 );
     88        $this->add_filter( 'wpmvc_addon_reviewer_img_LicenseKeys', 'ConfigController@reviewer_img' );
    8889        // Product admin page
    89         $this->add_filter('product_type_selector', 'WooCommerceController@product_type_selector', 15);
    90         $this->add_filter('product_type_options', 'WooCommerceController@product_type_options', 1);
    91         $this->add_filter('woocommerce_product_data_tabs', 'WooCommerceController@product_data_tabs', 99);
    92         $this->add_action('woocommerce_product_data_panels', 'WooCommerceController@product_data_panels');
    93         $this->add_action('woocommerce_update_product', 'WooCommerceController@save_product_meta');
    94         $this->add_action('woocommerce_product_options_general_product_data', 'view@admin.woocommerce.product-general-panel', 99);
     90        $this->add_filter( 'product_type_selector', 'WooCommerceController@product_type_selector', 15 );
     91        $this->add_filter( 'product_type_options', 'WooCommerceController@product_type_options', 1 );
     92        $this->add_filter( 'woocommerce_product_data_tabs', 'WooCommerceController@product_data_tabs', 99 );
     93        $this->add_action( 'woocommerce_product_data_panels', 'WooCommerceController@product_data_panels' );
     94        $this->add_action( 'woocommerce_update_product', 'WooCommerceController@save_product_meta' );
     95        $this->add_action( 'woocommerce_product_options_general_product_data', 'view@admin.woocommerce.product-general-panel', 99 );
    9596        // Orders list admin page
    96         $this->add_action('manage_posts_custom_column', 'ProductController@display_product_icon', 2, 2);
    97         $this->add_filter('woocommerce_shop_order_search_results', 'OrderController@admin_search', 10, 2);
     97        $this->add_action( 'manage_posts_custom_column', 'ProductController@display_product_icon', 2, 2 );
     98        $this->add_filter( 'woocommerce_shop_order_search_results', 'OrderController@admin_search', 10, 2 );
    9899        // Order admin page
    99         $this->add_action('woocommerce_after_order_itemmeta', 'OrderController@show_license_keys', 10, 3);
    100         $this->add_action('woocommerce_order_item_add_action_buttons', 'OrderController@show_bulk_actions');
     100        $this->add_action( 'woocommerce_after_order_itemmeta', 'OrderController@show_license_keys', 10, 3 );
     101        $this->add_action( 'woocommerce_order_item_add_action_buttons', 'OrderController@show_bulk_actions' );
    101102        // WooCommerce settings
    102         $this->add_filter('woocommerce_get_sections_advanced', 'WooCommerceController@sections_api', 99);
    103         $this->add_filter('woocommerce_get_settings_advanced', 'WooCommerceController@settings_api', 99, 2);
     103        $this->add_filter( 'woocommerce_get_sections_advanced', 'WooCommerceController@sections_api', 99 );
     104        $this->add_filter( 'woocommerce_get_settings_advanced', 'WooCommerceController@settings_api', 99, 2 );
    104105    }
    105106}
  • woo-license-keys/trunk/assets/js/app.js

    r1987362 r2362481  
    1 /*!
    2  * License keys plugin script.
    3  * This affects pages at my-account and other.
    4  *
    5  * @author Cami Mostajo <info@10quality.com>
    6  * @copyright 10 Quality <http://www.10quality.com/>
    7  * @license GPLv3
    8  * @package LicenseKeys
    9  * @version 1.2.1
    10  */
    11 // Init clipboard copy
    12 if ( jQuery('.clipboard-copy').length ) {
    13     var clipboard = new ClipboardJS( '.clipboard-copy' );
    14 }
     1
     2if(jQuery('.clipboard-copy').length){var clipboard=new ClipboardJS('.clipboard-copy');}
  • woo-license-keys/trunk/assets/js/clipboard.min.js

    r1987362 r2362481  
    1 /*!
    2  * clipboard.js v2.0.4
    3  * https://zenorocha.github.io/clipboard.js
    4  *
    5  * Licensed MIT © Zeno Rocha
    6  */
    7 !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});
     1
     2!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return o={},r.m=n=[function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n,t.exports.TinyEmitter=n},function(t,e,n){var d=n(3),h=n(4);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(u=t).addEventListener(s,f),{destroy:function(){u.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,l=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,l)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,l)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,l,u,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(5);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},function(t,e,n){"use strict";n.r(e);var o=n(0),r=n.n(o),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function a(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),this.resolveOptions(t),this.initSelection()}var l=(function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}(c,[{key:"resolveOptions",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=r()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=r()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(t){var e=0<arguments.length&&void 0!==t?t:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),c),u=n(1),s=n.n(u),f=n(2),d=n.n(f),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p=function(t,e,n){return e&&y(t.prototype,e),n&&y(t,n),t};function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var m=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(v,s.a),p(v,[{key:"resolveOptions",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=d()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return b("action",t)}},{key:"defaultTarget",value:function(t){var e=b("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return b("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(t){var e=0<arguments.length&&void 0!==t?t:["copy","cut"],n="string"==typeof e?[e]:e,o=!!document.queryCommandSupported;return n.forEach(function(t){o=o&&!!document.queryCommandSupported(t)}),o}}]),v);function v(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return n.resolveOptions(e),n.listenClick(t),n}function b(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}e.default=m}],r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6).default;function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var n,o});
  • woo-license-keys/trunk/plugin.php

    r2274899 r2362481  
    44Plugin URI: https://www.10quality.com/product/woocommerce-license-keys/
    55Description: Enable and handle "License Keys" with WooCommerce.
    6 Version: 1.4.0
     6Version: 1.4.1
    77Author: 10 Quality
    88Author URI: https://www.10quality.com/
     
    1212
    1313WC requires at least: 3
    14 WC tested up to: 4.0
     14WC tested up to: 4.3
    1515
    1616See "LICENSE" file.
  • woo-license-keys/trunk/vendor/10quality/wp-query-builder/composer.json

    r2274899 r2362481  
    2828        "psr-4": {
    2929            "TenQuality\\WP\\Database\\": "src"
    30         }
     30        },
     31        "files": [
     32            "src/Lib/functions.php"
     33        ]
    3134    },
    3235    "minimum-stability": "dev"
  • woo-license-keys/trunk/vendor/10quality/wp-query-builder/src/Abstracts/DataModel.php

    r2274899 r2362481  
    1010 * Custom table data model.
    1111 *
    12  * @author Local Vibes <https://localvibes.co/> Hyper Tribal
    1312 * @author 10 Quality <info@10quality.com>
    1413 * @license MIT
  • woo-license-keys/trunk/vendor/10quality/wp-query-builder/src/QueryBuilder.php

    r2274899 r2362481  
    1212 * @license MIT
    1313 * @package wp-query-builder
    14  * @version 1.0.7
     14 * @version 1.0.11
    1515 */
    1616class QueryBuilder
     
    2929    protected $builder;
    3030    /**
     31     * Builder options.
     32     * @since 1.0.11
     33     * @var array
     34     */
     35    protected $options;
     36    /**
    3137     * Builder constructor.
    3238     * @since 1.0.0
    3339     *
    34      * @param string $id
     40     * @param string|null $id
    3541     */
    3642    public function __construct( $id = null )
     
    4854            'offset'    => 0,
    4955        ];
     56        $this->options = [
     57            'wildcard' => '{%}',
     58            'default_wildcard' => '{%}',
     59        ];
    5060    }
    5161    /**
     
    132142        global $wpdb;
    133143        foreach ( $args as $key => $value ) {
     144            // Options - set
     145            if ( is_array( $value ) && array_key_exists( 'wildcard', $value ) && !empty( $value['wildcard'] ) )
     146                $this->options['wildcard'] = trim( $value['wildcard'] );
     147            // Value
    134148            $arg_value = is_array( $value ) && array_key_exists( 'value', $value ) ? $value['value'] : $value;
     149            if ( is_array( $value ) && array_key_exists( 'min', $value ) )
     150                $arg_value = $value['min'];
    135151            $sanitize_callback = is_array( $value ) && array_key_exists( 'sanitize_callback', $value )
    136152                ? $value['sanitize_callback']
    137153                : true;
    138             if ( $sanitize_callback )
     154            if ( $sanitize_callback
     155                && $key !== 'raw'
     156                && ( !is_array( $value ) || !array_key_exists( 'key', $value ) )
     157            )
    139158                $arg_value = $this->sanitize_value( $sanitize_callback, $arg_value );
    140159            $statement = $key === 'raw'
     
    142161                : [
    143162                    $key,
    144                     is_array( $value ) && isset( $value['operator'] ) ? $value['operator'] : ( $arg_value === null ? 'is' : '=' ),
    145                     is_array( $value ) && isset( $value['key'] )
    146                         ? '`' . $value['key'] . '`'
     163                    is_array( $value ) && isset( $value['operator'] ) ? strtoupper( $value['operator'] ) : ( $arg_value === null ? 'is' : '=' ),
     164                    is_array( $value ) && array_key_exists( 'key', $value )
     165                        ? $value['key']
    147166                        : ( is_array( $arg_value )
    148167                            ? ( '(\'' . implode( '\',\'', $arg_value ) . '\')' )
    149168                            : ( $arg_value === null
    150169                                ? 'null'
    151                                 : $wpdb->prepare( is_numeric( $arg_value ) ? '%d' : '%s' , $arg_value )
     170                                : $wpdb->prepare( ( !is_array( $value ) || !array_key_exists( 'force_string', $value ) || !$value['force_string'] ) && is_numeric( $arg_value ) ? '%d' : '%s' , $arg_value )
    152171                            )
    153172                        ),
    154173                ];
     174            // Between?
     175            if ( is_array( $value ) && isset( $value['operator'] ) ) {
     176                $value['operator'] = strtoupper( $value['operator'] );
     177                if ( strpos( $value['operator'], 'BETWEEN' ) !== false ) {
     178                    if ( array_key_exists( 'max', $value ) || array_key_exists( 'key_b', $value ) ) {
     179                        if ( array_key_exists( 'max', $value ) )
     180                            $arg_value = $value['max'];
     181                        if ( array_key_exists( 'sanitize_callback2', $value ) )
     182                            $sanitize_callback = $value['sanitize_callback2'];
     183                        if ( $sanitize_callback && !array_key_exists( 'key_b', $value ) )
     184                            $arg_value = $this->sanitize_value( $sanitize_callback, $arg_value );
     185                        $statement[] = 'AND';
     186                        $statement[] = array_key_exists( 'key_b', $value )
     187                            ? $value['key_b']
     188                            : ( is_array( $arg_value )
     189                                ? ( '(\'' . implode( '\',\'', $arg_value ) . '\')' )
     190                                : $wpdb->prepare( ( !array_key_exists( 'force_string', $value ) || !$value['force_string'] ) && is_numeric( $arg_value ) ? '%d' : '%s' , $arg_value )
     191                            );
     192                    } else {
     193                        throw new Exception( '"max" or "key_b "parameter must be indicated when using the BETWEEN operator.', 10202 );
     194                    }
     195                }
     196            }
    155197            $this->builder['where'][] = [
    156198                'joint'     => is_array( $value ) && isset( $value['joint'] ) ? $value['joint'] : 'AND',
    157199                'condition' => implode( ' ', $statement ),
    158200            ];
     201            // Options - reset
     202            if ( is_array( $value ) && array_key_exists( 'wildcard', $value ) && !empty( $value['wildcard'] ) )
     203                $this->options['wildcard'] = $this->options['default_wildcard'];
    159204        }
    160205        return $this;
     
    166211     * @global object $wpdb
    167212     *
    168      * @param string $table      Join table.
    169      * @param array  $args       Join arguments.
    170      * @param bool   $left       Flag that indicates if it is "LEFT JOIN"
    171      * @param bool   $add_prefix Should DB prefix be added.
     213     * @throws Exception
     214     *
     215     * @param string      $table      Join table.
     216     * @param array       $args       Join arguments.
     217     * @param bool|string $type       Flag that indicates if it is "LEFT or INNER", also accepts direct join string.
     218     * @param bool        $add_prefix Should DB prefix be added.
    172219     *
    173220     * @return \TenQuality\WP\Database\QueryBuilder this for chaining.
    174221     */
    175     public function join( $table, $args, $left = false, $add_prefix = true )
    176     {
     222    public function join( $table, $args, $type = false, $add_prefix = true )
     223    {
     224        $type = is_string( $type ) ? strtoupper( trim( $type ) ) : ( $type ? 'LEFT' : '' );
     225        if ( !in_array( $type, ['', 'LEFT', 'RIGHT', 'INNER', 'CROSS', 'LEFT OUTER', 'RIGHT OUTER'] ) )
     226            throw new Exception( 'Invalid join type.', 10201 );
    177227        global $wpdb;
    178228        $join = [
    179229            'table' => ( $add_prefix ? $wpdb->prefix : '' ) . $table,
    180             'left'  => $left,
     230            'type'  => $type,
    181231            'on'    => [],
    182232        ];
    183233        foreach ( $args as $argument ) {
     234            // Options - set
     235            if ( array_key_exists( 'wildcard', $argument ) && !empty( $argument['wildcard'] ) )
     236                $this->options['wildcard'] = trim( $argument['wildcard'] );
     237            // Value
    184238            $arg_value = isset( $argument['value'] ) ? $argument['value'] : null;
     239            if ( array_key_exists( 'min', $argument ) )
     240                $arg_value = $argument['min'];
    185241            $sanitize_callback = array_key_exists( 'sanitize_callback', $argument ) ? $argument['sanitize_callback'] : true;
    186             if ( $sanitize_callback )
     242            if ( $sanitize_callback
     243                && !array_key_exists( 'raw', $argument )
     244                && !array_key_exists( 'key_b', $argument )
     245            )
    187246                $arg_value = $this->sanitize_value( $sanitize_callback, $arg_value );
    188247            $statement = array_key_exists( 'raw', $argument )
    189                 ? $argument['raw']
    190                 : implode( ' ', [
     248                ? [$argument['raw']]
     249                : [
    191250                    isset( $argument['key_a'] ) ? $argument['key_a'] : $argument['key'],
    192                     isset( $argument['operator'] ) ? $argument['operator'] : ( $arg_value === null && ! isset( $argument['key_b'] ) ? 'is' : '=' ),
    193                     isset( $argument['key_b'] )
     251                    isset( $argument['operator'] ) ? strtoupper( $argument['operator'] ) : ( $arg_value === null && ! isset( $argument['key_b'] ) ? 'is' : '=' ),
     252                    array_key_exists( 'key_b', $argument )
    194253                        ? $argument['key_b']
    195254                        : ( is_array( $arg_value )
     
    197256                            : ( $arg_value === null
    198257                                ? 'null'
    199                                 : $wpdb->prepare( is_numeric( $arg_value ) ? '%d' : '%s' , $arg_value )
     258                                : $wpdb->prepare( ( !array_key_exists( 'force_string', $argument ) || !$argument['force_string'] ) && is_numeric( $arg_value ) ? '%d' : '%s' , $arg_value )
    200259                            )
    201260                        ),
    202                 ] );
     261                ];
     262            // Between?
     263            if ( isset( $argument['operator'] ) ) {
     264                $argument['operator'] = strtoupper( $argument['operator'] );
     265                if ( strpos( $argument['operator'], 'BETWEEN' ) !== false ) {
     266                    if ( array_key_exists( 'max', $argument ) || array_key_exists( 'key_c', $argument ) ) {
     267                        if ( array_key_exists( 'max', $argument ) )
     268                            $arg_value = $argument['max'];
     269                        if ( array_key_exists( 'sanitize_callback2', $argument ) )
     270                            $sanitize_callback = $argument['sanitize_callback2'];
     271                        if ( $sanitize_callback && !array_key_exists( 'key_c', $argument ) )
     272                            $arg_value = $this->sanitize_value( $sanitize_callback, $arg_value );
     273                        $statement[] = 'AND';
     274                        $statement[] = array_key_exists( 'key_c', $argument )
     275                            ? $argument['key_c']
     276                            : ( is_array( $arg_value )
     277                                ? ( '(\'' . implode( '\',\'', $arg_value ) . '\')' )
     278                                : $wpdb->prepare( ( !array_key_exists( 'force_string', $argument ) || !$argument['force_string'] ) && is_numeric( $arg_value ) ? '%d' : '%s' , $arg_value )
     279                            );
     280                    } else {
     281                        throw new Exception( '"max" or "key_c" parameter must be indicated when using the BETWEEN operator.', 10203 );
     282                    }
     283                }
     284            }
    203285            $join['on'][] = [
    204286                'joint'     => isset( $argument['joint'] ) ? $argument['joint'] : 'AND',
    205                 'condition' => $statement,
     287                'condition' => implode( ' ', $statement ),
    206288            ];
     289            // Options - reset
     290            if ( array_key_exists( 'wildcard', $argument ) && !empty( $argument['wildcard'] ) )
     291                $this->options['wildcard'] = $this->options['default_wildcard'];
    207292        }
    208293        $this->builder['join'][] = $join;
     
    420505    }
    421506    /**
    422      * Retunrs column results from builder statements.
     507     * Returns column results from builder statements.
    423508     * @since 1.0.6
    424509     *
     
    453538    }
    454539    /**
     540     * Returns flag indicating if query has been executed.
     541     * @since 1.0.8
     542     *
     543     * @global object $wpdb
     544     *
     545     * @param string $sql
     546     *
     547     * @return bool
     548     */
     549    public function query( $sql = '' )
     550    {
     551        global $wpdb;
     552        $this->builder = apply_filters( 'query_builder_query_builder', $this->builder );
     553        $this->builder = apply_filters( 'query_builder_query_builder_' . $this->id, $this->builder );
     554        // Build
     555        // Query
     556        $query = $sql;
     557        if ( empty( $query ) ) {
     558            $this->_query_select( $query, false );
     559            $this->_query_from( $query );
     560            $this->_query_join( $query );
     561            $this->_query_where( $query );
     562            $this->_query_group( $query );
     563            $this->_query_having( $query );
     564            $this->_query_order( $query );
     565            $this->_query_limit( $query );
     566            $this->_query_offset( $query );
     567        }
     568        // Process
     569        $query = apply_filters( 'query_builder_query_query', $query );
     570        $query = apply_filters( 'query_builder_query_query_' . $this->id, $query );
     571        return $wpdb->query( $query );
     572    }
     573    /**
     574     * Returns flag indicating if query has been executed.
     575     * @since 1.0.8
     576     *
     577     * @see self::query()
     578     *
     579     * @param string $sql
     580     *
     581     * @return bool
     582     */
     583    public function raw( $sql )
     584    {
     585        return $this->query( $sql );
     586    }
     587    /**
     588     * Returns flag indicating if delete query has been executed.
     589     * @since 1.0.8
     590     *
     591     * @global object $wpdb
     592     *
     593     * @return bool
     594     */
     595    public function delete()
     596    {
     597        global $wpdb;
     598        $this->builder = apply_filters( 'query_builder_delete_builder', $this->builder );
     599        $this->builder = apply_filters( 'query_builder_delete_builder_' . $this->id, $this->builder );
     600        // Build
     601        // Query
     602        $query = '';
     603        $this->_query_delete( $query );
     604        $this->_query_from( $query );
     605        $this->_query_join( $query );
     606        $this->_query_where( $query );
     607        // Process
     608        $query = apply_filters( 'query_builder_delete_query', $query );
     609        $query = apply_filters( 'query_builder_delete_query_' . $this->id, $query );
     610        return $wpdb->query( $query );
     611    }
     612    /**
    455613     * Retunrs found rows in last query, if SQL_CALC_FOUND_ROWS is used and is supported.
    456614     * @since 1.0.6
     
    478636    private function _query_select( &$query, $calc_rows = false )
    479637    {
    480         $query = 'SELECT ' . ( $calc_rows ? 'SQL_CALC_FOUND_ROWS ' : '' ) . ( is_array( $this->builder['select'] )
    481             ? implode( ',' , $this->builder['select'] )
    482             : $this->builder['select']
     638        $query = 'SELECT ' . ( $calc_rows ? 'SQL_CALC_FOUND_ROWS ' : '' ) . (
     639            is_array( $this->builder['select'] ) && count( $this->builder['select'] )
     640                ? implode( ',' , $this->builder['select'] )
     641                : '*'
    483642        );
    484643    }
     
    502661    {
    503662        foreach ( $this->builder['join'] as $join ) {
    504             $query .= ( $join['left'] ? ' LEFT JOIN ' : ' JOIN ' ) . $join['table'];
     663            $query .= ( !empty( $join['type'] ) ? ' ' . $join['type'] . ' JOIN ' : ' JOIN ' ) . $join['table'];
    505664            for ( $i = 0; $i < count( $join['on'] ); ++$i ) {
    506665                $query .= ( $i === 0 ? ' ON ' : ' ' . $join['on'][$i]['joint'] . ' ' )
     
    582741        if ( $this->builder['offset'] )
    583742            $query .= $wpdb->prepare( ' OFFSET %d', $this->builder['offset'] );
     743    }
     744    /**
     745     * Builds query's delete statement.
     746     * @since 1.0.0
     747     *
     748     * @param string &$query
     749     */
     750    private function _query_delete( &$query )
     751    {
     752        $query .= trim( 'DELETE ' . ( count( $this->builder['join'] )
     753            ? preg_replace( '/\s[aA][sS][\s\S]+.*?/', '', $this->builder['from'] )
     754            : ''
     755        ) );
    584756    }
    585757    /**
     
    623795    {
    624796        global $wpdb;
    625         return $wpdb->esc_like( $value );
     797        $wildcard = $this->options['wildcard'];
     798        return implode( '%', array_map( function( $part ) use( &$wpdb, &$wildcard ) {
     799            return $wpdb->esc_like( $part );
     800        }, explode( $wildcard, $value ) ) ) ;
    626801    }
    627802    /**
  • woo-license-keys/trunk/vendor/10quality/wp-query-builder/src/Traits/DataModelTrait.php

    r2274899 r2362481  
    88 * Static methods for data models.
    99 *
    10  * @author Local Vibes <https://localvibes.co/>
    11  * @copyright Local Vibes
    12  * @package localvibes
    13  * @version 1.0.7
     10 * @author 10 Quality <info@10quality.com>
     11 * @license MIT
     12 * @package wp-query-builder
     13 * @version 1.0.9
    1414 */
    1515trait DataModelTrait
     
    2222     * @param mixed $id
    2323     *
    24      * @return \TenQuality\WP\Database\Abstracts\DataModel
     24     * @return \TenQuality\WP\Database\Abstracts\DataModel|null
    2525     */
    2626    public static function find( $id )
  • woo-license-keys/trunk/vendor/10quality/wpmvc-core/src/lib/functions.php

    r2241305 r2362481  
    1717 * @license MIT
    1818 * @package WPMVC
    19  * @version 3.1.10.1
     19 * @version 3.1.12
    2020 */
    2121
     
    8787        // WPML support
    8888        if ( function_exists( 'icl_object_id' ) && defined( 'ICL_LANGUAGE_CODE' ) ) {
    89             if ( strpos( $url, '/' . ICL_LANGUAGE_CODE ) !== false)
    90                 $url = str_replace( '/' . ICL_LANGUAGE_CODE, '', $url );
     89            $url = preg_replace( '#([a-z])/' . ICL_LANGUAGE_CODE . '#', '\\1', $url );
    9190        }
    9291        // Clean base path
  • woo-license-keys/trunk/vendor/10quality/wpmvc-core/src/psr4/Bridge.php

    r2274899 r2362481  
    2121 * @license MIT
    2222 * @package WPMVC
    23  * @version 3.1.11
     23 * @version 3.1.13
    2424 */
    2525abstract class Bridge implements Plugable
     
    417417     * @param bool   $enqueue       Flag that indicates if asset should be enqueued upon registration.
    418418     * @param array  $dep           Dependencies.
    419      * @param bool   $footer        Flag that indicates if asset should enqueue at page footer.
     419     * @param bool   $flag          Conditional flag. For script assests it indicates it should be enqueued in the footer.
     420     *                              For style assests it indicates the media for which it has been defined.
    420421     * @param bool   $is_admin      Flag that indicates if asset should be enqueue on admin.
    421422     * @param string $version       Asset version.
    422423     * @param string $name_id       Asset name ID (slug).
    423      * @
    424      */
    425     public function add_asset( $asset, $enqueue = true, $dep = [], $footer = null, $is_admin = false, $version = null, $name_id = null )
    426     {
    427         if ( $footer === null )
    428             $footer = preg_match( '/\.js/', $asset );
     424     */
     425    public function add_asset( $asset, $enqueue = true, $dep = [], $flag = null, $is_admin = false, $version = null, $name_id = null )
     426    {
     427        if ( $flag === null )
     428            $flag = strpos( $asset, '.css') !== false ? 'all' : true;
    429429        $this->assets[] = [
    430430            'path'      => $asset,
    431431            'enqueue'   => $enqueue,
    432432            'dep'       => $dep,
    433             'footer'    => $footer,
     433            'flag'      => $flag,
    434434            'is_admin'  => $is_admin,
    435435            'version'   => $version,
     
    441441     * Adds hooks and filters into WordPress core.
    442442     * @since 1.0.3
    443      * @since 2.0.4 Added models.
    444      * @since 2.0.7 Added assets.
    445443     */
    446444    public function add_hooks()
     
    605603    public function _assets()
    606604    {
    607         $version = $this->config->get('version') ? $this->config->get('version') : '1.0.0';
     605        $version = $this->config->get( 'version' ) ? $this->config->get( 'version' ) : '1.0.0';
    608606        $dir = $this->config->get( 'paths.base' )
    609607            ? $this->config->get( 'paths.base' )
     
    614612                ? $asset['name_id']
    615613                : strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) )
    616                     . '-' . strtolower( $this->config->get('namespace') );
     614                    . '-' . strtolower( $this->config->get( 'namespace' ) );
    617615            $asset_version = empty( $asset['version'] ) ? $version : $asset['version'];
    618616            // Styles
     
    622620                    assets_url( $asset['path'], $dir ),
    623621                    $asset['dep'],
    624                     $asset_version
     622                    $asset_version,
     623                    $asset['flag']
    625624                );
    626625                if ($asset['enqueue'])
     
    630629                        $asset['dep'],
    631630                        $asset_version,
    632                         $asset['footer']
     631                        $asset['flag']
    633632                    );
    634633            }
     
    639638                    assets_url( $asset['path'], $dir ),
    640639                    $asset['dep'],
    641                     $asset_version
     640                    $asset_version,
     641                    $asset['flag']
    642642                );
    643643                if ($asset['enqueue'])
     
    647647                        $asset['dep'],
    648648                        $asset_version,
    649                         $asset['footer']
     649                        $asset['flag']
    650650                    );
    651651            }
     
    659659    public function _admin_assets()
    660660    {
    661         $version = $this->config->get('version') ? $this->config->get('version') : '1.0.0';
     661        $version = $this->config->get( 'version' ) ? $this->config->get( 'version' ) : '1.0.0';
    662662        $dir = $this->config->get( 'paths.base' )
    663663            ? $this->config->get( 'paths.base' )
     
    668668                ? $asset['name_id']
    669669                : strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) )
    670                     . '-' . strtolower( $this->config->get('namespace') );
     670                    . '-' . strtolower( $this->config->get( 'namespace' ) );
    671671            $asset_version = empty( $asset['version'] ) ? $version : $asset['version'];
    672672            // Styles
     
    676676                    assets_url( $asset['path'], $dir ),
    677677                    $asset['dep'],
    678                     $asset_version
     678                    $asset_version,
     679                    $asset['flag']
    679680                );
    680681                if ($asset['enqueue'])
     
    684685                        $asset['dep'],
    685686                        $asset_version,
    686                         $asset['footer']
     687                        $asset['flag']
    687688                    );
    688689            }
     
    693694                    assets_url( $asset['path'], $dir ),
    694695                    $asset['dep'],
    695                     $asset_version
     696                    $asset_version,
     697                    $asset['flag']
    696698                );
    697699                if ($asset['enqueue'])
     
    701703                        $asset['dep'],
    702704                        $asset_version,
    703                         $asset['footer']
     705                        $asset['flag']
    704706                    );
    705707            }
     
    746748     * Override mvc arguments with those defined when adding an action or filter.
    747749     * @since 1.0.3
    748      * @since 3.1.5 Mapping parameters support.
    749750     *
    750751     * @param string $mvc_call Lightweight MVC call. (i.e. 'Controller@method')
     
    869870                : __DIR__;
    870871            foreach ( $this->config->get( 'autoenqueue.assets' ) as $asset ) {
    871                 if ( $file->exists( assets_path( $asset['asset'], $dir ) ) )
     872                if ( $file->exists( assets_path( $asset['asset'], $dir ) ) ) {
    872873                    $this->add_asset(
    873874                        $asset['asset'],
    874875                        array_key_exists( 'enqueue', $asset ) ? $asset['enqueue'] : true,
    875                         $asset['dep'],
    876                         $asset['footer'],
     876                        array_key_exists( 'dep', $asset ) ? $asset['dep'] : array(),
     877                        array_key_exists( 'footer', $asset ) ? $asset['footer'] : ( array_key_exists( 'flag', $asset ) ? $asset['flag'] : null ),
    877878                        array_key_exists( 'is_admin', $asset ) ? $asset['is_admin'] : false,
    878879                        array_key_exists( 'version', $asset ) ? $asset['version'] : null,
    879880                        array_key_exists( 'id', $asset ) ? $asset['id'] : null
    880881                    );
     882                }
    881883            }
    882884        }
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/README.md

    r1831059 r2362481  
    1 # LIGHTWEIGHT MVC (For Wordpress MVC)
     1# LIGHTWEIGHT MVC (For WordPress MVC)
    22--------------------------------
    33
     
    88Forked version for WPMVC.
    99
    10 **Lightweight MVC** is a small framework that adds *Models*, *Views* and *Controllers* to your custom **Wordpress** plugin or theme.
     10**Lightweight MVC** is a small framework that adds *Models*, *Views* and *Controllers* to your custom **WordPress** plugin or theme.
    1111
    12 Lightweight MVC utilices existing Wordpress functionality preventing from overloading the already heavy loaded Wordpress core.
     12Lightweight MVC utilices existing WordPress functionality preventing from overloading the already heavy loaded WordPress core.
    1313
    14 This framework was inspired by **Laravel** to add the MVC design pattern to Wordpress development in an efficient, elegant and optimized way.
     14This framework was inspired by **Laravel** to add the MVC design pattern to WordPress development in an efficient, elegant and optimized way.
    1515
    1616## Coding Guidelines
    1717
    18 The coding is a mix between PSR-2 and Wordpress PHP guidelines.
     18The coding is a mix between PSR-2 and WordPress PHP guidelines.
    1919
    2020## License
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/composer.json

    r2119514 r2362481  
    11{
    22    "name": "10quality/wpmvc-mvc",
    3     "description": "Lightweight MVC for WPMVC (Wordpress MVC framework).",
     3    "description": "Lightweight MVC for WPMVC (WordPress MVC framework).",
    44    "license": "MIT",
    55    "keywords": ["wordpress","mvc","lightweight","light"],
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/phpunit.xml

    r1831059 r2362481  
    77         convertNoticesToExceptions="true"
    88         convertWarningsToExceptions="true"
    9          stopOnFailure="true"
    10          syntaxCheck="true">
     9         stopOnFailure="true">
    1110    <testsuites>
    12         <testsuite name="Package Test Suite">
     11        <testsuite name="WordPress MVC - MVC">
    1312            <directory>./tests/cases/</directory>
    1413        </testsuite>
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Controller.php

    r2092617 r2362481  
    2929     * Default construct.
    3030     * @since 1.0.0
    31      * @since 2.0.4 Allows controller to be called prios wordpress init.
     31     * @since 2.0.4 Allows controller to be called prior to WordPress init.
    3232     *
    3333     * @param object $view View class object.
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Controllers/ModelController.php

    r2092617 r2362481  
    2525    protected $model = '';
    2626    /**
    27      * Flag that indictes if model will save on autosave.
     27     * Flag that indicates if model will save on autosave.
    2828     * @since 1.0.0
    2929     * @var bool
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Engine.php

    r2092617 r2362481  
    7979     *
    8080     * @param string $controller_name Controller name and method. i.e. DealController@show
    81      * @param array  $args              Function args passed by. Arguments ready for call_user_func_array call.
     81     * @param array  $args            Function args passed by. Arguments ready for call_user_func_array call.
    8282     */
    8383    public function call_args( $controller_name, $args )
     
    108108     *
    109109     * @param string $controller_name Controller name and method. i.e. DealController@show
    110      * @param array  $args              Function args passed by. Arguments ready for call_user_func_array call.
     110     * @param array  $args            Function args passed by. Arguments ready for call_user_func_array call.
    111111     *
    112112     * @return mixed
     
    125125     *
    126126     * @param string $controller_name Controller name and method. i.e. DealController@show
    127      * @param array  $args               Controller parameters.
     127     * @param array  $args            Controller parameters.
    128128     */
    129129    private function run( $controller_name, $args )
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/CategoryModel.php

    r2092617 r2362481  
    101101     * Loads user meta data.
    102102     * @since 1.0.0
    103      * @since 2.1.1 Uses wordpress serialization.
     103     * @since 2.1.1 Uses WordPress serialization.
    104104     */
    105105    public function load_meta()
     
    173173     * Either adds or updates a meta.
    174174     * @since 1.0.0
    175      * @since 2.1.1 Uses wordpress serialization.
    176      * @since 2.1.2 Removed serialization, already done by wp.
    177175     *
    178176     * @param string $key   Key.
     
    183181        if ( $update_array )
    184182            $this->set_meta($key, $value);
    185 
    186183        try {
    187184            update_term_meta( $this->term_id, $key, $value );
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/Common/Attachment.php

    r1843081 r2362481  
    1111/**
    1212 * Attachment model.
    13  * Common Wordpress post type model.
     13 * Common WordPress post type model.
    1414 *
    1515 * @author Alejandro Mostajo <http://about.me/amostajo>
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/OptionModel.php

    r2092617 r2362481  
    88use WPMVC\MVC\Contracts\JSONable;
    99use WPMVC\MVC\Contracts\Stringable;
     10use WPMVC\MVC\Contracts\Traceable;
    1011use WPMVC\MVC\Traits\GenericModelTrait;
    1112use WPMVC\MVC\Traits\AliasTrait;
     
    1314
    1415/**
    15  * Abstract Model Class based on Wordpress Model.
     16 * Abstract Model Class based on WordPress Model.
    1617 *
    1718 * @author Alejandro Mostajo <http://about.me/amostajo>
     
    2122 * @version 1.0.0
    2223 */
    23 abstract class OptionModel implements Findable, Modelable, Arrayable, JSONable, Stringable
     24abstract class OptionModel implements Findable, Modelable, Arrayable, JSONable, Stringable, Traceable
    2425{
    2526    use GenericModelTrait, AliasTrait, CastTrait;
     
    109110    }
    110111    /**
     112     * Returns flag indicating if model has a trace in the database (an ID).
     113     * @since 2.1.11
     114     *
     115     * @param bool
     116     */
     117    public function has_trace()
     118    {
     119        return true;
     120    }
     121    /**
    111122     * Fills default when about to create object
    112123     * @since 1.0.0
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/PostModel.php

    r2092617 r2362481  
    33namespace WPMVC\MVC\Models;
    44
     5use WP_Post;
    56use WPMVC\MVC\Contracts\Modelable;
    67use WPMVC\MVC\Contracts\Findable;
     
    1112use WPMVC\MVC\Contracts\JSONable;
    1213use WPMVC\MVC\Contracts\Stringable;
     14use WPMVC\MVC\Contracts\Traceable;
    1315use WPMVC\MVC\Traits\MetaTrait;
    1416use WPMVC\MVC\Traits\PostCastTrait;
     
    2628 * @license MIT
    2729 * @package WPMVC\MVC
    28  * @version 2.1.5
     30 * @version 2.1.11
    2931 */
    3032abstract class PostModel implements Modelable, Findable, Metable, Parentable, PostCastable, Arrayable, JSONable, Stringable
     
    8486    protected $registry_labels = [];
    8587    /**
    86      * Wordpress support for during registration.
     88     * WordPress support for during registration.
    8789     * @since 1.0.1
    8890     * @var array
     
    123125     * Default constructor.
    124126     * @since 1.0.0
    125      */
    126     public function __construct( $id = 0 )
    127     {
    128         if ( ! empty( $id )  )
    129             $this->load($id);
     127     *
     128     * @param int|array|\WP_Post $post
     129     */
     130    public function __construct( $post = 0 )
     131    {
     132        if ( $post ) {
     133            if ( is_numeric( $post ) ) {
     134                $this->load( $post );
     135            } elseif ( is_array( $post ) ) {
     136                $this->load_attributes( $post );
     137            } elseif ( is_object( $post ) && is_a( $post, 'WP_Post' ) ) {
     138                $this->load_wp_post( $post );
     139            }
     140        }
    130141    }
    131142    /**
     
    137148    public function load( $id )
    138149    {
    139         $this->attributes = get_post( $id, ARRAY_A );
    140         $this->load_meta();
     150        $this->load_attributes( get_post( $id, ARRAY_A ) );
     151    }
     152    /**
     153     * Loads model from db.
     154     * @since 2.1.10
     155     *
     156     * @param array $attributes Rercord attributes.
     157     */
     158    public function load_attributes( $attributes )
     159    {
     160        if ( !empty( $attributes ) ) {
     161            $this->attributes = $attributes;
     162            $this->load_meta();
     163        }
     164    }
     165    /**
     166     * Loads model from db.
     167     * @since 2.1.10
     168     *
     169     * @param \WP_Post $post Post object.
     170     */
     171    public function load_wp_post( WP_Post $post )
     172    {
     173        $this->load_attributes( (array)$post );
    141174    }
    142175    /**
     
    144177     * @since 1.0.0
    145178     *
    146      * @return mixed.
     179     * @return bool|\WP_Error.
    147180     */
    148181    public function save()
     
    150183        if ( ! $this->is_loaded() ) return false;
    151184        $this->fill_defaults();
    152         $error = null;
    153         $id = wp_insert_post( $this->attributes, $error );
    154         if ( ! empty( $id ) ) {
    155             $this->attributes['ID'] = $id;
     185        $return = isset( $this->attributes['ID'] )
     186            ? wp_update_post( $this->attributes, true )
     187            : wp_insert_post( $this->attributes, true );
     188        if ( !is_wp_error( $return ) && !empty( $return ) ) {
     189            $this->attributes['ID'] = $return;
    156190            $this->save_meta_all();
    157         }
    158         return $error === false ? true : $error;
     191            $this->clear_wp_cache();
     192        }
     193        return is_wp_error( $return ) ? $return : !empty( $return );
    159194    }
    160195    /**
     
    181216    }
    182217    /**
     218     * Returns flag indicating if model has a trace in the database (an ID).
     219     * @since 2.1.11
     220     *
     221     * @param bool
     222     */
     223    public function has_trace()
     224    {
     225        return $this->ID !== null;
     226    }
     227    /**
    183228     * Getter function.
    184229     * @since 1.0.0
    185      * @since 2.0.4 Added relationships.
    186      * @since 2.1.5 Bug fixing.
    187230     *
    188231     * @param string $property
     
    190233     * @return mixed
    191234     */
    192     public function __get( $property )
    193     {
     235    public function &__get( $property )
     236    {
     237        $value = null;
    194238        $property = $this->get_alias_property( $property );
    195239        if ( method_exists( $this, $property ) ) {
    196             return $this->get_relationship( $property );
     240            $rel = $this->get_relationship( $property );
     241            if ( $rel )
     242                return $rel;
    197243        }
    198244        if ( preg_match( '/meta_/', $property ) ) {
    199             return $this->get_meta( preg_replace( '/meta_/', '', $property ) );
     245            $value = $this->get_meta( preg_replace( '/meta_/', '', $property ) );
    200246        } else if ( preg_match( '/func_/', $property ) ) {
    201247            $function_name = preg_replace( '/func_/', '', $property );
    202             return $this->$function_name();
     248            $value = $this->$function_name();
    203249        } if ( is_array( $this->attributes ) && array_key_exists( $property, $this->attributes ) ) {
    204250            return $this->attributes[$property];
     
    218264                    return $this->$property;
    219265                case 'post_content_filtered':
    220                     $content = apply_filters( 'the_content', $this->attributes[$property] );
    221                     $content = str_replace( ']]>', ']]&gt;', $content );
    222                     return $content;
     266                    $value = apply_filters( 'the_content', $this->attributes[$property] );
     267                    $value = str_replace( ']]>', ']]&gt;', $content );
    223268            }
    224269        }
    225         return null;
     270        return $value;
    226271    }
    227272    /**
     
    231276    private function fill_defaults()
    232277    {
    233         if ( ! array_key_exists('ID', $this->attributes) ) {
    234             $this->attributes['post_type'] = $this->type;
    235             $this->attributes['post_status'] = $this->status;
    236         }
     278        if ( !array_key_exists( 'ID', $this->attributes ) ) {
     279            if ( !array_key_exists( 'post_type', $this->attributes ) )
     280                $this->attributes['post_type'] = $this->type;
     281            if ( !array_key_exists( 'post_status', $this->attributes ) )
     282                $this->attributes['post_status'] = $this->status;
     283        }
     284    }
     285    /**
     286     * Clears WP cache.
     287     * @since 2.1.10
     288     */
     289    private function clear_wp_cache()
     290    {
     291        if ( $this->ID )
     292            wp_cache_delete( $this->ID, 'posts' );
    237293    }
    238294}
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/Relationship.php

    r1831059 r2362481  
    5757    public $class;
    5858    /**
    59      * Property in class that is mapped to the indefier of the relationship model.
     59     * Property in class that is mapped to the indentifier of the relationship model.
    6060     * @since 2.0.4
    6161     *
     
    9090     * @param object|Model &$parent  Parent class reference.
    9191     * @param string|mixed $class    Relationship model class name.
    92      * @param string       $property Property in class that is mapped to the indefier of the relationship model.
     92     * @param string       $property Property in class that is mapped to the indentifier of the relationship model.
    9393     * @param string       $method   Method in relationship model used to load it.
    9494     * @param string       $type     Relationship type.
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/TermModel.php

    r2092617 r2362481  
    1010use WPMVC\MVC\Contracts\Stringable;
    1111use WPMVC\MVC\Contracts\Metable;
     12use WPMVC\MVC\Contracts\Traceable;
    1213use WPMVC\MVC\Traits\AliasTrait;
    1314use WPMVC\MVC\Traits\CastTrait;
     
    2324 * @license MIT
    2425 * @package WPMVC\MVC
    25  * @version 2.1.5
     26 * @version 2.1.11
    2627 */
    27 abstract class TermModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable
     28abstract class TermModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable, Traceable
    2829{
    2930    use AliasTrait, CastTrait, SetterTrait, GetterTrait, ArrayCastTrait;
     
    8081    {
    8182        if ( ! empty( $id ) ) {
    82             $this->attributes = get_term( $id, $this->model_taxonomy, ARRAY_A );
    83             $this->load_meta();
     83            $attributes = get_term( $id, $this->model_taxonomy, ARRAY_A );
     84            if ( !is_wp_error( $attributes ) && !empty( $attributes ) ) {
     85                $this->attributes = $attributes;
     86                $this->load_meta();
     87            }
    8488        }
    8589    }
     
    9397    {
    9498        if ( ! empty( $slug ) ) {
    95             $this->attributes = get_term_by( 'slug', $slug, $this->model_taxonomy, ARRAY_A );
    96             $this->load_meta();
     99            $attributes = get_term_by( 'slug', $slug, $this->model_taxonomy, ARRAY_A );
     100            if ( !is_wp_error( $attributes ) && !empty( $attributes ) ) {
     101                $this->attributes = $attributes;
     102                $this->load_meta();
     103            }
    97104        }
    98105    }
     
    268275        }
    269276    }
     277    /**
     278     * Returns flag indicating if model has a trace in the database (an ID).
     279     * @since 2.1.11
     280     *
     281     * @param bool
     282     */
     283    public function has_trace()
     284    {
     285        return $this->term_id !== null;
     286    }
    270287}
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/UserModel.php

    r2092617 r2362481  
    33namespace WPMVC\MVC\Models;
    44
     5use WP_User;
    56use ReflectionClass;
    67use WPMVC\MVC\Contracts\Modelable;
     
    1011use WPMVC\MVC\Contracts\Stringable;
    1112use WPMVC\MVC\Contracts\Metable;
     13use WPMVC\MVC\Contracts\Traceable;
    1214use WPMVC\MVC\Traits\AliasTrait;
    1315use WPMVC\MVC\Traits\CastTrait;
     
    2325 * @license MIT
    2426 * @package WPMVC\MVC
    25  * @version 2.1.1
     27 * @version 2.1.11
    2628 */
    27 abstract class UserModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable
     29abstract class UserModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable, Traceable
    2830{
    2931    use AliasTrait, CastTrait, SetterTrait, GetterTrait, ArrayCastTrait;
     
    4648     */
    4749    protected $hidden = [];
     50    /**
     51     * WordPress user object.
     52     * @since 2.1.11
     53     * @var \WP_User|null
     54     */
     55    protected $__wp_user;
    4856    /**
    4957     * Flag that indicates if model should decode meta string values identified as JSON.
     
    6573    }
    6674    /**
    67      * Returns current user.
    68      * @since 1.0.0
    69      *
    70      * @return mixed
    71      */
    72     public static function current()
    73     {
    74         return self::find( get_current_user_id() );
    75     }
    76     /**
    7775     * Loads user data.
    7876     * @since 1.0.0
     
    8381    {
    8482        if ( ! empty( $id ) ) {
    85             $this->attributes = (array)get_user_by( 'id', $id );
     83            $this->load_wp_user( get_user_by( 'id', $id ) );
     84        }
     85    }
     86    /**
     87     * Loads model from a user object.
     88     * @since 2.1.11
     89     *
     90     * @param \WP_User $user
     91     */
     92    public function load_wp_user( $user )
     93    {
     94        if ( !is_object( $user ) || !$user instanceof WP_User )
     95            return;
     96        $this->__wp_user = $user;
     97        if ( $this->__wp_user ) {
     98            $this->attributes = (array)$this->__wp_user->data;
    8699            $this->load_meta();
    87100        }
     
    90103     * Deletes user.
    91104     * @since 1.0.0
     105     *
     106     * @return bool
    92107     */
    93108    public function delete()
    94109    {
    95         // TODO
     110        return $this->ID ? wp_delete_user( $this->ID ) : false;
    96111    }
    97112    /**
     
    104119    public function save()
    105120    {
    106         $id = wp_insert_user( $this->attributes );
    107         if ( is_wp_error( $id ) )
    108             return false;
    109         $this->ID = $id;
     121        // Insert or update
     122        if ( $this->ID === null ) {
     123            $id = wp_insert_user( $this->attributes );
     124            if ( is_wp_error( $id ) )
     125                return false;
     126            $this->ID = $id;
     127        } else {
     128            $aliases = array_filter( $this->aliases, function( $alias ) {
     129                return strpos( $alias, 'meta_' ) === false && strpos( $alias, 'func_' ) === false;
     130            } );
     131            $id = wp_update_user( array_filter( $this->attributes, function( $key ) use( &$aliases ) {
     132                return $key === 'ID' || in_array( $key, $aliases );
     133            }, ARRAY_FILTER_USE_KEY ) );
     134            if ( is_wp_error( $id ) )
     135                return false;
     136        }
     137        // Save meta
    110138        $this->save_meta_all();
    111139        return true;
     
    114142     * Loads user meta data.
    115143     * @since 1.0.0
    116      * @since 2.1.1 Uses wordpress serialization.
    117144     */
    118145    public function load_meta()
     
    135162    }
    136163    /**
     164     * Returns WordPress user object attached to model.
     165     * @since 2.1.11
     166     *
     167     * @return \WP_User|null
     168     */
     169    public function wp_user()
     170    {
     171        return isset( $this->__wp_user ) ? $this->__wp_user : null;
     172    }
     173    /**
    137174     * Returns flag indicating if object has meta key.
    138175     * @since 1.0.0
     
    184221     * Either adds or updates a meta.
    185222     * @since 1.0.0
    186      * @since 2.1.1 Uses wordpress serialization.
    187      * @since 2.1.2 Removed serialization, already done by wp.
    188223     *
    189224     * @param string $key   Key.
     
    209244        }
    210245    }
     246    /**
     247     * Returns flag indicating if model has a trace in the database (an ID).
     248     * @since 2.1.11
     249     *
     250     * @param bool
     251     */
     252    public function has_trace()
     253    {
     254        return $this->ID !== null;
     255    }
    211256}
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTermTrait.php

    r2092617 r2362481  
    1212 * @license MIT
    1313 * @package WPMVC\MVC
    14  * @version 2.1.5
     14 * @version 2.1.11.1
    1515 */
    1616trait FindTermTrait
     
    2222     * @param mixed  $id       Record ID.
    2323     * @param string $taxonomy Taxonomy.
     24     *
     25     * @return object|null
    2426     */
    2527    public static function find( $id = 0, $taxonomy = null )
    2628    {
    27         return new self( $taxonomy, $id );
     29        $model = new self( $taxonomy, $id );
     30        if ( !method_exists( $model, 'has_trace' ) )
     31            return $model;
     32        return $model->has_trace() ? $model : null;
    2833    }
    2934    /**
     
    3338     * @param string $slug     Term slug.
    3439     * @param string $taxonomy Taxonomy.
     40     *
     41     * @return object|null
    3542     */
    3643    public static function find_by_slug( $slug = 0, $taxonomy = null )
     
    3845        $model = new self( $taxonomy, 0 );
    3946        $model->load_by_slug( $slug );
    40         return $model;
     47        if ( !method_exists( $model, 'has_trace' ) )
     48            return $model;
     49        return $model->has_trace() ? $model : null;
    4150    }
    4251    /**
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTrait.php

    r2092617 r2362481  
    1212 * @license MIT
    1313 * @package WPMVC\MVC
    14  * @version 1.0.0
     14 * @version 2.1.11.1
    1515 */
    1616trait FindTrait
    1717{
    18 
    1918    /**
    2019     * Finds record based on an ID.
     
    2221     *
    2322     * @param mixed $id Record ID.
     23     *
     24     * @return object|null
    2425     */
    2526    public static function find( $id = 0 )
    2627    {
    27         return new self($id);
     28        $model = new self( $id );
     29        if ( !method_exists( $model, 'has_trace' ) )
     30            return $model;
     31        return $model->has_trace() ? $model : null;
    2832    }
    2933    /**
     
    3337     * @param int $id Parent post ID.
    3438     *
    35      * @return array
     39     * @return \WPMVC\MVC\Collection
    3640     */
    3741    public static function from( $id )
    3842    {
    3943        if ( empty( $id ) ) return;
    40         $output = new Collection();
     44        $output = new Collection;
    4145        $reference = new self();
    4246        $results = get_children( array(
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/MetaTrait.php

    r2092617 r2362481  
    110110     * @since 1.0.1 Hotfix, only saves registered meta.
    111111     * @since 2.1.1 Serialization changed.
    112      * @since 2.1.2 Removed serialization, already done by wp.
     112     * @since 2.1.2 Removed serialization, already done by WordPress.
    113113     *
    114114     * @see https://codex.wordpress.org/Function_Reference/maybe_serialize
  • woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/RelationshipTrait.php

    r1850510 r2362481  
    33namespace WPMVC\MVC\Traits;
    44
     5use ReflectionMethod;
    56use WPMVC\MVC\Collection;
    67use WPMVC\MVC\Models\Relationship;
     
    1415 * @license MIT
    1516 * @package WPMVC\MVC
    16  * @version 2.1.3
     17 * @version 2.1.8
    1718 */
    1819trait RelationshipTrait
     
    2829        'belongs_to'    => array(),
    2930    );
    30 
    3131    /**
    3232     * Returns object or objects associated with relationship.
     
    3939    private function get_relationship( $method )
    4040    {
     41        $refletor = new ReflectionMethod( $this, $method );
     42        if ( $refletor->isPublic() || count( $refletor->getParameters() ) )
     43            return;
    4144        // Get relationship
    4245        $rel = call_user_func_array( array( &$this, $method ), array() );
    4346        // Return on null
    44         if ( $rel === null || !is_object( $rel ) )
     47        if ( $rel === null || !is_object( $rel ) || !$rel instanceof Relationship )
    4548            return;
    4649        $property = $rel->property;
     
    7073                    break;
    7174                case Relationship::HAS_MANY:
    72                     $rel->object = new Collection;
     75                    $rel->object = [];
    7376                    foreach ( $this->$property as $id ) {
    7477                        if ($rel->function && $rel->method === null) {
     
    9699     * Returns relationship class.
    97100     * 1-to-1 Relationship.
    98      * Owner relatioship.
     101     * Owner relationship.
    99102     * @since 2.0.4
    100103     *
    101104     * @param string|mixed $class    Relationship model class name.
    102      * @param string       $property Property in class that is mapped to the indefier of the relationship model.
     105     * @param string       $property Property in class that is mapped to the indentifier of the relationship model.
    103106     * @param string       $method   Method in relationship model used to load it.
    104107     * @param string       $function Global function used to load relationship model.
     
    122125     * Returns relationship class.
    123126     * 1-to-1 Relationship.
    124      * Owner relatioship.
     127     * Owner relationship.
    125128     * @since 2.0.4
    126129     *
    127130     * @param string|mixed $class    Relationship model class name.
    128      * @param string       $property Property in class that is mapped to the indefier of the relationship model.
     131     * @param string       $property Property in class that is mapped to the indentifier of the relationship model.
    129132     * @param string       $method   Method in relationship model used to load it.
    130133     * @param string       $function Global function used to load relationship model.
     
    148151     * Returns relationship class.
    149152     * 1-to-N Relationship.
    150      * Owner relatioship.
     153     * Owner relationship.
    151154     * @since 2.0.4
    152155     *
    153156     * @param string|mixed $class    Relationship model class name.
    154      * @param string       $property Property in class that is mapped to the indefier of the relationship model.
     157     * @param string       $property Property in class that is mapped to the indentifier of the relationship model.
    155158     * @param string       $method   Method in relationship model used to load it.
    156159     * @param string       $function Global function used to load relationship model.
     
    173176    /**
    174177     * Returns relationship class.
    175      * Standard Wordpress featured attachment relationship.
     178     * Standard WordPress featured attachment relationship.
    176179     * @since 2.0.4
    177180     * @since 2.1.3 Remove `::class` to support php 5.4.
  • woo-license-keys/trunk/vendor/composer/autoload_files.php

    r2274899 r2362481  
    1010    'c607dd5e0d3f783ee5565b107740298c' => $vendorDir . '/10quality/wpmvc-core/src/lib/functions.php',
    1111    '5117276f634578e2f653b537c34c680d' => $vendorDir . '/10quality/wpmvc-addon/src/functions.php',
     12    '11298418fac2d36d6d38c7c3efc5b206' => $vendorDir . '/10quality/wp-query-builder/src/Lib/functions.php',
    1213    '3a37b78545ce53c7fa6c797d9fa036ea' => $baseDir . '/app/Lib/functions.php',
    1314);
  • woo-license-keys/trunk/vendor/composer/autoload_static.php

    r2274899 r2362481  
    1111        'c607dd5e0d3f783ee5565b107740298c' => __DIR__ . '/..' . '/10quality/wpmvc-core/src/lib/functions.php',
    1212        '5117276f634578e2f653b537c34c680d' => __DIR__ . '/..' . '/10quality/wpmvc-addon/src/functions.php',
     13        '11298418fac2d36d6d38c7c3efc5b206' => __DIR__ . '/..' . '/10quality/wp-query-builder/src/Lib/functions.php',
    1314        '3a37b78545ce53c7fa6c797d9fa036ea' => __DIR__ . '/../..' . '/app/Lib/functions.php',
    1415    );
  • woo-license-keys/trunk/vendor/composer/installed.json

    r2274899 r2362481  
    140140    },
    141141    {
     142        "name": "10quality/wpmvc-addon-reviewer",
     143        "version": "v1.0.x-dev",
     144        "version_normalized": "1.0.9999999.9999999-dev",
     145        "source": {
     146            "type": "git",
     147            "url": "https://github.com/10quality/wpmvc-addon-reviewer.git",
     148            "reference": "6cd1adbe9476806470e913cb2deffbfaee69a9e2"
     149        },
     150        "dist": {
     151            "type": "zip",
     152            "url": "https://api.github.com/repos/10quality/wpmvc-addon-reviewer/zipball/6cd1adbe9476806470e913cb2deffbfaee69a9e2",
     153            "reference": "6cd1adbe9476806470e913cb2deffbfaee69a9e2",
     154            "shasum": ""
     155        },
     156        "require": {
     157            "10quality/wpmvc-addon": "1.0.*",
     158            "10quality/wpmvc-core": "^3.1",
     159            "php": ">=5.4.0"
     160        },
     161        "require-dev": {
     162            "phpunit/phpunit": "4.4.*"
     163        },
     164        "time": "2019-12-13T20:17:33+00:00",
     165        "type": "library",
     166        "installation-source": "source",
     167        "autoload": {
     168            "psr-4": {
     169                "WPMVC\\Addons\\Reviewer\\": "addon/"
     170            }
     171        },
     172        "notification-url": "https://packagist.org/downloads/",
     173        "license": [
     174            "MIT"
     175        ],
     176        "description": "This addon will show a review notice to an admin user, suggesting them to review the plugin or theme built in Wordpress MVC.",
     177        "keywords": [
     178            "review",
     179            "wpmvc"
     180        ]
     181    },
     182    {
     183        "name": "10quality/wpmvc-logger",
     184        "version": "v2.0.x-dev",
     185        "version_normalized": "2.0.9999999.9999999-dev",
     186        "source": {
     187            "type": "git",
     188            "url": "https://github.com/10quality/wpmvc-klogger.git",
     189            "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1"
     190        },
     191        "dist": {
     192            "type": "zip",
     193            "url": "https://api.github.com/repos/10quality/wpmvc-klogger/zipball/3f8959bd7fe585d248d102e198aae4a2504a90d1",
     194            "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1",
     195            "shasum": ""
     196        },
     197        "require": {
     198            "10quality/wp-file": "0.9.*",
     199            "php": ">=5.3",
     200            "psr/log": "1.0.0"
     201        },
     202        "require-dev": {
     203            "phpunit/phpunit": "4.0.*"
     204        },
     205        "time": "2020-01-09T23:17:24+00:00",
     206        "type": "library",
     207        "installation-source": "source",
     208        "autoload": {
     209            "psr-4": {
     210                "WPMVC\\KLogger\\": "src/"
     211            },
     212            "classmap": [
     213                "src/"
     214            ]
     215        },
     216        "notification-url": "https://packagist.org/downloads/",
     217        "license": [
     218            "MIT"
     219        ],
     220        "authors": [
     221            {
     222                "name": "Kenny Katzgrau",
     223                "email": "katzgrau@gmail.com"
     224            },
     225            {
     226                "name": "Dan Horrigan",
     227                "email": "dan@dhorrigan.com"
     228            },
     229            {
     230                "name": "10 Quality",
     231                "email": "info@10quality.com",
     232                "homepage": "http://www.10quality.com",
     233                "role": "Developer"
     234            },
     235            {
     236                "name": "Alejandro Mostajo",
     237                "email": "amostajo@gmail.com",
     238                "role": "Developer"
     239            }
     240        ],
     241        "description": "KLogger for WordPress MVC.",
     242        "keywords": [
     243            "logging"
     244        ]
     245    },
     246    {
     247        "name": "10quality/wpmvc-phpfastcache",
     248        "version": "v4.0.x-dev",
     249        "version_normalized": "4.0.9999999.9999999-dev",
     250        "source": {
     251            "type": "git",
     252            "url": "https://github.com/10quality/wpmvc-phpfastcache.git",
     253            "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e"
     254        },
     255        "dist": {
     256            "type": "zip",
     257            "url": "https://api.github.com/repos/10quality/wpmvc-phpfastcache/zipball/6d0b4ca7fd1e3d5b27992a2d8321768eb484873e",
     258            "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e",
     259            "shasum": ""
     260        },
     261        "require": {
     262            "10quality/wp-file": "0.9.*",
     263            "php": ">=5.1.0"
     264        },
     265        "require-dev": {
     266            "katzgrau/klogger": "dev-master",
     267            "mockery/mockery": "dev-master",
     268            "phpunit/phpunit": "~4.1",
     269            "sami/sami": "dev-master"
     270        },
     271        "time": "2020-01-09T23:19:53+00:00",
     272        "type": "library",
     273        "installation-source": "source",
     274        "autoload": {
     275            "files": [
     276                "src/lib/functions.php"
     277            ],
     278            "psr-4": {
     279                "WPMVC\\PHPFastCache\\": "src/psr4"
     280            }
     281        },
     282        "notification-url": "https://packagist.org/downloads/",
     283        "license": [
     284            "MIT"
     285        ],
     286        "authors": [
     287            {
     288                "name": "Khoa Bui",
     289                "email": "khoaofgod@gmail.com",
     290                "homepage": "http://www.phpfastcache.com",
     291                "role": "Developer"
     292            },
     293            {
     294                "name": "10 Quality",
     295                "email": "info@10quality.com",
     296                "homepage": "http://www.10quality.com",
     297                "role": "Developer"
     298            },
     299            {
     300                "name": "Alejandro Mostajo",
     301                "email": "amostajo@gmail.com",
     302                "role": "Developer"
     303            }
     304        ],
     305        "description": "Forked version that works with WordPress MVC.",
     306        "homepage": "http://www.phpfastcache.com",
     307        "keywords": [
     308            "cache"
     309        ]
     310    },
     311    {
     312        "name": "10quality/ayuco",
     313        "version": "v1.0.x-dev",
     314        "version_normalized": "1.0.9999999.9999999-dev",
     315        "source": {
     316            "type": "git",
     317            "url": "https://github.com/10quality/ayuco.git",
     318            "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63"
     319        },
     320        "dist": {
     321            "type": "zip",
     322            "url": "https://api.github.com/repos/10quality/ayuco/zipball/6c4d11232dc7b80ebb87c7899db98c76829e1a63",
     323            "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63",
     324            "shasum": ""
     325        },
     326        "require-dev": {
     327            "phpunit/phpunit": "8.0.*"
     328        },
     329        "time": "2020-01-25T07:57:28+00:00",
     330        "type": "library",
     331        "installation-source": "source",
     332        "autoload": {
     333            "psr-4": {
     334                "Ayuco\\": "src"
     335            }
     336        },
     337        "notification-url": "https://packagist.org/downloads/",
     338        "license": [
     339            "MIT"
     340        ],
     341        "authors": [
     342            {
     343                "name": "Alejandro Mostajo",
     344                "homepage": "http://about.me/amostajo"
     345            },
     346            {
     347                "name": "10Quality",
     348                "homepage": "http://www.10quality.com/"
     349            }
     350        ],
     351        "description": "Command-Line interface that can be used to execute commands written in PHP.",
     352        "homepage": "https://github.com/10quality/ayuco",
     353        "keywords": [
     354            "command-line",
     355            "commands",
     356            "php"
     357        ]
     358    },
     359    {
     360        "name": "10quality/wpmvc-addon",
     361        "version": "v1.0.2",
     362        "version_normalized": "1.0.2.0",
     363        "source": {
     364            "type": "git",
     365            "url": "https://github.com/10quality/wpmvc-addon.git",
     366            "reference": "73be1d90b7910d79c48e01af8bf88283a4709c9a"
     367        },
     368        "dist": {
     369            "type": "zip",
     370            "url": "https://api.github.com/repos/10quality/wpmvc-addon/zipball/73be1d90b7910d79c48e01af8bf88283a4709c9a",
     371            "reference": "73be1d90b7910d79c48e01af8bf88283a4709c9a",
     372            "shasum": ""
     373        },
     374        "require": {
     375            "10quality/wpmvc-core": "^3.1",
     376            "php": ">=5.4.0"
     377        },
     378        "require-dev": {
     379            "phpunit/phpunit": "4.4.*"
     380        },
     381        "time": "2020-03-13T23:32:00+00:00",
     382        "type": "library",
     383        "installation-source": "dist",
     384        "autoload": {
     385            "files": [
     386                "src/functions.php"
     387            ]
     388        },
     389        "notification-url": "https://packagist.org/downloads/",
     390        "license": [
     391            "MIT"
     392        ],
     393        "authors": [
     394            {
     395                "name": "10 Quality",
     396                "email": "info@10quality.com"
     397            },
     398            {
     399                "name": "Alejandro Mostajo",
     400                "email": "amostajo@gmail.com"
     401            }
     402        ],
     403        "description": "Wordpress MVC addon dependency package.",
     404        "keywords": [
     405            "addon",
     406            "mvc",
     407            "wordpress"
     408        ]
     409    },
     410    {
     411        "name": "10quality/php-data-model",
     412        "version": "v1.0.x-dev",
     413        "version_normalized": "1.0.9999999.9999999-dev",
     414        "source": {
     415            "type": "git",
     416            "url": "https://github.com/10quality/php-data-model.git",
     417            "reference": "45083e64b7757edf0594a94ad892d5164b773464"
     418        },
     419        "dist": {
     420            "type": "zip",
     421            "url": "https://api.github.com/repos/10quality/php-data-model/zipball/45083e64b7757edf0594a94ad892d5164b773464",
     422            "reference": "45083e64b7757edf0594a94ad892d5164b773464",
     423            "shasum": ""
     424        },
     425        "require": {
     426            "php": ">=5.4"
     427        },
     428        "require-dev": {
     429            "phpunit/phpunit": "^4.8"
     430        },
     431        "time": "2018-09-20T20:37:38+00:00",
     432        "type": "library",
     433        "installation-source": "source",
     434        "autoload": {
     435            "psr-4": {
     436                "TenQuality\\Data\\": "src"
     437            }
     438        },
     439        "notification-url": "https://packagist.org/downloads/",
     440        "license": [
     441            "MIT"
     442        ],
     443        "authors": [
     444            {
     445                "name": "10 Quality",
     446                "email": "info@10quality.com"
     447            },
     448            {
     449                "name": "Cami M",
     450                "email": "info@10quality.com"
     451            }
     452        ],
     453        "description": "PHP Library that provides generic and scalable Data Models (abstract model class) for any type of data handling.",
     454        "homepage": "https://github.com/10quality/php-data-model",
     455        "keywords": [
     456            "data",
     457            "models"
     458        ]
     459    },
     460    {
     461        "name": "10quality/wpmvc-core",
     462        "version": "v3.1.13",
     463        "version_normalized": "3.1.13.0",
     464        "source": {
     465            "type": "git",
     466            "url": "https://github.com/10quality/wpmvc-core.git",
     467            "reference": "4efe96b316c23dd20d4b9c7b8a2004efc8ceee21"
     468        },
     469        "dist": {
     470            "type": "zip",
     471            "url": "https://api.github.com/repos/10quality/wpmvc-core/zipball/4efe96b316c23dd20d4b9c7b8a2004efc8ceee21",
     472            "reference": "4efe96b316c23dd20d4b9c7b8a2004efc8ceee21",
     473            "shasum": ""
     474        },
     475        "require": {
     476            "10quality/wpmvc-logger": "2.0.*",
     477            "10quality/wpmvc-mvc": "2.1.*",
     478            "10quality/wpmvc-phpfastcache": "4.0.*",
     479            "php": ">=5.4.0"
     480        },
     481        "require-dev": {
     482            "10quality/wpmvc-commands": "1.0.*",
     483            "phpunit/phpunit": "7.5.*"
     484        },
     485        "time": "2020-06-26T07:53:18+00:00",
     486        "type": "library",
     487        "installation-source": "source",
     488        "autoload": {
     489            "files": [
     490                "src/lib/functions.php"
     491            ],
     492            "psr-4": {
     493                "WPMVC\\": "src/psr4"
     494            }
     495        },
     496        "notification-url": "https://packagist.org/downloads/",
     497        "license": [
     498            "MIT"
     499        ],
     500        "authors": [
     501            {
     502                "name": "10 Quality",
     503                "email": "info@10quality.com"
     504            },
     505            {
     506                "name": "Alejandro Mostajo",
     507                "email": "amostajo@gmail.com"
     508            }
     509        ],
     510        "description": "WordPress MVC crore plugin.",
     511        "keywords": [
     512            "core",
     513            "mvc",
     514            "wordpress"
     515        ]
     516    },
     517    {
    142518        "name": "10quality/wpmvc-mvc",
    143         "version": "v2.1.6",
    144         "version_normalized": "2.1.6.0",
     519        "version": "v2.1.11.1",
     520        "version_normalized": "2.1.11.1",
    145521        "source": {
    146522            "type": "git",
    147523            "url": "https://github.com/10quality/wpmvc-mvc.git",
    148             "reference": "f90689907b6f1eab368a14e859e37bd16e87286c"
    149         },
    150         "dist": {
    151             "type": "zip",
    152             "url": "https://api.github.com/repos/10quality/wpmvc-mvc/zipball/f90689907b6f1eab368a14e859e37bd16e87286c",
    153             "reference": "f90689907b6f1eab368a14e859e37bd16e87286c",
     524            "reference": "97c9a92fd34b91b5512710b027484821c4656c32"
     525        },
     526        "dist": {
     527            "type": "zip",
     528            "url": "https://api.github.com/repos/10quality/wpmvc-mvc/zipball/97c9a92fd34b91b5512710b027484821c4656c32",
     529            "reference": "97c9a92fd34b91b5512710b027484821c4656c32",
    154530            "shasum": ""
    155531        },
     
    160536            "phpunit/phpunit": "7.5.*"
    161537        },
    162         "time": "2019-06-04T21:22:07+00:00",
     538        "time": "2020-06-28T19:05:43+00:00",
    163539        "type": "library",
    164540        "installation-source": "source",
     
    182558            }
    183559        ],
    184         "description": "Lightweight MVC for WPMVC (Wordpress MVC framework).",
     560        "description": "Lightweight MVC for WPMVC (WordPress MVC framework).",
    185561        "keywords": [
    186562            "light",
     
    191567    },
    192568    {
    193         "name": "10quality/wpmvc-addon-reviewer",
    194         "version": "v1.0.x-dev",
    195         "version_normalized": "1.0.9999999.9999999-dev",
    196         "source": {
    197             "type": "git",
    198             "url": "https://github.com/10quality/wpmvc-addon-reviewer.git",
    199             "reference": "6cd1adbe9476806470e913cb2deffbfaee69a9e2"
    200         },
    201         "dist": {
    202             "type": "zip",
    203             "url": "https://api.github.com/repos/10quality/wpmvc-addon-reviewer/zipball/6cd1adbe9476806470e913cb2deffbfaee69a9e2",
    204             "reference": "6cd1adbe9476806470e913cb2deffbfaee69a9e2",
    205             "shasum": ""
    206         },
    207         "require": {
    208             "10quality/wpmvc-addon": "1.0.*",
    209             "10quality/wpmvc-core": "^3.1",
    210             "php": ">=5.4.0"
    211         },
    212         "require-dev": {
    213             "phpunit/phpunit": "4.4.*"
    214         },
    215         "time": "2019-12-13T20:17:33+00:00",
    216         "type": "library",
    217         "installation-source": "source",
    218         "autoload": {
    219             "psr-4": {
    220                 "WPMVC\\Addons\\Reviewer\\": "addon/"
    221             }
    222         },
    223         "notification-url": "https://packagist.org/downloads/",
    224         "license": [
    225             "MIT"
    226         ],
    227         "description": "This addon will show a review notice to an admin user, suggesting them to review the plugin or theme built in Wordpress MVC.",
    228         "keywords": [
    229             "review",
    230             "wpmvc"
    231         ]
    232     },
    233     {
    234569        "name": "nikic/php-parser",
    235570        "version": "dev-master",
     
    238573            "type": "git",
    239574            "url": "https://github.com/nikic/PHP-Parser.git",
    240             "reference": "d86ca0f745b47efcf8d7cc1cfc69c55e78fd0b90"
    241         },
    242         "dist": {
    243             "type": "zip",
    244             "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d86ca0f745b47efcf8d7cc1cfc69c55e78fd0b90",
    245             "reference": "d86ca0f745b47efcf8d7cc1cfc69c55e78fd0b90",
     575            "reference": "f9d35fe11e58105dff933931344d6e6beb1406d8"
     576        },
     577        "dist": {
     578            "type": "zip",
     579            "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f9d35fe11e58105dff933931344d6e6beb1406d8",
     580            "reference": "f9d35fe11e58105dff933931344d6e6beb1406d8",
    246581            "shasum": ""
    247582        },
     
    251586        },
    252587        "require-dev": {
    253             "ircmaxell/php-yacc": "0.0.5",
    254             "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
    255         },
    256         "time": "2020-02-22T20:09:03+00:00",
     588            "ircmaxell/php-yacc": "^0.0.7",
     589            "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
     590        },
     591        "time": "2020-08-10T09:21:16+00:00",
    257592        "bin": [
    258593            "bin/php-parse"
     
    261596        "extra": {
    262597            "branch-alias": {
    263                 "dev-master": "4.3-dev"
     598                "dev-master": "4.8-dev"
    264599            }
    265600        },
     
    286621    },
    287622    {
    288         "name": "10quality/wpmvc-logger",
    289         "version": "v2.0.x-dev",
    290         "version_normalized": "2.0.9999999.9999999-dev",
    291         "source": {
    292             "type": "git",
    293             "url": "https://github.com/10quality/wpmvc-klogger.git",
    294             "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1"
    295         },
    296         "dist": {
    297             "type": "zip",
    298             "url": "https://api.github.com/repos/10quality/wpmvc-klogger/zipball/3f8959bd7fe585d248d102e198aae4a2504a90d1",
    299             "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1",
    300             "shasum": ""
    301         },
    302         "require": {
    303             "10quality/wp-file": "0.9.*",
    304             "php": ">=5.3",
    305             "psr/log": "1.0.0"
    306         },
    307         "require-dev": {
    308             "phpunit/phpunit": "4.0.*"
    309         },
    310         "time": "2020-01-09T23:17:24+00:00",
    311         "type": "library",
    312         "installation-source": "source",
    313         "autoload": {
    314             "psr-4": {
    315                 "WPMVC\\KLogger\\": "src/"
    316             },
    317             "classmap": [
    318                 "src/"
    319             ]
    320         },
    321         "notification-url": "https://packagist.org/downloads/",
    322         "license": [
    323             "MIT"
    324         ],
    325         "authors": [
    326             {
    327                 "name": "Kenny Katzgrau",
    328                 "email": "katzgrau@gmail.com"
    329             },
    330             {
    331                 "name": "Dan Horrigan",
    332                 "email": "dan@dhorrigan.com"
    333             },
    334             {
    335                 "name": "10 Quality",
    336                 "email": "info@10quality.com",
    337                 "homepage": "http://www.10quality.com",
    338                 "role": "Developer"
    339             },
    340             {
    341                 "name": "Alejandro Mostajo",
    342                 "email": "amostajo@gmail.com",
    343                 "role": "Developer"
    344             }
    345         ],
    346         "description": "KLogger for WordPress MVC.",
    347         "keywords": [
    348             "logging"
    349         ]
    350     },
    351     {
    352         "name": "10quality/wpmvc-phpfastcache",
    353         "version": "v4.0.x-dev",
    354         "version_normalized": "4.0.9999999.9999999-dev",
    355         "source": {
    356             "type": "git",
    357             "url": "https://github.com/10quality/wpmvc-phpfastcache.git",
    358             "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e"
    359         },
    360         "dist": {
    361             "type": "zip",
    362             "url": "https://api.github.com/repos/10quality/wpmvc-phpfastcache/zipball/6d0b4ca7fd1e3d5b27992a2d8321768eb484873e",
    363             "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e",
    364             "shasum": ""
    365         },
    366         "require": {
    367             "10quality/wp-file": "0.9.*",
    368             "php": ">=5.1.0"
    369         },
    370         "require-dev": {
    371             "katzgrau/klogger": "dev-master",
    372             "mockery/mockery": "dev-master",
    373             "phpunit/phpunit": "~4.1",
    374             "sami/sami": "dev-master"
    375         },
    376         "time": "2020-01-09T23:19:53+00:00",
    377         "type": "library",
    378         "installation-source": "source",
    379         "autoload": {
    380             "files": [
    381                 "src/lib/functions.php"
    382             ],
    383             "psr-4": {
    384                 "WPMVC\\PHPFastCache\\": "src/psr4"
    385             }
    386         },
    387         "notification-url": "https://packagist.org/downloads/",
    388         "license": [
    389             "MIT"
    390         ],
    391         "authors": [
    392             {
    393                 "name": "Khoa Bui",
    394                 "email": "khoaofgod@gmail.com",
    395                 "homepage": "http://www.phpfastcache.com",
    396                 "role": "Developer"
    397             },
    398             {
    399                 "name": "10 Quality",
    400                 "email": "info@10quality.com",
    401                 "homepage": "http://www.10quality.com",
    402                 "role": "Developer"
    403             },
    404             {
    405                 "name": "Alejandro Mostajo",
    406                 "email": "amostajo@gmail.com",
    407                 "role": "Developer"
    408             }
    409         ],
    410         "description": "Forked version that works with WordPress MVC.",
    411         "homepage": "http://www.phpfastcache.com",
    412         "keywords": [
    413             "cache"
    414         ]
    415     },
    416     {
    417         "name": "10quality/ayuco",
    418         "version": "v1.0.x-dev",
    419         "version_normalized": "1.0.9999999.9999999-dev",
    420         "source": {
    421             "type": "git",
    422             "url": "https://github.com/10quality/ayuco.git",
    423             "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63"
    424         },
    425         "dist": {
    426             "type": "zip",
    427             "url": "https://api.github.com/repos/10quality/ayuco/zipball/6c4d11232dc7b80ebb87c7899db98c76829e1a63",
    428             "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63",
    429             "shasum": ""
    430         },
    431         "require-dev": {
    432             "phpunit/phpunit": "8.0.*"
    433         },
    434         "time": "2020-01-25T07:57:28+00:00",
    435         "type": "library",
    436         "installation-source": "source",
    437         "autoload": {
    438             "psr-4": {
    439                 "Ayuco\\": "src"
    440             }
    441         },
    442         "notification-url": "https://packagist.org/downloads/",
    443         "license": [
    444             "MIT"
    445         ],
    446         "authors": [
    447             {
    448                 "name": "Alejandro Mostajo",
    449                 "homepage": "http://about.me/amostajo"
    450             },
    451             {
    452                 "name": "10Quality",
    453                 "homepage": "http://www.10quality.com/"
    454             }
    455         ],
    456         "description": "Command-Line interface that can be used to execute commands written in PHP.",
    457         "homepage": "https://github.com/10quality/ayuco",
    458         "keywords": [
    459             "command-line",
    460             "commands",
    461             "php"
    462         ]
    463     },
    464     {
    465         "name": "10quality/wpmvc-core",
    466         "version": "v3.1.11",
    467         "version_normalized": "3.1.11.0",
    468         "source": {
    469             "type": "git",
    470             "url": "https://github.com/10quality/wpmvc-core.git",
    471             "reference": "3c247ed0197d65ff01741ad972f2e79c1bd763bd"
    472         },
    473         "dist": {
    474             "type": "zip",
    475             "url": "https://api.github.com/repos/10quality/wpmvc-core/zipball/3c247ed0197d65ff01741ad972f2e79c1bd763bd",
    476             "reference": "3c247ed0197d65ff01741ad972f2e79c1bd763bd",
    477             "shasum": ""
    478         },
    479         "require": {
    480             "10quality/wpmvc-logger": "2.0.*",
    481             "10quality/wpmvc-mvc": "2.1.*",
    482             "10quality/wpmvc-phpfastcache": "4.0.*",
    483             "php": ">=5.4.0"
    484         },
    485         "require-dev": {
    486             "10quality/wpmvc-commands": "1.0.*",
    487             "phpunit/phpunit": "7.5.*"
    488         },
    489         "time": "2020-02-15T03:17:27+00:00",
    490         "type": "library",
    491         "installation-source": "source",
    492         "autoload": {
    493             "files": [
    494                 "src/lib/functions.php"
    495             ],
    496             "psr-4": {
    497                 "WPMVC\\": "src/psr4"
    498             }
    499         },
    500         "notification-url": "https://packagist.org/downloads/",
    501         "license": [
    502             "MIT"
    503         ],
    504         "authors": [
    505             {
    506                 "name": "10 Quality",
    507                 "email": "info@10quality.com"
    508             },
    509             {
    510                 "name": "Alejandro Mostajo",
    511                 "email": "amostajo@gmail.com"
    512             }
    513         ],
    514         "description": "WordPress MVC crore plugin.",
    515         "keywords": [
    516             "core",
    517             "mvc",
    518             "wordpress"
    519         ]
    520     },
    521     {
    522623        "name": "10quality/wpmvc-commands",
    523         "version": "v1.1.10",
    524         "version_normalized": "1.1.10.0",
     624        "version": "v1.1.11",
     625        "version_normalized": "1.1.11.0",
    525626        "source": {
    526627            "type": "git",
    527628            "url": "https://github.com/10quality/wpmvc-commands.git",
    528             "reference": "31ae94e9d8665445f333d6842783c5191a164375"
    529         },
    530         "dist": {
    531             "type": "zip",
    532             "url": "https://api.github.com/repos/10quality/wpmvc-commands/zipball/31ae94e9d8665445f333d6842783c5191a164375",
    533             "reference": "31ae94e9d8665445f333d6842783c5191a164375",
     629            "reference": "468bea1950ae79174127722409018b1b5a709329"
     630        },
     631        "dist": {
     632            "type": "zip",
     633            "url": "https://api.github.com/repos/10quality/wpmvc-commands/zipball/468bea1950ae79174127722409018b1b5a709329",
     634            "reference": "468bea1950ae79174127722409018b1b5a709329",
    534635            "shasum": ""
    535636        },
     
    542643            "phpunit/phpunit": "8.0.*"
    543644        },
    544         "time": "2020-02-15T07:01:15+00:00",
     645        "time": "2020-08-13T16:28:07+00:00",
    545646        "type": "library",
    546647        "installation-source": "source",
     
    569670    },
    570671    {
    571         "name": "10quality/wpmvc-addon",
    572         "version": "v1.0.2",
    573         "version_normalized": "1.0.2.0",
    574         "source": {
    575             "type": "git",
    576             "url": "https://github.com/10quality/wpmvc-addon.git",
    577             "reference": "73be1d90b7910d79c48e01af8bf88283a4709c9a"
    578         },
    579         "dist": {
    580             "type": "zip",
    581             "url": "https://api.github.com/repos/10quality/wpmvc-addon/zipball/73be1d90b7910d79c48e01af8bf88283a4709c9a",
    582             "reference": "73be1d90b7910d79c48e01af8bf88283a4709c9a",
    583             "shasum": ""
    584         },
    585         "require": {
    586             "10quality/wpmvc-core": "^3.1",
    587             "php": ">=5.4.0"
    588         },
    589         "require-dev": {
    590             "phpunit/phpunit": "4.4.*"
    591         },
    592         "time": "2020-03-13T23:32:00+00:00",
    593         "type": "library",
    594         "installation-source": "dist",
    595         "autoload": {
    596             "files": [
    597                 "src/functions.php"
    598             ]
    599         },
    600         "notification-url": "https://packagist.org/downloads/",
    601         "license": [
    602             "MIT"
    603         ],
    604         "authors": [
    605             {
    606                 "name": "10 Quality",
    607                 "email": "info@10quality.com"
    608             },
    609             {
    610                 "name": "Alejandro Mostajo",
    611                 "email": "amostajo@gmail.com"
    612             }
    613         ],
    614         "description": "Wordpress MVC addon dependency package.",
    615         "keywords": [
    616             "addon",
    617             "mvc",
    618             "wordpress"
    619         ]
    620     },
    621     {
    622         "name": "10quality/php-data-model",
    623         "version": "v1.0.x-dev",
    624         "version_normalized": "1.0.9999999.9999999-dev",
    625         "source": {
    626             "type": "git",
    627             "url": "https://github.com/10quality/php-data-model.git",
    628             "reference": "45083e64b7757edf0594a94ad892d5164b773464"
    629         },
    630         "dist": {
    631             "type": "zip",
    632             "url": "https://api.github.com/repos/10quality/php-data-model/zipball/45083e64b7757edf0594a94ad892d5164b773464",
    633             "reference": "45083e64b7757edf0594a94ad892d5164b773464",
    634             "shasum": ""
    635         },
    636         "require": {
    637             "php": ">=5.4"
    638         },
    639         "require-dev": {
    640             "phpunit/phpunit": "^4.8"
    641         },
    642         "time": "2018-09-20T20:37:38+00:00",
    643         "type": "library",
    644         "installation-source": "source",
    645         "autoload": {
    646             "psr-4": {
    647                 "TenQuality\\Data\\": "src"
    648             }
    649         },
    650         "notification-url": "https://packagist.org/downloads/",
    651         "license": [
    652             "MIT"
    653         ],
    654         "authors": [
    655             {
    656                 "name": "10 Quality",
    657                 "email": "info@10quality.com"
    658             },
    659             {
    660                 "name": "Cami M",
    661                 "email": "info@10quality.com"
    662             }
    663         ],
    664         "description": "PHP Library that provides generic and scalable Data Models (abstract model class) for any type of data handling.",
    665         "homepage": "https://github.com/10quality/php-data-model",
    666         "keywords": [
    667             "data",
    668             "models"
    669         ]
    670     },
    671     {
    672672        "name": "10quality/wp-query-builder",
    673673        "version": "v1.0.x-dev",
     
    676676            "type": "git",
    677677            "url": "https://github.com/10quality/wp-query-builder.git",
    678             "reference": "c848cd39afad98055e240ccc3b6b8ffe3e241316"
    679         },
    680         "dist": {
    681             "type": "zip",
    682             "url": "https://api.github.com/repos/10quality/wp-query-builder/zipball/c848cd39afad98055e240ccc3b6b8ffe3e241316",
    683             "reference": "c848cd39afad98055e240ccc3b6b8ffe3e241316",
     678            "reference": "802568f8e14e1074aaf130a83f88c9f47a26296c"
     679        },
     680        "dist": {
     681            "type": "zip",
     682            "url": "https://api.github.com/repos/10quality/wp-query-builder/zipball/802568f8e14e1074aaf130a83f88c9f47a26296c",
     683            "reference": "802568f8e14e1074aaf130a83f88c9f47a26296c",
    684684            "shasum": ""
    685685        },
     
    691691            "phpunit/phpunit": "8.0.*"
    692692        },
    693         "time": "2020-02-15T00:37:32+00:00",
     693        "time": "2020-08-06T05:45:56+00:00",
    694694        "type": "library",
    695695        "installation-source": "source",
     
    697697            "psr-4": {
    698698                "TenQuality\\WP\\Database\\": "src"
    699             }
     699            },
     700            "files": [
     701                "src/Lib/functions.php"
     702            ]
    700703        },
    701704        "notification-url": "https://packagist.org/downloads/",
Note: See TracChangeset for help on using the changeset viewer.