Plugin Directory

Changeset 2331812


Ignore:
Timestamp:
06/28/2020 01:54:01 AM (6 years ago)
Author:
10quality
Message:

Updating to version 2.3.12

Location:
simple-post-gallery/trunk
Files:
2 added
1 deleted
36 edited

Legend:

Unmodified
Added
Removed
  • simple-post-gallery/trunk/README.txt

    r2241498 r2331812  
    66Requires at least: 3.2
    77Requires PHP: 5.4
    8 Tested up to: 5.3
    9 Stable tag: 2.3.11
     8Tested up to: 5.4
     9Stable tag: 2.3.12
    1010License: MIT
    1111License URI: http://www.linfo.org/mitlicense.html
     
    6060== Changelog ==
    6161
     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
    6269= 2.3.11 =
    6370*Release Date - 9 Feb 2020*
  • simple-post-gallery/trunk/app/Config/app.php

    r2241498 r2331812  
    2020    ],
    2121
    22     'version' => '2.3.11',
     22    'version' => '2.3.12',
    2323
    2424    'author' => '10 Quality Studio <https://www.10quality.com/>',
  • simple-post-gallery/trunk/app/Controllers/GalleryController.php

    r2241498 r2331812  
    4343            if ( $post->gallery )
    4444                return $post->gallery;
    45         } catch (Exception $e) {
     45        } catch ( Exception $e ) {
    4646            Log::error( $e );
    4747        }
     
    173173            return;
    174174
    175         $nonce = Request::input( 'metabox_gallery_nonce', '', true );
     175        $nonce = Request::input( 'metabox_gallery_nonce', '', true, false );
    176176
    177177        if ( (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
  • simple-post-gallery/trunk/app/Controllers/NoticeController.php

    r2241498 r2331812  
    4242        }
    4343        */
    44         // TODO future notices
    4544    }
    4645}
  • simple-post-gallery/trunk/app/Controllers/VideoController.php

    r2241498 r2331812  
    1616 * @copyright 10Quality <http://www.10quality.com>
    1717 * @package simple-post-gallery
    18  * @version 2.2.0
     18 * @version 2.3.12
    1919 */
    2020class VideoController extends Controller
     
    207207                $image_url = 'https://img.youtube.com/vi/'.$id.'/hqdefault.jpg';
    208208            // SIMULATE AN UPLOAD
    209             $attachment_id = $this->create_from_thumbnail( $image_url );
     209            $attachment_id = $this->create_from_thumbnail( $image_url, $id );
    210210            if ( $attachment_id ) {
    211211                $model = Attachment::find( $attachment_id );
     
    223223            // SIMULATE AN UPLOAD
    224224            $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
    226227            );
    227228            if ( $attachment_id ) {
     
    243244     *
    244245     * @param string $url
     246     * @param string $video_id
    245247     *
    246248     * @return int|bool
    247249     */
    248     private function create_from_thumbnail( $url )
     250    private function create_from_thumbnail( $url, $video_id )
    249251    {
    250252        $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() ) ) );
    252255            return false;
    253256        }
     
    255258        // Set variables for storage
    256259        // 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';
    259262        $file_array['tmp_name'] = $tmp;
    260263        // If error storing temporarily, unlink
    261264        if ( is_wp_error( $tmp ) ) {
    262             @unlink($file_array['tmp_name']);
     265            @unlink( $file_array['tmp_name'] );
    263266            $file_array['tmp_name'] = '';
    264267        }
    265268        // Store
    266269        $id = media_handle_sideload( $file_array, 0 );
    267 
    268270        // 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'] );
    271274            return false;
    272275        }
     
    348351        return $post;
    349352    }
     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    }
    350378}
  • simple-post-gallery/trunk/app/Main.php

    r2241498 r2331812  
    1212 * @copyright 10 Quality
    1313 * @package simple-post-gallery
    14  * @version 2.3.2
     14 * @version 2.3.12
    1515 */
    1616class Main extends Bridge
     
    3434        $this->add_action('wp_ajax_video_importer_validate', 'VideoController@ajax_validate');
    3535        $this->add_action('wp_ajax_video_importer_import', 'VideoController@ajax_import');
     36        $this->add_filter( 'wp_get_attachment_metadata', 'VideoController@metadata', 15, 2 );
    3637        // -- Gutenberg
    3738        if ( function_exists( 'register_block_type' ) )
  • simple-post-gallery/trunk/app/Models/Attachment.php

    r2241498 r2331812  
    5454     * Hidden attributes in Array and JSON casting.
    5555     * @since 2.0.0
    56      * @since 2.2.1 Added is_lightbox, video_thumb and no_thumb_url.
    5756     * @var array
    5857     */
     
    9392     * Returns image with proper edit resolution.
    9493     * @since 1.0.0
    95      * @since 1.0.3 Adds ID on resize.
    96      * @since 1.0.5 ID passed as reference.
    9794     *
    9895     * @return string
     
    124121     * Returns flag indicating if attachement is a supported video.
    125122     * @since 2.1.0
    126      * @since 2.2.1 Added video/mp4.
    127123     *
    128124     * @return bool
     
    150146     * Returns attachment url at a specified resolution.
    151147     * @since 2.0.0
    152      * @since 2.2.1 Support for no thumb media.
    153148     *
    154149     * @param int  $width  Resolution width.
     
    209204     * Returns flag indicating if media is supported by lightbox solution.
    210205     * @since 2.2.1
    211      * @since 2.2.4 All current are supported.
    212206     *
    213207     * @return bool
  • simple-post-gallery/trunk/app/Models/Post.php

    r2241498 r2331812  
    4242     * Returns relationship between post and attachments.
    4343     * @since 2.0.0
    44      * @since 2.1.6 Fixes compatibility with php 5.4.
    4544     *
    4645     * @return Relationship
  • simple-post-gallery/trunk/app/Models/PostGallery.php

    r2241498 r2331812  
    3535     * Field aliases and definitions.
    3636     * @since 1.0.0
    37      * @since 2.0.0 Added extra for custom data.
    3837     * @var array
    3938     */
     
    4948     * Instance constructor.
    5049     * @since 1.0.0
    51      * @since 2.0.0 Cached removed.
    5250     *
    5351     * @return this for chaining
  • simple-post-gallery/trunk/plugin.php

    r2241498 r2331812  
    44Plugin URI: https://www.10quality.com/product/post-gallery-pro/
    55Description: 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.11
     6Version: 2.3.12
    77Author: 10 Quality
    88Author URI: https://www.10quality.com/
     
    1010Text Domain: simple-post-gallery
    1111Domain Path: /assets/languages/
     12
     13Requires PHP: 5.6
    1214
    1315Copyright (c) 2018 10Quality - http://www.10quality.com
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/lib/functions.php

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

    r1843712 r2331812  
    3636     * Default constructor.
    3737     * @since 1.0.0
    38      * @since 3.0.0 Main as reference, new addon MVC location.
    39      * @since 3.0.1 Fixes paths.
    4038     *
    4139     * @see https://github.com/10quality/wpmvc-addon-template
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Bridge.php

    r2241498 r2331812  
    2121 * @license MIT
    2222 * @package WPMVC
    23  * @version 3.1.8
     23 * @version 3.1.13
    2424 */
    2525abstract class Bridge implements Plugable
    2626{
    2727    /**
    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
    2944     * @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
    4351     * @var array
    44      * @since 1.0.2
    45      */
    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
    5058     * @var array
    51      * @since 1.0.3
    52      */
    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
    5765     * @var array
    58      * @since 1.0.3
    59      */
    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
    6472     * @var array
    65      * @since 1.0.3
    66      */
    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
    7179     * @var array
    72      * @since 1.0.3
    73      */
    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
    7886     * @var array
     87     */
     88    protected $assets;
     89
     90    /**
     91     * List of Models that requires bridge processing to function.
    7992     * @since 2.0.4
    80      */
    81     protected $models;
    82 
    83     /**
    84      * List of assets to register or enqueue.
    8593     * @var array
    86      * @since 2.0.7
    87      */
    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
    92100     * @var array
    93      * @since 2.0.4
    94      */
    95     protected $_automatedModels;
     101     */
     102    protected $_configs;
    96103
    97104    /**
    98105     * Main constructor
    99106     * @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.
    106107     *
    107108     * @param array $config Configuration options.
     
    116117        $this->assets = [];
    117118        $this->_automatedModels = [];
     119        $this->_configs = [];
    118120        $this->config = $config;
    119121        $this->mvc = new Engine(
     
    178180     * Checks "addon_" prefix to search for addon methods.
    179181     * @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.
    184182     *
    185183     * @return mixed
     
    260258     * @since 1.0.1
    261259     *
    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.
    263261     * @param array  $params View parameters passed by.
    264262     *
     
    274272     * @since 3.1.8
    275273     *
    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.
    277275     * @param array  $params View parameters passed by.
    278276     *
     
    416414     * @since 2.0.7
    417415     *
    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;
    428429        $this->assets[] = [
    429430            'path'      => $asset,
    430431            'enqueue'   => $enqueue,
    431432            'dep'       => $dep,
    432             'footer'    => $footer,
     433            'flag'      => $flag,
    433434            'is_admin'  => $is_admin,
     435            'version'   => $version,
     436            'name_id'   => $name_id,
    434437        ];
    435438    }
     
    438441     * Adds hooks and filters into WordPress core.
    439442     * @since 1.0.3
    440      * @since 2.0.4 Added models.
    441      * @since 2.0.7 Added assets.
    442443     */
    443444    public function add_hooks()
     
    491492
    492493    /**
     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    /**
    493511     * Registers added widgets into WordPress.
    494512     * @since 1.0.3
     
    504522     * Registers added models into WordPress.
    505523     * @since 2.0.4
    506      * @since 2.0.7  Support for automated models with no registration.
    507      * @since 2.0.16 Registry supports
    508524     */
    509525    public function _models()
     
    584600     * Enqueues assets registered in class.
    585601     * @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.
    589602     */
    590603    public function _assets()
    591604    {
    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';
    593606        $dir = $this->config->get( 'paths.base' )
    594607            ? $this->config->get( 'paths.base' )
     
    596609        foreach ( $this->assets as $asset ) {
    597610            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'];
    600616            // Styles
    601617            if ( preg_match( '/\.css/', $asset['path'] ) ) {
     
    604620                    assets_url( $asset['path'], $dir ),
    605621                    $asset['dep'],
    606                     $version
     622                    $asset_version,
     623                    $asset['flag']
    607624                );
    608625                if ($asset['enqueue'])
     
    611628                        assets_url( $asset['path'], $dir ),
    612629                        $asset['dep'],
    613                         $version,
    614                         $asset['footer']
     630                        $asset_version,
     631                        $asset['flag']
    615632                    );
    616633            }
     
    621638                    assets_url( $asset['path'], $dir ),
    622639                    $asset['dep'],
    623                     $version
     640                    $asset_version,
     641                    $asset['flag']
    624642                );
    625643                if ($asset['enqueue'])
     
    628646                        assets_url( $asset['path'], $dir ),
    629647                        $asset['dep'],
    630                         $version,
    631                         $asset['footer']
     648                        $asset_version,
     649                        $asset['flag']
    632650                    );
    633651            }
     
    641659    public function _admin_assets()
    642660    {
    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';
    644662        $dir = $this->config->get( 'paths.base' )
    645663            ? $this->config->get( 'paths.base' )
     
    647665        foreach ( $this->assets as $asset ) {
    648666            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'];
    651672            // Styles
    652673            if ( preg_match( '/\.css/', $asset['path'] ) ) {
     
    655676                    assets_url( $asset['path'], $dir ),
    656677                    $asset['dep'],
    657                     $version
     678                    $asset_version,
     679                    $asset['flag']
    658680                );
    659681                if ($asset['enqueue'])
     
    662684                        assets_url( $asset['path'], $dir ),
    663685                        $asset['dep'],
    664                         $version,
    665                         $asset['footer']
     686                        $asset_version,
     687                        $asset['flag']
    666688                    );
    667689            }
     
    672694                    assets_url( $asset['path'], $dir ),
    673695                    $asset['dep'],
    674                     $version
     696                    $asset_version,
     697                    $asset['flag']
    675698                );
    676699                if ($asset['enqueue'])
     
    679702                        assets_url( $asset['path'], $dir ),
    680703                        $asset['dep'],
    681                         $version,
    682                         $asset['footer']
     704                        $asset_version,
     705                        $asset['flag']
    683706                    );
    684707            }
     
    702725     * Returns valid action filter item.
    703726     * @since 1.0.3
    704      * @since 3.1.5 Mapping parameters support.
    705727     *
    706728     * @param string $hook          WordPress hook name.
     
    726748     * Override mvc arguments with those defined when adding an action or filter.
    727749     * @since 1.0.3
    728      * @since 3.1.5 Mapping parameters support.
    729750     *
    730751     * @param string $mvc_call Lightweight MVC call. (i.e. 'Controller@method')
     
    791812     * Addes automated wordpress metaboxes based on post type.
    792813     * @since 2.0.4
    793      * @since 2.0.7 Parameter removed and code refactored.
    794      * @since 2.0.16 Fixes count() warning.
    795814     */
    796815    private function _metaboxes()
     
    816835     * Addes automated WordPress save post functionality.
    817836     * @since 2.0.4
    818      * @since 2.0.9 Fix for multiple types calling to function.
    819837     *
    820838     * @param string $type Post type.
     
    841859     * Checks if generated assets exist or not.
    842860     * @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.
    846861     */
    847862    private function _check_assets()
     
    855870                : __DIR__;
    856871            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 ) ) ) {
    858873                    $this->add_asset(
    859874                        $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
    864881                    );
     882                }
    865883            }
    866884        }
     
    887905     * Loads localization.
    888906     * @since 3.1.0
    889      * @since 3.1.4 Extend locale file loadout.
    890907     */
    891908    private function _localize()
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Config.php

    r2241498 r2331812  
    2121     */
    2222    protected $raw;
    23 
    2423    /**
    2524     * Constructor.
     
    3231        $this->raw = $raw;
    3332    }
    34 
    3533    /**
    3634     * Returns value stored in given key.
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Request.php

    r2241498 r2331812  
    1212 * @license MIT
    1313 * @package WPMVC
    14  * @version 1.0.0
     14 * @version 3.1.11
    1515 */
    1616class Request
     
    2222     * @global object $wp_query WordPress query.
    2323     *
    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.
    2728     *
    2829     * @return mixed
    2930     */
    30     public static function input ( $key, $default = null, $clear = false )
     31    public static function input( $key, $default = null, $clear = false, $sanitize = true )
    3132    {
    3233        global $wp_query;
    3334        $value = null;
    3435        // 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 ) ) {
    3637            $value = $wp_query->query_vars[$key];
    3738            if ( $clear ) unset( $wp_query->query_vars[$key] );
     
    4344            if ( $clear ) unset( $_GET[$key] );
    4445        }
     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;
    4583        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;
    61124    }
    62125}
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-core/src/psr4/Response.php

    r1843712 r2331812  
    142142        return json_encode( $this->to_array(), JSON_NUMERIC_CHECK );
    143143    }
    144 
    145144    /**
    146145     * Returns object as JSON string.
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/README.md

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

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

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

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

    r2092750 r2331812  
    2525    protected $model = '';
    2626    /**
    27      * Flag that indictes if model will save on autosave.
     27     * Flag that indicates if model will save on autosave.
    2828     * @since 1.0.0
    2929     * @var bool
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Engine.php

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

    r2092750 r2331812  
    99use WPMVC\MVC\Contracts\Stringable;
    1010use WPMVC\MVC\Contracts\Metable;
     11use WPMVC\MVC\Contracts\Traceable;
    1112use WPMVC\MVC\Traits\AliasTrait;
    1213use WPMVC\MVC\Traits\CastTrait;
     
    101102     * Loads user meta data.
    102103     * @since 1.0.0
    103      * @since 2.1.1 Uses wordpress serialization.
     104     * @since 2.1.1 Uses WordPress serialization.
    104105     */
    105106    public function load_meta()
     
    173174     * Either adds or updates a meta.
    174175     * @since 1.0.0
    175      * @since 2.1.1 Uses wordpress serialization.
    176      * @since 2.1.2 Removed serialization, already done by wp.
    177176     *
    178177     * @param string $key   Key.
     
    183182        if ( $update_array )
    184183            $this->set_meta($key, $value);
    185 
    186184        try {
    187185            update_term_meta( $this->term_id, $key, $value );
     
    202200        }
    203201    }
     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    }
    204212}
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Models/Common/Attachment.php

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

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

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

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

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

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

    r2092750 r2331812  
    1212 * @license MIT
    1313 * @package WPMVC\MVC
    14  * @version 2.1.5
     14 * @version 2.1.11
    1515 */
    1616trait FindTermTrait
     
    2222     * @param mixed  $id       Record ID.
    2323     * @param string $taxonomy Taxonomy.
     24     *
     25     * @return object|null
    2426     */
    2527    public static function find( $id = 0, $taxonomy = null )
    2628    {
    27         return new self( $taxonomy, $id );
     29        $model = new self( $taxonomy, $id );
     30        return $model->has_trace() ? $model : null;
    2831    }
    2932    /**
     
    3336     * @param string $slug     Term slug.
    3437     * @param string $taxonomy Taxonomy.
     38     *
     39     * @return object|null
    3540     */
    3641    public static function find_by_slug( $slug = 0, $taxonomy = null )
     
    3843        $model = new self( $taxonomy, 0 );
    3944        $model->load_by_slug( $slug );
    40         return $model;
     45        return $model->has_trace() ? $model : null;
    4146    }
    4247    /**
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Traits/FindTrait.php

    r2092750 r2331812  
    1212 * @license MIT
    1313 * @package WPMVC\MVC
    14  * @version 1.0.0
     14 * @version 2.1.11
    1515 */
    1616trait FindTrait
    1717{
    18 
    1918    /**
    2019     * Finds record based on an ID.
     
    2221     *
    2322     * @param mixed $id Record ID.
     23     *
     24     * @return object|null
    2425     */
    2526    public static function find( $id = 0 )
    2627    {
    27         return new self($id);
     28        $model = new self( $id );
     29        return $model->has_trace() ? $model : null;
    2830    }
    2931    /**
     
    3335     * @param int $id Parent post ID.
    3436     *
    35      * @return array
     37     * @return \WPMVC\MVC\Collection
    3638     */
    3739    public static function from( $id )
    3840    {
    3941        if ( empty( $id ) ) return;
    40         $output = new Collection();
     42        $output = new Collection;
    4143        $reference = new self();
    4244        $results = get_children( array(
  • simple-post-gallery/trunk/vendor/10quality/wpmvc-mvc/src/Traits/MetaTrait.php

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

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

    r1843712 r2331812  
    99    '6f7750a5f1d239027ef483252f4ce3c7' => $vendorDir . '/10quality/wpmvc-phpfastcache/src/lib/functions.php',
    1010    'c607dd5e0d3f783ee5565b107740298c' => $vendorDir . '/10quality/wpmvc-core/src/lib/functions.php',
    11     '8600a54881920645a043f9b975dff7cc' => $baseDir . '/app/Lib/functions.php',
     11    'c413ca1672f2a2c1abe9b592407b6349' => $baseDir . '/app/Lib/functions.php',
    1212);
  • simple-post-gallery/trunk/vendor/composer/autoload_static.php

    r1843712 r2331812  
    1010        '6f7750a5f1d239027ef483252f4ce3c7' => __DIR__ . '/..' . '/10quality/wpmvc-phpfastcache/src/lib/functions.php',
    1111        'c607dd5e0d3f783ee5565b107740298c' => __DIR__ . '/..' . '/10quality/wpmvc-core/src/lib/functions.php',
    12         '8600a54881920645a043f9b975dff7cc' => __DIR__ . '/../..' . '/app/Lib/functions.php',
     12        'c413ca1672f2a2c1abe9b592407b6349' => __DIR__ . '/../..' . '/app/Lib/functions.php',
    1313    );
    1414
  • simple-post-gallery/trunk/vendor/composer/installed.json

    r2241498 r2331812  
    9191    },
    9292    {
     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    {
    93319        "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",
    96322        "source": {
    97323            "type": "git",
    98324            "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",
    105331            "shasum": ""
    106332        },
     
    111337            "phpunit/phpunit": "7.5.*"
    112338        },
    113         "time": "2019-06-04T21:22:07+00:00",
     339        "time": "2020-06-27T08:09:03+00:00",
    114340        "type": "library",
    115341        "installation-source": "dist",
     
    133359            }
    134360        ],
    135         "description": "Lightweight MVC for WPMVC (Wordpress MVC framework).",
     361        "description": "Lightweight MVC for WPMVC (WordPress MVC framework).",
    136362        "keywords": [
    137363            "light",
     
    142368    },
    143369    {
    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     {
    198370        "name": "10quality/wpmvc-core",
    199         "version": "v3.1.10.1",
    200         "version_normalized": "3.1.10.1",
     371        "version": "v3.1.13",
     372        "version_normalized": "3.1.13.0",
    201373        "source": {
    202374            "type": "git",
    203375            "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",
    210382            "shasum": ""
    211383        },
     
    220392            "phpunit/phpunit": "7.5.*"
    221393        },
    222         "time": "2020-01-27T01:02:47+00:00",
     394        "time": "2020-06-26T07:53:18+00:00",
    223395        "type": "library",
    224396        "installation-source": "source",
     
    253425    },
    254426    {
    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",
    477477            "php"
    478478        ]
Note: See TracChangeset for help on using the changeset viewer.