Changeset 2331812
- Timestamp:
- 06/28/2020 01:54:01 AM (6 years ago)
- Location:
- simple-post-gallery/trunk
- Files:
-
- 2 added
- 1 deleted
- 36 edited
-
README.txt (modified) (2 diffs)
-
app/Config/app.php (modified) (1 diff)
-
app/Controllers/GalleryController.php (modified) (2 diffs)
-
app/Controllers/NoticeController.php (modified) (1 diff)
-
app/Controllers/VideoController.php (modified) (6 diffs)
-
app/Main.php (modified) (2 diffs)
-
app/Models/Attachment.php (modified) (5 diffs)
-
app/Models/Post.php (modified) (1 diff)
-
app/Models/PostGallery.php (modified) (2 diffs)
-
assets/js/jquery.min.js (deleted)
-
plugin.php (modified) (2 diffs)
-
vendor/10quality/wpmvc-core/src/lib/functions.php (modified) (2 diffs)
-
vendor/10quality/wpmvc-core/src/psr4/Addon.php (modified) (1 diff)
-
vendor/10quality/wpmvc-core/src/psr4/Bridge.php (modified) (28 diffs)
-
vendor/10quality/wpmvc-core/src/psr4/Config.php (modified) (2 diffs)
-
vendor/10quality/wpmvc-core/src/psr4/Request.php (modified) (3 diffs)
-
vendor/10quality/wpmvc-core/src/psr4/Response.php (modified) (1 diff)
-
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) (5 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) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-post-gallery/trunk/README.txt
r2241498 r2331812 6 6 Requires at least: 3.2 7 7 Requires PHP: 5.4 8 Tested up to: 5. 39 Stable tag: 2.3.1 18 Tested up to: 5.4 9 Stable tag: 2.3.12 10 10 License: MIT 11 11 License URI: http://www.linfo.org/mitlicense.html … … 60 60 == Changelog == 61 61 62 = 2.3.12 = 63 *Release Date - 27 Jun 2020* 64 65 * Fixed bug related to imported videos on WordPress >= 5.4 66 * Framework files updated. 67 * Code refactor. 68 62 69 = 2.3.11 = 63 70 *Release Date - 9 Feb 2020* -
simple-post-gallery/trunk/app/Config/app.php
r2241498 r2331812 20 20 ], 21 21 22 'version' => '2.3.1 1',22 'version' => '2.3.12', 23 23 24 24 'author' => '10 Quality Studio <https://www.10quality.com/>', -
simple-post-gallery/trunk/app/Controllers/GalleryController.php
r2241498 r2331812 43 43 if ( $post->gallery ) 44 44 return $post->gallery; 45 } catch ( Exception $e) {45 } catch ( Exception $e ) { 46 46 Log::error( $e ); 47 47 } … … 173 173 return; 174 174 175 $nonce = Request::input( 'metabox_gallery_nonce', '', true );175 $nonce = Request::input( 'metabox_gallery_nonce', '', true, false ); 176 176 177 177 if ( (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) -
simple-post-gallery/trunk/app/Controllers/NoticeController.php
r2241498 r2331812 42 42 } 43 43 */ 44 // TODO future notices45 44 } 46 45 } -
simple-post-gallery/trunk/app/Controllers/VideoController.php
r2241498 r2331812 16 16 * @copyright 10Quality <http://www.10quality.com> 17 17 * @package simple-post-gallery 18 * @version 2. 2.018 * @version 2.3.12 19 19 */ 20 20 class VideoController extends Controller … … 207 207 $image_url = 'https://img.youtube.com/vi/'.$id.'/hqdefault.jpg'; 208 208 // SIMULATE AN UPLOAD 209 $attachment_id = $this->create_from_thumbnail( $image_url );209 $attachment_id = $this->create_from_thumbnail( $image_url, $id ); 210 210 if ( $attachment_id ) { 211 211 $model = Attachment::find( $attachment_id ); … … 223 223 // SIMULATE AN UPLOAD 224 224 $attachment_id = $this->create_from_thumbnail( 225 isset( $hash[0]['thumbnail_large'] ) ? $hash[0]['thumbnail_large'] : $hash[0]['thumbnail_medium'] 225 isset( $hash[0]['thumbnail_large'] ) ? $hash[0]['thumbnail_large'] : $hash[0]['thumbnail_medium'], 226 $id 226 227 ); 227 228 if ( $attachment_id ) { … … 243 244 * 244 245 * @param string $url 246 * @param string $video_id 245 247 * 246 248 * @return int|bool 247 249 */ 248 private function create_from_thumbnail( $url )250 private function create_from_thumbnail( $url, $video_id ) 249 251 { 250 252 $tmp = download_url( $url ); 251 if( is_wp_error( $tmp ) ){ 253 if( is_wp_error( $tmp ) ) { 254 Log::error( new Exception( 'WP_Error:' . implode( ' | ', $tmp->get_error_messages() ) ) ); 252 255 return false; 253 256 } … … 255 258 // Set variables for storage 256 259 // fix file filename for query strings 257 preg_match( '/[^\?]+\.(jpg|jpe|jpeg|gif|png)/i', $url, $matches);258 $file_array['name'] = basename($matches[0]);260 preg_match( '/[^\?]+\.(jpg|jpe|jpeg|gif|png)/i', $url, $matches ); 261 $file_array['name'] = isset( $matches[0] ) ? basename( $matches[0] ) : $video_id . '.jpg'; 259 262 $file_array['tmp_name'] = $tmp; 260 263 // If error storing temporarily, unlink 261 264 if ( is_wp_error( $tmp ) ) { 262 @unlink( $file_array['tmp_name']);265 @unlink( $file_array['tmp_name'] ); 263 266 $file_array['tmp_name'] = ''; 264 267 } 265 268 // Store 266 269 $id = media_handle_sideload( $file_array, 0 ); 267 268 270 // If error storing permanently, unlink 269 if ( is_wp_error($id) ) { 270 @unlink($file_array['tmp_name']); 271 if ( is_wp_error( $id ) ) { 272 Log::error( new Exception( 'WP_Error:' . implode( ' | ', $tmp->get_error_messages() ) ) ); 273 @unlink( $file_array['tmp_name'] ); 271 274 return false; 272 275 } … … 348 351 return $post; 349 352 } 353 /** 354 * Returns attachment metadata. 355 * This is a small hack to add 'full' index if missing. 356 * @since 2.3.12 357 * 358 * @hook wp_get_attachment_metadata 359 * 360 * @param array $data 361 * @param int $attachment_id 362 * 363 * @return array 364 */ 365 public function metadata( $data, $attachment_id ) 366 { 367 $attachment = Attachment::find( $attachment_id ); 368 if ( $attachment->is_video && !array_key_exists( 'full', $data['sizes'] ) ) { 369 $data['sizes']['full'] = [ 370 'file' => preg_replace( '/[\s\S]+\//', '', $data['file'] ), 371 'width' => $data['width'], 372 'height' => $data['height'], 373 'mime-type' => strpos( $data['file'], '.jpg' ) ? 'image/jpeg' : 'image/png', 374 ]; 375 } 376 return $data; 377 } 350 378 } -
simple-post-gallery/trunk/app/Main.php
r2241498 r2331812 12 12 * @copyright 10 Quality 13 13 * @package simple-post-gallery 14 * @version 2.3. 214 * @version 2.3.12 15 15 */ 16 16 class Main extends Bridge … … 34 34 $this->add_action('wp_ajax_video_importer_validate', 'VideoController@ajax_validate'); 35 35 $this->add_action('wp_ajax_video_importer_import', 'VideoController@ajax_import'); 36 $this->add_filter( 'wp_get_attachment_metadata', 'VideoController@metadata', 15, 2 ); 36 37 // -- Gutenberg 37 38 if ( function_exists( 'register_block_type' ) ) -
simple-post-gallery/trunk/app/Models/Attachment.php
r2241498 r2331812 54 54 * Hidden attributes in Array and JSON casting. 55 55 * @since 2.0.0 56 * @since 2.2.1 Added is_lightbox, video_thumb and no_thumb_url.57 56 * @var array 58 57 */ … … 93 92 * Returns image with proper edit resolution. 94 93 * @since 1.0.0 95 * @since 1.0.3 Adds ID on resize.96 * @since 1.0.5 ID passed as reference.97 94 * 98 95 * @return string … … 124 121 * Returns flag indicating if attachement is a supported video. 125 122 * @since 2.1.0 126 * @since 2.2.1 Added video/mp4.127 123 * 128 124 * @return bool … … 150 146 * Returns attachment url at a specified resolution. 151 147 * @since 2.0.0 152 * @since 2.2.1 Support for no thumb media.153 148 * 154 149 * @param int $width Resolution width. … … 209 204 * Returns flag indicating if media is supported by lightbox solution. 210 205 * @since 2.2.1 211 * @since 2.2.4 All current are supported.212 206 * 213 207 * @return bool -
simple-post-gallery/trunk/app/Models/Post.php
r2241498 r2331812 42 42 * Returns relationship between post and attachments. 43 43 * @since 2.0.0 44 * @since 2.1.6 Fixes compatibility with php 5.4.45 44 * 46 45 * @return Relationship -
simple-post-gallery/trunk/app/Models/PostGallery.php
r2241498 r2331812 35 35 * Field aliases and definitions. 36 36 * @since 1.0.0 37 * @since 2.0.0 Added extra for custom data.38 37 * @var array 39 38 */ … … 49 48 * Instance constructor. 50 49 * @since 1.0.0 51 * @since 2.0.0 Cached removed.52 50 * 53 51 * @return this for chaining -
simple-post-gallery/trunk/plugin.php
r2241498 r2331812 4 4 Plugin URI: https://www.10quality.com/product/post-gallery-pro/ 5 5 Description: Adds Gallery of pictures, photos and videos (YouTube, Vimeo and MP4) to any post type. Developed for easy customization in themes. 6 Version: 2.3.1 16 Version: 2.3.12 7 7 Author: 10 Quality 8 8 Author URI: https://www.10quality.com/ … … 10 10 Text Domain: simple-post-gallery 11 11 Domain Path: /assets/languages/ 12 13 Requires PHP: 5.6 12 14 13 15 Copyright (c) 2018 10Quality - http://www.10quality.com -
simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/lib/functions.php
r2241498 r2331812 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 -
simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Addon.php
r1843712 r2331812 36 36 * Default constructor. 37 37 * @since 1.0.0 38 * @since 3.0.0 Main as reference, new addon MVC location.39 * @since 3.0.1 Fixes paths.40 38 * 41 39 * @see https://github.com/10quality/wpmvc-addon-template -
simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Bridge.php
r2241498 r2331812 21 21 * @license MIT 22 22 * @package WPMVC 23 * @version 3.1. 823 * @version 3.1.13 24 24 */ 25 25 abstract class Bridge implements Plugable 26 26 { 27 27 /** 28 * Configuration file. 28 * Main configuration file. 29 * @since 1.0.0 30 * @var \WPMVC\Config 31 */ 32 protected $config; 33 34 /** 35 * MVC engine. 36 * @since 1.0.0 37 * @var \WPMVC\MVC\Engine 38 */ 39 protected $mvc; 40 41 /** 42 * Add ons. 43 * @since 1.0.2 29 44 * @var array 30 * @since 1.0.0 31 */ 32 protected $config; 33 34 /** 35 * MVC engine. 36 * @var object Engine 37 * @since 1.0.0 38 */ 39 protected $mvc; 40 41 /** 42 * Add ons. 45 */ 46 protected $addons; 47 48 /** 49 * List of WordPress action hooks to add. 50 * @since 1.0.3 43 51 * @var array 44 * @since 1.0.245 */46 protected $addons; 47 48 /**49 * List of WordPress action hooks to add.52 */ 53 protected $actions; 54 55 /** 56 * List of WordPress filter hooks to add. 57 * @since 1.0.3 50 58 * @var array 51 * @since 1.0.352 */53 protected $actions; 54 55 /**56 * List of WordPress filter hooks to add.59 */ 60 protected $filters; 61 62 /** 63 * List of WordPress shortcodes to add. 64 * @since 1.0.3 57 65 * @var array 58 * @since 1.0.359 */60 protected $filters; 61 62 /**63 * List of WordPress shortcodes to add.66 */ 67 protected $shortcodes; 68 69 /** 70 * List of WordPress widgets to add. 71 * @since 1.0.3 64 72 * @var array 65 * @since 1.0.366 */67 protected $shortcodes; 68 69 /**70 * List of WordPress widgets to add.73 */ 74 protected $widgets; 75 76 /** 77 * List of Models (post_type) to add/register. 78 * @since 2.0.4 71 79 * @var array 72 * @since 1.0.373 */74 protected $widgets; 75 76 /**77 * List of Models (post_type) to add/register.80 */ 81 protected $models; 82 83 /** 84 * List of assets to register or enqueue. 85 * @since 2.0.7 78 86 * @var array 87 */ 88 protected $assets; 89 90 /** 91 * List of Models that requires bridge processing to function. 79 92 * @since 2.0.4 80 */81 protected $models;82 83 /**84 * List of assets to register or enqueue.85 93 * @var array 86 * @since 2.0.787 */88 protected $assets; 89 90 /**91 * List of Models that requires bridge processing to function.94 */ 95 protected $_automatedModels; 96 97 /** 98 * List of additional configuration files loaded per request. 99 * @since 3.1.11 92 100 * @var array 93 * @since 2.0.4 94 */ 95 protected $_automatedModels; 101 */ 102 protected $_configs; 96 103 97 104 /** 98 105 * Main constructor 99 106 * @since 1.0.0 100 * @since 2.0.3 Cache and log are obligatory configuration settings.101 * @since 2.0.4 Added models.102 * @since 2.0.7 Added assets.103 * @since 3.0.3 Added views alternative relative theme's path.104 * @since 3.0.4 Typo comma fix.105 * @since 3.1.0 Chages the way cache, log and assets are loaded.106 107 * 107 108 * @param array $config Configuration options. … … 116 117 $this->assets = []; 117 118 $this->_automatedModels = []; 119 $this->_configs = []; 118 120 $this->config = $config; 119 121 $this->mvc = new Engine( … … 178 180 * Checks "addon_" prefix to search for addon methods. 179 181 * @since 1.0.2 180 * @since 1.0.3 Added MVC controller and views direct calls.181 * @since 2.0.4 Added metabox generation.182 * @since 2.0.7 Metabox refactored.183 * @since 3.0.2 Returns addon method call.184 182 * 185 183 * @return mixed … … 260 258 * @since 1.0.1 261 259 * 262 * @param string $view Name and location of the view within " theme/views" path.260 * @param string $view Name and location of the view within "[project]/views" path. 263 261 * @param array $params View parameters passed by. 264 262 * … … 274 272 * @since 3.1.8 275 273 * 276 * @param string $view Name and location of the view within " theme/views" path.274 * @param string $view Name and location of the view within "[project]/views" path. 277 275 * @param array $params View parameters passed by. 278 276 * … … 416 414 * @since 2.0.7 417 415 * 418 * @param string $asset Asset relative path (within assets forlder). 419 * @param bool $enqueue Flag that indicates if asset should be enqueued upon registration. 420 * @param array $dep Dependencies. 421 * @param bool $footer Flag that indicates if asset should enqueue at page footer. 422 * @param bool $is_admin Flag that indicates if asset should be enqueue on admin. 423 */ 424 public function add_asset( $asset, $enqueue = true, $dep = [], $footer = null, $is_admin = false ) 425 { 426 if ( $footer === null ) 427 $footer = preg_match( '/\.js/', $asset ); 416 * @param string $asset Asset relative path (within assets forlder). 417 * @param bool $enqueue Flag that indicates if asset should be enqueued upon registration. 418 * @param array $dep Dependencies. 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. 421 * @param bool $is_admin Flag that indicates if asset should be enqueue on admin. 422 * @param string $version Asset version. 423 * @param string $name_id Asset name ID (slug). 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; 428 429 $this->assets[] = [ 429 430 'path' => $asset, 430 431 'enqueue' => $enqueue, 431 432 'dep' => $dep, 432 'f ooter' => $footer,433 'flag' => $flag, 433 434 'is_admin' => $is_admin, 435 'version' => $version, 436 'name_id' => $name_id, 434 437 ]; 435 438 } … … 438 441 * Adds hooks and filters into WordPress core. 439 442 * @since 1.0.3 440 * @since 2.0.4 Added models.441 * @since 2.0.7 Added assets.442 443 */ 443 444 public function add_hooks() … … 491 492 492 493 /** 494 * Returns a configuration file loaded as a Config class. 495 * @since 3.1.11 496 * 497 * @param string $config_file Configuration file name without extension. 498 * 499 * @return null|\WPMVC\Config 500 */ 501 public function load_config( $config_file ) 502 { 503 if ( !array_key_exists( $config_file, $this->_configs ) ) { 504 $filename = $this->config->get( 'paths.base' ) . 'Config/' . $config_file . '.php'; 505 $this->_configs[$config_file] = new Config( File::auth()->exists( $filename ) ? include $filename : [] ); 506 } 507 return $this->_configs[$config_file]; 508 } 509 510 /** 493 511 * Registers added widgets into WordPress. 494 512 * @since 1.0.3 … … 504 522 * Registers added models into WordPress. 505 523 * @since 2.0.4 506 * @since 2.0.7 Support for automated models with no registration.507 * @since 2.0.16 Registry supports508 524 */ 509 525 public function _models() … … 584 600 * Enqueues assets registered in class. 585 601 * @since 2.0.7 586 * @since 2.0.8 Bug fix.587 * @since 2.0.12 Dir __DIR__ checked on config.588 * @since 3.1.0 Doesn't load admin assets.589 602 */ 590 603 public function _assets() 591 604 { 592 $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'; 593 606 $dir = $this->config->get( 'paths.base' ) 594 607 ? $this->config->get( 'paths.base' ) … … 596 609 foreach ( $this->assets as $asset ) { 597 610 if ( isset( $asset['is_admin'] ) && $asset['is_admin'] ) continue; 598 $name = strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) ) 599 .'-'.strtolower( $this->config->get('namespace') ); 611 $name = !empty( $asset['name_id'] ) 612 ? $asset['name_id'] 613 : strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) ) 614 . '-' . strtolower( $this->config->get( 'namespace' ) ); 615 $asset_version = empty( $asset['version'] ) ? $version : $asset['version']; 600 616 // Styles 601 617 if ( preg_match( '/\.css/', $asset['path'] ) ) { … … 604 620 assets_url( $asset['path'], $dir ), 605 621 $asset['dep'], 606 $version 622 $asset_version, 623 $asset['flag'] 607 624 ); 608 625 if ($asset['enqueue']) … … 611 628 assets_url( $asset['path'], $dir ), 612 629 $asset['dep'], 613 $ version,614 $asset['f ooter']630 $asset_version, 631 $asset['flag'] 615 632 ); 616 633 } … … 621 638 assets_url( $asset['path'], $dir ), 622 639 $asset['dep'], 623 $version 640 $asset_version, 641 $asset['flag'] 624 642 ); 625 643 if ($asset['enqueue']) … … 628 646 assets_url( $asset['path'], $dir ), 629 647 $asset['dep'], 630 $ version,631 $asset['f ooter']648 $asset_version, 649 $asset['flag'] 632 650 ); 633 651 } … … 641 659 public function _admin_assets() 642 660 { 643 $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'; 644 662 $dir = $this->config->get( 'paths.base' ) 645 663 ? $this->config->get( 'paths.base' ) … … 647 665 foreach ( $this->assets as $asset ) { 648 666 if ( ! isset( $asset['is_admin'] ) || ! $asset['is_admin'] ) continue; 649 $name = strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) ) 650 .'-'.strtolower( $this->config->get('namespace') ); 667 $name = !empty( $asset['name_id'] ) 668 ? $asset['name_id'] 669 : strtolower( preg_replace( '/css|js|\/|\.min|\./', '', $asset['path'] ) ) 670 . '-' . strtolower( $this->config->get( 'namespace' ) ); 671 $asset_version = empty( $asset['version'] ) ? $version : $asset['version']; 651 672 // Styles 652 673 if ( preg_match( '/\.css/', $asset['path'] ) ) { … … 655 676 assets_url( $asset['path'], $dir ), 656 677 $asset['dep'], 657 $version 678 $asset_version, 679 $asset['flag'] 658 680 ); 659 681 if ($asset['enqueue']) … … 662 684 assets_url( $asset['path'], $dir ), 663 685 $asset['dep'], 664 $ version,665 $asset['f ooter']686 $asset_version, 687 $asset['flag'] 666 688 ); 667 689 } … … 672 694 assets_url( $asset['path'], $dir ), 673 695 $asset['dep'], 674 $version 696 $asset_version, 697 $asset['flag'] 675 698 ); 676 699 if ($asset['enqueue']) … … 679 702 assets_url( $asset['path'], $dir ), 680 703 $asset['dep'], 681 $ version,682 $asset['f ooter']704 $asset_version, 705 $asset['flag'] 683 706 ); 684 707 } … … 702 725 * Returns valid action filter item. 703 726 * @since 1.0.3 704 * @since 3.1.5 Mapping parameters support.705 727 * 706 728 * @param string $hook WordPress hook name. … … 726 748 * Override mvc arguments with those defined when adding an action or filter. 727 749 * @since 1.0.3 728 * @since 3.1.5 Mapping parameters support.729 750 * 730 751 * @param string $mvc_call Lightweight MVC call. (i.e. 'Controller@method') … … 791 812 * Addes automated wordpress metaboxes based on post type. 792 813 * @since 2.0.4 793 * @since 2.0.7 Parameter removed and code refactored.794 * @since 2.0.16 Fixes count() warning.795 814 */ 796 815 private function _metaboxes() … … 816 835 * Addes automated WordPress save post functionality. 817 836 * @since 2.0.4 818 * @since 2.0.9 Fix for multiple types calling to function.819 837 * 820 838 * @param string $type Post type. … … 841 859 * Checks if generated assets exist or not. 842 860 * @since 2.0.7 843 * @since 2.0.8 Refactor based on new config file.844 * @since 2.0.12 Dir __DIR__ checked on config.845 * @since 3.1.0 Refactors name and allows for admin enqueues.846 861 */ 847 862 private function _check_assets() … … 855 870 : __DIR__; 856 871 foreach ( $this->config->get( 'autoenqueue.assets' ) as $asset ) { 857 if ( $file->exists( assets_path( $asset['asset'], $dir ) ) ) 872 if ( $file->exists( assets_path( $asset['asset'], $dir ) ) ) { 858 873 $this->add_asset( 859 874 $asset['asset'], 860 isset( $asset['enqueue'] ) ? $asset['enqueue'] : true, 861 $asset['dep'], 862 $asset['footer'], 863 isset( $asset['is_admin'] ) ? $asset['is_admin'] : false 875 array_key_exists( 'enqueue', $asset ) ? $asset['enqueue'] : true, 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 ), 878 array_key_exists( 'is_admin', $asset ) ? $asset['is_admin'] : false, 879 array_key_exists( 'version', $asset ) ? $asset['version'] : null, 880 array_key_exists( 'id', $asset ) ? $asset['id'] : null 864 881 ); 882 } 865 883 } 866 884 } … … 887 905 * Loads localization. 888 906 * @since 3.1.0 889 * @since 3.1.4 Extend locale file loadout.890 907 */ 891 908 private function _localize() -
simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Config.php
r2241498 r2331812 21 21 */ 22 22 protected $raw; 23 24 23 /** 25 24 * Constructor. … … 32 31 $this->raw = $raw; 33 32 } 34 35 33 /** 36 34 * Returns value stored in given key. -
simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Request.php
r2241498 r2331812 12 12 * @license MIT 13 13 * @package WPMVC 14 * @version 1.0.014 * @version 3.1.11 15 15 */ 16 16 class Request … … 22 22 * @global object $wp_query WordPress query. 23 23 * 24 * @param string $key Name of the input. 25 * @param mixed $default Default value if data is not found. 26 * @param bool $Clear Clears out source value. 24 * @param string $key Name of the input. 25 * @param mixed $default Default value if data is not found. 26 * @param bool $clear Clears out source value. 27 * @param bool|string $sanitize Sanitation callable or flag that indicates if auto-sanitation should be applied. 27 28 * 28 29 * @return mixed 29 30 */ 30 public static function input ( $key, $default = null, $clear = false )31 public static function input( $key, $default = null, $clear = false, $sanitize = true ) 31 32 { 32 33 global $wp_query; 33 34 $value = null; 34 35 // Check if it exists in wp_query 35 if ( array_key_exists( $key, $wp_query->query_vars ) ) {36 if ( isset( $wp_query ) && isset( $wp_query->query_vars ) && array_key_exists( $key, $wp_query->query_vars ) ) { 36 37 $value = $wp_query->query_vars[$key]; 37 38 if ( $clear ) unset( $wp_query->query_vars[$key] ); … … 43 44 if ( $clear ) unset( $_GET[$key] ); 44 45 } 46 return $value == null ? $default : self::sanitize( $value, $sanitize ); 47 } 48 /** 49 * Returns all variables stored in $_GET, $_POST and $wp_query->query_vars. 50 * @since 3.1.11 51 * 52 * @global object $wp_query WordPress query. 53 * 54 * @param bool|string $sanitize Sanitation callable or flag that indicates if auto-sanitation should be applied. 55 * 56 * @return array 57 */ 58 public static function all( $sanitize = true ) 59 { 60 global $wp_query; 61 $return = $_GET; 62 if ( $_POST ) 63 $return = array_merge( $return, $_POST ); 64 if ( isset( $wp_query ) && isset( $wp_query->query_vars ) ) 65 $return = array_merge( $return, $wp_query->query_vars ); 66 return array_map( function( $value ) use( &$sanitize ) { 67 return self::sanitize( $value, $sanitize ); 68 }, $return ); 69 } 70 /** 71 * Returns a sanitized value. 72 * @since 3.1.11 73 * 74 * @param mixed $value Value to sanitize. 75 * @param bool|string $sanitize Sanitation callable or flag that indicates if auto-sanitation should be applied. 76 * 77 * @return mixed 78 */ 79 public static function sanitize( $value, $sanitize = true ) 80 { 81 if ( $sanitize === false ) 82 return $value; 45 83 if ( ! is_array( $value ) ) $value = trim( $value ); 46 return $value == null 47 ? $default 48 : ( is_array( $value ) 49 ? $value 50 : ( is_int( $value ) 51 ? intval( $value ) 52 : ( is_float( $value ) 53 ? floatval( $value ) 54 : ( strtolower( $value ) == 'true' || strtolower( $value ) == 'false' 55 ? strtolower( $value ) == 'true' 56 : $value 57 ) 58 ) 59 ) 60 ); 84 if ( is_array( $value ) ) { 85 if ( $sanitize === true || ! is_callable( $sanitize ) ) 86 $sanitize = apply_filters( 'wpmvc_request_sanitize_array', 'WPMVC\Request::sanitize_array' ); 87 return call_user_func_array( $sanitize, [$value] ); 88 } elseif ( is_numeric( $value ) ) { 89 if ( strpos( $value, '.' ) !== false ) { 90 if ( $sanitize === true || ! is_callable( $sanitize ) ) 91 $sanitize = apply_filters( 'wpmvc_request_sanitize_float', 'floatval' ); 92 return call_user_func_array( $sanitize, [$value] ); 93 } else { 94 if ( $sanitize === true || ! is_callable( $sanitize ) ) 95 $sanitize = apply_filters( 'wpmvc_request_sanitize_int', 'intval' ); 96 return call_user_func_array( $sanitize, [$value] ); 97 } 98 } elseif ( strtolower( $value ) === 'true' || strtolower( $value ) === 'false' ) { 99 return strtolower( $value ) === 'true'; 100 } elseif ( filter_var( $value, FILTER_VALIDATE_EMAIL ) ) { 101 if ( $sanitize === true || ! is_callable( $sanitize ) ) 102 $sanitize = apply_filters( 'wpmvc_request_sanitize_email', 'sanitize_email' ); 103 return call_user_func_array( $sanitize, [$value] ); 104 } else { 105 if ( $sanitize === true || ! is_callable( $sanitize ) ) 106 $sanitize = apply_filters( 'wpmvc_request_sanitize_string', 'sanitize_text_field' ); 107 return call_user_func_array( $sanitize, [$value] ); 108 } 109 } 110 /** 111 * Returns sanitized array. 112 * @since 3.1.11 113 * 114 * @param array $value 115 * 116 * @return array 117 */ 118 public static function sanitize_array( $value ) 119 { 120 foreach ( $value as $key => $sub ) { 121 $value[$key] = self::sanitize( $sub ); 122 } 123 return $value; 61 124 } 62 125 } -
simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Response.php
r1843712 r2331812 142 142 return json_encode( $this->to_array(), JSON_NUMERIC_CHECK ); 143 143 } 144 145 144 /** 146 145 * Returns object as JSON string. -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/README.md
r1843712 r2331812 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 -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/composer.json
r2113414 r2331812 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"], -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/phpunit.xml
r1843712 r2331812 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> -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Controller.php
r2092750 r2331812 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. -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Controllers/ModelController.php
r2092750 r2331812 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 -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Engine.php
r2092750 r2331812 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 ) -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/CategoryModel.php
r2092750 r2331812 9 9 use WPMVC\MVC\Contracts\Stringable; 10 10 use WPMVC\MVC\Contracts\Metable; 11 use WPMVC\MVC\Contracts\Traceable; 11 12 use WPMVC\MVC\Traits\AliasTrait; 12 13 use WPMVC\MVC\Traits\CastTrait; … … 101 102 * Loads user meta data. 102 103 * @since 1.0.0 103 * @since 2.1.1 Uses wordpress serialization.104 * @since 2.1.1 Uses WordPress serialization. 104 105 */ 105 106 public function load_meta() … … 173 174 * Either adds or updates a meta. 174 175 * @since 1.0.0 175 * @since 2.1.1 Uses wordpress serialization.176 * @since 2.1.2 Removed serialization, already done by wp.177 176 * 178 177 * @param string $key Key. … … 183 182 if ( $update_array ) 184 183 $this->set_meta($key, $value); 185 186 184 try { 187 185 update_term_meta( $this->term_id, $key, $value ); … … 202 200 } 203 201 } 202 /** 203 * Returns flag indicating if model has a trace in the database (an ID). 204 * @since 2.1.11 205 * 206 * @param bool 207 */ 208 public function has_trace() 209 { 210 return $this->term_id !== null; 211 } 204 212 } -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/Common/Attachment.php
r1843712 r2331812 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> -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/OptionModel.php
r2092750 r2331812 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 -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/PostModel.php
r2092750 r2331812 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 } -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/Relationship.php
r1843712 r2331812 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. -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/TermModel.php
r2092750 r2331812 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 } -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/UserModel.php
r2092750 r2331812 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 } -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTermTrait.php
r2092750 r2331812 12 12 * @license MIT 13 13 * @package WPMVC\MVC 14 * @version 2.1. 514 * @version 2.1.11 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 return $model->has_trace() ? $model : null; 28 31 } 29 32 /** … … 33 36 * @param string $slug Term slug. 34 37 * @param string $taxonomy Taxonomy. 38 * 39 * @return object|null 35 40 */ 36 41 public static function find_by_slug( $slug = 0, $taxonomy = null ) … … 38 43 $model = new self( $taxonomy, 0 ); 39 44 $model->load_by_slug( $slug ); 40 return $model ;45 return $model->has_trace() ? $model : null; 41 46 } 42 47 /** -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTrait.php
r2092750 r2331812 12 12 * @license MIT 13 13 * @package WPMVC\MVC 14 * @version 1.0.014 * @version 2.1.11 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 return $model->has_trace() ? $model : null; 28 30 } 29 31 /** … … 33 35 * @param int $id Parent post ID. 34 36 * 35 * @return array37 * @return \WPMVC\MVC\Collection 36 38 */ 37 39 public static function from( $id ) 38 40 { 39 41 if ( empty( $id ) ) return; 40 $output = new Collection ();42 $output = new Collection; 41 43 $reference = new self(); 42 44 $results = get_children( array( -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Traits/MetaTrait.php
r2092750 r2331812 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 -
simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Traits/RelationshipTrait.php
r1850509 r2331812 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. -
simple-post-gallery/trunk/vendor/composer/autoload_files.php
r1843712 r2331812 9 9 '6f7750a5f1d239027ef483252f4ce3c7' => $vendorDir . '/10quality/wpmvc-phpfastcache/src/lib/functions.php', 10 10 'c607dd5e0d3f783ee5565b107740298c' => $vendorDir . '/10quality/wpmvc-core/src/lib/functions.php', 11 ' 8600a54881920645a043f9b975dff7cc' => $baseDir . '/app/Lib/functions.php',11 'c413ca1672f2a2c1abe9b592407b6349' => $baseDir . '/app/Lib/functions.php', 12 12 ); -
simple-post-gallery/trunk/vendor/composer/autoload_static.php
r1843712 r2331812 10 10 '6f7750a5f1d239027ef483252f4ce3c7' => __DIR__ . '/..' . '/10quality/wpmvc-phpfastcache/src/lib/functions.php', 11 11 'c607dd5e0d3f783ee5565b107740298c' => __DIR__ . '/..' . '/10quality/wpmvc-core/src/lib/functions.php', 12 ' 8600a54881920645a043f9b975dff7cc' => __DIR__ . '/../..' . '/app/Lib/functions.php',12 'c413ca1672f2a2c1abe9b592407b6349' => __DIR__ . '/../..' . '/app/Lib/functions.php', 13 13 ); 14 14 -
simple-post-gallery/trunk/vendor/composer/installed.json
r2241498 r2331812 91 91 }, 92 92 { 93 "name": "10quality/wpmvc-logger", 94 "version": "v2.0.x-dev", 95 "version_normalized": "2.0.9999999.9999999-dev", 96 "source": { 97 "type": "git", 98 "url": "https://github.com/10quality/wpmvc-klogger.git", 99 "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1" 100 }, 101 "dist": { 102 "type": "zip", 103 "url": "https://api.github.com/repos/10quality/wpmvc-klogger/zipball/3f8959bd7fe585d248d102e198aae4a2504a90d1", 104 "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1", 105 "shasum": "" 106 }, 107 "require": { 108 "10quality/wp-file": "0.9.*", 109 "php": ">=5.3", 110 "psr/log": "1.0.0" 111 }, 112 "require-dev": { 113 "phpunit/phpunit": "4.0.*" 114 }, 115 "time": "2020-01-09T23:17:24+00:00", 116 "type": "library", 117 "installation-source": "source", 118 "autoload": { 119 "psr-4": { 120 "WPMVC\\KLogger\\": "src/" 121 }, 122 "classmap": [ 123 "src/" 124 ] 125 }, 126 "notification-url": "https://packagist.org/downloads/", 127 "license": [ 128 "MIT" 129 ], 130 "authors": [ 131 { 132 "name": "Kenny Katzgrau", 133 "email": "katzgrau@gmail.com" 134 }, 135 { 136 "name": "Dan Horrigan", 137 "email": "dan@dhorrigan.com" 138 }, 139 { 140 "name": "10 Quality", 141 "email": "info@10quality.com", 142 "homepage": "http://www.10quality.com", 143 "role": "Developer" 144 }, 145 { 146 "name": "Alejandro Mostajo", 147 "email": "amostajo@gmail.com", 148 "role": "Developer" 149 } 150 ], 151 "description": "KLogger for WordPress MVC.", 152 "keywords": [ 153 "logging" 154 ] 155 }, 156 { 157 "name": "10quality/wpmvc-phpfastcache", 158 "version": "v4.0.x-dev", 159 "version_normalized": "4.0.9999999.9999999-dev", 160 "source": { 161 "type": "git", 162 "url": "https://github.com/10quality/wpmvc-phpfastcache.git", 163 "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e" 164 }, 165 "dist": { 166 "type": "zip", 167 "url": "https://api.github.com/repos/10quality/wpmvc-phpfastcache/zipball/6d0b4ca7fd1e3d5b27992a2d8321768eb484873e", 168 "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e", 169 "shasum": "" 170 }, 171 "require": { 172 "10quality/wp-file": "0.9.*", 173 "php": ">=5.1.0" 174 }, 175 "require-dev": { 176 "katzgrau/klogger": "dev-master", 177 "mockery/mockery": "dev-master", 178 "phpunit/phpunit": "~4.1", 179 "sami/sami": "dev-master" 180 }, 181 "time": "2020-01-09T23:19:53+00:00", 182 "type": "library", 183 "installation-source": "source", 184 "autoload": { 185 "files": [ 186 "src/lib/functions.php" 187 ], 188 "psr-4": { 189 "WPMVC\\PHPFastCache\\": "src/psr4" 190 } 191 }, 192 "notification-url": "https://packagist.org/downloads/", 193 "license": [ 194 "MIT" 195 ], 196 "authors": [ 197 { 198 "name": "Khoa Bui", 199 "email": "khoaofgod@gmail.com", 200 "homepage": "http://www.phpfastcache.com", 201 "role": "Developer" 202 }, 203 { 204 "name": "10 Quality", 205 "email": "info@10quality.com", 206 "homepage": "http://www.10quality.com", 207 "role": "Developer" 208 }, 209 { 210 "name": "Alejandro Mostajo", 211 "email": "amostajo@gmail.com", 212 "role": "Developer" 213 } 214 ], 215 "description": "Forked version that works with WordPress MVC.", 216 "homepage": "http://www.phpfastcache.com", 217 "keywords": [ 218 "cache" 219 ] 220 }, 221 { 222 "name": "10quality/ayuco", 223 "version": "v1.0.x-dev", 224 "version_normalized": "1.0.9999999.9999999-dev", 225 "source": { 226 "type": "git", 227 "url": "https://github.com/10quality/ayuco.git", 228 "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63" 229 }, 230 "dist": { 231 "type": "zip", 232 "url": "https://api.github.com/repos/10quality/ayuco/zipball/6c4d11232dc7b80ebb87c7899db98c76829e1a63", 233 "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63", 234 "shasum": "" 235 }, 236 "require-dev": { 237 "phpunit/phpunit": "8.0.*" 238 }, 239 "time": "2020-01-25T07:57:28+00:00", 240 "type": "library", 241 "installation-source": "source", 242 "autoload": { 243 "psr-4": { 244 "Ayuco\\": "src" 245 } 246 }, 247 "notification-url": "https://packagist.org/downloads/", 248 "license": [ 249 "MIT" 250 ], 251 "authors": [ 252 { 253 "name": "Alejandro Mostajo", 254 "homepage": "http://about.me/amostajo" 255 }, 256 { 257 "name": "10Quality", 258 "homepage": "http://www.10quality.com/" 259 } 260 ], 261 "description": "Command-Line interface that can be used to execute commands written in PHP.", 262 "homepage": "https://github.com/10quality/ayuco", 263 "keywords": [ 264 "command-line", 265 "commands", 266 "php" 267 ] 268 }, 269 { 270 "name": "10quality/wpmvc-commands", 271 "version": "v1.1.10", 272 "version_normalized": "1.1.10.0", 273 "source": { 274 "type": "git", 275 "url": "https://github.com/10quality/wpmvc-commands.git", 276 "reference": "31ae94e9d8665445f333d6842783c5191a164375" 277 }, 278 "dist": { 279 "type": "zip", 280 "url": "https://api.github.com/repos/10quality/wpmvc-commands/zipball/31ae94e9d8665445f333d6842783c5191a164375", 281 "reference": "31ae94e9d8665445f333d6842783c5191a164375", 282 "shasum": "" 283 }, 284 "require": { 285 "10quality/ayuco": "^1.0", 286 "nikic/php-parser": "^4.2", 287 "php": ">=5.4.0" 288 }, 289 "require-dev": { 290 "phpunit/phpunit": "8.0.*" 291 }, 292 "time": "2020-02-15T07:01:15+00:00", 293 "type": "library", 294 "installation-source": "source", 295 "autoload": { 296 "psr-4": { 297 "WPMVC\\Commands\\": "src" 298 } 299 }, 300 "notification-url": "https://packagist.org/downloads/", 301 "license": [ 302 "MIT" 303 ], 304 "authors": [ 305 { 306 "name": "Alejandro Mostajo", 307 "email": "amostajo@gmail.com" 308 } 309 ], 310 "description": "Ayuco commands/jobs for WordPress MVC.", 311 "keywords": [ 312 "ayuco", 313 "jobs", 314 "mvc", 315 "wordpress" 316 ] 317 }, 318 { 93 319 "name": "10quality/wpmvc-mvc", 94 "version": "v2.1. 6",95 "version_normalized": "2.1. 6.0",320 "version": "v2.1.11", 321 "version_normalized": "2.1.11.0", 96 322 "source": { 97 323 "type": "git", 98 324 "url": "https://github.com/10quality/wpmvc-mvc.git", 99 "reference": " f90689907b6f1eab368a14e859e37bd16e87286c"100 }, 101 "dist": { 102 "type": "zip", 103 "url": "https://api.github.com/repos/10quality/wpmvc-mvc/zipball/ f90689907b6f1eab368a14e859e37bd16e87286c",104 "reference": " f90689907b6f1eab368a14e859e37bd16e87286c",325 "reference": "0fd4995de2dfbfda032128f000a5541ea92ffc28" 326 }, 327 "dist": { 328 "type": "zip", 329 "url": "https://api.github.com/repos/10quality/wpmvc-mvc/zipball/0fd4995de2dfbfda032128f000a5541ea92ffc28", 330 "reference": "0fd4995de2dfbfda032128f000a5541ea92ffc28", 105 331 "shasum": "" 106 332 }, … … 111 337 "phpunit/phpunit": "7.5.*" 112 338 }, 113 "time": "20 19-06-04T21:22:07+00:00",339 "time": "2020-06-27T08:09:03+00:00", 114 340 "type": "library", 115 341 "installation-source": "dist", … … 133 359 } 134 360 ], 135 "description": "Lightweight MVC for WPMVC (Word press MVC framework).",361 "description": "Lightweight MVC for WPMVC (WordPress MVC framework).", 136 362 "keywords": [ 137 363 "light", … … 142 368 }, 143 369 { 144 "name": "nikic/php-parser",145 "version": "dev-master",146 "version_normalized": "9999999-dev",147 "source": {148 "type": "git",149 "url": "https://github.com/nikic/PHP-Parser.git",150 "reference": "a2443aaefa9282a488ec7880193f3fcd29f69b33"151 },152 "dist": {153 "type": "zip",154 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a2443aaefa9282a488ec7880193f3fcd29f69b33",155 "reference": "a2443aaefa9282a488ec7880193f3fcd29f69b33",156 "shasum": ""157 },158 "require": {159 "ext-tokenizer": "*",160 "php": ">=7.0"161 },162 "require-dev": {163 "ircmaxell/php-yacc": "0.0.5",164 "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"165 },166 "time": "2020-02-09T21:50:19+00:00",167 "bin": [168 "bin/php-parse"169 ],170 "type": "library",171 "extra": {172 "branch-alias": {173 "dev-master": "4.3-dev"174 }175 },176 "installation-source": "source",177 "autoload": {178 "psr-4": {179 "PhpParser\\": "lib/PhpParser"180 }181 },182 "notification-url": "https://packagist.org/downloads/",183 "license": [184 "BSD-3-Clause"185 ],186 "authors": [187 {188 "name": "Nikita Popov"189 }190 ],191 "description": "A PHP parser written in PHP",192 "keywords": [193 "parser",194 "php"195 ]196 },197 {198 370 "name": "10quality/wpmvc-core", 199 "version": "v3.1.1 0.1",200 "version_normalized": "3.1.1 0.1",371 "version": "v3.1.13", 372 "version_normalized": "3.1.13.0", 201 373 "source": { 202 374 "type": "git", 203 375 "url": "https://github.com/10quality/wpmvc-core.git", 204 "reference": " 9eef2af9433d4993055e21f5985cc54b43dd7405"205 }, 206 "dist": { 207 "type": "zip", 208 "url": "https://api.github.com/repos/10quality/wpmvc-core/zipball/ 9eef2af9433d4993055e21f5985cc54b43dd7405",209 "reference": " 9eef2af9433d4993055e21f5985cc54b43dd7405",376 "reference": "4efe96b316c23dd20d4b9c7b8a2004efc8ceee21" 377 }, 378 "dist": { 379 "type": "zip", 380 "url": "https://api.github.com/repos/10quality/wpmvc-core/zipball/4efe96b316c23dd20d4b9c7b8a2004efc8ceee21", 381 "reference": "4efe96b316c23dd20d4b9c7b8a2004efc8ceee21", 210 382 "shasum": "" 211 383 }, … … 220 392 "phpunit/phpunit": "7.5.*" 221 393 }, 222 "time": "2020-0 1-27T01:02:47+00:00",394 "time": "2020-06-26T07:53:18+00:00", 223 395 "type": "library", 224 396 "installation-source": "source", … … 253 425 }, 254 426 { 255 "name": "10quality/wpmvc-commands", 256 "version": "v1.1.9.1", 257 "version_normalized": "1.1.9.1", 258 "source": { 259 "type": "git", 260 "url": "https://github.com/10quality/wpmvc-commands.git", 261 "reference": "9cfd462bf9f18d01a8620020aca2fb685033909c" 262 }, 263 "dist": { 264 "type": "zip", 265 "url": "https://api.github.com/repos/10quality/wpmvc-commands/zipball/9cfd462bf9f18d01a8620020aca2fb685033909c", 266 "reference": "9cfd462bf9f18d01a8620020aca2fb685033909c", 267 "shasum": "" 268 }, 269 "require": { 270 "10quality/ayuco": "^1.0", 271 "nikic/php-parser": "^4.2", 272 "php": ">=5.4.0" 273 }, 274 "require-dev": { 275 "phpunit/phpunit": "8.0.*" 276 }, 277 "time": "2020-01-27T19:38:38+00:00", 278 "type": "library", 279 "installation-source": "source", 280 "autoload": { 281 "psr-4": { 282 "WPMVC\\Commands\\": "src" 283 } 284 }, 285 "notification-url": "https://packagist.org/downloads/", 286 "license": [ 287 "MIT" 288 ], 289 "authors": [ 290 { 291 "name": "Alejandro Mostajo", 292 "email": "amostajo@gmail.com" 293 } 294 ], 295 "description": "Ayuco commands/jobs for WordPress MVC.", 296 "keywords": [ 297 "ayuco", 298 "jobs", 299 "mvc", 300 "wordpress" 301 ] 302 }, 303 { 304 "name": "10quality/wpmvc-logger", 305 "version": "v2.0.x-dev", 306 "version_normalized": "2.0.9999999.9999999-dev", 307 "source": { 308 "type": "git", 309 "url": "https://github.com/10quality/wpmvc-klogger.git", 310 "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1" 311 }, 312 "dist": { 313 "type": "zip", 314 "url": "https://api.github.com/repos/10quality/wpmvc-klogger/zipball/3f8959bd7fe585d248d102e198aae4a2504a90d1", 315 "reference": "3f8959bd7fe585d248d102e198aae4a2504a90d1", 316 "shasum": "" 317 }, 318 "require": { 319 "10quality/wp-file": "0.9.*", 320 "php": ">=5.3", 321 "psr/log": "1.0.0" 322 }, 323 "require-dev": { 324 "phpunit/phpunit": "4.0.*" 325 }, 326 "time": "2020-01-09T23:17:24+00:00", 327 "type": "library", 328 "installation-source": "source", 329 "autoload": { 330 "psr-4": { 331 "WPMVC\\KLogger\\": "src/" 332 }, 333 "classmap": [ 334 "src/" 335 ] 336 }, 337 "notification-url": "https://packagist.org/downloads/", 338 "license": [ 339 "MIT" 340 ], 341 "authors": [ 342 { 343 "name": "Kenny Katzgrau", 344 "email": "katzgrau@gmail.com" 345 }, 346 { 347 "name": "Dan Horrigan", 348 "email": "dan@dhorrigan.com" 349 }, 350 { 351 "name": "10 Quality", 352 "email": "info@10quality.com", 353 "homepage": "http://www.10quality.com", 354 "role": "Developer" 355 }, 356 { 357 "name": "Alejandro Mostajo", 358 "email": "amostajo@gmail.com", 359 "role": "Developer" 360 } 361 ], 362 "description": "KLogger for WordPress MVC.", 363 "keywords": [ 364 "logging" 365 ] 366 }, 367 { 368 "name": "10quality/wpmvc-phpfastcache", 369 "version": "v4.0.x-dev", 370 "version_normalized": "4.0.9999999.9999999-dev", 371 "source": { 372 "type": "git", 373 "url": "https://github.com/10quality/wpmvc-phpfastcache.git", 374 "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e" 375 }, 376 "dist": { 377 "type": "zip", 378 "url": "https://api.github.com/repos/10quality/wpmvc-phpfastcache/zipball/6d0b4ca7fd1e3d5b27992a2d8321768eb484873e", 379 "reference": "6d0b4ca7fd1e3d5b27992a2d8321768eb484873e", 380 "shasum": "" 381 }, 382 "require": { 383 "10quality/wp-file": "0.9.*", 384 "php": ">=5.1.0" 385 }, 386 "require-dev": { 387 "katzgrau/klogger": "dev-master", 388 "mockery/mockery": "dev-master", 389 "phpunit/phpunit": "~4.1", 390 "sami/sami": "dev-master" 391 }, 392 "time": "2020-01-09T23:19:53+00:00", 393 "type": "library", 394 "installation-source": "source", 395 "autoload": { 396 "files": [ 397 "src/lib/functions.php" 398 ], 399 "psr-4": { 400 "WPMVC\\PHPFastCache\\": "src/psr4" 401 } 402 }, 403 "notification-url": "https://packagist.org/downloads/", 404 "license": [ 405 "MIT" 406 ], 407 "authors": [ 408 { 409 "name": "Khoa Bui", 410 "email": "khoaofgod@gmail.com", 411 "homepage": "http://www.phpfastcache.com", 412 "role": "Developer" 413 }, 414 { 415 "name": "10 Quality", 416 "email": "info@10quality.com", 417 "homepage": "http://www.10quality.com", 418 "role": "Developer" 419 }, 420 { 421 "name": "Alejandro Mostajo", 422 "email": "amostajo@gmail.com", 423 "role": "Developer" 424 } 425 ], 426 "description": "Forked version that works with WordPress MVC.", 427 "homepage": "http://www.phpfastcache.com", 428 "keywords": [ 429 "cache" 430 ] 431 }, 432 { 433 "name": "10quality/ayuco", 434 "version": "v1.0.x-dev", 435 "version_normalized": "1.0.9999999.9999999-dev", 436 "source": { 437 "type": "git", 438 "url": "https://github.com/10quality/ayuco.git", 439 "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63" 440 }, 441 "dist": { 442 "type": "zip", 443 "url": "https://api.github.com/repos/10quality/ayuco/zipball/6c4d11232dc7b80ebb87c7899db98c76829e1a63", 444 "reference": "6c4d11232dc7b80ebb87c7899db98c76829e1a63", 445 "shasum": "" 446 }, 447 "require-dev": { 448 "phpunit/phpunit": "8.0.*" 449 }, 450 "time": "2020-01-25T07:57:28+00:00", 451 "type": "library", 452 "installation-source": "source", 453 "autoload": { 454 "psr-4": { 455 "Ayuco\\": "src" 456 } 457 }, 458 "notification-url": "https://packagist.org/downloads/", 459 "license": [ 460 "MIT" 461 ], 462 "authors": [ 463 { 464 "name": "Alejandro Mostajo", 465 "homepage": "http://about.me/amostajo" 466 }, 467 { 468 "name": "10Quality", 469 "homepage": "http://www.10quality.com/" 470 } 471 ], 472 "description": "Command-Line interface that can be used to execute commands written in PHP.", 473 "homepage": "https://github.com/10quality/ayuco", 474 "keywords": [ 475 "command-line", 476 "commands", 427 "name": "nikic/php-parser", 428 "version": "v4.5.0", 429 "version_normalized": "4.5.0.0", 430 "source": { 431 "type": "git", 432 "url": "https://github.com/nikic/PHP-Parser.git", 433 "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463" 434 }, 435 "dist": { 436 "type": "zip", 437 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/53c2753d756f5adb586dca79c2ec0e2654dd9463", 438 "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463", 439 "shasum": "" 440 }, 441 "require": { 442 "ext-tokenizer": "*", 443 "php": ">=7.0" 444 }, 445 "require-dev": { 446 "ircmaxell/php-yacc": "0.0.5", 447 "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" 448 }, 449 "time": "2020-06-03T07:24:19+00:00", 450 "bin": [ 451 "bin/php-parse" 452 ], 453 "type": "library", 454 "extra": { 455 "branch-alias": { 456 "dev-master": "4.3-dev" 457 } 458 }, 459 "installation-source": "source", 460 "autoload": { 461 "psr-4": { 462 "PhpParser\\": "lib/PhpParser" 463 } 464 }, 465 "notification-url": "https://packagist.org/downloads/", 466 "license": [ 467 "BSD-3-Clause" 468 ], 469 "authors": [ 470 { 471 "name": "Nikita Popov" 472 } 473 ], 474 "description": "A PHP parser written in PHP", 475 "keywords": [ 476 "parser", 477 477 "php" 478 478 ]
Note: See TracChangeset
for help on using the changeset viewer.