Changeset 2362481
- Timestamp:
- 08/16/2020 05:55:11 PM (6 years ago)
- Location:
- woo-license-keys/trunk
- Files:
-
- 6 added
- 34 edited
-
README.txt (modified) (2 diffs)
-
app/Config/app.php (modified) (1 diff)
-
app/Controllers/AccountController.php (modified) (1 diff)
-
app/Controllers/ConfigController.php (modified) (3 diffs)
-
app/Main.php (modified) (3 diffs)
-
assets/js/app.js (modified) (1 diff)
-
assets/js/clipboard.min.js (modified) (1 diff)
-
assets/svgs (added)
-
assets/svgs/woo-license-keys-reviewer-logo.svg (added)
-
plugin.php (modified) (2 diffs)
-
vendor/10quality/wp-query-builder/composer.json (modified) (1 diff)
-
vendor/10quality/wp-query-builder/src/Abstracts/DataModel.php (modified) (1 diff)
-
vendor/10quality/wp-query-builder/src/Lib (added)
-
vendor/10quality/wp-query-builder/src/Lib/functions.php (added)
-
vendor/10quality/wp-query-builder/src/QueryBuilder.php (modified) (13 diffs)
-
vendor/10quality/wp-query-builder/src/Traits/DataModelTrait.php (modified) (2 diffs)
-
vendor/10quality/wpmvc-core/src/lib/functions.php (modified) (2 diffs)
-
vendor/10quality/wpmvc-core/src/psr4/Bridge.php (modified) (17 diffs)
-
vendor/10quality/wpmvc-mvc/README.md (modified) (2 diffs)
-
vendor/10quality/wpmvc-mvc/composer.json (modified) (1 diff)
-
vendor/10quality/wpmvc-mvc/phpunit.xml (modified) (1 diff)
-
vendor/10quality/wpmvc-mvc/src/Contracts/Traceable.php (added)
-
vendor/10quality/wpmvc-mvc/src/Controller.php (modified) (1 diff)
-
vendor/10quality/wpmvc-mvc/src/Controllers/ModelController.php (modified) (1 diff)
-
vendor/10quality/wpmvc-mvc/src/Engine.php (modified) (3 diffs)
-
vendor/10quality/wpmvc-mvc/src/Models/CategoryModel.php (modified) (3 diffs)
-
vendor/10quality/wpmvc-mvc/src/Models/CommentModel.php (added)
-
vendor/10quality/wpmvc-mvc/src/Models/Common/Attachment.php (modified) (1 diff)
-
vendor/10quality/wpmvc-mvc/src/Models/OptionModel.php (modified) (4 diffs)
-
vendor/10quality/wpmvc-mvc/src/Models/PostModel.php (modified) (12 diffs)
-
vendor/10quality/wpmvc-mvc/src/Models/Relationship.php (modified) (2 diffs)
-
vendor/10quality/wpmvc-mvc/src/Models/TermModel.php (modified) (5 diffs)
-
vendor/10quality/wpmvc-mvc/src/Models/UserModel.php (modified) (12 diffs)
-
vendor/10quality/wpmvc-mvc/src/Traits/FindTermTrait.php (modified) (4 diffs)
-
vendor/10quality/wpmvc-mvc/src/Traits/FindTrait.php (modified) (3 diffs)
-
vendor/10quality/wpmvc-mvc/src/Traits/MetaTrait.php (modified) (1 diff)
-
vendor/10quality/wpmvc-mvc/src/Traits/RelationshipTrait.php (modified) (9 diffs)
-
vendor/composer/autoload_files.php (modified) (1 diff)
-
vendor/composer/autoload_static.php (modified) (1 diff)
-
vendor/composer/installed.json (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-license-keys/trunk/README.txt
r2274899 r2362481 6 6 Requires at least: 3.2 7 7 Requires PHP: 5.4 8 Tested up to: 5. 49 Stable tag: 1.4. 08 Tested up to: 5.5 9 Stable tag: 1.4.1 10 10 License: GPLv3 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 86 86 == Changelog == 87 87 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 88 95 = 1.4.0 = 89 96 *Release Date - 03 Apr 2020* -
woo-license-keys/trunk/app/Config/app.php
r2274899 r2362481 19 19 ], 20 20 21 'version' => '1.4. 0',21 'version' => '1.4.1', 22 22 23 23 'author' => '10 Quality Studio <https://www.10quality.com/>', -
woo-license-keys/trunk/app/Controllers/AccountController.php
r2274899 r2362481 239 239 assets_url( 'js/clipboard.min.js', __DIR__ ), 240 240 [], 241 '2.0. 4',241 '2.0.6', 242 242 true 243 243 ); -
woo-license-keys/trunk/app/Controllers/ConfigController.php
r2215470 r2362481 7 7 8 8 /** 9 * Config Controller controller.9 * Configuration hooks. 10 10 * Handles all configuration related business logic. 11 11 * … … 14 14 * @license GPLv3 15 15 * @package woo-license-keys 16 * @version 1. 3.516 * @version 1.4.1 17 17 */ 18 18 class ConfigController extends Controller … … 71 71 return $meta; 72 72 } 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 } 73 85 } -
woo-license-keys/trunk/app/Main.php
r2241305 r2362481 15 15 * @license GPLv3 16 16 * @package woo-license-keys 17 * @version 1. 3.817 * @version 1.4.1 18 18 */ 19 19 class Main extends Bridge … … 25 25 { 26 26 // General 27 $this->add_filter( 'woocommerce_license_key_types', 'WooCommerceController@types', 1);27 $this->add_filter( 'woocommerce_license_key_types', 'WooCommerceController@types', 1 ); 28 28 // 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 ); 33 33 // 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' ); 38 38 // 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 ); 41 41 // 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' ); 49 49 // 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 ); 51 51 // 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 ); 54 54 // 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' ); 56 56 // API Handler 57 57 $handler = get_option( 'license_keys_api_handler', 'wp_ajax' ); 58 58 switch ( $handler ) { 59 59 case 'wp_rest': 60 $this->add_action( 'rest_api_init', 'WPRestController@init');60 $this->add_action( 'rest_api_init', 'WPRestController@init' ); 61 61 break; 62 62 case 'wp_ajax': 63 63 // - 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' ); 66 66 // - 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' ); 69 69 // - 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' ); 72 72 break; 73 73 default: … … 83 83 { 84 84 // 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' ); 88 89 // 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 ); 95 96 // 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 ); 98 99 // 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' ); 101 102 // 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 ); 104 105 } 105 106 } -
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 2 if(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 4 4 Plugin URI: https://www.10quality.com/product/woocommerce-license-keys/ 5 5 Description: Enable and handle "License Keys" with WooCommerce. 6 Version: 1.4. 06 Version: 1.4.1 7 7 Author: 10 Quality 8 8 Author URI: https://www.10quality.com/ … … 12 12 13 13 WC requires at least: 3 14 WC tested up to: 4. 014 WC tested up to: 4.3 15 15 16 16 See "LICENSE" file. -
woo-license-keys/trunk/vendor/10quality/wp-query-builder/composer.json
r2274899 r2362481 28 28 "psr-4": { 29 29 "TenQuality\\WP\\Database\\": "src" 30 } 30 }, 31 "files": [ 32 "src/Lib/functions.php" 33 ] 31 34 }, 32 35 "minimum-stability": "dev" -
woo-license-keys/trunk/vendor/10quality/wp-query-builder/src/Abstracts/DataModel.php
r2274899 r2362481 10 10 * Custom table data model. 11 11 * 12 * @author Local Vibes <https://localvibes.co/> Hyper Tribal13 12 * @author 10 Quality <info@10quality.com> 14 13 * @license MIT -
woo-license-keys/trunk/vendor/10quality/wp-query-builder/src/QueryBuilder.php
r2274899 r2362481 12 12 * @license MIT 13 13 * @package wp-query-builder 14 * @version 1.0. 714 * @version 1.0.11 15 15 */ 16 16 class QueryBuilder … … 29 29 protected $builder; 30 30 /** 31 * Builder options. 32 * @since 1.0.11 33 * @var array 34 */ 35 protected $options; 36 /** 31 37 * Builder constructor. 32 38 * @since 1.0.0 33 39 * 34 * @param string $id40 * @param string|null $id 35 41 */ 36 42 public function __construct( $id = null ) … … 48 54 'offset' => 0, 49 55 ]; 56 $this->options = [ 57 'wildcard' => '{%}', 58 'default_wildcard' => '{%}', 59 ]; 50 60 } 51 61 /** … … 132 142 global $wpdb; 133 143 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 134 148 $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']; 135 151 $sanitize_callback = is_array( $value ) && array_key_exists( 'sanitize_callback', $value ) 136 152 ? $value['sanitize_callback'] 137 153 : true; 138 if ( $sanitize_callback ) 154 if ( $sanitize_callback 155 && $key !== 'raw' 156 && ( !is_array( $value ) || !array_key_exists( 'key', $value ) ) 157 ) 139 158 $arg_value = $this->sanitize_value( $sanitize_callback, $arg_value ); 140 159 $statement = $key === 'raw' … … 142 161 : [ 143 162 $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'] 147 166 : ( is_array( $arg_value ) 148 167 ? ( '(\'' . implode( '\',\'', $arg_value ) . '\')' ) 149 168 : ( $arg_value === null 150 169 ? '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 ) 152 171 ) 153 172 ), 154 173 ]; 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 } 155 197 $this->builder['where'][] = [ 156 198 'joint' => is_array( $value ) && isset( $value['joint'] ) ? $value['joint'] : 'AND', 157 199 'condition' => implode( ' ', $statement ), 158 200 ]; 201 // Options - reset 202 if ( is_array( $value ) && array_key_exists( 'wildcard', $value ) && !empty( $value['wildcard'] ) ) 203 $this->options['wildcard'] = $this->options['default_wildcard']; 159 204 } 160 205 return $this; … … 166 211 * @global object $wpdb 167 212 * 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. 172 219 * 173 220 * @return \TenQuality\WP\Database\QueryBuilder this for chaining. 174 221 */ 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 ); 177 227 global $wpdb; 178 228 $join = [ 179 229 'table' => ( $add_prefix ? $wpdb->prefix : '' ) . $table, 180 ' left' => $left,230 'type' => $type, 181 231 'on' => [], 182 232 ]; 183 233 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 184 238 $arg_value = isset( $argument['value'] ) ? $argument['value'] : null; 239 if ( array_key_exists( 'min', $argument ) ) 240 $arg_value = $argument['min']; 185 241 $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 ) 187 246 $arg_value = $this->sanitize_value( $sanitize_callback, $arg_value ); 188 247 $statement = array_key_exists( 'raw', $argument ) 189 ? $argument['raw']190 : implode( ' ',[248 ? [$argument['raw']] 249 : [ 191 250 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 ) 194 253 ? $argument['key_b'] 195 254 : ( is_array( $arg_value ) … … 197 256 : ( $arg_value === null 198 257 ? '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 ) 200 259 ) 201 260 ), 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 } 203 285 $join['on'][] = [ 204 286 'joint' => isset( $argument['joint'] ) ? $argument['joint'] : 'AND', 205 'condition' => $statement,287 'condition' => implode( ' ', $statement ), 206 288 ]; 289 // Options - reset 290 if ( array_key_exists( 'wildcard', $argument ) && !empty( $argument['wildcard'] ) ) 291 $this->options['wildcard'] = $this->options['default_wildcard']; 207 292 } 208 293 $this->builder['join'][] = $join; … … 420 505 } 421 506 /** 422 * Retu nrs column results from builder statements.507 * Returns column results from builder statements. 423 508 * @since 1.0.6 424 509 * … … 453 538 } 454 539 /** 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 /** 455 613 * Retunrs found rows in last query, if SQL_CALC_FOUND_ROWS is used and is supported. 456 614 * @since 1.0.6 … … 478 636 private function _query_select( &$query, $calc_rows = false ) 479 637 { 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 : '*' 483 642 ); 484 643 } … … 502 661 { 503 662 foreach ( $this->builder['join'] as $join ) { 504 $query .= ( $join['left'] ? ' LEFTJOIN ' : ' JOIN ' ) . $join['table'];663 $query .= ( !empty( $join['type'] ) ? ' ' . $join['type'] . ' JOIN ' : ' JOIN ' ) . $join['table']; 505 664 for ( $i = 0; $i < count( $join['on'] ); ++$i ) { 506 665 $query .= ( $i === 0 ? ' ON ' : ' ' . $join['on'][$i]['joint'] . ' ' ) … … 582 741 if ( $this->builder['offset'] ) 583 742 $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 ) ); 584 756 } 585 757 /** … … 623 795 { 624 796 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 ) ) ) ; 626 801 } 627 802 /** -
woo-license-keys/trunk/vendor/10quality/wp-query-builder/src/Traits/DataModelTrait.php
r2274899 r2362481 8 8 * Static methods for data models. 9 9 * 10 * @author Local Vibes <https://localvibes.co/>11 * @ copyright Local Vibes12 * @package localvibes13 * @version 1.0. 710 * @author 10 Quality <info@10quality.com> 11 * @license MIT 12 * @package wp-query-builder 13 * @version 1.0.9 14 14 */ 15 15 trait DataModelTrait … … 22 22 * @param mixed $id 23 23 * 24 * @return \TenQuality\WP\Database\Abstracts\DataModel 24 * @return \TenQuality\WP\Database\Abstracts\DataModel|null 25 25 */ 26 26 public static function find( $id ) -
woo-license-keys/trunk/vendor/10quality/wpmvc-core/src/lib/functions.php
r2241305 r2362481 17 17 * @license MIT 18 18 * @package WPMVC 19 * @version 3.1.1 0.119 * @version 3.1.12 20 20 */ 21 21 … … 87 87 // WPML support 88 88 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 ); 91 90 } 92 91 // Clean base path -
woo-license-keys/trunk/vendor/10quality/wpmvc-core/src/psr4/Bridge.php
r2274899 r2362481 21 21 * @license MIT 22 22 * @package WPMVC 23 * @version 3.1.1 123 * @version 3.1.13 24 24 */ 25 25 abstract class Bridge implements Plugable … … 417 417 * @param bool $enqueue Flag that indicates if asset should be enqueued upon registration. 418 418 * @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. 420 421 * @param bool $is_admin Flag that indicates if asset should be enqueue on admin. 421 422 * @param string $version Asset version. 422 423 * @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; 429 429 $this->assets[] = [ 430 430 'path' => $asset, 431 431 'enqueue' => $enqueue, 432 432 'dep' => $dep, 433 'f ooter' => $footer,433 'flag' => $flag, 434 434 'is_admin' => $is_admin, 435 435 'version' => $version, … … 441 441 * Adds hooks and filters into WordPress core. 442 442 * @since 1.0.3 443 * @since 2.0.4 Added models.444 * @since 2.0.7 Added assets.445 443 */ 446 444 public function add_hooks() … … 605 603 public function _assets() 606 604 { 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'; 608 606 $dir = $this->config->get( 'paths.base' ) 609 607 ? $this->config->get( 'paths.base' ) … … 614 612 ? $asset['name_id'] 615 613 : strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) ) 616 . '-' . strtolower( $this->config->get( 'namespace') );614 . '-' . strtolower( $this->config->get( 'namespace' ) ); 617 615 $asset_version = empty( $asset['version'] ) ? $version : $asset['version']; 618 616 // Styles … … 622 620 assets_url( $asset['path'], $dir ), 623 621 $asset['dep'], 624 $asset_version 622 $asset_version, 623 $asset['flag'] 625 624 ); 626 625 if ($asset['enqueue']) … … 630 629 $asset['dep'], 631 630 $asset_version, 632 $asset['f ooter']631 $asset['flag'] 633 632 ); 634 633 } … … 639 638 assets_url( $asset['path'], $dir ), 640 639 $asset['dep'], 641 $asset_version 640 $asset_version, 641 $asset['flag'] 642 642 ); 643 643 if ($asset['enqueue']) … … 647 647 $asset['dep'], 648 648 $asset_version, 649 $asset['f ooter']649 $asset['flag'] 650 650 ); 651 651 } … … 659 659 public function _admin_assets() 660 660 { 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'; 662 662 $dir = $this->config->get( 'paths.base' ) 663 663 ? $this->config->get( 'paths.base' ) … … 668 668 ? $asset['name_id'] 669 669 : strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) ) 670 . '-' . strtolower( $this->config->get( 'namespace') );670 . '-' . strtolower( $this->config->get( 'namespace' ) ); 671 671 $asset_version = empty( $asset['version'] ) ? $version : $asset['version']; 672 672 // Styles … … 676 676 assets_url( $asset['path'], $dir ), 677 677 $asset['dep'], 678 $asset_version 678 $asset_version, 679 $asset['flag'] 679 680 ); 680 681 if ($asset['enqueue']) … … 684 685 $asset['dep'], 685 686 $asset_version, 686 $asset['f ooter']687 $asset['flag'] 687 688 ); 688 689 } … … 693 694 assets_url( $asset['path'], $dir ), 694 695 $asset['dep'], 695 $asset_version 696 $asset_version, 697 $asset['flag'] 696 698 ); 697 699 if ($asset['enqueue']) … … 701 703 $asset['dep'], 702 704 $asset_version, 703 $asset['f ooter']705 $asset['flag'] 704 706 ); 705 707 } … … 746 748 * Override mvc arguments with those defined when adding an action or filter. 747 749 * @since 1.0.3 748 * @since 3.1.5 Mapping parameters support.749 750 * 750 751 * @param string $mvc_call Lightweight MVC call. (i.e. 'Controller@method') … … 869 870 : __DIR__; 870 871 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 ) ) ) { 872 873 $this->add_asset( 873 874 $asset['asset'], 874 875 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 ), 877 878 array_key_exists( 'is_admin', $asset ) ? $asset['is_admin'] : false, 878 879 array_key_exists( 'version', $asset ) ? $asset['version'] : null, 879 880 array_key_exists( 'id', $asset ) ? $asset['id'] : null 880 881 ); 882 } 881 883 } 882 884 } -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/README.md
r1831059 r2362481 1 # LIGHTWEIGHT MVC (For Word press MVC)1 # LIGHTWEIGHT MVC (For WordPress MVC) 2 2 -------------------------------- 3 3 … … 8 8 Forked version for WPMVC. 9 9 10 **Lightweight MVC** is a small framework that adds *Models*, *Views* and *Controllers* to your custom **Word press** plugin or theme.10 **Lightweight MVC** is a small framework that adds *Models*, *Views* and *Controllers* to your custom **WordPress** plugin or theme. 11 11 12 Lightweight MVC utilices existing Word press functionality preventing from overloading the already heavy loaded Wordpress core.12 Lightweight MVC utilices existing WordPress functionality preventing from overloading the already heavy loaded WordPress core. 13 13 14 This framework was inspired by **Laravel** to add the MVC design pattern to Word press development in an efficient, elegant and optimized way.14 This framework was inspired by **Laravel** to add the MVC design pattern to WordPress development in an efficient, elegant and optimized way. 15 15 16 16 ## Coding Guidelines 17 17 18 The coding is a mix between PSR-2 and Word press PHP guidelines.18 The coding is a mix between PSR-2 and WordPress PHP guidelines. 19 19 20 20 ## License -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/composer.json
r2119514 r2362481 1 1 { 2 2 "name": "10quality/wpmvc-mvc", 3 "description": "Lightweight MVC for WPMVC (Word press MVC framework).",3 "description": "Lightweight MVC for WPMVC (WordPress MVC framework).", 4 4 "license": "MIT", 5 5 "keywords": ["wordpress","mvc","lightweight","light"], -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/phpunit.xml
r1831059 r2362481 7 7 convertNoticesToExceptions="true" 8 8 convertWarningsToExceptions="true" 9 stopOnFailure="true" 10 syntaxCheck="true"> 9 stopOnFailure="true"> 11 10 <testsuites> 12 <testsuite name=" Package Test Suite">11 <testsuite name="WordPress MVC - MVC"> 13 12 <directory>./tests/cases/</directory> 14 13 </testsuite> -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Controller.php
r2092617 r2362481 29 29 * Default construct. 30 30 * @since 1.0.0 31 * @since 2.0.4 Allows controller to be called prio s wordpress init.31 * @since 2.0.4 Allows controller to be called prior to WordPress init. 32 32 * 33 33 * @param object $view View class object. -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Controllers/ModelController.php
r2092617 r2362481 25 25 protected $model = ''; 26 26 /** 27 * Flag that indic tes if model will save on autosave.27 * Flag that indicates if model will save on autosave. 28 28 * @since 1.0.0 29 29 * @var bool -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Engine.php
r2092617 r2362481 79 79 * 80 80 * @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. 82 82 */ 83 83 public function call_args( $controller_name, $args ) … … 108 108 * 109 109 * @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. 111 111 * 112 112 * @return mixed … … 125 125 * 126 126 * @param string $controller_name Controller name and method. i.e. DealController@show 127 * @param array $args Controller parameters.127 * @param array $args Controller parameters. 128 128 */ 129 129 private function run( $controller_name, $args ) -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/CategoryModel.php
r2092617 r2362481 101 101 * Loads user meta data. 102 102 * @since 1.0.0 103 * @since 2.1.1 Uses wordpress serialization.103 * @since 2.1.1 Uses WordPress serialization. 104 104 */ 105 105 public function load_meta() … … 173 173 * Either adds or updates a meta. 174 174 * @since 1.0.0 175 * @since 2.1.1 Uses wordpress serialization.176 * @since 2.1.2 Removed serialization, already done by wp.177 175 * 178 176 * @param string $key Key. … … 183 181 if ( $update_array ) 184 182 $this->set_meta($key, $value); 185 186 183 try { 187 184 update_term_meta( $this->term_id, $key, $value ); -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/Common/Attachment.php
r1843081 r2362481 11 11 /** 12 12 * Attachment model. 13 * Common Word press post type model.13 * Common WordPress post type model. 14 14 * 15 15 * @author Alejandro Mostajo <http://about.me/amostajo> -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/OptionModel.php
r2092617 r2362481 8 8 use WPMVC\MVC\Contracts\JSONable; 9 9 use WPMVC\MVC\Contracts\Stringable; 10 use WPMVC\MVC\Contracts\Traceable; 10 11 use WPMVC\MVC\Traits\GenericModelTrait; 11 12 use WPMVC\MVC\Traits\AliasTrait; … … 13 14 14 15 /** 15 * Abstract Model Class based on Word press Model.16 * Abstract Model Class based on WordPress Model. 16 17 * 17 18 * @author Alejandro Mostajo <http://about.me/amostajo> … … 21 22 * @version 1.0.0 22 23 */ 23 abstract class OptionModel implements Findable, Modelable, Arrayable, JSONable, Stringable 24 abstract class OptionModel implements Findable, Modelable, Arrayable, JSONable, Stringable, Traceable 24 25 { 25 26 use GenericModelTrait, AliasTrait, CastTrait; … … 109 110 } 110 111 /** 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 /** 111 122 * Fills default when about to create object 112 123 * @since 1.0.0 -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/PostModel.php
r2092617 r2362481 3 3 namespace WPMVC\MVC\Models; 4 4 5 use WP_Post; 5 6 use WPMVC\MVC\Contracts\Modelable; 6 7 use WPMVC\MVC\Contracts\Findable; … … 11 12 use WPMVC\MVC\Contracts\JSONable; 12 13 use WPMVC\MVC\Contracts\Stringable; 14 use WPMVC\MVC\Contracts\Traceable; 13 15 use WPMVC\MVC\Traits\MetaTrait; 14 16 use WPMVC\MVC\Traits\PostCastTrait; … … 26 28 * @license MIT 27 29 * @package WPMVC\MVC 28 * @version 2.1. 530 * @version 2.1.11 29 31 */ 30 32 abstract class PostModel implements Modelable, Findable, Metable, Parentable, PostCastable, Arrayable, JSONable, Stringable … … 84 86 protected $registry_labels = []; 85 87 /** 86 * Word press support for during registration.88 * WordPress support for during registration. 87 89 * @since 1.0.1 88 90 * @var array … … 123 125 * Default constructor. 124 126 * @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 } 130 141 } 131 142 /** … … 137 148 public function load( $id ) 138 149 { 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 ); 141 174 } 142 175 /** … … 144 177 * @since 1.0.0 145 178 * 146 * @return mixed.179 * @return bool|\WP_Error. 147 180 */ 148 181 public function save() … … 150 183 if ( ! $this->is_loaded() ) return false; 151 184 $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; 156 190 $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 ); 159 194 } 160 195 /** … … 181 216 } 182 217 /** 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 /** 183 228 * Getter function. 184 229 * @since 1.0.0 185 * @since 2.0.4 Added relationships.186 * @since 2.1.5 Bug fixing.187 230 * 188 231 * @param string $property … … 190 233 * @return mixed 191 234 */ 192 public function __get( $property ) 193 { 235 public function &__get( $property ) 236 { 237 $value = null; 194 238 $property = $this->get_alias_property( $property ); 195 239 if ( method_exists( $this, $property ) ) { 196 return $this->get_relationship( $property ); 240 $rel = $this->get_relationship( $property ); 241 if ( $rel ) 242 return $rel; 197 243 } 198 244 if ( preg_match( '/meta_/', $property ) ) { 199 return$this->get_meta( preg_replace( '/meta_/', '', $property ) );245 $value = $this->get_meta( preg_replace( '/meta_/', '', $property ) ); 200 246 } else if ( preg_match( '/func_/', $property ) ) { 201 247 $function_name = preg_replace( '/func_/', '', $property ); 202 return$this->$function_name();248 $value = $this->$function_name(); 203 249 } if ( is_array( $this->attributes ) && array_key_exists( $property, $this->attributes ) ) { 204 250 return $this->attributes[$property]; … … 218 264 return $this->$property; 219 265 case 'post_content_filtered': 220 $content = apply_filters( 'the_content', $this->attributes[$property] ); 221 $content = str_replace( ']]>', ']]>', $content ); 222 return $content; 266 $value = apply_filters( 'the_content', $this->attributes[$property] ); 267 $value = str_replace( ']]>', ']]>', $content ); 223 268 } 224 269 } 225 return null;270 return $value; 226 271 } 227 272 /** … … 231 276 private function fill_defaults() 232 277 { 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' ); 237 293 } 238 294 } -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/Relationship.php
r1831059 r2362481 57 57 public $class; 58 58 /** 59 * Property in class that is mapped to the inde fier of the relationship model.59 * Property in class that is mapped to the indentifier of the relationship model. 60 60 * @since 2.0.4 61 61 * … … 90 90 * @param object|Model &$parent Parent class reference. 91 91 * @param string|mixed $class Relationship model class name. 92 * @param string $property Property in class that is mapped to the inde fier of the relationship model.92 * @param string $property Property in class that is mapped to the indentifier of the relationship model. 93 93 * @param string $method Method in relationship model used to load it. 94 94 * @param string $type Relationship type. -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/TermModel.php
r2092617 r2362481 10 10 use WPMVC\MVC\Contracts\Stringable; 11 11 use WPMVC\MVC\Contracts\Metable; 12 use WPMVC\MVC\Contracts\Traceable; 12 13 use WPMVC\MVC\Traits\AliasTrait; 13 14 use WPMVC\MVC\Traits\CastTrait; … … 23 24 * @license MIT 24 25 * @package WPMVC\MVC 25 * @version 2.1. 526 * @version 2.1.11 26 27 */ 27 abstract class TermModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable 28 abstract class TermModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable, Traceable 28 29 { 29 30 use AliasTrait, CastTrait, SetterTrait, GetterTrait, ArrayCastTrait; … … 80 81 { 81 82 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 } 84 88 } 85 89 } … … 93 97 { 94 98 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 } 97 104 } 98 105 } … … 268 275 } 269 276 } 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 } 270 287 } -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Models/UserModel.php
r2092617 r2362481 3 3 namespace WPMVC\MVC\Models; 4 4 5 use WP_User; 5 6 use ReflectionClass; 6 7 use WPMVC\MVC\Contracts\Modelable; … … 10 11 use WPMVC\MVC\Contracts\Stringable; 11 12 use WPMVC\MVC\Contracts\Metable; 13 use WPMVC\MVC\Contracts\Traceable; 12 14 use WPMVC\MVC\Traits\AliasTrait; 13 15 use WPMVC\MVC\Traits\CastTrait; … … 23 25 * @license MIT 24 26 * @package WPMVC\MVC 25 * @version 2.1.1 27 * @version 2.1.11 26 28 */ 27 abstract class UserModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable 29 abstract class UserModel implements Modelable, Findable, Metable, JSONable, Stringable, Arrayable, Traceable 28 30 { 29 31 use AliasTrait, CastTrait, SetterTrait, GetterTrait, ArrayCastTrait; … … 46 48 */ 47 49 protected $hidden = []; 50 /** 51 * WordPress user object. 52 * @since 2.1.11 53 * @var \WP_User|null 54 */ 55 protected $__wp_user; 48 56 /** 49 57 * Flag that indicates if model should decode meta string values identified as JSON. … … 65 73 } 66 74 /** 67 * Returns current user.68 * @since 1.0.069 *70 * @return mixed71 */72 public static function current()73 {74 return self::find( get_current_user_id() );75 }76 /**77 75 * Loads user data. 78 76 * @since 1.0.0 … … 83 81 { 84 82 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; 86 99 $this->load_meta(); 87 100 } … … 90 103 * Deletes user. 91 104 * @since 1.0.0 105 * 106 * @return bool 92 107 */ 93 108 public function delete() 94 109 { 95 // TODO110 return $this->ID ? wp_delete_user( $this->ID ) : false; 96 111 } 97 112 /** … … 104 119 public function save() 105 120 { 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 110 138 $this->save_meta_all(); 111 139 return true; … … 114 142 * Loads user meta data. 115 143 * @since 1.0.0 116 * @since 2.1.1 Uses wordpress serialization.117 144 */ 118 145 public function load_meta() … … 135 162 } 136 163 /** 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 /** 137 174 * Returns flag indicating if object has meta key. 138 175 * @since 1.0.0 … … 184 221 * Either adds or updates a meta. 185 222 * @since 1.0.0 186 * @since 2.1.1 Uses wordpress serialization.187 * @since 2.1.2 Removed serialization, already done by wp.188 223 * 189 224 * @param string $key Key. … … 209 244 } 210 245 } 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 } 211 256 } -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTermTrait.php
r2092617 r2362481 12 12 * @license MIT 13 13 * @package WPMVC\MVC 14 * @version 2.1. 514 * @version 2.1.11.1 15 15 */ 16 16 trait FindTermTrait … … 22 22 * @param mixed $id Record ID. 23 23 * @param string $taxonomy Taxonomy. 24 * 25 * @return object|null 24 26 */ 25 27 public static function find( $id = 0, $taxonomy = null ) 26 28 { 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; 28 33 } 29 34 /** … … 33 38 * @param string $slug Term slug. 34 39 * @param string $taxonomy Taxonomy. 40 * 41 * @return object|null 35 42 */ 36 43 public static function find_by_slug( $slug = 0, $taxonomy = null ) … … 38 45 $model = new self( $taxonomy, 0 ); 39 46 $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; 41 50 } 42 51 /** -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTrait.php
r2092617 r2362481 12 12 * @license MIT 13 13 * @package WPMVC\MVC 14 * @version 1.0.014 * @version 2.1.11.1 15 15 */ 16 16 trait FindTrait 17 17 { 18 19 18 /** 20 19 * Finds record based on an ID. … … 22 21 * 23 22 * @param mixed $id Record ID. 23 * 24 * @return object|null 24 25 */ 25 26 public static function find( $id = 0 ) 26 27 { 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; 28 32 } 29 33 /** … … 33 37 * @param int $id Parent post ID. 34 38 * 35 * @return array39 * @return \WPMVC\MVC\Collection 36 40 */ 37 41 public static function from( $id ) 38 42 { 39 43 if ( empty( $id ) ) return; 40 $output = new Collection ();44 $output = new Collection; 41 45 $reference = new self(); 42 46 $results = get_children( array( -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/MetaTrait.php
r2092617 r2362481 110 110 * @since 1.0.1 Hotfix, only saves registered meta. 111 111 * @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. 113 113 * 114 114 * @see https://codex.wordpress.org/Function_Reference/maybe_serialize -
woo-license-keys/trunk/vendor/10quality/wpmvc-mvc/src/Traits/RelationshipTrait.php
r1850510 r2362481 3 3 namespace WPMVC\MVC\Traits; 4 4 5 use ReflectionMethod; 5 6 use WPMVC\MVC\Collection; 6 7 use WPMVC\MVC\Models\Relationship; … … 14 15 * @license MIT 15 16 * @package WPMVC\MVC 16 * @version 2.1. 317 * @version 2.1.8 17 18 */ 18 19 trait RelationshipTrait … … 28 29 'belongs_to' => array(), 29 30 ); 30 31 31 /** 32 32 * Returns object or objects associated with relationship. … … 39 39 private function get_relationship( $method ) 40 40 { 41 $refletor = new ReflectionMethod( $this, $method ); 42 if ( $refletor->isPublic() || count( $refletor->getParameters() ) ) 43 return; 41 44 // Get relationship 42 45 $rel = call_user_func_array( array( &$this, $method ), array() ); 43 46 // Return on null 44 if ( $rel === null || !is_object( $rel ) )47 if ( $rel === null || !is_object( $rel ) || !$rel instanceof Relationship ) 45 48 return; 46 49 $property = $rel->property; … … 70 73 break; 71 74 case Relationship::HAS_MANY: 72 $rel->object = new Collection;75 $rel->object = []; 73 76 foreach ( $this->$property as $id ) { 74 77 if ($rel->function && $rel->method === null) { … … 96 99 * Returns relationship class. 97 100 * 1-to-1 Relationship. 98 * Owner relatio ship.101 * Owner relationship. 99 102 * @since 2.0.4 100 103 * 101 104 * @param string|mixed $class Relationship model class name. 102 * @param string $property Property in class that is mapped to the inde fier of the relationship model.105 * @param string $property Property in class that is mapped to the indentifier of the relationship model. 103 106 * @param string $method Method in relationship model used to load it. 104 107 * @param string $function Global function used to load relationship model. … … 122 125 * Returns relationship class. 123 126 * 1-to-1 Relationship. 124 * Owner relatio ship.127 * Owner relationship. 125 128 * @since 2.0.4 126 129 * 127 130 * @param string|mixed $class Relationship model class name. 128 * @param string $property Property in class that is mapped to the inde fier of the relationship model.131 * @param string $property Property in class that is mapped to the indentifier of the relationship model. 129 132 * @param string $method Method in relationship model used to load it. 130 133 * @param string $function Global function used to load relationship model. … … 148 151 * Returns relationship class. 149 152 * 1-to-N Relationship. 150 * Owner relatio ship.153 * Owner relationship. 151 154 * @since 2.0.4 152 155 * 153 156 * @param string|mixed $class Relationship model class name. 154 * @param string $property Property in class that is mapped to the inde fier of the relationship model.157 * @param string $property Property in class that is mapped to the indentifier of the relationship model. 155 158 * @param string $method Method in relationship model used to load it. 156 159 * @param string $function Global function used to load relationship model. … … 173 176 /** 174 177 * Returns relationship class. 175 * Standard Word press featured attachment relationship.178 * Standard WordPress featured attachment relationship. 176 179 * @since 2.0.4 177 180 * @since 2.1.3 Remove `::class` to support php 5.4. -
woo-license-keys/trunk/vendor/composer/autoload_files.php
r2274899 r2362481 10 10 'c607dd5e0d3f783ee5565b107740298c' => $vendorDir . '/10quality/wpmvc-core/src/lib/functions.php', 11 11 '5117276f634578e2f653b537c34c680d' => $vendorDir . '/10quality/wpmvc-addon/src/functions.php', 12 '11298418fac2d36d6d38c7c3efc5b206' => $vendorDir . '/10quality/wp-query-builder/src/Lib/functions.php', 12 13 '3a37b78545ce53c7fa6c797d9fa036ea' => $baseDir . '/app/Lib/functions.php', 13 14 ); -
woo-license-keys/trunk/vendor/composer/autoload_static.php
r2274899 r2362481 11 11 'c607dd5e0d3f783ee5565b107740298c' => __DIR__ . '/..' . '/10quality/wpmvc-core/src/lib/functions.php', 12 12 '5117276f634578e2f653b537c34c680d' => __DIR__ . '/..' . '/10quality/wpmvc-addon/src/functions.php', 13 '11298418fac2d36d6d38c7c3efc5b206' => __DIR__ . '/..' . '/10quality/wp-query-builder/src/Lib/functions.php', 13 14 '3a37b78545ce53c7fa6c797d9fa036ea' => __DIR__ . '/../..' . '/app/Lib/functions.php', 14 15 ); -
woo-license-keys/trunk/vendor/composer/installed.json
r2274899 r2362481 140 140 }, 141 141 { 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 { 142 518 "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", 145 521 "source": { 146 522 "type": "git", 147 523 "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", 154 530 "shasum": "" 155 531 }, … … 160 536 "phpunit/phpunit": "7.5.*" 161 537 }, 162 "time": "20 19-06-04T21:22:07+00:00",538 "time": "2020-06-28T19:05:43+00:00", 163 539 "type": "library", 164 540 "installation-source": "source", … … 182 558 } 183 559 ], 184 "description": "Lightweight MVC for WPMVC (Word press MVC framework).",560 "description": "Lightweight MVC for WPMVC (WordPress MVC framework).", 185 561 "keywords": [ 186 562 "light", … … 191 567 }, 192 568 { 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 {234 569 "name": "nikic/php-parser", 235 570 "version": "dev-master", … … 238 573 "type": "git", 239 574 "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", 246 581 "shasum": "" 247 582 }, … … 251 586 }, 252 587 "require-dev": { 253 "ircmaxell/php-yacc": " 0.0.5",254 "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 "255 }, 256 "time": "2020-0 2-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", 257 592 "bin": [ 258 593 "bin/php-parse" … … 261 596 "extra": { 262 597 "branch-alias": { 263 "dev-master": "4. 3-dev"598 "dev-master": "4.8-dev" 264 599 } 265 600 }, … … 286 621 }, 287 622 { 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 {522 623 "name": "10quality/wpmvc-commands", 523 "version": "v1.1.1 0",524 "version_normalized": "1.1.1 0.0",624 "version": "v1.1.11", 625 "version_normalized": "1.1.11.0", 525 626 "source": { 526 627 "type": "git", 527 628 "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", 534 635 "shasum": "" 535 636 }, … … 542 643 "phpunit/phpunit": "8.0.*" 543 644 }, 544 "time": "2020-0 2-15T07:01:15+00:00",645 "time": "2020-08-13T16:28:07+00:00", 545 646 "type": "library", 546 647 "installation-source": "source", … … 569 670 }, 570 671 { 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 {672 672 "name": "10quality/wp-query-builder", 673 673 "version": "v1.0.x-dev", … … 676 676 "type": "git", 677 677 "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", 684 684 "shasum": "" 685 685 }, … … 691 691 "phpunit/phpunit": "8.0.*" 692 692 }, 693 "time": "2020-0 2-15T00:37:32+00:00",693 "time": "2020-08-06T05:45:56+00:00", 694 694 "type": "library", 695 695 "installation-source": "source", … … 697 697 "psr-4": { 698 698 "TenQuality\\WP\\Database\\": "src" 699 } 699 }, 700 "files": [ 701 "src/Lib/functions.php" 702 ] 700 703 }, 701 704 "notification-url": "https://packagist.org/downloads/",
Note: See TracChangeset
for help on using the changeset viewer.