Plugin Directory

Changeset 2632279


Ignore:
Timestamp:
11/18/2021 07:17:44 PM (4 years ago)
Author:
ownerrez
Message:

Update to version 1.1.9 from GitHub

Location:
ownerrez
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ownerrez/tags/1.1.9/lib/autoload.php

    r2492370 r2632279  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1::getLoader();
     7return ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745::getLoader();
  • ownerrez/tags/1.1.9/lib/composer/ClassLoader.php

    r2492370 r2632279  
    4343class ClassLoader
    4444{
     45    /** @var ?string */
    4546    private $vendorDir;
    4647
    4748    // PSR-4
     49    /**
     50     * @var array[]
     51     * @psalm-var array<string, array<string, int>>
     52     */
    4853    private $prefixLengthsPsr4 = array();
     54    /**
     55     * @var array[]
     56     * @psalm-var array<string, array<int, string>>
     57     */
    4958    private $prefixDirsPsr4 = array();
     59    /**
     60     * @var array[]
     61     * @psalm-var array<string, string>
     62     */
    5063    private $fallbackDirsPsr4 = array();
    5164
    5265    // PSR-0
     66    /**
     67     * @var array[]
     68     * @psalm-var array<string, array<string, string[]>>
     69     */
    5370    private $prefixesPsr0 = array();
     71    /**
     72     * @var array[]
     73     * @psalm-var array<string, string>
     74     */
    5475    private $fallbackDirsPsr0 = array();
    5576
     77    /** @var bool */
    5678    private $useIncludePath = false;
     79
     80    /**
     81     * @var string[]
     82     * @psalm-var array<string, string>
     83     */
    5784    private $classMap = array();
     85
     86    /** @var bool */
    5887    private $classMapAuthoritative = false;
     88
     89    /**
     90     * @var bool[]
     91     * @psalm-var array<string, bool>
     92     */
    5993    private $missingClasses = array();
     94
     95    /** @var ?string */
    6096    private $apcuPrefix;
    6197
     98    /**
     99     * @var self[]
     100     */
    62101    private static $registeredLoaders = array();
    63102
     103    /**
     104     * @param ?string $vendorDir
     105     */
    64106    public function __construct($vendorDir = null)
    65107    {
     
    67109    }
    68110
     111    /**
     112     * @return string[]
     113     */
    69114    public function getPrefixes()
    70115    {
     
    76121    }
    77122
     123    /**
     124     * @return array[]
     125     * @psalm-return array<string, array<int, string>>
     126     */
    78127    public function getPrefixesPsr4()
    79128    {
     
    81130    }
    82131
     132    /**
     133     * @return array[]
     134     * @psalm-return array<string, string>
     135     */
    83136    public function getFallbackDirs()
    84137    {
     
    86139    }
    87140
     141    /**
     142     * @return array[]
     143     * @psalm-return array<string, string>
     144     */
    88145    public function getFallbackDirsPsr4()
    89146    {
     
    91148    }
    92149
     150    /**
     151     * @return string[] Array of classname => path
     152     * @psalm-var array<string, string>
     153     */
    93154    public function getClassMap()
    94155    {
     
    97158
    98159    /**
    99      * @param array $classMap Class to filename map
     160     * @param string[] $classMap Class to filename map
     161     * @psalm-param array<string, string> $classMap
     162     *
     163     * @return void
    100164     */
    101165    public function addClassMap(array $classMap)
     
    112176     * appending or prepending to the ones previously set for this prefix.
    113177     *
    114      * @param string       $prefix  The prefix
    115      * @param array|string $paths   The PSR-0 root directories
    116      * @param bool         $prepend Whether to prepend the directories
     178     * @param string          $prefix  The prefix
     179     * @param string[]|string $paths   The PSR-0 root directories
     180     * @param bool            $prepend Whether to prepend the directories
     181     *
     182     * @return void
    117183     */
    118184    public function add($prefix, $paths, $prepend = false)
     
    157223     * appending or prepending to the ones previously set for this namespace.
    158224     *
    159      * @param string       $prefix  The prefix/namespace, with trailing '\\'
    160      * @param array|string $paths   The PSR-4 base directories
    161      * @param bool         $prepend Whether to prepend the directories
     225     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     226     * @param string[]|string $paths   The PSR-4 base directories
     227     * @param bool            $prepend Whether to prepend the directories
    162228     *
    163229     * @throws \InvalidArgumentException
     230     *
     231     * @return void
    164232     */
    165233    public function addPsr4($prefix, $paths, $prepend = false)
     
    205273     * replacing any others previously set for this prefix.
    206274     *
    207      * @param string       $prefix The prefix
    208      * @param array|string $paths  The PSR-0 base directories
     275     * @param string          $prefix The prefix
     276     * @param string[]|string $paths  The PSR-0 base directories
     277     *
     278     * @return void
    209279     */
    210280    public function set($prefix, $paths)
     
    221291     * replacing any others previously set for this namespace.
    222292     *
    223      * @param string       $prefix The prefix/namespace, with trailing '\\'
    224      * @param array|string $paths  The PSR-4 base directories
     293     * @param string          $prefix The prefix/namespace, with trailing '\\'
     294     * @param string[]|string $paths  The PSR-4 base directories
    225295     *
    226296     * @throws \InvalidArgumentException
     297     *
     298     * @return void
    227299     */
    228300    public function setPsr4($prefix, $paths)
     
    244316     *
    245317     * @param bool $useIncludePath
     318     *
     319     * @return void
    246320     */
    247321    public function setUseIncludePath($useIncludePath)
     
    266340     *
    267341     * @param bool $classMapAuthoritative
     342     *
     343     * @return void
    268344     */
    269345    public function setClassMapAuthoritative($classMapAuthoritative)
     
    286362     *
    287363     * @param string|null $apcuPrefix
     364     *
     365     * @return void
    288366     */
    289367    public function setApcuPrefix($apcuPrefix)
     
    306384     *
    307385     * @param bool $prepend Whether to prepend the autoloader or not
     386     *
     387     * @return void
    308388     */
    309389    public function register($prepend = false)
     
    325405    /**
    326406     * Unregisters this instance as an autoloader.
     407     *
     408     * @return void
    327409     */
    328410    public function unregister()
     
    339421     *
    340422     * @param  string    $class The name of the class
    341      * @return bool|null True if loaded, null otherwise
     423     * @return true|null True if loaded, null otherwise
    342424     */
    343425    public function loadClass($class)
     
    348430            return true;
    349431        }
     432
     433        return null;
    350434    }
    351435
     
    402486    }
    403487
     488    /**
     489     * @param  string       $class
     490     * @param  string       $ext
     491     * @return string|false
     492     */
    404493    private function findFileWithExtension($class, $ext)
    405494    {
     
    473562 *
    474563 * Prevents access to $this/self from included files.
     564 *
     565 * @param  string $file
     566 * @return void
     567 * @private
    475568 */
    476569function includeFile($file)
  • ownerrez/tags/1.1.9/lib/composer/InstalledVersions.php

    r2492370 r2632279  
    11<?php
    22
    3 
    4 
    5 
    6 
    7 
    8 
    9 
    10 
    11 
     3/*
     4 * This file is part of Composer.
     5 *
     6 * (c) Nils Adermann <naderman@naderman.de>
     7 *     Jordi Boggiano <j.boggiano@seld.be>
     8 *
     9 * For the full copyright and license information, please view the LICENSE
     10 * file that was distributed with this source code.
     11 */
    1212
    1313namespace Composer;
     
    1616use Composer\Semver\VersionParser;
    1717
    18 
    19 
    20 
    21 
    22 
     18/**
     19 * This class is copied in every Composer installed project and available to all
     20 *
     21 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
     22 *
     23 * To require its presence, you can require `composer-runtime-api ^2.0`
     24 */
    2325class InstalledVersions
    2426{
    25 private static $installed = array (
    26   'root' =>
    27   array (
    28     'pretty_version' => 'v1.1.6',
    29     'version' => '1.1.6.0',
    30     'aliases' =>
    31     array (
    32     ),
    33     'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    34     'name' => 'ownerrez/orez-wp',
    35   ),
    36   'versions' =>
    37   array (
    38     'guzzlehttp/guzzle' =>
    39     array (
    40       'pretty_version' => '7.2.0',
    41       'version' => '7.2.0.0',
    42       'aliases' =>
    43       array (
    44       ),
    45       'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79',
    46     ),
    47     'guzzlehttp/promises' =>
    48     array (
    49       'pretty_version' => '1.4.0',
    50       'version' => '1.4.0.0',
    51       'aliases' =>
    52       array (
    53       ),
    54       'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
    55     ),
    56     'guzzlehttp/psr7' =>
    57     array (
    58       'pretty_version' => '1.7.0',
    59       'version' => '1.7.0.0',
    60       'aliases' =>
    61       array (
    62       ),
    63       'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
    64     ),
    65     'ownerrez/orez-api' =>
    66     array (
    67       'pretty_version' => '1.0.5',
    68       'version' => '1.0.5.0',
    69       'aliases' =>
    70       array (
    71       ),
    72       'reference' => '7b103b412eb359848cbde50bfc3c8b18a898b461',
    73     ),
    74     'ownerrez/orez-wp' =>
    75     array (
    76       'pretty_version' => 'v1.1.6',
    77       'version' => '1.1.6.0',
    78       'aliases' =>
    79       array (
    80       ),
    81       'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    82     ),
    83     'psr/http-client' =>
    84     array (
    85       'pretty_version' => '1.0.1',
    86       'version' => '1.0.1.0',
    87       'aliases' =>
    88       array (
    89       ),
    90       'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
    91     ),
    92     'psr/http-client-implementation' =>
    93     array (
    94       'provided' =>
    95       array (
    96         0 => '1.0',
    97       ),
    98     ),
    99     'psr/http-message' =>
    100     array (
    101       'pretty_version' => '1.0.1',
    102       'version' => '1.0.1.0',
    103       'aliases' =>
    104       array (
    105       ),
    106       'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
    107     ),
    108     'psr/http-message-implementation' =>
    109     array (
    110       'provided' =>
    111       array (
    112         0 => '1.0',
    113       ),
    114     ),
    115     'ralouphie/getallheaders' =>
    116     array (
    117       'pretty_version' => '3.0.3',
    118       'version' => '3.0.3.0',
    119       'aliases' =>
    120       array (
    121       ),
    122       'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    123     ),
    124   ),
    125 );
    126 private static $canGetVendors;
    127 private static $installedByVendor = array();
    128 
    129 
    130 
    131 
    132 
    133 
    134 
    135 public static function getInstalledPackages()
    136 {
    137 $packages = array();
    138 foreach (self::getInstalled() as $installed) {
    139 $packages[] = array_keys($installed['versions']);
     27    /**
     28     * @var mixed[]|null
     29     * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
     30     */
     31    private static $installed;
     32
     33    /**
     34     * @var bool|null
     35     */
     36    private static $canGetVendors;
     37
     38    /**
     39     * @var array[]
     40     * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     41     */
     42    private static $installedByVendor = array();
     43
     44    /**
     45     * Returns a list of all package names which are present, either by being installed, replaced or provided
     46     *
     47     * @return string[]
     48     * @psalm-return list<string>
     49     */
     50    public static function getInstalledPackages()
     51    {
     52        $packages = array();
     53        foreach (self::getInstalled() as $installed) {
     54            $packages[] = array_keys($installed['versions']);
     55        }
     56
     57        if (1 === \count($packages)) {
     58            return $packages[0];
     59        }
     60
     61        return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
     62    }
     63
     64    /**
     65     * Returns a list of all package names with a specific type e.g. 'library'
     66     *
     67     * @param  string   $type
     68     * @return string[]
     69     * @psalm-return list<string>
     70     */
     71    public static function getInstalledPackagesByType($type)
     72    {
     73        $packagesByType = array();
     74
     75        foreach (self::getInstalled() as $installed) {
     76            foreach ($installed['versions'] as $name => $package) {
     77                if (isset($package['type']) && $package['type'] === $type) {
     78                    $packagesByType[] = $name;
     79                }
     80            }
     81        }
     82
     83        return $packagesByType;
     84    }
     85
     86    /**
     87     * Checks whether the given package is installed
     88     *
     89     * This also returns true if the package name is provided or replaced by another package
     90     *
     91     * @param  string $packageName
     92     * @param  bool   $includeDevRequirements
     93     * @return bool
     94     */
     95    public static function isInstalled($packageName, $includeDevRequirements = true)
     96    {
     97        foreach (self::getInstalled() as $installed) {
     98            if (isset($installed['versions'][$packageName])) {
     99                return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     100            }
     101        }
     102
     103        return false;
     104    }
     105
     106    /**
     107     * Checks whether the given package satisfies a version constraint
     108     *
     109     * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
     110     *
     111     *   Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
     112     *
     113     * @param  VersionParser $parser      Install composer/semver to have access to this class and functionality
     114     * @param  string        $packageName
     115     * @param  string|null   $constraint  A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
     116     * @return bool
     117     */
     118    public static function satisfies(VersionParser $parser, $packageName, $constraint)
     119    {
     120        $constraint = $parser->parseConstraints($constraint);
     121        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
     122
     123        return $provided->matches($constraint);
     124    }
     125
     126    /**
     127     * Returns a version constraint representing all the range(s) which are installed for a given package
     128     *
     129     * It is easier to use this via isInstalled() with the $constraint argument if you need to check
     130     * whether a given version of a package is installed, and not just whether it exists
     131     *
     132     * @param  string $packageName
     133     * @return string Version constraint usable with composer/semver
     134     */
     135    public static function getVersionRanges($packageName)
     136    {
     137        foreach (self::getInstalled() as $installed) {
     138            if (!isset($installed['versions'][$packageName])) {
     139                continue;
     140            }
     141
     142            $ranges = array();
     143            if (isset($installed['versions'][$packageName]['pretty_version'])) {
     144                $ranges[] = $installed['versions'][$packageName]['pretty_version'];
     145            }
     146            if (array_key_exists('aliases', $installed['versions'][$packageName])) {
     147                $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
     148            }
     149            if (array_key_exists('replaced', $installed['versions'][$packageName])) {
     150                $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
     151            }
     152            if (array_key_exists('provided', $installed['versions'][$packageName])) {
     153                $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
     154            }
     155
     156            return implode(' || ', $ranges);
     157        }
     158
     159        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     160    }
     161
     162    /**
     163     * @param  string      $packageName
     164     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     165     */
     166    public static function getVersion($packageName)
     167    {
     168        foreach (self::getInstalled() as $installed) {
     169            if (!isset($installed['versions'][$packageName])) {
     170                continue;
     171            }
     172
     173            if (!isset($installed['versions'][$packageName]['version'])) {
     174                return null;
     175            }
     176
     177            return $installed['versions'][$packageName]['version'];
     178        }
     179
     180        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     181    }
     182
     183    /**
     184     * @param  string      $packageName
     185     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     186     */
     187    public static function getPrettyVersion($packageName)
     188    {
     189        foreach (self::getInstalled() as $installed) {
     190            if (!isset($installed['versions'][$packageName])) {
     191                continue;
     192            }
     193
     194            if (!isset($installed['versions'][$packageName]['pretty_version'])) {
     195                return null;
     196            }
     197
     198            return $installed['versions'][$packageName]['pretty_version'];
     199        }
     200
     201        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     202    }
     203
     204    /**
     205     * @param  string      $packageName
     206     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
     207     */
     208    public static function getReference($packageName)
     209    {
     210        foreach (self::getInstalled() as $installed) {
     211            if (!isset($installed['versions'][$packageName])) {
     212                continue;
     213            }
     214
     215            if (!isset($installed['versions'][$packageName]['reference'])) {
     216                return null;
     217            }
     218
     219            return $installed['versions'][$packageName]['reference'];
     220        }
     221
     222        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     223    }
     224
     225    /**
     226     * @param  string      $packageName
     227     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
     228     */
     229    public static function getInstallPath($packageName)
     230    {
     231        foreach (self::getInstalled() as $installed) {
     232            if (!isset($installed['versions'][$packageName])) {
     233                continue;
     234            }
     235
     236            return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
     237        }
     238
     239        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     240    }
     241
     242    /**
     243     * @return array
     244     * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
     245     */
     246    public static function getRootPackage()
     247    {
     248        $installed = self::getInstalled();
     249
     250        return $installed[0]['root'];
     251    }
     252
     253    /**
     254     * Returns the raw installed.php data for custom implementations
     255     *
     256     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
     257     * @return array[]
     258     * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
     259     */
     260    public static function getRawData()
     261    {
     262        @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
     263
     264        if (null === self::$installed) {
     265            // only require the installed.php file if this file is loaded from its dumped location,
     266            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
     267            if (substr(__DIR__, -8, 1) !== 'C') {
     268                self::$installed = include __DIR__ . '/installed.php';
     269            } else {
     270                self::$installed = array();
     271            }
     272        }
     273
     274        return self::$installed;
     275    }
     276
     277    /**
     278     * Returns the raw data of all installed.php which are currently loaded for custom implementations
     279     *
     280     * @return array[]
     281     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     282     */
     283    public static function getAllRawData()
     284    {
     285        return self::getInstalled();
     286    }
     287
     288    /**
     289     * Lets you reload the static array from another file
     290     *
     291     * This is only useful for complex integrations in which a project needs to use
     292     * this class but then also needs to execute another project's autoloader in process,
     293     * and wants to ensure both projects have access to their version of installed.php.
     294     *
     295     * A typical case would be PHPUnit, where it would need to make sure it reads all
     296     * the data it needs from this class, then call reload() with
     297     * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
     298     * the project in which it runs can then also use this class safely, without
     299     * interference between PHPUnit's dependencies and the project's dependencies.
     300     *
     301     * @param  array[] $data A vendor/composer/installed.php data set
     302     * @return void
     303     *
     304     * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
     305     */
     306    public static function reload($data)
     307    {
     308        self::$installed = $data;
     309        self::$installedByVendor = array();
     310    }
     311
     312    /**
     313     * @return array[]
     314     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     315     */
     316    private static function getInstalled()
     317    {
     318        if (null === self::$canGetVendors) {
     319            self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
     320        }
     321
     322        $installed = array();
     323
     324        if (self::$canGetVendors) {
     325            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     326                if (isset(self::$installedByVendor[$vendorDir])) {
     327                    $installed[] = self::$installedByVendor[$vendorDir];
     328                } elseif (is_file($vendorDir.'/composer/installed.php')) {
     329                    $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     330                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
     331                        self::$installed = $installed[count($installed) - 1];
     332                    }
     333                }
     334            }
     335        }
     336
     337        if (null === self::$installed) {
     338            // only require the installed.php file if this file is loaded from its dumped location,
     339            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
     340            if (substr(__DIR__, -8, 1) !== 'C') {
     341                self::$installed = require __DIR__ . '/installed.php';
     342            } else {
     343                self::$installed = array();
     344            }
     345        }
     346        $installed[] = self::$installed;
     347
     348        return $installed;
     349    }
    140350}
    141 
    142 
    143 if (1 === \count($packages)) {
    144 return $packages[0];
    145 }
    146 
    147 return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
    148 }
    149 
    150 
    151 
    152 
    153 
    154 
    155 
    156 
    157 
    158 public static function isInstalled($packageName)
    159 {
    160 foreach (self::getInstalled() as $installed) {
    161 if (isset($installed['versions'][$packageName])) {
    162 return true;
    163 }
    164 }
    165 
    166 return false;
    167 }
    168 
    169 
    170 
    171 
    172 
    173 
    174 
    175 
    176 
    177 
    178 
    179 
    180 
    181 
    182 public static function satisfies(VersionParser $parser, $packageName, $constraint)
    183 {
    184 $constraint = $parser->parseConstraints($constraint);
    185 $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    186 
    187 return $provided->matches($constraint);
    188 }
    189 
    190 
    191 
    192 
    193 
    194 
    195 
    196 
    197 
    198 
    199 public static function getVersionRanges($packageName)
    200 {
    201 foreach (self::getInstalled() as $installed) {
    202 if (!isset($installed['versions'][$packageName])) {
    203 continue;
    204 }
    205 
    206 $ranges = array();
    207 if (isset($installed['versions'][$packageName]['pretty_version'])) {
    208 $ranges[] = $installed['versions'][$packageName]['pretty_version'];
    209 }
    210 if (array_key_exists('aliases', $installed['versions'][$packageName])) {
    211 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
    212 }
    213 if (array_key_exists('replaced', $installed['versions'][$packageName])) {
    214 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
    215 }
    216 if (array_key_exists('provided', $installed['versions'][$packageName])) {
    217 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
    218 }
    219 
    220 return implode(' || ', $ranges);
    221 }
    222 
    223 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    224 }
    225 
    226 
    227 
    228 
    229 
    230 public static function getVersion($packageName)
    231 {
    232 foreach (self::getInstalled() as $installed) {
    233 if (!isset($installed['versions'][$packageName])) {
    234 continue;
    235 }
    236 
    237 if (!isset($installed['versions'][$packageName]['version'])) {
    238 return null;
    239 }
    240 
    241 return $installed['versions'][$packageName]['version'];
    242 }
    243 
    244 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    245 }
    246 
    247 
    248 
    249 
    250 
    251 public static function getPrettyVersion($packageName)
    252 {
    253 foreach (self::getInstalled() as $installed) {
    254 if (!isset($installed['versions'][$packageName])) {
    255 continue;
    256 }
    257 
    258 if (!isset($installed['versions'][$packageName]['pretty_version'])) {
    259 return null;
    260 }
    261 
    262 return $installed['versions'][$packageName]['pretty_version'];
    263 }
    264 
    265 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    266 }
    267 
    268 
    269 
    270 
    271 
    272 public static function getReference($packageName)
    273 {
    274 foreach (self::getInstalled() as $installed) {
    275 if (!isset($installed['versions'][$packageName])) {
    276 continue;
    277 }
    278 
    279 if (!isset($installed['versions'][$packageName]['reference'])) {
    280 return null;
    281 }
    282 
    283 return $installed['versions'][$packageName]['reference'];
    284 }
    285 
    286 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    287 }
    288 
    289 
    290 
    291 
    292 
    293 public static function getRootPackage()
    294 {
    295 $installed = self::getInstalled();
    296 
    297 return $installed[0]['root'];
    298 }
    299 
    300 
    301 
    302 
    303 
    304 
    305 
    306 public static function getRawData()
    307 {
    308 return self::$installed;
    309 }
    310 
    311 
    312 
    313 
    314 
    315 
    316 
    317 
    318 
    319 
    320 
    321 
    322 
    323 
    324 
    325 
    326 
    327 
    328 
    329 public static function reload($data)
    330 {
    331 self::$installed = $data;
    332 self::$installedByVendor = array();
    333 }
    334 
    335 
    336 
    337 
    338 private static function getInstalled()
    339 {
    340 if (null === self::$canGetVendors) {
    341 self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
    342 }
    343 
    344 $installed = array();
    345 
    346 if (self::$canGetVendors) {
    347 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
    348 if (isset(self::$installedByVendor[$vendorDir])) {
    349 $installed[] = self::$installedByVendor[$vendorDir];
    350 } elseif (is_file($vendorDir.'/composer/installed.php')) {
    351 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    352 }
    353 }
    354 }
    355 
    356 $installed[] = self::$installed;
    357 
    358 return $installed;
    359 }
    360 }
  • ownerrez/tags/1.1.9/lib/composer/autoload_real.php

    r2492370 r2632279  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1
     5class ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInit32993f4f10380a055df9a453a342ebf1::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInitb2c63143273ca805b250984dbfb91745::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5454
    5555        if ($useStaticLoader) {
    56             $includeFiles = Composer\Autoload\ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$files;
     56            $includeFiles = Composer\Autoload\ComposerStaticInitb2c63143273ca805b250984dbfb91745::$files;
    5757        } else {
    5858            $includeFiles = require __DIR__ . '/autoload_files.php';
    5959        }
    6060        foreach ($includeFiles as $fileIdentifier => $file) {
    61             composerRequire32993f4f10380a055df9a453a342ebf1($fileIdentifier, $file);
     61            composerRequireb2c63143273ca805b250984dbfb91745($fileIdentifier, $file);
    6262        }
    6363
     
    6666}
    6767
    68 function composerRequire32993f4f10380a055df9a453a342ebf1($fileIdentifier, $file)
     68function composerRequireb2c63143273ca805b250984dbfb91745($fileIdentifier, $file)
    6969{
    7070    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • ownerrez/tags/1.1.9/lib/composer/autoload_static.php

    r2492370 r2632279  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit32993f4f10380a055df9a453a342ebf1
     7class ComposerStaticInitb2c63143273ca805b250984dbfb91745
    88{
    99    public static $files = array (
     
    7676    {
    7777        return \Closure::bind(function () use ($loader) {
    78             $loader->prefixLengthsPsr4 = ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$prefixLengthsPsr4;
    79             $loader->prefixDirsPsr4 = ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$prefixDirsPsr4;
    80             $loader->classMap = ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$classMap;
     78            $loader->prefixLengthsPsr4 = ComposerStaticInitb2c63143273ca805b250984dbfb91745::$prefixLengthsPsr4;
     79            $loader->prefixDirsPsr4 = ComposerStaticInitb2c63143273ca805b250984dbfb91745::$prefixDirsPsr4;
     80            $loader->classMap = ComposerStaticInitb2c63143273ca805b250984dbfb91745::$classMap;
    8181
    8282        }, null, ClassLoader::class);
  • ownerrez/tags/1.1.9/lib/composer/installed.php

    r2492370 r2632279  
    1 <?php return array (
    2   'root' =>
    3   array (
    4     'pretty_version' => 'v1.1.6',
    5     'version' => '1.1.6.0',
    6     'aliases' =>
    7     array (
     1<?php return array(
     2    'root' => array(
     3        'pretty_version' => 'v1.1.9',
     4        'version' => '1.1.9.0',
     5        'type' => 'wordpress-plugin',
     6        'install_path' => __DIR__ . '/../../../',
     7        'aliases' => array(),
     8        'reference' => '9a913e03f1939826e93b1da4755993874c9e79f9',
     9        'name' => 'ownerrez/orez-wp',
     10        'dev' => true,
    811    ),
    9     'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    10     'name' => 'ownerrez/orez-wp',
    11   ),
    12   'versions' =>
    13   array (
    14     'guzzlehttp/guzzle' =>
    15     array (
    16       'pretty_version' => '7.2.0',
    17       'version' => '7.2.0.0',
    18       'aliases' =>
    19       array (
    20       ),
    21       'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79',
     12    'versions' => array(
     13        'guzzlehttp/guzzle' => array(
     14            'pretty_version' => '7.2.0',
     15            'version' => '7.2.0.0',
     16            'type' => 'library',
     17            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     18            'aliases' => array(),
     19            'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79',
     20            'dev_requirement' => false,
     21        ),
     22        'guzzlehttp/promises' => array(
     23            'pretty_version' => '1.4.0',
     24            'version' => '1.4.0.0',
     25            'type' => 'library',
     26            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     27            'aliases' => array(),
     28            'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
     29            'dev_requirement' => false,
     30        ),
     31        'guzzlehttp/psr7' => array(
     32            'pretty_version' => '1.7.0',
     33            'version' => '1.7.0.0',
     34            'type' => 'library',
     35            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     36            'aliases' => array(),
     37            'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
     38            'dev_requirement' => false,
     39        ),
     40        'ownerrez/orez-api' => array(
     41            'pretty_version' => '1.0.5',
     42            'version' => '1.0.5.0',
     43            'type' => 'library',
     44            'install_path' => __DIR__ . '/../ownerrez/orez-api',
     45            'aliases' => array(),
     46            'reference' => '7b103b412eb359848cbde50bfc3c8b18a898b461',
     47            'dev_requirement' => false,
     48        ),
     49        'ownerrez/orez-wp' => array(
     50            'pretty_version' => 'v1.1.9',
     51            'version' => '1.1.9.0',
     52            'type' => 'wordpress-plugin',
     53            'install_path' => __DIR__ . '/../../../',
     54            'aliases' => array(),
     55            'reference' => '9a913e03f1939826e93b1da4755993874c9e79f9',
     56            'dev_requirement' => false,
     57        ),
     58        'psr/http-client' => array(
     59            'pretty_version' => '1.0.1',
     60            'version' => '1.0.1.0',
     61            'type' => 'library',
     62            'install_path' => __DIR__ . '/../psr/http-client',
     63            'aliases' => array(),
     64            'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
     65            'dev_requirement' => false,
     66        ),
     67        'psr/http-client-implementation' => array(
     68            'dev_requirement' => false,
     69            'provided' => array(
     70                0 => '1.0',
     71            ),
     72        ),
     73        'psr/http-message' => array(
     74            'pretty_version' => '1.0.1',
     75            'version' => '1.0.1.0',
     76            'type' => 'library',
     77            'install_path' => __DIR__ . '/../psr/http-message',
     78            'aliases' => array(),
     79            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
     80            'dev_requirement' => false,
     81        ),
     82        'psr/http-message-implementation' => array(
     83            'dev_requirement' => false,
     84            'provided' => array(
     85                0 => '1.0',
     86            ),
     87        ),
     88        'ralouphie/getallheaders' => array(
     89            'pretty_version' => '3.0.3',
     90            'version' => '3.0.3.0',
     91            'type' => 'library',
     92            'install_path' => __DIR__ . '/../ralouphie/getallheaders',
     93            'aliases' => array(),
     94            'reference' => '120b605dfeb996808c31b6477290a714d356e822',
     95            'dev_requirement' => false,
     96        ),
    2297    ),
    23     'guzzlehttp/promises' =>
    24     array (
    25       'pretty_version' => '1.4.0',
    26       'version' => '1.4.0.0',
    27       'aliases' =>
    28       array (
    29       ),
    30       'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
    31     ),
    32     'guzzlehttp/psr7' =>
    33     array (
    34       'pretty_version' => '1.7.0',
    35       'version' => '1.7.0.0',
    36       'aliases' =>
    37       array (
    38       ),
    39       'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
    40     ),
    41     'ownerrez/orez-api' =>
    42     array (
    43       'pretty_version' => '1.0.5',
    44       'version' => '1.0.5.0',
    45       'aliases' =>
    46       array (
    47       ),
    48       'reference' => '7b103b412eb359848cbde50bfc3c8b18a898b461',
    49     ),
    50     'ownerrez/orez-wp' =>
    51     array (
    52       'pretty_version' => 'v1.1.6',
    53       'version' => '1.1.6.0',
    54       'aliases' =>
    55       array (
    56       ),
    57       'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    58     ),
    59     'psr/http-client' =>
    60     array (
    61       'pretty_version' => '1.0.1',
    62       'version' => '1.0.1.0',
    63       'aliases' =>
    64       array (
    65       ),
    66       'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
    67     ),
    68     'psr/http-client-implementation' =>
    69     array (
    70       'provided' =>
    71       array (
    72         0 => '1.0',
    73       ),
    74     ),
    75     'psr/http-message' =>
    76     array (
    77       'pretty_version' => '1.0.1',
    78       'version' => '1.0.1.0',
    79       'aliases' =>
    80       array (
    81       ),
    82       'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
    83     ),
    84     'psr/http-message-implementation' =>
    85     array (
    86       'provided' =>
    87       array (
    88         0 => '1.0',
    89       ),
    90     ),
    91     'ralouphie/getallheaders' =>
    92     array (
    93       'pretty_version' => '3.0.3',
    94       'version' => '3.0.3.0',
    95       'aliases' =>
    96       array (
    97       ),
    98       'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    99     ),
    100   ),
    10198);
  • ownerrez/tags/1.1.9/ownerrez.php

    r2492370 r2632279  
    1717 * Plugin URI:        https://www.ownerreservations.com/support/wordpress
    1818 * Description:       The official WordPress plugin for the OwnerRez API.
    19  * Version:           1.1.6
     19 * Version:           1.1.9
    2020 * Author:            OwnerRez, Inc.
    2121 * Author URI:        https://www.ownerreservations.com/
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define('OWNERREZ_VERSION', '1.1.6');
     38define('OWNERREZ_VERSION', '1.1.9');
    3939
    4040/**
  • ownerrez/tags/1.1.9/public/class-ownerrez-shortcodes.php

    r2455543 r2632279  
    2323class OwnerRez_ShortCodes {
    2424
    25     /**
    26     * The ID of this plugin.
    27     *
    28     * @since    1.0.0
    29     * @access   private
    30     * @var      string    $ownerrez    The ID of this plugin.
    31     */
    32     private $ownerrez;
    33 
    34     /**
    35     * The version of this plugin.
    36     *
    37     * @since    1.0.0
    38     * @access   private
    39     * @var      string    $version    The current version of this plugin.
    40     */
    41     private $version;
     25    /**
     26    * The ID of this plugin.
     27    *
     28    * @since    1.0.0
     29    * @access   private
     30    * @var      string    $ownerrez    The ID of this plugin.
     31    */
     32    private $ownerrez;
     33
     34    /**
     35    * The version of this plugin.
     36    *
     37    * @since    1.0.0
     38    * @access   private
     39    * @var      string    $version    The current version of this plugin.
     40    */
     41    private $version;
    4242
    4343    private $api;
    4444
    45     /**
    46     * Initialize the class and set its properties.
    47     *
    48     * @since    1.0.0
    49     * @param      string    $ownerrez       The name of the plugin.
    50     * @param      string    $version    The version of this plugin.
    51     */
    52     public function __construct( $ownerrez, $version ) {
    53 
    54         $this->ownerrez = $ownerrez;
    55         $this->version = $version;
     45    /**
     46    * Initialize the class and set its properties.
     47    *
     48    * @since    1.0.0
     49    * @param      string    $ownerrez       The name of the plugin.
     50    * @param      string    $version    The version of this plugin.
     51    */
     52    public function __construct( $ownerrez, $version ) {
     53
     54        $this->ownerrez = $ownerrez;
     55        $this->version = $version;
    5656        $this->api = new OwnerRez_ApiWrapper();
    57     }
    58 
    59     /**
    60     * Register the shortcodes for the public-facing side of the site.
    61     *
    62     * @since    1.0.0
    63     */
    64     public function register_shortcodes()
     57    }
     58
     59    /**
     60    * Register the shortcodes for the public-facing side of the site.
     61    *
     62    * @since    1.0.0
     63    */
     64    public function register_shortcodes()
    6565    {
    6666        add_shortcode('ownerrez', array($this, 'shortcode'));
     
    325325    {
    326326        if (!$this->photoCarouselEnqueued) {
    327             wp_enqueue_style("ownerrez-lgstyle1", "https://cdn.orez.io/hc/content/lightslider.min.css", null, $this->version);
    328             wp_enqueue_style("ownerrez-lgstyle2", "https://cdn.orez.io/hc/content/lightgallery.min.css", null, $this->version);
     327            wp_enqueue_style("ownerrez-lgstyle", "https://cdn.orez.io/hc/content/lgbundle.min.css", null, $this->version);
    329328            wp_enqueue_script("ownerrez-lgscript", "https://cdn.orez.io/hc/scripts/lgbundle.min.js", array( 'jquery' ), $this->version);
     329//            wp_enqueue_style("ownerrez-lgstyle", "https://hosteddev.ownerrez.com/content/lgbundle.min.css", null, $this->version);
     330//            wp_enqueue_script("ownerrez-lgscript", "https://hosteddev.ownerrez.com/scripts/lgbundle.min.js", array( 'jquery' ), $this->version);
    330331            wp_enqueue_script("ownerrez-photo-carousel.js", plugins_url('/ownerrez/public/js/ownerrez-photo-carousel.js'), array( 'jquery' ), $this->version);
    331332
     
    342343                $caption = $image->caption;
    343344
    344             $sliderUl .= "<li data-thumb='" . $image->croppedUrl . "' data-src='" . $image->originalUrl . "'><img src='" . $image->largeUrl . "' data-sub-html='" . $caption . "' />";
     345            $srcUrl = $image->originalUrl;
     346            $posterAttr = "";
     347
     348            if (property_exists($image, "videoUrl") && !is_null($image->videoUrl)) {
     349                $srcUrl = $image->videoUrl . (strpos($image->videoUrl, "?") ? "&" : "?") . 'mute=0&muted=false';
     350                $posterAttr = " data-poster='" . $image->originalUrl . "'";
     351            }
     352
     353            $sliderUl .= "<li data-thumb='" . $image->croppedUrl . "' data-src='" . $srcUrl . "'" . $posterAttr . "><img src='" . $image->largeUrl . "' data-sub-html='" . $caption . "' />";
     354
     355            if (property_exists($image, "videoUrl") && !is_null($image->videoUrl)) {
     356                $sliderUl .= '<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="Play video" role="img" class="lg-video-play-icon">
     357                        <title>Play video</title>
     358                        <circle cx="50%" cy="50%" r="48"></circle>
     359                        <polygon points="35,30 35,70 70,50"></polygon>
     360                    </svg>';
     361            }
    345362
    346363            if (strlen($caption) > 0)
     
    350367        }
    351368
    352         $sliderUl .= "</ul>";
     369        $sliderUl .= '</ul>
     370        <ul class="loading-pager"><li>Loading...</li></ul>';
    353371
    354372        return $sliderUl;
  • ownerrez/tags/1.1.9/public/css/ownerrez-public.css

    r2450742 r2632279  
    11.loading-slider {
    22    padding: 0;
    3     padding-bottom: 70% /* a bit extra for the thumbs */
    4 }
    5 
    6 .loading-slider li {
    7     margin: 0;
    8     padding: 0;
    9     list-style: none
     3    margin: 0;
     4    border: 1px solid rgb(204, 204, 204);
     5    box-shadow: rgb(204 204 204) 1px 1px 3px;
     6}
     7
     8.loading-slider li,
     9.lightSlider li {
     10    margin: 0;
     11    padding: 0;
     12    list-style: none;
     13    line-height: 0;
     14}
     15
     16ul.loading-pager {
     17    margin: 0;
     18    padding: 0;
     19    list-style: none;
     20    text-align: center;
     21    height: 81px;
     22}
     23ul.loading-pager li {
     24    line-height: 5;
    1025}
    1126
     
    2035}
    2136
     37.loading-slider .caption,
    2238.lightSlider .caption {
    2339    text-align: center;
    2440    position: absolute;
    25     bottom: 0px;
    26     left: 0px;
    27     right: 0px;
     41    bottom: 0;
     42    left: 0;
     43    right: 0;
    2844    font-size: 16px;
    2945    margin: 0;
     
    3248    padding: 5px 10px 5px 5px;
    3349    background-color: rgba(255,255,255,.8);
     50    line-height: 1.2;
    3451}
    3552
     
    190207    margin-left: 5px;
    191208}
     209
     210.loading-slider li,
     211.lslide {
     212    position: relative;
     213    cursor: pointer;
     214}
     215.loading-slider li .lg-video-play-icon,
     216.lslide .lg-video-play-icon {
     217    width: 150px;
     218}
     219
     220.lslide:hover .lg-video-play-icon {
     221    opacity: 0.9;
     222    cursor: pointer;
     223}
     224
     225.loading-slider li .lg-video-play-icon polygon,
     226.lslide .lg-video-play-icon polygon {
     227    fill: #fcfcfc;
     228}
     229.loading-slider li .lg-video-play-icon circle,
     230.lslide .lg-video-play-icon circle {
     231    fill: none;
     232    stroke: #fcfcfc;
     233    stroke-width: 3%;
     234}
     235.lg-video-play-button .lg-video-play-icon {
     236    width: 35%;
     237    left: 53%;
     238    top: 48%;
     239}
     240
     241.loading-slider img,
     242.lslide img {
     243    min-width: 100%;
     244}
  • ownerrez/tags/1.1.9/public/js/ownerrez-photo-carousel.js

    r2450742 r2632279  
    11jQuery(".ownerrez-photo-carousel").each(function() {
    2     var div = jQuery(this);
    3     div.lightSlider({
     2    var loadingPager = jQuery(this).nextAll("ul.loading-pager");loadingPager
     3    jQuery(this).lightSlider({
    44        gallery: true,
    55        item: 1,
     
    1414        mode: 'fade',
    1515        onSliderLoad: function (el) {
    16             el.lightGallery({
     16            loadingPager.remove();
     17            lightGallery(el.get(0), {
     18                licenseKey: "5CD6B56C-064145F1-A29A5203-5655C26F",
    1719                selector: '.ownerrez-photo-carousel .lslide',
    18                 preload: 4
     20                preload: 4,
     21                plugins: [lgVideo,lgThumbnail],
     22                loadYouTubeThumbnail: false,
     23                gotoNextSlideOnVideoEnd: false,
     24                youTubePlayerParams: {
     25                    modestbranding: 1,
     26                    iv_load_policy: 3
     27                }
    1928            });
    2029        },
  • ownerrez/tags/1.1.9/readme.txt

    r2492370 r2632279  
    44Requires at least: 5.4
    55Tested up to: 5.7
    6 Stable tag: 1.1.6
     6Stable tag: 1.1.9
    77License: MIT
    88License URI: https://github.com/ownerrez/orez-wp/blob/master/LICENSE
     
    3333
    3434== Changelog ==
     35= 1.1.9 =
     36- Added video support to photo carousel.
     37
     38= 1.1.6 =
     39- Add support for WordPress 5.7
     40- Add support for PHP 8
     41
    3542= 1.1.5 =
    36 - Upgrade to orez-api version 1.0.4: Now validates integer quote properties and errors for invalid.
     43- Upgraded to orez-api version 1.0.4: Now validates integer quote properties and errors for invalid.
    3744
    3845= 1.1.0 =
  • ownerrez/trunk/lib/autoload.php

    r2492370 r2632279  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1::getLoader();
     7return ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745::getLoader();
  • ownerrez/trunk/lib/composer/ClassLoader.php

    r2492370 r2632279  
    4343class ClassLoader
    4444{
     45    /** @var ?string */
    4546    private $vendorDir;
    4647
    4748    // PSR-4
     49    /**
     50     * @var array[]
     51     * @psalm-var array<string, array<string, int>>
     52     */
    4853    private $prefixLengthsPsr4 = array();
     54    /**
     55     * @var array[]
     56     * @psalm-var array<string, array<int, string>>
     57     */
    4958    private $prefixDirsPsr4 = array();
     59    /**
     60     * @var array[]
     61     * @psalm-var array<string, string>
     62     */
    5063    private $fallbackDirsPsr4 = array();
    5164
    5265    // PSR-0
     66    /**
     67     * @var array[]
     68     * @psalm-var array<string, array<string, string[]>>
     69     */
    5370    private $prefixesPsr0 = array();
     71    /**
     72     * @var array[]
     73     * @psalm-var array<string, string>
     74     */
    5475    private $fallbackDirsPsr0 = array();
    5576
     77    /** @var bool */
    5678    private $useIncludePath = false;
     79
     80    /**
     81     * @var string[]
     82     * @psalm-var array<string, string>
     83     */
    5784    private $classMap = array();
     85
     86    /** @var bool */
    5887    private $classMapAuthoritative = false;
     88
     89    /**
     90     * @var bool[]
     91     * @psalm-var array<string, bool>
     92     */
    5993    private $missingClasses = array();
     94
     95    /** @var ?string */
    6096    private $apcuPrefix;
    6197
     98    /**
     99     * @var self[]
     100     */
    62101    private static $registeredLoaders = array();
    63102
     103    /**
     104     * @param ?string $vendorDir
     105     */
    64106    public function __construct($vendorDir = null)
    65107    {
     
    67109    }
    68110
     111    /**
     112     * @return string[]
     113     */
    69114    public function getPrefixes()
    70115    {
     
    76121    }
    77122
     123    /**
     124     * @return array[]
     125     * @psalm-return array<string, array<int, string>>
     126     */
    78127    public function getPrefixesPsr4()
    79128    {
     
    81130    }
    82131
     132    /**
     133     * @return array[]
     134     * @psalm-return array<string, string>
     135     */
    83136    public function getFallbackDirs()
    84137    {
     
    86139    }
    87140
     141    /**
     142     * @return array[]
     143     * @psalm-return array<string, string>
     144     */
    88145    public function getFallbackDirsPsr4()
    89146    {
     
    91148    }
    92149
     150    /**
     151     * @return string[] Array of classname => path
     152     * @psalm-var array<string, string>
     153     */
    93154    public function getClassMap()
    94155    {
     
    97158
    98159    /**
    99      * @param array $classMap Class to filename map
     160     * @param string[] $classMap Class to filename map
     161     * @psalm-param array<string, string> $classMap
     162     *
     163     * @return void
    100164     */
    101165    public function addClassMap(array $classMap)
     
    112176     * appending or prepending to the ones previously set for this prefix.
    113177     *
    114      * @param string       $prefix  The prefix
    115      * @param array|string $paths   The PSR-0 root directories
    116      * @param bool         $prepend Whether to prepend the directories
     178     * @param string          $prefix  The prefix
     179     * @param string[]|string $paths   The PSR-0 root directories
     180     * @param bool            $prepend Whether to prepend the directories
     181     *
     182     * @return void
    117183     */
    118184    public function add($prefix, $paths, $prepend = false)
     
    157223     * appending or prepending to the ones previously set for this namespace.
    158224     *
    159      * @param string       $prefix  The prefix/namespace, with trailing '\\'
    160      * @param array|string $paths   The PSR-4 base directories
    161      * @param bool         $prepend Whether to prepend the directories
     225     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     226     * @param string[]|string $paths   The PSR-4 base directories
     227     * @param bool            $prepend Whether to prepend the directories
    162228     *
    163229     * @throws \InvalidArgumentException
     230     *
     231     * @return void
    164232     */
    165233    public function addPsr4($prefix, $paths, $prepend = false)
     
    205273     * replacing any others previously set for this prefix.
    206274     *
    207      * @param string       $prefix The prefix
    208      * @param array|string $paths  The PSR-0 base directories
     275     * @param string          $prefix The prefix
     276     * @param string[]|string $paths  The PSR-0 base directories
     277     *
     278     * @return void
    209279     */
    210280    public function set($prefix, $paths)
     
    221291     * replacing any others previously set for this namespace.
    222292     *
    223      * @param string       $prefix The prefix/namespace, with trailing '\\'
    224      * @param array|string $paths  The PSR-4 base directories
     293     * @param string          $prefix The prefix/namespace, with trailing '\\'
     294     * @param string[]|string $paths  The PSR-4 base directories
    225295     *
    226296     * @throws \InvalidArgumentException
     297     *
     298     * @return void
    227299     */
    228300    public function setPsr4($prefix, $paths)
     
    244316     *
    245317     * @param bool $useIncludePath
     318     *
     319     * @return void
    246320     */
    247321    public function setUseIncludePath($useIncludePath)
     
    266340     *
    267341     * @param bool $classMapAuthoritative
     342     *
     343     * @return void
    268344     */
    269345    public function setClassMapAuthoritative($classMapAuthoritative)
     
    286362     *
    287363     * @param string|null $apcuPrefix
     364     *
     365     * @return void
    288366     */
    289367    public function setApcuPrefix($apcuPrefix)
     
    306384     *
    307385     * @param bool $prepend Whether to prepend the autoloader or not
     386     *
     387     * @return void
    308388     */
    309389    public function register($prepend = false)
     
    325405    /**
    326406     * Unregisters this instance as an autoloader.
     407     *
     408     * @return void
    327409     */
    328410    public function unregister()
     
    339421     *
    340422     * @param  string    $class The name of the class
    341      * @return bool|null True if loaded, null otherwise
     423     * @return true|null True if loaded, null otherwise
    342424     */
    343425    public function loadClass($class)
     
    348430            return true;
    349431        }
     432
     433        return null;
    350434    }
    351435
     
    402486    }
    403487
     488    /**
     489     * @param  string       $class
     490     * @param  string       $ext
     491     * @return string|false
     492     */
    404493    private function findFileWithExtension($class, $ext)
    405494    {
     
    473562 *
    474563 * Prevents access to $this/self from included files.
     564 *
     565 * @param  string $file
     566 * @return void
     567 * @private
    475568 */
    476569function includeFile($file)
  • ownerrez/trunk/lib/composer/InstalledVersions.php

    r2492370 r2632279  
    11<?php
    22
    3 
    4 
    5 
    6 
    7 
    8 
    9 
    10 
    11 
     3/*
     4 * This file is part of Composer.
     5 *
     6 * (c) Nils Adermann <naderman@naderman.de>
     7 *     Jordi Boggiano <j.boggiano@seld.be>
     8 *
     9 * For the full copyright and license information, please view the LICENSE
     10 * file that was distributed with this source code.
     11 */
    1212
    1313namespace Composer;
     
    1616use Composer\Semver\VersionParser;
    1717
    18 
    19 
    20 
    21 
    22 
     18/**
     19 * This class is copied in every Composer installed project and available to all
     20 *
     21 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
     22 *
     23 * To require its presence, you can require `composer-runtime-api ^2.0`
     24 */
    2325class InstalledVersions
    2426{
    25 private static $installed = array (
    26   'root' =>
    27   array (
    28     'pretty_version' => 'v1.1.6',
    29     'version' => '1.1.6.0',
    30     'aliases' =>
    31     array (
    32     ),
    33     'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    34     'name' => 'ownerrez/orez-wp',
    35   ),
    36   'versions' =>
    37   array (
    38     'guzzlehttp/guzzle' =>
    39     array (
    40       'pretty_version' => '7.2.0',
    41       'version' => '7.2.0.0',
    42       'aliases' =>
    43       array (
    44       ),
    45       'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79',
    46     ),
    47     'guzzlehttp/promises' =>
    48     array (
    49       'pretty_version' => '1.4.0',
    50       'version' => '1.4.0.0',
    51       'aliases' =>
    52       array (
    53       ),
    54       'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
    55     ),
    56     'guzzlehttp/psr7' =>
    57     array (
    58       'pretty_version' => '1.7.0',
    59       'version' => '1.7.0.0',
    60       'aliases' =>
    61       array (
    62       ),
    63       'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
    64     ),
    65     'ownerrez/orez-api' =>
    66     array (
    67       'pretty_version' => '1.0.5',
    68       'version' => '1.0.5.0',
    69       'aliases' =>
    70       array (
    71       ),
    72       'reference' => '7b103b412eb359848cbde50bfc3c8b18a898b461',
    73     ),
    74     'ownerrez/orez-wp' =>
    75     array (
    76       'pretty_version' => 'v1.1.6',
    77       'version' => '1.1.6.0',
    78       'aliases' =>
    79       array (
    80       ),
    81       'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    82     ),
    83     'psr/http-client' =>
    84     array (
    85       'pretty_version' => '1.0.1',
    86       'version' => '1.0.1.0',
    87       'aliases' =>
    88       array (
    89       ),
    90       'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
    91     ),
    92     'psr/http-client-implementation' =>
    93     array (
    94       'provided' =>
    95       array (
    96         0 => '1.0',
    97       ),
    98     ),
    99     'psr/http-message' =>
    100     array (
    101       'pretty_version' => '1.0.1',
    102       'version' => '1.0.1.0',
    103       'aliases' =>
    104       array (
    105       ),
    106       'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
    107     ),
    108     'psr/http-message-implementation' =>
    109     array (
    110       'provided' =>
    111       array (
    112         0 => '1.0',
    113       ),
    114     ),
    115     'ralouphie/getallheaders' =>
    116     array (
    117       'pretty_version' => '3.0.3',
    118       'version' => '3.0.3.0',
    119       'aliases' =>
    120       array (
    121       ),
    122       'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    123     ),
    124   ),
    125 );
    126 private static $canGetVendors;
    127 private static $installedByVendor = array();
    128 
    129 
    130 
    131 
    132 
    133 
    134 
    135 public static function getInstalledPackages()
    136 {
    137 $packages = array();
    138 foreach (self::getInstalled() as $installed) {
    139 $packages[] = array_keys($installed['versions']);
     27    /**
     28     * @var mixed[]|null
     29     * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
     30     */
     31    private static $installed;
     32
     33    /**
     34     * @var bool|null
     35     */
     36    private static $canGetVendors;
     37
     38    /**
     39     * @var array[]
     40     * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     41     */
     42    private static $installedByVendor = array();
     43
     44    /**
     45     * Returns a list of all package names which are present, either by being installed, replaced or provided
     46     *
     47     * @return string[]
     48     * @psalm-return list<string>
     49     */
     50    public static function getInstalledPackages()
     51    {
     52        $packages = array();
     53        foreach (self::getInstalled() as $installed) {
     54            $packages[] = array_keys($installed['versions']);
     55        }
     56
     57        if (1 === \count($packages)) {
     58            return $packages[0];
     59        }
     60
     61        return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
     62    }
     63
     64    /**
     65     * Returns a list of all package names with a specific type e.g. 'library'
     66     *
     67     * @param  string   $type
     68     * @return string[]
     69     * @psalm-return list<string>
     70     */
     71    public static function getInstalledPackagesByType($type)
     72    {
     73        $packagesByType = array();
     74
     75        foreach (self::getInstalled() as $installed) {
     76            foreach ($installed['versions'] as $name => $package) {
     77                if (isset($package['type']) && $package['type'] === $type) {
     78                    $packagesByType[] = $name;
     79                }
     80            }
     81        }
     82
     83        return $packagesByType;
     84    }
     85
     86    /**
     87     * Checks whether the given package is installed
     88     *
     89     * This also returns true if the package name is provided or replaced by another package
     90     *
     91     * @param  string $packageName
     92     * @param  bool   $includeDevRequirements
     93     * @return bool
     94     */
     95    public static function isInstalled($packageName, $includeDevRequirements = true)
     96    {
     97        foreach (self::getInstalled() as $installed) {
     98            if (isset($installed['versions'][$packageName])) {
     99                return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     100            }
     101        }
     102
     103        return false;
     104    }
     105
     106    /**
     107     * Checks whether the given package satisfies a version constraint
     108     *
     109     * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
     110     *
     111     *   Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
     112     *
     113     * @param  VersionParser $parser      Install composer/semver to have access to this class and functionality
     114     * @param  string        $packageName
     115     * @param  string|null   $constraint  A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
     116     * @return bool
     117     */
     118    public static function satisfies(VersionParser $parser, $packageName, $constraint)
     119    {
     120        $constraint = $parser->parseConstraints($constraint);
     121        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
     122
     123        return $provided->matches($constraint);
     124    }
     125
     126    /**
     127     * Returns a version constraint representing all the range(s) which are installed for a given package
     128     *
     129     * It is easier to use this via isInstalled() with the $constraint argument if you need to check
     130     * whether a given version of a package is installed, and not just whether it exists
     131     *
     132     * @param  string $packageName
     133     * @return string Version constraint usable with composer/semver
     134     */
     135    public static function getVersionRanges($packageName)
     136    {
     137        foreach (self::getInstalled() as $installed) {
     138            if (!isset($installed['versions'][$packageName])) {
     139                continue;
     140            }
     141
     142            $ranges = array();
     143            if (isset($installed['versions'][$packageName]['pretty_version'])) {
     144                $ranges[] = $installed['versions'][$packageName]['pretty_version'];
     145            }
     146            if (array_key_exists('aliases', $installed['versions'][$packageName])) {
     147                $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
     148            }
     149            if (array_key_exists('replaced', $installed['versions'][$packageName])) {
     150                $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
     151            }
     152            if (array_key_exists('provided', $installed['versions'][$packageName])) {
     153                $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
     154            }
     155
     156            return implode(' || ', $ranges);
     157        }
     158
     159        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     160    }
     161
     162    /**
     163     * @param  string      $packageName
     164     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     165     */
     166    public static function getVersion($packageName)
     167    {
     168        foreach (self::getInstalled() as $installed) {
     169            if (!isset($installed['versions'][$packageName])) {
     170                continue;
     171            }
     172
     173            if (!isset($installed['versions'][$packageName]['version'])) {
     174                return null;
     175            }
     176
     177            return $installed['versions'][$packageName]['version'];
     178        }
     179
     180        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     181    }
     182
     183    /**
     184     * @param  string      $packageName
     185     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     186     */
     187    public static function getPrettyVersion($packageName)
     188    {
     189        foreach (self::getInstalled() as $installed) {
     190            if (!isset($installed['versions'][$packageName])) {
     191                continue;
     192            }
     193
     194            if (!isset($installed['versions'][$packageName]['pretty_version'])) {
     195                return null;
     196            }
     197
     198            return $installed['versions'][$packageName]['pretty_version'];
     199        }
     200
     201        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     202    }
     203
     204    /**
     205     * @param  string      $packageName
     206     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
     207     */
     208    public static function getReference($packageName)
     209    {
     210        foreach (self::getInstalled() as $installed) {
     211            if (!isset($installed['versions'][$packageName])) {
     212                continue;
     213            }
     214
     215            if (!isset($installed['versions'][$packageName]['reference'])) {
     216                return null;
     217            }
     218
     219            return $installed['versions'][$packageName]['reference'];
     220        }
     221
     222        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     223    }
     224
     225    /**
     226     * @param  string      $packageName
     227     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
     228     */
     229    public static function getInstallPath($packageName)
     230    {
     231        foreach (self::getInstalled() as $installed) {
     232            if (!isset($installed['versions'][$packageName])) {
     233                continue;
     234            }
     235
     236            return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
     237        }
     238
     239        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
     240    }
     241
     242    /**
     243     * @return array
     244     * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
     245     */
     246    public static function getRootPackage()
     247    {
     248        $installed = self::getInstalled();
     249
     250        return $installed[0]['root'];
     251    }
     252
     253    /**
     254     * Returns the raw installed.php data for custom implementations
     255     *
     256     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
     257     * @return array[]
     258     * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
     259     */
     260    public static function getRawData()
     261    {
     262        @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
     263
     264        if (null === self::$installed) {
     265            // only require the installed.php file if this file is loaded from its dumped location,
     266            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
     267            if (substr(__DIR__, -8, 1) !== 'C') {
     268                self::$installed = include __DIR__ . '/installed.php';
     269            } else {
     270                self::$installed = array();
     271            }
     272        }
     273
     274        return self::$installed;
     275    }
     276
     277    /**
     278     * Returns the raw data of all installed.php which are currently loaded for custom implementations
     279     *
     280     * @return array[]
     281     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     282     */
     283    public static function getAllRawData()
     284    {
     285        return self::getInstalled();
     286    }
     287
     288    /**
     289     * Lets you reload the static array from another file
     290     *
     291     * This is only useful for complex integrations in which a project needs to use
     292     * this class but then also needs to execute another project's autoloader in process,
     293     * and wants to ensure both projects have access to their version of installed.php.
     294     *
     295     * A typical case would be PHPUnit, where it would need to make sure it reads all
     296     * the data it needs from this class, then call reload() with
     297     * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
     298     * the project in which it runs can then also use this class safely, without
     299     * interference between PHPUnit's dependencies and the project's dependencies.
     300     *
     301     * @param  array[] $data A vendor/composer/installed.php data set
     302     * @return void
     303     *
     304     * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
     305     */
     306    public static function reload($data)
     307    {
     308        self::$installed = $data;
     309        self::$installedByVendor = array();
     310    }
     311
     312    /**
     313     * @return array[]
     314     * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     315     */
     316    private static function getInstalled()
     317    {
     318        if (null === self::$canGetVendors) {
     319            self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
     320        }
     321
     322        $installed = array();
     323
     324        if (self::$canGetVendors) {
     325            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     326                if (isset(self::$installedByVendor[$vendorDir])) {
     327                    $installed[] = self::$installedByVendor[$vendorDir];
     328                } elseif (is_file($vendorDir.'/composer/installed.php')) {
     329                    $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     330                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
     331                        self::$installed = $installed[count($installed) - 1];
     332                    }
     333                }
     334            }
     335        }
     336
     337        if (null === self::$installed) {
     338            // only require the installed.php file if this file is loaded from its dumped location,
     339            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
     340            if (substr(__DIR__, -8, 1) !== 'C') {
     341                self::$installed = require __DIR__ . '/installed.php';
     342            } else {
     343                self::$installed = array();
     344            }
     345        }
     346        $installed[] = self::$installed;
     347
     348        return $installed;
     349    }
    140350}
    141 
    142 
    143 if (1 === \count($packages)) {
    144 return $packages[0];
    145 }
    146 
    147 return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
    148 }
    149 
    150 
    151 
    152 
    153 
    154 
    155 
    156 
    157 
    158 public static function isInstalled($packageName)
    159 {
    160 foreach (self::getInstalled() as $installed) {
    161 if (isset($installed['versions'][$packageName])) {
    162 return true;
    163 }
    164 }
    165 
    166 return false;
    167 }
    168 
    169 
    170 
    171 
    172 
    173 
    174 
    175 
    176 
    177 
    178 
    179 
    180 
    181 
    182 public static function satisfies(VersionParser $parser, $packageName, $constraint)
    183 {
    184 $constraint = $parser->parseConstraints($constraint);
    185 $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    186 
    187 return $provided->matches($constraint);
    188 }
    189 
    190 
    191 
    192 
    193 
    194 
    195 
    196 
    197 
    198 
    199 public static function getVersionRanges($packageName)
    200 {
    201 foreach (self::getInstalled() as $installed) {
    202 if (!isset($installed['versions'][$packageName])) {
    203 continue;
    204 }
    205 
    206 $ranges = array();
    207 if (isset($installed['versions'][$packageName]['pretty_version'])) {
    208 $ranges[] = $installed['versions'][$packageName]['pretty_version'];
    209 }
    210 if (array_key_exists('aliases', $installed['versions'][$packageName])) {
    211 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
    212 }
    213 if (array_key_exists('replaced', $installed['versions'][$packageName])) {
    214 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
    215 }
    216 if (array_key_exists('provided', $installed['versions'][$packageName])) {
    217 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
    218 }
    219 
    220 return implode(' || ', $ranges);
    221 }
    222 
    223 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    224 }
    225 
    226 
    227 
    228 
    229 
    230 public static function getVersion($packageName)
    231 {
    232 foreach (self::getInstalled() as $installed) {
    233 if (!isset($installed['versions'][$packageName])) {
    234 continue;
    235 }
    236 
    237 if (!isset($installed['versions'][$packageName]['version'])) {
    238 return null;
    239 }
    240 
    241 return $installed['versions'][$packageName]['version'];
    242 }
    243 
    244 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    245 }
    246 
    247 
    248 
    249 
    250 
    251 public static function getPrettyVersion($packageName)
    252 {
    253 foreach (self::getInstalled() as $installed) {
    254 if (!isset($installed['versions'][$packageName])) {
    255 continue;
    256 }
    257 
    258 if (!isset($installed['versions'][$packageName]['pretty_version'])) {
    259 return null;
    260 }
    261 
    262 return $installed['versions'][$packageName]['pretty_version'];
    263 }
    264 
    265 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    266 }
    267 
    268 
    269 
    270 
    271 
    272 public static function getReference($packageName)
    273 {
    274 foreach (self::getInstalled() as $installed) {
    275 if (!isset($installed['versions'][$packageName])) {
    276 continue;
    277 }
    278 
    279 if (!isset($installed['versions'][$packageName]['reference'])) {
    280 return null;
    281 }
    282 
    283 return $installed['versions'][$packageName]['reference'];
    284 }
    285 
    286 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    287 }
    288 
    289 
    290 
    291 
    292 
    293 public static function getRootPackage()
    294 {
    295 $installed = self::getInstalled();
    296 
    297 return $installed[0]['root'];
    298 }
    299 
    300 
    301 
    302 
    303 
    304 
    305 
    306 public static function getRawData()
    307 {
    308 return self::$installed;
    309 }
    310 
    311 
    312 
    313 
    314 
    315 
    316 
    317 
    318 
    319 
    320 
    321 
    322 
    323 
    324 
    325 
    326 
    327 
    328 
    329 public static function reload($data)
    330 {
    331 self::$installed = $data;
    332 self::$installedByVendor = array();
    333 }
    334 
    335 
    336 
    337 
    338 private static function getInstalled()
    339 {
    340 if (null === self::$canGetVendors) {
    341 self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
    342 }
    343 
    344 $installed = array();
    345 
    346 if (self::$canGetVendors) {
    347 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
    348 if (isset(self::$installedByVendor[$vendorDir])) {
    349 $installed[] = self::$installedByVendor[$vendorDir];
    350 } elseif (is_file($vendorDir.'/composer/installed.php')) {
    351 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    352 }
    353 }
    354 }
    355 
    356 $installed[] = self::$installed;
    357 
    358 return $installed;
    359 }
    360 }
  • ownerrez/trunk/lib/composer/autoload_real.php

    r2492370 r2632279  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1
     5class ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit32993f4f10380a055df9a453a342ebf1', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitb2c63143273ca805b250984dbfb91745', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInit32993f4f10380a055df9a453a342ebf1::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInitb2c63143273ca805b250984dbfb91745::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5454
    5555        if ($useStaticLoader) {
    56             $includeFiles = Composer\Autoload\ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$files;
     56            $includeFiles = Composer\Autoload\ComposerStaticInitb2c63143273ca805b250984dbfb91745::$files;
    5757        } else {
    5858            $includeFiles = require __DIR__ . '/autoload_files.php';
    5959        }
    6060        foreach ($includeFiles as $fileIdentifier => $file) {
    61             composerRequire32993f4f10380a055df9a453a342ebf1($fileIdentifier, $file);
     61            composerRequireb2c63143273ca805b250984dbfb91745($fileIdentifier, $file);
    6262        }
    6363
     
    6666}
    6767
    68 function composerRequire32993f4f10380a055df9a453a342ebf1($fileIdentifier, $file)
     68function composerRequireb2c63143273ca805b250984dbfb91745($fileIdentifier, $file)
    6969{
    7070    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • ownerrez/trunk/lib/composer/autoload_static.php

    r2492370 r2632279  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit32993f4f10380a055df9a453a342ebf1
     7class ComposerStaticInitb2c63143273ca805b250984dbfb91745
    88{
    99    public static $files = array (
     
    7676    {
    7777        return \Closure::bind(function () use ($loader) {
    78             $loader->prefixLengthsPsr4 = ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$prefixLengthsPsr4;
    79             $loader->prefixDirsPsr4 = ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$prefixDirsPsr4;
    80             $loader->classMap = ComposerStaticInit32993f4f10380a055df9a453a342ebf1::$classMap;
     78            $loader->prefixLengthsPsr4 = ComposerStaticInitb2c63143273ca805b250984dbfb91745::$prefixLengthsPsr4;
     79            $loader->prefixDirsPsr4 = ComposerStaticInitb2c63143273ca805b250984dbfb91745::$prefixDirsPsr4;
     80            $loader->classMap = ComposerStaticInitb2c63143273ca805b250984dbfb91745::$classMap;
    8181
    8282        }, null, ClassLoader::class);
  • ownerrez/trunk/lib/composer/installed.php

    r2492370 r2632279  
    1 <?php return array (
    2   'root' =>
    3   array (
    4     'pretty_version' => 'v1.1.6',
    5     'version' => '1.1.6.0',
    6     'aliases' =>
    7     array (
     1<?php return array(
     2    'root' => array(
     3        'pretty_version' => 'v1.1.9',
     4        'version' => '1.1.9.0',
     5        'type' => 'wordpress-plugin',
     6        'install_path' => __DIR__ . '/../../../',
     7        'aliases' => array(),
     8        'reference' => '9a913e03f1939826e93b1da4755993874c9e79f9',
     9        'name' => 'ownerrez/orez-wp',
     10        'dev' => true,
    811    ),
    9     'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    10     'name' => 'ownerrez/orez-wp',
    11   ),
    12   'versions' =>
    13   array (
    14     'guzzlehttp/guzzle' =>
    15     array (
    16       'pretty_version' => '7.2.0',
    17       'version' => '7.2.0.0',
    18       'aliases' =>
    19       array (
    20       ),
    21       'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79',
     12    'versions' => array(
     13        'guzzlehttp/guzzle' => array(
     14            'pretty_version' => '7.2.0',
     15            'version' => '7.2.0.0',
     16            'type' => 'library',
     17            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     18            'aliases' => array(),
     19            'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79',
     20            'dev_requirement' => false,
     21        ),
     22        'guzzlehttp/promises' => array(
     23            'pretty_version' => '1.4.0',
     24            'version' => '1.4.0.0',
     25            'type' => 'library',
     26            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     27            'aliases' => array(),
     28            'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
     29            'dev_requirement' => false,
     30        ),
     31        'guzzlehttp/psr7' => array(
     32            'pretty_version' => '1.7.0',
     33            'version' => '1.7.0.0',
     34            'type' => 'library',
     35            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     36            'aliases' => array(),
     37            'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
     38            'dev_requirement' => false,
     39        ),
     40        'ownerrez/orez-api' => array(
     41            'pretty_version' => '1.0.5',
     42            'version' => '1.0.5.0',
     43            'type' => 'library',
     44            'install_path' => __DIR__ . '/../ownerrez/orez-api',
     45            'aliases' => array(),
     46            'reference' => '7b103b412eb359848cbde50bfc3c8b18a898b461',
     47            'dev_requirement' => false,
     48        ),
     49        'ownerrez/orez-wp' => array(
     50            'pretty_version' => 'v1.1.9',
     51            'version' => '1.1.9.0',
     52            'type' => 'wordpress-plugin',
     53            'install_path' => __DIR__ . '/../../../',
     54            'aliases' => array(),
     55            'reference' => '9a913e03f1939826e93b1da4755993874c9e79f9',
     56            'dev_requirement' => false,
     57        ),
     58        'psr/http-client' => array(
     59            'pretty_version' => '1.0.1',
     60            'version' => '1.0.1.0',
     61            'type' => 'library',
     62            'install_path' => __DIR__ . '/../psr/http-client',
     63            'aliases' => array(),
     64            'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
     65            'dev_requirement' => false,
     66        ),
     67        'psr/http-client-implementation' => array(
     68            'dev_requirement' => false,
     69            'provided' => array(
     70                0 => '1.0',
     71            ),
     72        ),
     73        'psr/http-message' => array(
     74            'pretty_version' => '1.0.1',
     75            'version' => '1.0.1.0',
     76            'type' => 'library',
     77            'install_path' => __DIR__ . '/../psr/http-message',
     78            'aliases' => array(),
     79            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
     80            'dev_requirement' => false,
     81        ),
     82        'psr/http-message-implementation' => array(
     83            'dev_requirement' => false,
     84            'provided' => array(
     85                0 => '1.0',
     86            ),
     87        ),
     88        'ralouphie/getallheaders' => array(
     89            'pretty_version' => '3.0.3',
     90            'version' => '3.0.3.0',
     91            'type' => 'library',
     92            'install_path' => __DIR__ . '/../ralouphie/getallheaders',
     93            'aliases' => array(),
     94            'reference' => '120b605dfeb996808c31b6477290a714d356e822',
     95            'dev_requirement' => false,
     96        ),
    2297    ),
    23     'guzzlehttp/promises' =>
    24     array (
    25       'pretty_version' => '1.4.0',
    26       'version' => '1.4.0.0',
    27       'aliases' =>
    28       array (
    29       ),
    30       'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
    31     ),
    32     'guzzlehttp/psr7' =>
    33     array (
    34       'pretty_version' => '1.7.0',
    35       'version' => '1.7.0.0',
    36       'aliases' =>
    37       array (
    38       ),
    39       'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
    40     ),
    41     'ownerrez/orez-api' =>
    42     array (
    43       'pretty_version' => '1.0.5',
    44       'version' => '1.0.5.0',
    45       'aliases' =>
    46       array (
    47       ),
    48       'reference' => '7b103b412eb359848cbde50bfc3c8b18a898b461',
    49     ),
    50     'ownerrez/orez-wp' =>
    51     array (
    52       'pretty_version' => 'v1.1.6',
    53       'version' => '1.1.6.0',
    54       'aliases' =>
    55       array (
    56       ),
    57       'reference' => 'd3cc35419e0abe1c8bd7560755a3660d7ea23ce1',
    58     ),
    59     'psr/http-client' =>
    60     array (
    61       'pretty_version' => '1.0.1',
    62       'version' => '1.0.1.0',
    63       'aliases' =>
    64       array (
    65       ),
    66       'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
    67     ),
    68     'psr/http-client-implementation' =>
    69     array (
    70       'provided' =>
    71       array (
    72         0 => '1.0',
    73       ),
    74     ),
    75     'psr/http-message' =>
    76     array (
    77       'pretty_version' => '1.0.1',
    78       'version' => '1.0.1.0',
    79       'aliases' =>
    80       array (
    81       ),
    82       'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
    83     ),
    84     'psr/http-message-implementation' =>
    85     array (
    86       'provided' =>
    87       array (
    88         0 => '1.0',
    89       ),
    90     ),
    91     'ralouphie/getallheaders' =>
    92     array (
    93       'pretty_version' => '3.0.3',
    94       'version' => '3.0.3.0',
    95       'aliases' =>
    96       array (
    97       ),
    98       'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    99     ),
    100   ),
    10198);
  • ownerrez/trunk/ownerrez.php

    r2492370 r2632279  
    1717 * Plugin URI:        https://www.ownerreservations.com/support/wordpress
    1818 * Description:       The official WordPress plugin for the OwnerRez API.
    19  * Version:           1.1.6
     19 * Version:           1.1.9
    2020 * Author:            OwnerRez, Inc.
    2121 * Author URI:        https://www.ownerreservations.com/
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define('OWNERREZ_VERSION', '1.1.6');
     38define('OWNERREZ_VERSION', '1.1.9');
    3939
    4040/**
  • ownerrez/trunk/public/class-ownerrez-shortcodes.php

    r2455543 r2632279  
    2323class OwnerRez_ShortCodes {
    2424
    25     /**
    26     * The ID of this plugin.
    27     *
    28     * @since    1.0.0
    29     * @access   private
    30     * @var      string    $ownerrez    The ID of this plugin.
    31     */
    32     private $ownerrez;
    33 
    34     /**
    35     * The version of this plugin.
    36     *
    37     * @since    1.0.0
    38     * @access   private
    39     * @var      string    $version    The current version of this plugin.
    40     */
    41     private $version;
     25    /**
     26    * The ID of this plugin.
     27    *
     28    * @since    1.0.0
     29    * @access   private
     30    * @var      string    $ownerrez    The ID of this plugin.
     31    */
     32    private $ownerrez;
     33
     34    /**
     35    * The version of this plugin.
     36    *
     37    * @since    1.0.0
     38    * @access   private
     39    * @var      string    $version    The current version of this plugin.
     40    */
     41    private $version;
    4242
    4343    private $api;
    4444
    45     /**
    46     * Initialize the class and set its properties.
    47     *
    48     * @since    1.0.0
    49     * @param      string    $ownerrez       The name of the plugin.
    50     * @param      string    $version    The version of this plugin.
    51     */
    52     public function __construct( $ownerrez, $version ) {
    53 
    54         $this->ownerrez = $ownerrez;
    55         $this->version = $version;
     45    /**
     46    * Initialize the class and set its properties.
     47    *
     48    * @since    1.0.0
     49    * @param      string    $ownerrez       The name of the plugin.
     50    * @param      string    $version    The version of this plugin.
     51    */
     52    public function __construct( $ownerrez, $version ) {
     53
     54        $this->ownerrez = $ownerrez;
     55        $this->version = $version;
    5656        $this->api = new OwnerRez_ApiWrapper();
    57     }
    58 
    59     /**
    60     * Register the shortcodes for the public-facing side of the site.
    61     *
    62     * @since    1.0.0
    63     */
    64     public function register_shortcodes()
     57    }
     58
     59    /**
     60    * Register the shortcodes for the public-facing side of the site.
     61    *
     62    * @since    1.0.0
     63    */
     64    public function register_shortcodes()
    6565    {
    6666        add_shortcode('ownerrez', array($this, 'shortcode'));
     
    325325    {
    326326        if (!$this->photoCarouselEnqueued) {
    327             wp_enqueue_style("ownerrez-lgstyle1", "https://cdn.orez.io/hc/content/lightslider.min.css", null, $this->version);
    328             wp_enqueue_style("ownerrez-lgstyle2", "https://cdn.orez.io/hc/content/lightgallery.min.css", null, $this->version);
     327            wp_enqueue_style("ownerrez-lgstyle", "https://cdn.orez.io/hc/content/lgbundle.min.css", null, $this->version);
    329328            wp_enqueue_script("ownerrez-lgscript", "https://cdn.orez.io/hc/scripts/lgbundle.min.js", array( 'jquery' ), $this->version);
     329//            wp_enqueue_style("ownerrez-lgstyle", "https://hosteddev.ownerrez.com/content/lgbundle.min.css", null, $this->version);
     330//            wp_enqueue_script("ownerrez-lgscript", "https://hosteddev.ownerrez.com/scripts/lgbundle.min.js", array( 'jquery' ), $this->version);
    330331            wp_enqueue_script("ownerrez-photo-carousel.js", plugins_url('/ownerrez/public/js/ownerrez-photo-carousel.js'), array( 'jquery' ), $this->version);
    331332
     
    342343                $caption = $image->caption;
    343344
    344             $sliderUl .= "<li data-thumb='" . $image->croppedUrl . "' data-src='" . $image->originalUrl . "'><img src='" . $image->largeUrl . "' data-sub-html='" . $caption . "' />";
     345            $srcUrl = $image->originalUrl;
     346            $posterAttr = "";
     347
     348            if (property_exists($image, "videoUrl") && !is_null($image->videoUrl)) {
     349                $srcUrl = $image->videoUrl . (strpos($image->videoUrl, "?") ? "&" : "?") . 'mute=0&muted=false';
     350                $posterAttr = " data-poster='" . $image->originalUrl . "'";
     351            }
     352
     353            $sliderUl .= "<li data-thumb='" . $image->croppedUrl . "' data-src='" . $srcUrl . "'" . $posterAttr . "><img src='" . $image->largeUrl . "' data-sub-html='" . $caption . "' />";
     354
     355            if (property_exists($image, "videoUrl") && !is_null($image->videoUrl)) {
     356                $sliderUl .= '<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="Play video" role="img" class="lg-video-play-icon">
     357                        <title>Play video</title>
     358                        <circle cx="50%" cy="50%" r="48"></circle>
     359                        <polygon points="35,30 35,70 70,50"></polygon>
     360                    </svg>';
     361            }
    345362
    346363            if (strlen($caption) > 0)
     
    350367        }
    351368
    352         $sliderUl .= "</ul>";
     369        $sliderUl .= '</ul>
     370        <ul class="loading-pager"><li>Loading...</li></ul>';
    353371
    354372        return $sliderUl;
  • ownerrez/trunk/public/css/ownerrez-public.css

    r2450742 r2632279  
    11.loading-slider {
    22    padding: 0;
    3     padding-bottom: 70% /* a bit extra for the thumbs */
    4 }
    5 
    6 .loading-slider li {
    7     margin: 0;
    8     padding: 0;
    9     list-style: none
     3    margin: 0;
     4    border: 1px solid rgb(204, 204, 204);
     5    box-shadow: rgb(204 204 204) 1px 1px 3px;
     6}
     7
     8.loading-slider li,
     9.lightSlider li {
     10    margin: 0;
     11    padding: 0;
     12    list-style: none;
     13    line-height: 0;
     14}
     15
     16ul.loading-pager {
     17    margin: 0;
     18    padding: 0;
     19    list-style: none;
     20    text-align: center;
     21    height: 81px;
     22}
     23ul.loading-pager li {
     24    line-height: 5;
    1025}
    1126
     
    2035}
    2136
     37.loading-slider .caption,
    2238.lightSlider .caption {
    2339    text-align: center;
    2440    position: absolute;
    25     bottom: 0px;
    26     left: 0px;
    27     right: 0px;
     41    bottom: 0;
     42    left: 0;
     43    right: 0;
    2844    font-size: 16px;
    2945    margin: 0;
     
    3248    padding: 5px 10px 5px 5px;
    3349    background-color: rgba(255,255,255,.8);
     50    line-height: 1.2;
    3451}
    3552
     
    190207    margin-left: 5px;
    191208}
     209
     210.loading-slider li,
     211.lslide {
     212    position: relative;
     213    cursor: pointer;
     214}
     215.loading-slider li .lg-video-play-icon,
     216.lslide .lg-video-play-icon {
     217    width: 150px;
     218}
     219
     220.lslide:hover .lg-video-play-icon {
     221    opacity: 0.9;
     222    cursor: pointer;
     223}
     224
     225.loading-slider li .lg-video-play-icon polygon,
     226.lslide .lg-video-play-icon polygon {
     227    fill: #fcfcfc;
     228}
     229.loading-slider li .lg-video-play-icon circle,
     230.lslide .lg-video-play-icon circle {
     231    fill: none;
     232    stroke: #fcfcfc;
     233    stroke-width: 3%;
     234}
     235.lg-video-play-button .lg-video-play-icon {
     236    width: 35%;
     237    left: 53%;
     238    top: 48%;
     239}
     240
     241.loading-slider img,
     242.lslide img {
     243    min-width: 100%;
     244}
  • ownerrez/trunk/public/js/ownerrez-photo-carousel.js

    r2450742 r2632279  
    11jQuery(".ownerrez-photo-carousel").each(function() {
    2     var div = jQuery(this);
    3     div.lightSlider({
     2    var loadingPager = jQuery(this).nextAll("ul.loading-pager");loadingPager
     3    jQuery(this).lightSlider({
    44        gallery: true,
    55        item: 1,
     
    1414        mode: 'fade',
    1515        onSliderLoad: function (el) {
    16             el.lightGallery({
     16            loadingPager.remove();
     17            lightGallery(el.get(0), {
     18                licenseKey: "5CD6B56C-064145F1-A29A5203-5655C26F",
    1719                selector: '.ownerrez-photo-carousel .lslide',
    18                 preload: 4
     20                preload: 4,
     21                plugins: [lgVideo,lgThumbnail],
     22                loadYouTubeThumbnail: false,
     23                gotoNextSlideOnVideoEnd: false,
     24                youTubePlayerParams: {
     25                    modestbranding: 1,
     26                    iv_load_policy: 3
     27                }
    1928            });
    2029        },
  • ownerrez/trunk/readme.txt

    r2492370 r2632279  
    44Requires at least: 5.4
    55Tested up to: 5.7
    6 Stable tag: 1.1.6
     6Stable tag: 1.1.9
    77License: MIT
    88License URI: https://github.com/ownerrez/orez-wp/blob/master/LICENSE
     
    3333
    3434== Changelog ==
     35= 1.1.9 =
     36- Added video support to photo carousel.
     37
     38= 1.1.6 =
     39- Add support for WordPress 5.7
     40- Add support for PHP 8
     41
    3542= 1.1.5 =
    36 - Upgrade to orez-api version 1.0.4: Now validates integer quote properties and errors for invalid.
     43- Upgraded to orez-api version 1.0.4: Now validates integer quote properties and errors for invalid.
    3744
    3845= 1.1.0 =
Note: See TracChangeset for help on using the changeset viewer.