Changeset 3077243
- Timestamp:
- 04/25/2024 08:15:24 PM (2 years ago)
- Location:
- safety-exit
- Files:
-
- 20 edited
- 1 copied
-
tags/1.7.1 (copied) (copied from safety-exit/trunk)
-
tags/1.7.1/lib/Safety_Exit_Admin.php (modified) (6 diffs)
-
tags/1.7.1/lib/Safety_Exit_Frontend.php (modified) (5 diffs)
-
tags/1.7.1/readme.txt (modified) (2 diffs)
-
tags/1.7.1/safety-exit.php (modified) (1 diff)
-
tags/1.7.1/vendor/autoload.php (modified) (1 diff)
-
tags/1.7.1/vendor/composer/ClassLoader.php (modified) (27 diffs)
-
tags/1.7.1/vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
tags/1.7.1/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/1.7.1/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.7.1/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/lib/Safety_Exit_Admin.php (modified) (6 diffs)
-
trunk/lib/Safety_Exit_Frontend.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/safety-exit.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (27 diffs)
-
trunk/vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
safety-exit/tags/1.7.1/lib/Safety_Exit_Admin.php
r3057884 r3077243 308 308 case 'sftExt_fontawesome_icon_classes': 309 309 ?> 310 <div id="sftExt_icon_display" style="height: 75px;"><i class="fa-3x <?= $options['sftExt_fontawesome_icon_classes']; ?>"></i></div>310 <div id="sftExt_icon_display" style="height: 75px;"><i class="fa-3x <?= esc_attr($options['sftExt_fontawesome_icon_classes']); ?>"></i></div> 311 311 <!-- <button id="sftExt_fontawesome_icon_classes_btn" >Change Icon</button> --> 312 <input type="hidden" id="sftExt_fontawesome_icon_classes" name="sftExt_settings[sftExt_fontawesome_icon_classes]" value="<?= $options['sftExt_fontawesome_icon_classes']; ?>">312 <input type="hidden" id="sftExt_fontawesome_icon_classes" name="sftExt_settings[sftExt_fontawesome_icon_classes]" value="<?= esc_attr( $options['sftExt_fontawesome_icon_classes'] ); ?>"> 313 313 314 314 <?php … … 316 316 case 'sftExt_bg_color': 317 317 ?> 318 <div id="sftExt_color_picker_btn_bg_color" style="background-color: <?= $options['sftExt_bg_color']?>">Choose Color</div>319 <input type="hidden" id="sftExt_bg_color" name="sftExt_settings[sftExt_bg_color]" value="<?= $options['sftExt_bg_color']; ?>">318 <div id="sftExt_color_picker_btn_bg_color" style="background-color: <?= esc_attr( $options['sftExt_bg_color'] )?>">Choose Color</div> 319 <input type="hidden" id="sftExt_bg_color" name="sftExt_settings[sftExt_bg_color]" value="<?= esc_attr( $options['sftExt_bg_color'] ); ?>"> 320 320 321 321 <?php … … 323 323 case 'sftExt_font_color': 324 324 ?> 325 <div id="sftExt_color_picker_btn_font_color" style="background-color: <?= $options['sftExt_font_color']?>">Choose Color</div>326 <input type="hidden" id="sftExt_font_color" name="sftExt_settings[sftExt_font_color]" value="<?= $options['sftExt_font_color']; ?>">325 <div id="sftExt_color_picker_btn_font_color" style="background-color: <?= esc_attr( $options['sftExt_font_color'] ); ?>">Choose Color</div> 326 <input type="hidden" id="sftExt_font_color" name="sftExt_settings[sftExt_font_color]" value="<?= esc_attr( $options['sftExt_font_color'] ); ?>"> 327 327 328 328 <?php … … 339 339 case 'sftExt_border_radius': 340 340 ?> 341 <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= $options['sftExt_border_radius']; ?>"> px341 <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= esc_attr( $options['sftExt_border_radius'] ); ?>"> px 342 342 <?php 343 343 break; 344 344 case 'sftExt_rectangle_font_size': 345 345 ?> 346 <input type="number" id="sftExt_rectangle_font_size" name="sftExt_settings[sftExt_rectangle_font_size]" value="<?= $options['sftExt_rectangle_font_size']; ?>"> <span class="sftExt_units"><?= $options['sftExt_rectangle_font_size_units']; ?></span>346 <input type="number" id="sftExt_rectangle_font_size" name="sftExt_settings[sftExt_rectangle_font_size]" value="<?= esc_attr( $options['sftExt_rectangle_font_size'] ); ?>"> <span class="sftExt_units"><?= esc_attr( $options['sftExt_rectangle_font_size_units'] ); ?></span> 347 347 <?php 348 348 break; … … 358 358 case 'sftExt_current_tab_url': 359 359 ?> 360 <input type="text" id="sftExt_current_tab_url" name="sftExt_settings[sftExt_current_tab_url]" value="<?= $options['sftExt_current_tab_url']; ?>">360 <input type="text" id="sftExt_current_tab_url" name="sftExt_settings[sftExt_current_tab_url]" value="<?= esc_attr( $options['sftExt_current_tab_url'] ); ?>"> 361 361 <?php 362 362 break; 363 363 case 'sftExt_new_tab_url': 364 364 ?> 365 <input type="text" id="sftExt_new_tab_url" name="sftExt_settings[sftExt_new_tab_url]" value="<?= $options['sftExt_new_tab_url']; ?>">365 <input type="text" id="sftExt_new_tab_url" name="sftExt_settings[sftExt_new_tab_url]" value="<?= esc_attr( $options['sftExt_new_tab_url'] ); ?>"> 366 366 <?php 367 367 break; 368 368 case 'sftExt_rectangle_text': 369 369 ?> 370 <input type="text" id="sftExt_rectangle_text" name="sftExt_settings[sftExt_rectangle_text]" value="<?= $options['sftExt_rectangle_text']; ?>">370 <input type="text" id="sftExt_rectangle_text" name="sftExt_settings[sftExt_rectangle_text]" value="<?= esc_attr( $options['sftExt_rectangle_text'] ); ?>"> 371 371 <?php 372 372 break; … … 388 388 ?> 389 389 <?php foreach($postIDs as $key => $postID) : ?> 390 <input type="checkbox" name="sftExt_settings[sftExt_pages][]" id="sftExt_pages" value="<?= $postID; ?>" <?= in_array( $postID, $options['sftExt_pages']) ? 'checked="checked"': ''?>> <?= get_the_title($postID); ?><br/>390 <input type="checkbox" name="sftExt_settings[sftExt_pages][]" id="sftExt_pages" value="<?= $postID; ?>" <?= in_array( $postID, $options['sftExt_pages'] ) ? 'checked="checked"': ''?>> <?= get_the_title( $postID ); ?><br/> 391 391 <?php endforeach; ?> 392 392 <?php -
safety-exit/tags/1.7.1/lib/Safety_Exit_Frontend.php
r3057884 r3077243 74 74 $this->hideOnMobile = true; 75 75 } 76 $this->classes = $this->defaultSettings['sftExt_position'] . ' ' . $this->defaultSettings['sftExt_type'];76 $this->classes = esc_attr( $this->defaultSettings['sftExt_position'] ) . ' ' . esc_attr( $this->defaultSettings['sftExt_type'] ); 77 77 78 78 if($this->defaultSettings['sftExt_rectangle_icon_onOff'] == 'yes' && $this->defaultSettings['sftExt_type'] == 'rectangle') { 79 $this->icon = '<i class="' . $this->defaultSettings['sftExt_fontawesome_icon_classes']. '"></i>';79 $this->icon = '<i class="' . esc_attr( $this->defaultSettings['sftExt_fontawesome_icon_classes'] ) . '"></i>'; 80 80 }else if($this->defaultSettings['sftExt_type'] == 'round' || $this->defaultSettings['sftExt_type'] == 'square'){ 81 $this->icon = '<i class="' . $this->defaultSettings['sftExt_fontawesome_icon_classes']. '"></i>';81 $this->icon = '<i class="' . esc_attr( $this->defaultSettings['sftExt_fontawesome_icon_classes'] ) . '"></i>'; 82 82 } 83 83 } … … 113 113 $js .= 'window.sftExtBtn.classes=\'' . $this->classes . '\';'; 114 114 $js .= 'window.sftExtBtn.icon=\'' . $this->icon . '\';'; 115 $js .= 'window.sftExtBtn.newTabUrl=\'' . $this->defaultSettings['sftExt_new_tab_url']. '\';';116 $js .= 'window.sftExtBtn.currentTabUrl=\'' . $this->defaultSettings['sftExt_current_tab_url']. '\';';117 $js .= 'window.sftExtBtn.btnType=\'' . $this->defaultSettings['sftExt_type']. '\';';118 $js .= 'window.sftExtBtn.text=\'' . $this->defaultSettings['sftExt_rectangle_text']. '\';';115 $js .= 'window.sftExtBtn.newTabUrl=\'' . esc_attr( $this->defaultSettings['sftExt_new_tab_url'] ) . '\';'; 116 $js .= 'window.sftExtBtn.currentTabUrl=\'' . esc_attr( $this->defaultSettings['sftExt_current_tab_url'] ) . '\';'; 117 $js .= 'window.sftExtBtn.btnType=\'' . esc_attr( $this->defaultSettings['sftExt_type'] ) . '\';'; 118 $js .= 'window.sftExtBtn.text=\'' . esc_attr( $this->defaultSettings['sftExt_rectangle_text'] ) . '\';'; 119 119 $js .= 'window.sftExtBtn.shouldShow=' . ($this->displayButton ? 'true' : 'false') . ';'; 120 120 $js .= '</script>'; … … 127 127 do_action( 'qm/debug', 'generating custom CSS' ); 128 128 $css = '<style>:root{'; 129 $css .= '--sftExt_bgColor:' . $this->defaultSettings['sftExt_bg_color']. ';';130 $css .= '--sftExt_textColor:' . $this->defaultSettings['sftExt_font_color']. ';';129 $css .= '--sftExt_bgColor:' . esc_attr( $this->defaultSettings['sftExt_bg_color'] ) . ';'; 130 $css .= '--sftExt_textColor:' . esc_attr( $this->defaultSettings['sftExt_font_color'] ) . ';'; 131 131 $css .= '--sftExt_active:' . (!$this->displayButton ? 'none !important' : 'inline-block') . ';'; 132 132 $css .= '--sftExt_activeMobile:' . ($this->hideOnMobile ? 'none !important' : 'inline-block') . ';'; 133 133 $css .= '--sftExt_mobileBreakPoint:600px;'; 134 $css .= '--sftExt_rectangle_fontSize:' . $this->defaultSettings['sftExt_rectangle_font_size'] . $this->defaultSettings['sftExt_rectangle_font_size_units'].';';135 $css .= '--sftExt_rectangle_letterSpacing:' . $this->defaultSettings['sftExt_letter_spacing']. ';';136 $css .= '--sftExt_rectangle_borderRadius:' . $this->defaultSettings['sftExt_border_radius']. 'px;';134 $css .= '--sftExt_rectangle_fontSize:' . esc_attr( $this->defaultSettings['sftExt_rectangle_font_size'] ) . esc_attr( $this->defaultSettings['sftExt_rectangle_font_size_units'] ) .';'; 135 $css .= '--sftExt_rectangle_letterSpacing:' . esc_attr( $this->defaultSettings['sftExt_letter_spacing'] ) . ';'; 136 $css .= '--sftExt_rectangle_borderRadius:' . esc_attr( $this->defaultSettings['sftExt_border_radius'] ) . 'px;'; 137 137 $css .= '}</style>'; 138 138 return $css; … … 140 140 141 141 public function generate_html() { 142 $html = '<button id="sftExt-frontend-button" class="' . $this->classes . '" data-new-tab="' . $this->defaultSettings['sftExt_new_tab_url'] . '" data-url="' . $this->defaultSettings['sftExt_current_tab_url']. '">';142 $html = '<button id="sftExt-frontend-button" class="' . $this->classes . '" data-new-tab="' . esc_attr( $this->defaultSettings['sftExt_new_tab_url'] ) . '" data-url="' . esc_attr( $this->defaultSettings['sftExt_current_tab_url'] ) . '">'; 143 143 $html .= '<div class="sftExt-inner">'; 144 144 $html .= $this->icon ?? ''; … … 147 147 $html .= ' class="sr-only"'; 148 148 } 149 $html .= '>'. $this->defaultSettings['sftExt_rectangle_text'].'</span>';149 $html .= '>'. esc_attr( $this->defaultSettings['sftExt_rectangle_text'] ) .'</span>'; 150 150 $html .= '</div>'; 151 151 $html .= '</button>'; -
safety-exit/tags/1.7.1/readme.txt
r3057884 r3077243 1 1 === Safety Exit === 2 2 Contributors: tcordero 3 Tags: quick exit, safety exit, stop abuse, no domestic violence, safe browsing, exit, fast exit, domestic violence, panic button3 Tags: quick exit, safety exit, exit, fast exit, panic button 4 4 Donate link: https://tomascordero.com 5 5 Requires at least: 5.2.0 6 6 Tested up to: 6.4.3 7 7 Requires PHP: 5.6.0 8 Stable tag: 1.7. 08 Stable tag: 1.7.1 9 9 License: GPL-2.0+ 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 49 49 == Changelog == 50 1.7.1: 51 - Fix: Security fix 50 52 1.7.0: 51 53 - Refactor: Completely reworked how the button is rendered. It will try to render via HTML first. If it cant it will render with JS. This should finally fix all theme related problems. -
safety-exit/tags/1.7.1/safety-exit.php
r3057884 r3077243 12 12 * Plugin URI: 13 13 * Description: This plugin will inject a button on your website that will allow a website user to quickly navigate away from your website. 14 * Version: 1.7. 014 * Version: 1.7.1 15 15 * Author: Tomas Cordero 16 16 * Author URI: https://tomascordero.com -
safety-exit/tags/1.7.1/vendor/autoload.php
r3057884 r3077243 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe1::getLoader();25 return ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe::getLoader(); -
safety-exit/tags/1.7.1/vendor/composer/ClassLoader.php
r3057884 r3077243 46 46 private static $includeFile; 47 47 48 /** @var ?string*/48 /** @var string|null */ 49 49 private $vendorDir; 50 50 51 51 // PSR-4 52 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 55 54 */ 56 55 private $prefixLengthsPsr4 = array(); 57 56 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 60 58 */ 61 59 private $prefixDirsPsr4 = array(); 62 60 /** 63 * @var array[] 64 * @psalm-var array<string, string> 61 * @var list<string> 65 62 */ 66 63 private $fallbackDirsPsr4 = array(); … … 68 65 // PSR-0 69 66 /** 70 * @var array[] 71 * @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>>> 72 72 */ 73 73 private $prefixesPsr0 = array(); 74 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 75 * @var list<string> 77 76 */ 78 77 private $fallbackDirsPsr0 = array(); … … 82 81 83 82 /** 84 * @var string[] 85 * @psalm-var array<string, string> 83 * @var array<string, string> 86 84 */ 87 85 private $classMap = array(); … … 91 89 92 90 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 91 * @var array<string, bool> 95 92 */ 96 93 private $missingClasses = array(); 97 94 98 /** @var ?string*/95 /** @var string|null */ 99 96 private $apcuPrefix; 100 97 101 98 /** 102 * @var self[]99 * @var array<string, self> 103 100 */ 104 101 private static $registeredLoaders = array(); 105 102 106 103 /** 107 * @param ?string$vendorDir104 * @param string|null $vendorDir 108 105 */ 109 106 public function __construct($vendorDir = null) … … 114 111 115 112 /** 116 * @return string[]113 * @return array<string, list<string>> 117 114 */ 118 115 public function getPrefixes() … … 126 123 127 124 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 130 126 */ 131 127 public function getPrefixesPsr4() … … 135 131 136 132 /** 137 * @return array[] 138 * @psalm-return array<string, string> 133 * @return list<string> 139 134 */ 140 135 public function getFallbackDirs() … … 144 139 145 140 /** 146 * @return array[] 147 * @psalm-return array<string, string> 141 * @return list<string> 148 142 */ 149 143 public function getFallbackDirsPsr4() … … 153 147 154 148 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 157 150 */ 158 151 public function getClassMap() … … 162 155 163 156 /** 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 166 158 * 167 159 * @return void … … 180 172 * appending or prepending to the ones previously set for this prefix. 181 173 * 182 * @param string $prefix The prefix183 * @param string[]|string $paths The PSR-0 root directories184 * @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 185 177 * 186 178 * @return void … … 188 180 public function add($prefix, $paths, $prepend = false) 189 181 { 182 $paths = (array) $paths; 190 183 if (!$prefix) { 191 184 if ($prepend) { 192 185 $this->fallbackDirsPsr0 = array_merge( 193 (array)$paths,186 $paths, 194 187 $this->fallbackDirsPsr0 195 188 ); … … 197 190 $this->fallbackDirsPsr0 = array_merge( 198 191 $this->fallbackDirsPsr0, 199 (array)$paths192 $paths 200 193 ); 201 194 } … … 206 199 $first = $prefix[0]; 207 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 208 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 209 202 210 203 return; … … 212 205 if ($prepend) { 213 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 214 (array)$paths,207 $paths, 215 208 $this->prefixesPsr0[$first][$prefix] 216 209 ); … … 218 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 219 212 $this->prefixesPsr0[$first][$prefix], 220 (array)$paths213 $paths 221 214 ); 222 215 } … … 227 220 * appending or prepending to the ones previously set for this namespace. 228 221 * 229 * @param string $prefix The prefix/namespace, with trailing '\\'230 * @param string[]|string $paths The PSR-4 base directories231 * @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 232 225 * 233 226 * @throws \InvalidArgumentException … … 237 230 public function addPsr4($prefix, $paths, $prepend = false) 238 231 { 232 $paths = (array) $paths; 239 233 if (!$prefix) { 240 234 // Register directories for the root namespace. 241 235 if ($prepend) { 242 236 $this->fallbackDirsPsr4 = array_merge( 243 (array)$paths,237 $paths, 244 238 $this->fallbackDirsPsr4 245 239 ); … … 247 241 $this->fallbackDirsPsr4 = array_merge( 248 242 $this->fallbackDirsPsr4, 249 (array)$paths243 $paths 250 244 ); 251 245 } … … 257 251 } 258 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 259 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 260 254 } elseif ($prepend) { 261 255 // Prepend directories for an already registered namespace. 262 256 $this->prefixDirsPsr4[$prefix] = array_merge( 263 (array)$paths,257 $paths, 264 258 $this->prefixDirsPsr4[$prefix] 265 259 ); … … 268 262 $this->prefixDirsPsr4[$prefix] = array_merge( 269 263 $this->prefixDirsPsr4[$prefix], 270 (array)$paths264 $paths 271 265 ); 272 266 } … … 277 271 * replacing any others previously set for this prefix. 278 272 * 279 * @param string $prefix The prefix280 * @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 281 275 * 282 276 * @return void … … 295 289 * replacing any others previously set for this namespace. 296 290 * 297 * @param string $prefix The prefix/namespace, with trailing '\\'298 * @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 299 293 * 300 294 * @throws \InvalidArgumentException … … 430 424 { 431 425 if ($file = $this->findFile($class)) { 432 (self::$includeFile)($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 433 428 434 429 return true; … … 481 476 482 477 /** 483 * Returns the currently registered loaders indexed by their corresponding vendor directories.484 * 485 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 486 481 */ 487 482 public static function getRegisteredLoaders() … … 561 556 } 562 557 563 private static function initializeIncludeClosure(): void 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 564 562 { 565 563 if (self::$includeFile !== null) { … … 575 573 * @return void 576 574 */ 577 self::$includeFile = static function($file) {575 self::$includeFile = \Closure::bind(static function($file) { 578 576 include $file; 579 } ;577 }, null, null); 580 578 } 581 579 } -
safety-exit/tags/1.7.1/vendor/composer/InstalledVersions.php
r3057884 r3077243 99 99 foreach (self::getInstalled() as $installed) { 100 100 if (isset($installed['versions'][$packageName])) { 101 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 102 102 } 103 103 } … … 120 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 121 121 { 122 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 123 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 124 124 … … 329 329 $installed[] = self::$installedByVendor[$vendorDir]; 330 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 331 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 332 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 333 335 self::$installed = $installed[count($installed) - 1]; … … 341 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 342 344 if (substr(__DIR__, -8, 1) !== 'C') { 343 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 344 348 } else { 345 349 self::$installed = array(); 346 350 } 347 351 } 348 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 349 356 350 357 return $installed; -
safety-exit/tags/1.7.1/vendor/composer/autoload_real.php
r3057884 r3077243 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe15 class ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
safety-exit/tags/1.7.1/vendor/composer/autoload_static.php
r3057884 r3077243 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe17 class ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 30 30 { 31 31 return \Closure::bind(function () use ($loader) { 32 $loader->prefixLengthsPsr4 = ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::$prefixLengthsPsr4;33 $loader->prefixDirsPsr4 = ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::$prefixDirsPsr4;34 $loader->classMap = ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::$classMap;32 $loader->prefixLengthsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixLengthsPsr4; 33 $loader->prefixDirsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixDirsPsr4; 34 $loader->classMap = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$classMap; 35 35 36 36 }, null, ClassLoader::class); -
safety-exit/tags/1.7.1/vendor/composer/installed.php
r3057884 r3077243 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',6 'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',16 'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
safety-exit/trunk/lib/Safety_Exit_Admin.php
r3057884 r3077243 308 308 case 'sftExt_fontawesome_icon_classes': 309 309 ?> 310 <div id="sftExt_icon_display" style="height: 75px;"><i class="fa-3x <?= $options['sftExt_fontawesome_icon_classes']; ?>"></i></div>310 <div id="sftExt_icon_display" style="height: 75px;"><i class="fa-3x <?= esc_attr($options['sftExt_fontawesome_icon_classes']); ?>"></i></div> 311 311 <!-- <button id="sftExt_fontawesome_icon_classes_btn" >Change Icon</button> --> 312 <input type="hidden" id="sftExt_fontawesome_icon_classes" name="sftExt_settings[sftExt_fontawesome_icon_classes]" value="<?= $options['sftExt_fontawesome_icon_classes']; ?>">312 <input type="hidden" id="sftExt_fontawesome_icon_classes" name="sftExt_settings[sftExt_fontawesome_icon_classes]" value="<?= esc_attr( $options['sftExt_fontawesome_icon_classes'] ); ?>"> 313 313 314 314 <?php … … 316 316 case 'sftExt_bg_color': 317 317 ?> 318 <div id="sftExt_color_picker_btn_bg_color" style="background-color: <?= $options['sftExt_bg_color']?>">Choose Color</div>319 <input type="hidden" id="sftExt_bg_color" name="sftExt_settings[sftExt_bg_color]" value="<?= $options['sftExt_bg_color']; ?>">318 <div id="sftExt_color_picker_btn_bg_color" style="background-color: <?= esc_attr( $options['sftExt_bg_color'] )?>">Choose Color</div> 319 <input type="hidden" id="sftExt_bg_color" name="sftExt_settings[sftExt_bg_color]" value="<?= esc_attr( $options['sftExt_bg_color'] ); ?>"> 320 320 321 321 <?php … … 323 323 case 'sftExt_font_color': 324 324 ?> 325 <div id="sftExt_color_picker_btn_font_color" style="background-color: <?= $options['sftExt_font_color']?>">Choose Color</div>326 <input type="hidden" id="sftExt_font_color" name="sftExt_settings[sftExt_font_color]" value="<?= $options['sftExt_font_color']; ?>">325 <div id="sftExt_color_picker_btn_font_color" style="background-color: <?= esc_attr( $options['sftExt_font_color'] ); ?>">Choose Color</div> 326 <input type="hidden" id="sftExt_font_color" name="sftExt_settings[sftExt_font_color]" value="<?= esc_attr( $options['sftExt_font_color'] ); ?>"> 327 327 328 328 <?php … … 339 339 case 'sftExt_border_radius': 340 340 ?> 341 <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= $options['sftExt_border_radius']; ?>"> px341 <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= esc_attr( $options['sftExt_border_radius'] ); ?>"> px 342 342 <?php 343 343 break; 344 344 case 'sftExt_rectangle_font_size': 345 345 ?> 346 <input type="number" id="sftExt_rectangle_font_size" name="sftExt_settings[sftExt_rectangle_font_size]" value="<?= $options['sftExt_rectangle_font_size']; ?>"> <span class="sftExt_units"><?= $options['sftExt_rectangle_font_size_units']; ?></span>346 <input type="number" id="sftExt_rectangle_font_size" name="sftExt_settings[sftExt_rectangle_font_size]" value="<?= esc_attr( $options['sftExt_rectangle_font_size'] ); ?>"> <span class="sftExt_units"><?= esc_attr( $options['sftExt_rectangle_font_size_units'] ); ?></span> 347 347 <?php 348 348 break; … … 358 358 case 'sftExt_current_tab_url': 359 359 ?> 360 <input type="text" id="sftExt_current_tab_url" name="sftExt_settings[sftExt_current_tab_url]" value="<?= $options['sftExt_current_tab_url']; ?>">360 <input type="text" id="sftExt_current_tab_url" name="sftExt_settings[sftExt_current_tab_url]" value="<?= esc_attr( $options['sftExt_current_tab_url'] ); ?>"> 361 361 <?php 362 362 break; 363 363 case 'sftExt_new_tab_url': 364 364 ?> 365 <input type="text" id="sftExt_new_tab_url" name="sftExt_settings[sftExt_new_tab_url]" value="<?= $options['sftExt_new_tab_url']; ?>">365 <input type="text" id="sftExt_new_tab_url" name="sftExt_settings[sftExt_new_tab_url]" value="<?= esc_attr( $options['sftExt_new_tab_url'] ); ?>"> 366 366 <?php 367 367 break; 368 368 case 'sftExt_rectangle_text': 369 369 ?> 370 <input type="text" id="sftExt_rectangle_text" name="sftExt_settings[sftExt_rectangle_text]" value="<?= $options['sftExt_rectangle_text']; ?>">370 <input type="text" id="sftExt_rectangle_text" name="sftExt_settings[sftExt_rectangle_text]" value="<?= esc_attr( $options['sftExt_rectangle_text'] ); ?>"> 371 371 <?php 372 372 break; … … 388 388 ?> 389 389 <?php foreach($postIDs as $key => $postID) : ?> 390 <input type="checkbox" name="sftExt_settings[sftExt_pages][]" id="sftExt_pages" value="<?= $postID; ?>" <?= in_array( $postID, $options['sftExt_pages']) ? 'checked="checked"': ''?>> <?= get_the_title($postID); ?><br/>390 <input type="checkbox" name="sftExt_settings[sftExt_pages][]" id="sftExt_pages" value="<?= $postID; ?>" <?= in_array( $postID, $options['sftExt_pages'] ) ? 'checked="checked"': ''?>> <?= get_the_title( $postID ); ?><br/> 391 391 <?php endforeach; ?> 392 392 <?php -
safety-exit/trunk/lib/Safety_Exit_Frontend.php
r3057884 r3077243 74 74 $this->hideOnMobile = true; 75 75 } 76 $this->classes = $this->defaultSettings['sftExt_position'] . ' ' . $this->defaultSettings['sftExt_type'];76 $this->classes = esc_attr( $this->defaultSettings['sftExt_position'] ) . ' ' . esc_attr( $this->defaultSettings['sftExt_type'] ); 77 77 78 78 if($this->defaultSettings['sftExt_rectangle_icon_onOff'] == 'yes' && $this->defaultSettings['sftExt_type'] == 'rectangle') { 79 $this->icon = '<i class="' . $this->defaultSettings['sftExt_fontawesome_icon_classes']. '"></i>';79 $this->icon = '<i class="' . esc_attr( $this->defaultSettings['sftExt_fontawesome_icon_classes'] ) . '"></i>'; 80 80 }else if($this->defaultSettings['sftExt_type'] == 'round' || $this->defaultSettings['sftExt_type'] == 'square'){ 81 $this->icon = '<i class="' . $this->defaultSettings['sftExt_fontawesome_icon_classes']. '"></i>';81 $this->icon = '<i class="' . esc_attr( $this->defaultSettings['sftExt_fontawesome_icon_classes'] ) . '"></i>'; 82 82 } 83 83 } … … 113 113 $js .= 'window.sftExtBtn.classes=\'' . $this->classes . '\';'; 114 114 $js .= 'window.sftExtBtn.icon=\'' . $this->icon . '\';'; 115 $js .= 'window.sftExtBtn.newTabUrl=\'' . $this->defaultSettings['sftExt_new_tab_url']. '\';';116 $js .= 'window.sftExtBtn.currentTabUrl=\'' . $this->defaultSettings['sftExt_current_tab_url']. '\';';117 $js .= 'window.sftExtBtn.btnType=\'' . $this->defaultSettings['sftExt_type']. '\';';118 $js .= 'window.sftExtBtn.text=\'' . $this->defaultSettings['sftExt_rectangle_text']. '\';';115 $js .= 'window.sftExtBtn.newTabUrl=\'' . esc_attr( $this->defaultSettings['sftExt_new_tab_url'] ) . '\';'; 116 $js .= 'window.sftExtBtn.currentTabUrl=\'' . esc_attr( $this->defaultSettings['sftExt_current_tab_url'] ) . '\';'; 117 $js .= 'window.sftExtBtn.btnType=\'' . esc_attr( $this->defaultSettings['sftExt_type'] ) . '\';'; 118 $js .= 'window.sftExtBtn.text=\'' . esc_attr( $this->defaultSettings['sftExt_rectangle_text'] ) . '\';'; 119 119 $js .= 'window.sftExtBtn.shouldShow=' . ($this->displayButton ? 'true' : 'false') . ';'; 120 120 $js .= '</script>'; … … 127 127 do_action( 'qm/debug', 'generating custom CSS' ); 128 128 $css = '<style>:root{'; 129 $css .= '--sftExt_bgColor:' . $this->defaultSettings['sftExt_bg_color']. ';';130 $css .= '--sftExt_textColor:' . $this->defaultSettings['sftExt_font_color']. ';';129 $css .= '--sftExt_bgColor:' . esc_attr( $this->defaultSettings['sftExt_bg_color'] ) . ';'; 130 $css .= '--sftExt_textColor:' . esc_attr( $this->defaultSettings['sftExt_font_color'] ) . ';'; 131 131 $css .= '--sftExt_active:' . (!$this->displayButton ? 'none !important' : 'inline-block') . ';'; 132 132 $css .= '--sftExt_activeMobile:' . ($this->hideOnMobile ? 'none !important' : 'inline-block') . ';'; 133 133 $css .= '--sftExt_mobileBreakPoint:600px;'; 134 $css .= '--sftExt_rectangle_fontSize:' . $this->defaultSettings['sftExt_rectangle_font_size'] . $this->defaultSettings['sftExt_rectangle_font_size_units'].';';135 $css .= '--sftExt_rectangle_letterSpacing:' . $this->defaultSettings['sftExt_letter_spacing']. ';';136 $css .= '--sftExt_rectangle_borderRadius:' . $this->defaultSettings['sftExt_border_radius']. 'px;';134 $css .= '--sftExt_rectangle_fontSize:' . esc_attr( $this->defaultSettings['sftExt_rectangle_font_size'] ) . esc_attr( $this->defaultSettings['sftExt_rectangle_font_size_units'] ) .';'; 135 $css .= '--sftExt_rectangle_letterSpacing:' . esc_attr( $this->defaultSettings['sftExt_letter_spacing'] ) . ';'; 136 $css .= '--sftExt_rectangle_borderRadius:' . esc_attr( $this->defaultSettings['sftExt_border_radius'] ) . 'px;'; 137 137 $css .= '}</style>'; 138 138 return $css; … … 140 140 141 141 public function generate_html() { 142 $html = '<button id="sftExt-frontend-button" class="' . $this->classes . '" data-new-tab="' . $this->defaultSettings['sftExt_new_tab_url'] . '" data-url="' . $this->defaultSettings['sftExt_current_tab_url']. '">';142 $html = '<button id="sftExt-frontend-button" class="' . $this->classes . '" data-new-tab="' . esc_attr( $this->defaultSettings['sftExt_new_tab_url'] ) . '" data-url="' . esc_attr( $this->defaultSettings['sftExt_current_tab_url'] ) . '">'; 143 143 $html .= '<div class="sftExt-inner">'; 144 144 $html .= $this->icon ?? ''; … … 147 147 $html .= ' class="sr-only"'; 148 148 } 149 $html .= '>'. $this->defaultSettings['sftExt_rectangle_text'].'</span>';149 $html .= '>'. esc_attr( $this->defaultSettings['sftExt_rectangle_text'] ) .'</span>'; 150 150 $html .= '</div>'; 151 151 $html .= '</button>'; -
safety-exit/trunk/readme.txt
r3057884 r3077243 1 1 === Safety Exit === 2 2 Contributors: tcordero 3 Tags: quick exit, safety exit, stop abuse, no domestic violence, safe browsing, exit, fast exit, domestic violence, panic button3 Tags: quick exit, safety exit, exit, fast exit, panic button 4 4 Donate link: https://tomascordero.com 5 5 Requires at least: 5.2.0 6 6 Tested up to: 6.4.3 7 7 Requires PHP: 5.6.0 8 Stable tag: 1.7. 08 Stable tag: 1.7.1 9 9 License: GPL-2.0+ 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 49 49 == Changelog == 50 1.7.1: 51 - Fix: Security fix 50 52 1.7.0: 51 53 - Refactor: Completely reworked how the button is rendered. It will try to render via HTML first. If it cant it will render with JS. This should finally fix all theme related problems. -
safety-exit/trunk/safety-exit.php
r3057884 r3077243 12 12 * Plugin URI: 13 13 * Description: This plugin will inject a button on your website that will allow a website user to quickly navigate away from your website. 14 * Version: 1.7. 014 * Version: 1.7.1 15 15 * Author: Tomas Cordero 16 16 * Author URI: https://tomascordero.com -
safety-exit/trunk/vendor/autoload.php
r3057884 r3077243 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe1::getLoader();25 return ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe::getLoader(); -
safety-exit/trunk/vendor/composer/ClassLoader.php
r3057884 r3077243 46 46 private static $includeFile; 47 47 48 /** @var ?string*/48 /** @var string|null */ 49 49 private $vendorDir; 50 50 51 51 // PSR-4 52 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 55 54 */ 56 55 private $prefixLengthsPsr4 = array(); 57 56 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 60 58 */ 61 59 private $prefixDirsPsr4 = array(); 62 60 /** 63 * @var array[] 64 * @psalm-var array<string, string> 61 * @var list<string> 65 62 */ 66 63 private $fallbackDirsPsr4 = array(); … … 68 65 // PSR-0 69 66 /** 70 * @var array[] 71 * @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>>> 72 72 */ 73 73 private $prefixesPsr0 = array(); 74 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 75 * @var list<string> 77 76 */ 78 77 private $fallbackDirsPsr0 = array(); … … 82 81 83 82 /** 84 * @var string[] 85 * @psalm-var array<string, string> 83 * @var array<string, string> 86 84 */ 87 85 private $classMap = array(); … … 91 89 92 90 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 91 * @var array<string, bool> 95 92 */ 96 93 private $missingClasses = array(); 97 94 98 /** @var ?string*/95 /** @var string|null */ 99 96 private $apcuPrefix; 100 97 101 98 /** 102 * @var self[]99 * @var array<string, self> 103 100 */ 104 101 private static $registeredLoaders = array(); 105 102 106 103 /** 107 * @param ?string$vendorDir104 * @param string|null $vendorDir 108 105 */ 109 106 public function __construct($vendorDir = null) … … 114 111 115 112 /** 116 * @return string[]113 * @return array<string, list<string>> 117 114 */ 118 115 public function getPrefixes() … … 126 123 127 124 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 130 126 */ 131 127 public function getPrefixesPsr4() … … 135 131 136 132 /** 137 * @return array[] 138 * @psalm-return array<string, string> 133 * @return list<string> 139 134 */ 140 135 public function getFallbackDirs() … … 144 139 145 140 /** 146 * @return array[] 147 * @psalm-return array<string, string> 141 * @return list<string> 148 142 */ 149 143 public function getFallbackDirsPsr4() … … 153 147 154 148 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 157 150 */ 158 151 public function getClassMap() … … 162 155 163 156 /** 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 166 158 * 167 159 * @return void … … 180 172 * appending or prepending to the ones previously set for this prefix. 181 173 * 182 * @param string $prefix The prefix183 * @param string[]|string $paths The PSR-0 root directories184 * @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 185 177 * 186 178 * @return void … … 188 180 public function add($prefix, $paths, $prepend = false) 189 181 { 182 $paths = (array) $paths; 190 183 if (!$prefix) { 191 184 if ($prepend) { 192 185 $this->fallbackDirsPsr0 = array_merge( 193 (array)$paths,186 $paths, 194 187 $this->fallbackDirsPsr0 195 188 ); … … 197 190 $this->fallbackDirsPsr0 = array_merge( 198 191 $this->fallbackDirsPsr0, 199 (array)$paths192 $paths 200 193 ); 201 194 } … … 206 199 $first = $prefix[0]; 207 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 208 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 209 202 210 203 return; … … 212 205 if ($prepend) { 213 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 214 (array)$paths,207 $paths, 215 208 $this->prefixesPsr0[$first][$prefix] 216 209 ); … … 218 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 219 212 $this->prefixesPsr0[$first][$prefix], 220 (array)$paths213 $paths 221 214 ); 222 215 } … … 227 220 * appending or prepending to the ones previously set for this namespace. 228 221 * 229 * @param string $prefix The prefix/namespace, with trailing '\\'230 * @param string[]|string $paths The PSR-4 base directories231 * @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 232 225 * 233 226 * @throws \InvalidArgumentException … … 237 230 public function addPsr4($prefix, $paths, $prepend = false) 238 231 { 232 $paths = (array) $paths; 239 233 if (!$prefix) { 240 234 // Register directories for the root namespace. 241 235 if ($prepend) { 242 236 $this->fallbackDirsPsr4 = array_merge( 243 (array)$paths,237 $paths, 244 238 $this->fallbackDirsPsr4 245 239 ); … … 247 241 $this->fallbackDirsPsr4 = array_merge( 248 242 $this->fallbackDirsPsr4, 249 (array)$paths243 $paths 250 244 ); 251 245 } … … 257 251 } 258 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 259 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 260 254 } elseif ($prepend) { 261 255 // Prepend directories for an already registered namespace. 262 256 $this->prefixDirsPsr4[$prefix] = array_merge( 263 (array)$paths,257 $paths, 264 258 $this->prefixDirsPsr4[$prefix] 265 259 ); … … 268 262 $this->prefixDirsPsr4[$prefix] = array_merge( 269 263 $this->prefixDirsPsr4[$prefix], 270 (array)$paths264 $paths 271 265 ); 272 266 } … … 277 271 * replacing any others previously set for this prefix. 278 272 * 279 * @param string $prefix The prefix280 * @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 281 275 * 282 276 * @return void … … 295 289 * replacing any others previously set for this namespace. 296 290 * 297 * @param string $prefix The prefix/namespace, with trailing '\\'298 * @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 299 293 * 300 294 * @throws \InvalidArgumentException … … 430 424 { 431 425 if ($file = $this->findFile($class)) { 432 (self::$includeFile)($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 433 428 434 429 return true; … … 481 476 482 477 /** 483 * Returns the currently registered loaders indexed by their corresponding vendor directories.484 * 485 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 486 481 */ 487 482 public static function getRegisteredLoaders() … … 561 556 } 562 557 563 private static function initializeIncludeClosure(): void 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 564 562 { 565 563 if (self::$includeFile !== null) { … … 575 573 * @return void 576 574 */ 577 self::$includeFile = static function($file) {575 self::$includeFile = \Closure::bind(static function($file) { 578 576 include $file; 579 } ;577 }, null, null); 580 578 } 581 579 } -
safety-exit/trunk/vendor/composer/InstalledVersions.php
r3057884 r3077243 99 99 foreach (self::getInstalled() as $installed) { 100 100 if (isset($installed['versions'][$packageName])) { 101 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 102 102 } 103 103 } … … 120 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 121 121 { 122 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 123 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 124 124 … … 329 329 $installed[] = self::$installedByVendor[$vendorDir]; 330 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 331 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 332 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 333 335 self::$installed = $installed[count($installed) - 1]; … … 341 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 342 344 if (substr(__DIR__, -8, 1) !== 'C') { 343 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 344 348 } else { 345 349 self::$installed = array(); 346 350 } 347 351 } 348 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 349 356 350 357 return $installed; -
safety-exit/trunk/vendor/composer/autoload_real.php
r3057884 r3077243 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe15 class ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
safety-exit/trunk/vendor/composer/autoload_static.php
r3057884 r3077243 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe17 class ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 30 30 { 31 31 return \Closure::bind(function () use ($loader) { 32 $loader->prefixLengthsPsr4 = ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::$prefixLengthsPsr4;33 $loader->prefixDirsPsr4 = ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::$prefixDirsPsr4;34 $loader->classMap = ComposerStaticInit 828586c23bf9c162a8fb38f1fcafdbe1::$classMap;32 $loader->prefixLengthsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixLengthsPsr4; 33 $loader->prefixDirsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixDirsPsr4; 34 $loader->classMap = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$classMap; 35 35 36 36 }, null, ClassLoader::class); -
safety-exit/trunk/vendor/composer/installed.php
r3057884 r3077243 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',6 'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',16 'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.