Changeset 3097146
- Timestamp:
- 06/04/2024 08:11:39 AM (22 months ago)
- Location:
- glomex-oembed/trunk
- Files:
-
- 1 added
- 9 edited
-
README.txt (modified) (3 diffs)
-
composer-public.json (modified) (1 diff)
-
glomex-oembed.php (modified) (3 diffs)
-
internals/OembedExtender.php (modified) (1 diff)
-
internals/OembedGlomexIntegrationShortcode.php (added)
-
vendor-prod/autoload.php (modified) (1 diff)
-
vendor-prod/composer/ClassLoader.php (modified) (25 diffs)
-
vendor-prod/composer/autoload_classmap.php (modified) (1 diff)
-
vendor-prod/composer/autoload_real.php (modified) (2 diffs)
-
vendor-prod/composer/autoload_static.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
glomex-oembed/trunk/README.txt
r3077114 r3097146 13 13 14 14 ## Description 15 This is a Wordpress plugin that acts as a bridge between our oEmbed endpoint and internal WP oEmbed service. It allows 16 simple oEmbed operation - just paste a link into (basically) any Wordpress editor and it will automagically convert this 17 link into glomex player/playlist/integration. 15 This is a Wordpress plugin that acts as a bridge between our oEmbed endpoint and internal WP oEmbed service. It allows simple oEmbed operation - just paste a link into (basically) any Wordpress editor and it will automagically convert this link into glomex player/playlist/integration. 18 16 19 17 ## Installation and operation … … 29 27 30 28 This plugin is intended for internal and external usage. There is no dependency on our infrastructure. 29 30 ## Shortcodes 31 32 `[glomex_integration]` 33 You can use the shortcode `[glomex_integration]` to embed a player in your post. 34 Additional shortcode parameters (not required): `playlist_id`, `integration_id`, `variant`, `width`, `height`. 31 35 32 36 ## URL … … 97 101 == Changelog == 98 102 103 = 0.9.1 = 104 * created `glomex_integration` shortcode to embed a player in your post 105 99 106 = 0.9.0 = 100 107 * created functionality for the prefixing video ID in the URL -
glomex-oembed/trunk/composer-public.json
r3077114 r3097146 4 4 "license": "GPL-3.0-or-later", 5 5 "type": "wordpress-plugin", 6 "version": "0.9. 0",6 "version": "0.9.1", 7 7 "authors": [ 8 8 { -
glomex-oembed/trunk/glomex-oembed.php
r3077114 r3097146 6 6 * @package Glomex\Oembed 7 7 * @author glomex 8 * @copyright 202 3glomex8 * @copyright 2024 glomex 9 9 * @license Apache-2.0 10 10 * @link https://glomex.com … … 13 13 * Plugin URI: https://wordpress.org/plugins/glomex-oembed/ 14 14 * Description: glomex oEmbed WP plugin 15 * Version: 0.9. 015 * Version: 0.9.1 16 16 * Author: glomex 17 17 * Author URI: https://glomex.com/ … … 30 30 } 31 31 32 define( 'GLOMEX_OEMBED_VERSION', '0.9. 0' );32 define( 'GLOMEX_OEMBED_VERSION', '0.9.1' ); 33 33 define( 'GLOMEX_OEMBED_TEXTDOMAIN', 'glomexoembed' ); 34 34 define( 'GLOMEX_OEMBED_NAME', 'glomex oEmbed' ); -
glomex-oembed/trunk/internals/OembedExtender.php
r3077114 r3097146 252 252 return $this; 253 253 } 254 ; 254 255 255 $this->parsedUrl['path'] = $this->parsedUrl['path'] . '-wp'; 256 256 -
glomex-oembed/trunk/vendor-prod/autoload.php
r3077114 r3097146 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 -
glomex-oembed/trunk/vendor-prod/composer/ClassLoader.php
r2879239 r3097146 43 43 class ClassLoader 44 44 { 45 /** @var ?string */ 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 46 49 private $vendorDir; 47 50 48 51 // PSR-4 49 52 /** 50 * @var array[] 51 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 52 54 */ 53 55 private $prefixLengthsPsr4 = array(); 54 56 /** 55 * @var array[] 56 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 57 58 */ 58 59 private $prefixDirsPsr4 = array(); 59 60 /** 60 * @var array[] 61 * @psalm-var array<string, string> 61 * @var list<string> 62 62 */ 63 63 private $fallbackDirsPsr4 = array(); … … 65 65 // PSR-0 66 66 /** 67 * @var array[] 68 * @psalm-var array<string, array<string, string[]>> 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 69 72 */ 70 73 private $prefixesPsr0 = array(); 71 74 /** 72 * @var array[] 73 * @psalm-var array<string, string> 75 * @var list<string> 74 76 */ 75 77 private $fallbackDirsPsr0 = array(); … … 79 81 80 82 /** 81 * @var string[] 82 * @psalm-var array<string, string> 83 * @var array<string, string> 83 84 */ 84 85 private $classMap = array(); … … 88 89 89 90 /** 90 * @var bool[] 91 * @psalm-var array<string, bool> 91 * @var array<string, bool> 92 92 */ 93 93 private $missingClasses = array(); 94 94 95 /** @var ?string*/95 /** @var string|null */ 96 96 private $apcuPrefix; 97 97 98 98 /** 99 * @var self[]99 * @var array<string, self> 100 100 */ 101 101 private static $registeredLoaders = array(); 102 102 103 103 /** 104 * @param ?string$vendorDir104 * @param string|null $vendorDir 105 105 */ 106 106 public function __construct($vendorDir = null) 107 107 { 108 108 $this->vendorDir = $vendorDir; 109 } 110 111 /** 112 * @return string[] 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 113 114 */ 114 115 public function getPrefixes() … … 122 123 123 124 /** 124 * @return array[] 125 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 126 126 */ 127 127 public function getPrefixesPsr4() … … 131 131 132 132 /** 133 * @return array[] 134 * @psalm-return array<string, string> 133 * @return list<string> 135 134 */ 136 135 public function getFallbackDirs() … … 140 139 141 140 /** 142 * @return array[] 143 * @psalm-return array<string, string> 141 * @return list<string> 144 142 */ 145 143 public function getFallbackDirsPsr4() … … 149 147 150 148 /** 151 * @return string[] Array of classname => path 152 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 153 150 */ 154 151 public function getClassMap() … … 158 155 159 156 /** 160 * @param string[] $classMap Class to filename map 161 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 162 158 * 163 159 * @return void … … 176 172 * appending or prepending to the ones previously set for this prefix. 177 173 * 178 * @param string $prefix The prefix179 * @param string[]|string $paths The PSR-0 root directories180 * @param bool $prepend Whether to prepend the directories174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 181 177 * 182 178 * @return void … … 184 180 public function add($prefix, $paths, $prepend = false) 185 181 { 182 $paths = (array) $paths; 186 183 if (!$prefix) { 187 184 if ($prepend) { 188 185 $this->fallbackDirsPsr0 = array_merge( 189 (array)$paths,186 $paths, 190 187 $this->fallbackDirsPsr0 191 188 ); … … 193 190 $this->fallbackDirsPsr0 = array_merge( 194 191 $this->fallbackDirsPsr0, 195 (array)$paths192 $paths 196 193 ); 197 194 } … … 202 199 $first = $prefix[0]; 203 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 204 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 205 202 206 203 return; … … 208 205 if ($prepend) { 209 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 210 (array)$paths,207 $paths, 211 208 $this->prefixesPsr0[$first][$prefix] 212 209 ); … … 214 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 215 212 $this->prefixesPsr0[$first][$prefix], 216 (array)$paths213 $paths 217 214 ); 218 215 } … … 223 220 * appending or prepending to the ones previously set for this namespace. 224 221 * 225 * @param string $prefix The prefix/namespace, with trailing '\\'226 * @param string[]|string $paths The PSR-4 base directories227 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 228 225 * 229 226 * @throws \InvalidArgumentException … … 233 230 public function addPsr4($prefix, $paths, $prepend = false) 234 231 { 232 $paths = (array) $paths; 235 233 if (!$prefix) { 236 234 // Register directories for the root namespace. 237 235 if ($prepend) { 238 236 $this->fallbackDirsPsr4 = array_merge( 239 (array)$paths,237 $paths, 240 238 $this->fallbackDirsPsr4 241 239 ); … … 243 241 $this->fallbackDirsPsr4 = array_merge( 244 242 $this->fallbackDirsPsr4, 245 (array)$paths243 $paths 246 244 ); 247 245 } … … 253 251 } 254 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 255 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 256 254 } elseif ($prepend) { 257 255 // Prepend directories for an already registered namespace. 258 256 $this->prefixDirsPsr4[$prefix] = array_merge( 259 (array)$paths,257 $paths, 260 258 $this->prefixDirsPsr4[$prefix] 261 259 ); … … 264 262 $this->prefixDirsPsr4[$prefix] = array_merge( 265 263 $this->prefixDirsPsr4[$prefix], 266 (array)$paths264 $paths 267 265 ); 268 266 } … … 273 271 * replacing any others previously set for this prefix. 274 272 * 275 * @param string $prefix The prefix276 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 277 275 * 278 276 * @return void … … 291 289 * replacing any others previously set for this namespace. 292 290 * 293 * @param string $prefix The prefix/namespace, with trailing '\\'294 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 295 293 * 296 294 * @throws \InvalidArgumentException … … 426 424 { 427 425 if ($file = $this->findFile($class)) { 428 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 429 428 430 429 return true; … … 477 476 478 477 /** 479 * Returns the currently registered loaders indexed by their corresponding vendor directories.480 * 481 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 482 481 */ 483 482 public static function getRegisteredLoaders() … … 556 555 return false; 557 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 558 579 } 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 } -
glomex-oembed/trunk/vendor-prod/composer/autoload_classmap.php
r2879239 r3097146 197 197 'glomex_oEmbed\\Integrations\\CMB' => $baseDir . '/integrations/CMB.php', 198 198 'glomex_oEmbed\\Internals\\OembedExtender' => $baseDir . '/internals/OembedExtender.php', 199 'glomex_oEmbed\\Internals\\OembedGlomexIntegrationShortcode' => $baseDir . '/internals/OembedGlomexIntegrationShortcode.php', 199 200 'glomex_oEmbed\\Internals\\OembedHandler' => $baseDir . '/internals/OembedHandler.php', 200 201 'glomex_oEmbed\\Internals\\OembedHooksProvider' => $baseDir . '/internals/OembedHooksProvider.php', -
glomex-oembed/trunk/vendor-prod/composer/autoload_real.php
r3077114 r3097146 34 34 $loader->register(true); 35 35 36 $includeFiles = \Composer\Autoload\ComposerStaticInitf34f63ec563e6e39bbffa297fa394971::$files; 37 foreach ($includeFiles as $fileIdentifier => $file) { 38 composerRequiref34f63ec563e6e39bbffa297fa394971($fileIdentifier, $file); 36 $filesToLoad = \Composer\Autoload\ComposerStaticInitf34f63ec563e6e39bbffa297fa394971::$files; 37 $requireFile = \Closure::bind(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 }, null, null); 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 composerRequiref34f63ec563e6e39bbffa297fa394971($fileIdentifier, $file)51 {52 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {53 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;54 55 require $file;56 }57 } -
glomex-oembed/trunk/vendor-prod/composer/autoload_static.php
r3077114 r3097146 285 285 'glomex_oEmbed\\Integrations\\CMB' => __DIR__ . '/../..' . '/integrations/CMB.php', 286 286 'glomex_oEmbed\\Internals\\OembedExtender' => __DIR__ . '/../..' . '/internals/OembedExtender.php', 287 'glomex_oEmbed\\Internals\\OembedGlomexIntegrationShortcode' => __DIR__ . '/../..' . '/internals/OembedGlomexIntegrationShortcode.php', 287 288 'glomex_oEmbed\\Internals\\OembedHandler' => __DIR__ . '/../..' . '/internals/OembedHandler.php', 288 289 'glomex_oEmbed\\Internals\\OembedHooksProvider' => __DIR__ . '/../..' . '/internals/OembedHooksProvider.php',
Note: See TracChangeset
for help on using the changeset viewer.