Changeset 2846829
- Timestamp:
- 01/11/2023 02:34:54 PM (3 years ago)
- Location:
- ownerrez
- Files:
-
- 2 deleted
- 16 edited
- 1 copied
-
tags/1.1.14 (copied) (copied from ownerrez/trunk)
-
tags/1.1.14/lib/autoload.php (modified) (1 diff)
-
tags/1.1.14/lib/composer/ClassLoader.php (modified) (4 diffs)
-
tags/1.1.14/lib/composer/autoload_real.php (modified) (3 diffs)
-
tags/1.1.14/lib/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.1.14/ownerrez.php (modified) (2 diffs)
-
tags/1.1.14/public/class-ownerrez-shortcodes.php (modified) (1 diff)
-
tags/1.1.14/public/js/ownerrez-photo-carousel.js (deleted)
-
tags/1.1.14/public/js/ownerrez-public.js (modified) (1 diff)
-
tags/1.1.14/readme.txt (modified) (1 diff)
-
trunk/lib/autoload.php (modified) (1 diff)
-
trunk/lib/composer/ClassLoader.php (modified) (4 diffs)
-
trunk/lib/composer/autoload_real.php (modified) (3 diffs)
-
trunk/lib/composer/autoload_static.php (modified) (2 diffs)
-
trunk/ownerrez.php (modified) (2 diffs)
-
trunk/public/class-ownerrez-shortcodes.php (modified) (1 diff)
-
trunk/public/js/ownerrez-photo-carousel.js (deleted)
-
trunk/public/js/ownerrez-public.js (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ownerrez/tags/1.1.14/lib/autoload.php
r2753814 r2846829 4 4 5 5 if (PHP_VERSION_ID < 50600) { 6 echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 7 exit(1); 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 8 21 } 9 22 10 23 require_once __DIR__ . '/composer/autoload_real.php'; 11 24 12 return ComposerAutoloaderInit 471966cf087c00d83203268549f1513a::getLoader();25 return ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8::getLoader(); -
ownerrez/tags/1.1.14/lib/composer/ClassLoader.php
r2723507 r2846829 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file);432 (self::$includeFile)($file); 429 433 430 434 return true; … … 556 560 return false; 557 561 } 562 563 private static function initializeIncludeClosure(): void 564 { 565 if (self::$includeFile !== null) { 566 return; 567 } 568 569 /** 570 * Scope isolated include. 571 * 572 * Prevents access to $this/self from included files. 573 * 574 * @param string $file 575 * @return void 576 */ 577 self::$includeFile = static function($file) { 578 include $file; 579 }; 580 } 558 581 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
ownerrez/tags/1.1.14/lib/composer/autoload_real.php
r2753814 r2846829 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 471966cf087c00d83203268549f1513a5 class ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 471966cf087c00d83203268549f1513a', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 471966cf087c00d83203268549f1513a', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 471966cf087c00d83203268549f1513a::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $includeFiles = \Composer\Autoload\ComposerStaticInit471966cf087c00d83203268549f1513a::$files; 37 foreach ($includeFiles as $fileIdentifier => $file) { 38 composerRequire471966cf087c00d83203268549f1513a($fileIdentifier, $file); 36 $filesToLoad = \Composer\Autoload\ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$files; 37 $requireFile = static function ($fileIdentifier, $file) { 38 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 39 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 40 41 require $file; 42 } 43 }; 44 foreach ($filesToLoad as $fileIdentifier => $file) { 45 ($requireFile)($fileIdentifier, $file); 39 46 } 40 47 … … 42 49 } 43 50 } 44 45 /**46 * @param string $fileIdentifier47 * @param string $file48 * @return void49 */50 function composerRequire471966cf087c00d83203268549f1513a($fileIdentifier, $file)51 {52 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {53 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;54 55 require $file;56 }57 } -
ownerrez/tags/1.1.14/lib/composer/autoload_static.php
r2753814 r2846829 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 471966cf087c00d83203268549f1513a7 class ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8 8 8 { 9 9 public static $files = array ( … … 76 76 { 77 77 return \Closure::bind(function () use ($loader) { 78 $loader->prefixLengthsPsr4 = ComposerStaticInit 471966cf087c00d83203268549f1513a::$prefixLengthsPsr4;79 $loader->prefixDirsPsr4 = ComposerStaticInit 471966cf087c00d83203268549f1513a::$prefixDirsPsr4;80 $loader->classMap = ComposerStaticInit 471966cf087c00d83203268549f1513a::$classMap;78 $loader->prefixLengthsPsr4 = ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$prefixLengthsPsr4; 79 $loader->prefixDirsPsr4 = ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$prefixDirsPsr4; 80 $loader->classMap = ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$classMap; 81 81 82 82 }, null, ClassLoader::class); -
ownerrez/tags/1.1.14/ownerrez.php
r2753814 r2846829 17 17 * Plugin URI: https://www.ownerreservations.com/support/wordpress 18 18 * Description: The official WordPress plugin for the OwnerRez API. 19 * Version: 1.1.1 319 * Version: 1.1.14 20 20 * Author: OwnerRez, Inc. 21 21 * Author URI: https://www.ownerreservations.com/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('OWNERREZ_VERSION', '1.1.1 3');38 define('OWNERREZ_VERSION', '1.1.14'); 39 39 40 40 /** -
ownerrez/tags/1.1.14/public/class-ownerrez-shortcodes.php
r2753806 r2846829 329 329 // wp_enqueue_style("ownerrez-lgstyle", "https://hosteddev.ownerrez.com/content/lgbundle.min.css", null, $this->version); 330 330 // wp_enqueue_script("ownerrez-lgscript", "https://hosteddev.ownerrez.com/scripts/lgbundle.min.js", array( 'jquery' ), $this->version); 331 wp_enqueue_script("ownerrez-photo-carousel.js", plugins_url('/ownerrez/public/js/ownerrez-photo-carousel.js'), array( 'jquery' ), $this->version);332 331 333 332 $this->photoCarouselEnqueued = true; -
ownerrez/tags/1.1.14/public/js/ownerrez-public.js
r2450742 r2846829 2 2 'use strict'; 3 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note: It has been assumed you will write jQuery code here, so the 9 * $ function reference has been prepared for usage within the scope 10 * of this function. 11 * 12 * This enables you to define handlers, for when the DOM is ready: 13 * 14 * $(function() { 15 * 16 * }); 17 * 18 * When the window is loaded: 19 * 20 * $( window ).load(function() { 21 * 22 * }); 23 * 24 * ...and/or other possibilities. 25 * 26 * Ideally, it is not considered best practise to attach more than a 27 * single DOM-ready or window-load handler for a particular page. 28 * Although scripts in the WordPress core, Plugins and Themes may be 29 * practising this, we should strive to set a better example in our own work. 30 */ 4 $(function() { 5 6 // initialize carousel 7 $(".ownerrez-photo-carousel").each(function () { 8 var loadingPager = $(this).nextAll("ul.loading-pager"); 9 var carousel = this; 10 11 $(this).lightSlider({ 12 gallery: true, 13 item: 1, 14 loop: true, 15 auto: true, 16 pause: 5000, 17 thumbItem: 6, 18 slideMargin: 0, 19 galleryMargin: 0, 20 thumbMargin: 0, 21 enableDrag: false, 22 mode: 'fade', 23 onSliderLoad: function (el) { 24 loadingPager.remove(); 25 lightGallery(el.get(0), { 26 licenseKey: "5CD6B56C-064145F1-A29A5203-5655C26F", 27 selector: '.ownerrez-photo-carousel .lslide', 28 preload: 4, 29 plugins: [lgVideo, lgThumbnail], 30 loadYouTubeThumbnail: false, 31 gotoNextSlideOnVideoEnd: false, 32 youTubePlayerParams: { 33 modestbranding: 1, 34 iv_load_policy: 3 35 } 36 }); 37 38 $("li", carousel).css("height", "100%"); 39 }, 40 prevHtml: '<span class="ownerrez-photo-carousel-prev lg-prev lg-icon"></span>', 41 nextHtml: '<span class="ownerrez-photo-carousel-next lg-next lg-icon"></span>' 42 }).removeClass("loading-slider"); 43 }); 44 }); 31 45 32 46 })( jQuery ); -
ownerrez/tags/1.1.14/readme.txt
r2753814 r2846829 33 33 34 34 == Changelog == 35 = 1.1.14 = 36 - Initialize carousel even when WP is configured to add scripts html head. 37 35 38 = 1.1.13 = 36 39 - Webhooks now always return the correct http code. -
ownerrez/trunk/lib/autoload.php
r2753814 r2846829 4 4 5 5 if (PHP_VERSION_ID < 50600) { 6 echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 7 exit(1); 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 8 21 } 9 22 10 23 require_once __DIR__ . '/composer/autoload_real.php'; 11 24 12 return ComposerAutoloaderInit 471966cf087c00d83203268549f1513a::getLoader();25 return ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8::getLoader(); -
ownerrez/trunk/lib/composer/ClassLoader.php
r2723507 r2846829 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file);432 (self::$includeFile)($file); 429 433 430 434 return true; … … 556 560 return false; 557 561 } 562 563 private static function initializeIncludeClosure(): void 564 { 565 if (self::$includeFile !== null) { 566 return; 567 } 568 569 /** 570 * Scope isolated include. 571 * 572 * Prevents access to $this/self from included files. 573 * 574 * @param string $file 575 * @return void 576 */ 577 self::$includeFile = static function($file) { 578 include $file; 579 }; 580 } 558 581 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
ownerrez/trunk/lib/composer/autoload_real.php
r2753814 r2846829 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 471966cf087c00d83203268549f1513a5 class ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 471966cf087c00d83203268549f1513a', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 471966cf087c00d83203268549f1513a', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit086fb7da0edbe87de691a5092fbd16c8', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 471966cf087c00d83203268549f1513a::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $includeFiles = \Composer\Autoload\ComposerStaticInit471966cf087c00d83203268549f1513a::$files; 37 foreach ($includeFiles as $fileIdentifier => $file) { 38 composerRequire471966cf087c00d83203268549f1513a($fileIdentifier, $file); 36 $filesToLoad = \Composer\Autoload\ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$files; 37 $requireFile = static function ($fileIdentifier, $file) { 38 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 39 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 40 41 require $file; 42 } 43 }; 44 foreach ($filesToLoad as $fileIdentifier => $file) { 45 ($requireFile)($fileIdentifier, $file); 39 46 } 40 47 … … 42 49 } 43 50 } 44 45 /**46 * @param string $fileIdentifier47 * @param string $file48 * @return void49 */50 function composerRequire471966cf087c00d83203268549f1513a($fileIdentifier, $file)51 {52 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {53 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;54 55 require $file;56 }57 } -
ownerrez/trunk/lib/composer/autoload_static.php
r2753814 r2846829 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 471966cf087c00d83203268549f1513a7 class ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8 8 8 { 9 9 public static $files = array ( … … 76 76 { 77 77 return \Closure::bind(function () use ($loader) { 78 $loader->prefixLengthsPsr4 = ComposerStaticInit 471966cf087c00d83203268549f1513a::$prefixLengthsPsr4;79 $loader->prefixDirsPsr4 = ComposerStaticInit 471966cf087c00d83203268549f1513a::$prefixDirsPsr4;80 $loader->classMap = ComposerStaticInit 471966cf087c00d83203268549f1513a::$classMap;78 $loader->prefixLengthsPsr4 = ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$prefixLengthsPsr4; 79 $loader->prefixDirsPsr4 = ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$prefixDirsPsr4; 80 $loader->classMap = ComposerStaticInit086fb7da0edbe87de691a5092fbd16c8::$classMap; 81 81 82 82 }, null, ClassLoader::class); -
ownerrez/trunk/ownerrez.php
r2753814 r2846829 17 17 * Plugin URI: https://www.ownerreservations.com/support/wordpress 18 18 * Description: The official WordPress plugin for the OwnerRez API. 19 * Version: 1.1.1 319 * Version: 1.1.14 20 20 * Author: OwnerRez, Inc. 21 21 * Author URI: https://www.ownerreservations.com/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('OWNERREZ_VERSION', '1.1.1 3');38 define('OWNERREZ_VERSION', '1.1.14'); 39 39 40 40 /** -
ownerrez/trunk/public/class-ownerrez-shortcodes.php
r2753806 r2846829 329 329 // wp_enqueue_style("ownerrez-lgstyle", "https://hosteddev.ownerrez.com/content/lgbundle.min.css", null, $this->version); 330 330 // wp_enqueue_script("ownerrez-lgscript", "https://hosteddev.ownerrez.com/scripts/lgbundle.min.js", array( 'jquery' ), $this->version); 331 wp_enqueue_script("ownerrez-photo-carousel.js", plugins_url('/ownerrez/public/js/ownerrez-photo-carousel.js'), array( 'jquery' ), $this->version);332 331 333 332 $this->photoCarouselEnqueued = true; -
ownerrez/trunk/public/js/ownerrez-public.js
r2450742 r2846829 2 2 'use strict'; 3 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note: It has been assumed you will write jQuery code here, so the 9 * $ function reference has been prepared for usage within the scope 10 * of this function. 11 * 12 * This enables you to define handlers, for when the DOM is ready: 13 * 14 * $(function() { 15 * 16 * }); 17 * 18 * When the window is loaded: 19 * 20 * $( window ).load(function() { 21 * 22 * }); 23 * 24 * ...and/or other possibilities. 25 * 26 * Ideally, it is not considered best practise to attach more than a 27 * single DOM-ready or window-load handler for a particular page. 28 * Although scripts in the WordPress core, Plugins and Themes may be 29 * practising this, we should strive to set a better example in our own work. 30 */ 4 $(function() { 5 6 // initialize carousel 7 $(".ownerrez-photo-carousel").each(function () { 8 var loadingPager = $(this).nextAll("ul.loading-pager"); 9 var carousel = this; 10 11 $(this).lightSlider({ 12 gallery: true, 13 item: 1, 14 loop: true, 15 auto: true, 16 pause: 5000, 17 thumbItem: 6, 18 slideMargin: 0, 19 galleryMargin: 0, 20 thumbMargin: 0, 21 enableDrag: false, 22 mode: 'fade', 23 onSliderLoad: function (el) { 24 loadingPager.remove(); 25 lightGallery(el.get(0), { 26 licenseKey: "5CD6B56C-064145F1-A29A5203-5655C26F", 27 selector: '.ownerrez-photo-carousel .lslide', 28 preload: 4, 29 plugins: [lgVideo, lgThumbnail], 30 loadYouTubeThumbnail: false, 31 gotoNextSlideOnVideoEnd: false, 32 youTubePlayerParams: { 33 modestbranding: 1, 34 iv_load_policy: 3 35 } 36 }); 37 38 $("li", carousel).css("height", "100%"); 39 }, 40 prevHtml: '<span class="ownerrez-photo-carousel-prev lg-prev lg-icon"></span>', 41 nextHtml: '<span class="ownerrez-photo-carousel-next lg-next lg-icon"></span>' 42 }).removeClass("loading-slider"); 43 }); 44 }); 31 45 32 46 })( jQuery ); -
ownerrez/trunk/readme.txt
r2753814 r2846829 33 33 34 34 == Changelog == 35 = 1.1.14 = 36 - Initialize carousel even when WP is configured to add scripts html head. 37 35 38 = 1.1.13 = 36 39 - Webhooks now always return the correct http code.
Note: See TracChangeset
for help on using the changeset viewer.