Plugin Directory

Changeset 3077243


Ignore:
Timestamp:
04/25/2024 08:15:24 PM (2 years ago)
Author:
tcordero
Message:

Update to version 1.7.1 from GitHub

Location:
safety-exit
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • safety-exit/tags/1.7.1/lib/Safety_Exit_Admin.php

    r3057884 r3077243  
    308308            case 'sftExt_fontawesome_icon_classes':
    309309                ?>
    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>
    311311                    <!-- <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'] ); ?>">
    313313
    314314                <?php
     
    316316            case 'sftExt_bg_color':
    317317                ?>
    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'] ); ?>">
    320320
    321321                <?php
     
    323323            case 'sftExt_font_color':
    324324                ?>
    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'] ); ?>">
    327327
    328328                <?php
     
    339339            case 'sftExt_border_radius':
    340340                ?>
    341                     <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= $options['sftExt_border_radius']; ?>"> px
     341                    <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= esc_attr( $options['sftExt_border_radius'] ); ?>"> px
    342342                <?php
    343343                break;
    344344            case 'sftExt_rectangle_font_size':
    345345                ?>
    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>
    347347                <?php
    348348                break;
     
    358358            case 'sftExt_current_tab_url':
    359359                ?>
    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'] ); ?>">
    361361                <?php
    362362                break;
    363363            case 'sftExt_new_tab_url':
    364364                ?>
    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'] ); ?>">
    366366                <?php
    367367                break;
    368368            case 'sftExt_rectangle_text':
    369369                ?>
    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'] ); ?>">
    371371                <?php
    372372                break;
     
    388388                ?>
    389389                <?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/>
    391391                <?php endforeach; ?>
    392392                <?php
  • safety-exit/tags/1.7.1/lib/Safety_Exit_Frontend.php

    r3057884 r3077243  
    7474            $this->hideOnMobile = true;
    7575        }
    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'] );
    7777
    7878        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>';
    8080        }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>';
    8282        }
    8383    }
     
    113113        $js .= 'window.sftExtBtn.classes=\'' . $this->classes . '\';';
    114114        $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'] ) . '\';';
    119119        $js .= 'window.sftExtBtn.shouldShow=' . ($this->displayButton ? 'true' : 'false') . ';';
    120120        $js .= '</script>';
     
    127127        do_action( 'qm/debug', 'generating custom CSS' );
    128128        $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'] ) . ';';
    131131        $css .= '--sftExt_active:' . (!$this->displayButton ? 'none !important' : 'inline-block') . ';';
    132132        $css .= '--sftExt_activeMobile:' . ($this->hideOnMobile ? 'none !important' : 'inline-block') . ';';
    133133        $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;';
    137137        $css .= '}</style>';
    138138        return $css;
     
    140140
    141141    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'] ) . '">';
    143143        $html .= '<div class="sftExt-inner">';
    144144        $html .= $this->icon ?? '';
     
    147147            $html .= ' class="sr-only"';
    148148        }
    149         $html .= '>'. $this->defaultSettings['sftExt_rectangle_text'] .'</span>';
     149        $html .= '>'. esc_attr( $this->defaultSettings['sftExt_rectangle_text'] ) .'</span>';
    150150        $html .= '</div>';
    151151        $html .= '</button>';
  • safety-exit/tags/1.7.1/readme.txt

    r3057884 r3077243  
    11=== Safety Exit ===
    22Contributors: tcordero
    3 Tags: quick exit, safety exit, stop abuse, no domestic violence, safe browsing, exit, fast exit, domestic violence, panic button
     3Tags: quick exit, safety exit, exit, fast exit, panic button
    44Donate link: https://tomascordero.com
    55Requires at least: 5.2.0
    66Tested up to: 6.4.3
    77Requires PHP: 5.6.0
    8 Stable tag: 1.7.0
     8Stable tag: 1.7.1
    99License: GPL-2.0+
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848
    4949== Changelog ==
     501.7.1:
     51    - Fix: Security fix
    50521.7.0:
    5153    - 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  
    1212 * Plugin URI:
    1313 * 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.0
     14 * Version:     1.7.1
    1515 * Author:      Tomas Cordero
    1616 * Author URI:  https://tomascordero.com
  • safety-exit/tags/1.7.1/vendor/autoload.php

    r3057884 r3077243  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1::getLoader();
     25return ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe::getLoader();
  • safety-exit/tags/1.7.1/vendor/composer/ClassLoader.php

    r3057884 r3077243  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    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>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    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
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @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
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @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
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    430424    {
    431425        if ($file = $this->findFile($class)) {
    432             (self::$includeFile)($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    433428
    434429            return true;
     
    481476
    482477    /**
    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>
    486481     */
    487482    public static function getRegisteredLoaders()
     
    561556    }
    562557
    563     private static function initializeIncludeClosure(): void
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
    564562    {
    565563        if (self::$includeFile !== null) {
     
    575573         * @return void
    576574         */
    577         self::$includeFile = static function($file) {
     575        self::$includeFile = \Closure::bind(static function($file) {
    578576            include $file;
    579         };
     577        }, null, null);
    580578    }
    581579}
  • safety-exit/tags/1.7.1/vendor/composer/InstalledVersions.php

    r3057884 r3077243  
    9999        foreach (self::getInstalled() as $installed) {
    100100            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;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } 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;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            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;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • safety-exit/tags/1.7.1/vendor/composer/autoload_real.php

    r3057884 r3077243  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1
     5class ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • safety-exit/tags/1.7.1/vendor/composer/autoload_static.php

    r3057884 r3077243  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1
     7class ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3030    {
    3131        return \Closure::bind(function () use ($loader) {
    32             $loader->prefixLengthsPsr4 = ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::$prefixLengthsPsr4;
    33             $loader->prefixDirsPsr4 = ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::$prefixDirsPsr4;
    34             $loader->classMap = ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::$classMap;
     32            $loader->prefixLengthsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixLengthsPsr4;
     33            $loader->prefixDirsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixDirsPsr4;
     34            $loader->classMap = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$classMap;
    3535
    3636        }, null, ClassLoader::class);
  • safety-exit/tags/1.7.1/vendor/composer/installed.php

    r3057884 r3077243  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',
     6        'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',
     16            'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • safety-exit/trunk/lib/Safety_Exit_Admin.php

    r3057884 r3077243  
    308308            case 'sftExt_fontawesome_icon_classes':
    309309                ?>
    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>
    311311                    <!-- <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'] ); ?>">
    313313
    314314                <?php
     
    316316            case 'sftExt_bg_color':
    317317                ?>
    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'] ); ?>">
    320320
    321321                <?php
     
    323323            case 'sftExt_font_color':
    324324                ?>
    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'] ); ?>">
    327327
    328328                <?php
     
    339339            case 'sftExt_border_radius':
    340340                ?>
    341                     <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= $options['sftExt_border_radius']; ?>"> px
     341                    <input type="number" id="sftExt_border_radius" name="sftExt_settings[sftExt_border_radius]" value="<?= esc_attr( $options['sftExt_border_radius'] ); ?>"> px
    342342                <?php
    343343                break;
    344344            case 'sftExt_rectangle_font_size':
    345345                ?>
    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>
    347347                <?php
    348348                break;
     
    358358            case 'sftExt_current_tab_url':
    359359                ?>
    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'] ); ?>">
    361361                <?php
    362362                break;
    363363            case 'sftExt_new_tab_url':
    364364                ?>
    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'] ); ?>">
    366366                <?php
    367367                break;
    368368            case 'sftExt_rectangle_text':
    369369                ?>
    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'] ); ?>">
    371371                <?php
    372372                break;
     
    388388                ?>
    389389                <?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/>
    391391                <?php endforeach; ?>
    392392                <?php
  • safety-exit/trunk/lib/Safety_Exit_Frontend.php

    r3057884 r3077243  
    7474            $this->hideOnMobile = true;
    7575        }
    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'] );
    7777
    7878        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>';
    8080        }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>';
    8282        }
    8383    }
     
    113113        $js .= 'window.sftExtBtn.classes=\'' . $this->classes . '\';';
    114114        $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'] ) . '\';';
    119119        $js .= 'window.sftExtBtn.shouldShow=' . ($this->displayButton ? 'true' : 'false') . ';';
    120120        $js .= '</script>';
     
    127127        do_action( 'qm/debug', 'generating custom CSS' );
    128128        $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'] ) . ';';
    131131        $css .= '--sftExt_active:' . (!$this->displayButton ? 'none !important' : 'inline-block') . ';';
    132132        $css .= '--sftExt_activeMobile:' . ($this->hideOnMobile ? 'none !important' : 'inline-block') . ';';
    133133        $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;';
    137137        $css .= '}</style>';
    138138        return $css;
     
    140140
    141141    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'] ) . '">';
    143143        $html .= '<div class="sftExt-inner">';
    144144        $html .= $this->icon ?? '';
     
    147147            $html .= ' class="sr-only"';
    148148        }
    149         $html .= '>'. $this->defaultSettings['sftExt_rectangle_text'] .'</span>';
     149        $html .= '>'. esc_attr( $this->defaultSettings['sftExt_rectangle_text'] ) .'</span>';
    150150        $html .= '</div>';
    151151        $html .= '</button>';
  • safety-exit/trunk/readme.txt

    r3057884 r3077243  
    11=== Safety Exit ===
    22Contributors: tcordero
    3 Tags: quick exit, safety exit, stop abuse, no domestic violence, safe browsing, exit, fast exit, domestic violence, panic button
     3Tags: quick exit, safety exit, exit, fast exit, panic button
    44Donate link: https://tomascordero.com
    55Requires at least: 5.2.0
    66Tested up to: 6.4.3
    77Requires PHP: 5.6.0
    8 Stable tag: 1.7.0
     8Stable tag: 1.7.1
    99License: GPL-2.0+
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848
    4949== Changelog ==
     501.7.1:
     51    - Fix: Security fix
    50521.7.0:
    5153    - 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  
    1212 * Plugin URI:
    1313 * 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.0
     14 * Version:     1.7.1
    1515 * Author:      Tomas Cordero
    1616 * Author URI:  https://tomascordero.com
  • safety-exit/trunk/vendor/autoload.php

    r3057884 r3077243  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1::getLoader();
     25return ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe::getLoader();
  • safety-exit/trunk/vendor/composer/ClassLoader.php

    r3057884 r3077243  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    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>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    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
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @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
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @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
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    430424    {
    431425        if ($file = $this->findFile($class)) {
    432             (self::$includeFile)($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    433428
    434429            return true;
     
    481476
    482477    /**
    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>
    486481     */
    487482    public static function getRegisteredLoaders()
     
    561556    }
    562557
    563     private static function initializeIncludeClosure(): void
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
    564562    {
    565563        if (self::$includeFile !== null) {
     
    575573         * @return void
    576574         */
    577         self::$includeFile = static function($file) {
     575        self::$includeFile = \Closure::bind(static function($file) {
    578576            include $file;
    579         };
     577        }, null, null);
    580578    }
    581579}
  • safety-exit/trunk/vendor/composer/InstalledVersions.php

    r3057884 r3077243  
    9999        foreach (self::getInstalled() as $installed) {
    100100            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;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } 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;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            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;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • safety-exit/trunk/vendor/composer/autoload_real.php

    r3057884 r3077243  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1
     5class ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit828586c23bf9c162a8fb38f1fcafdbe1', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitf2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • safety-exit/trunk/vendor/composer/autoload_static.php

    r3057884 r3077243  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1
     7class ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3030    {
    3131        return \Closure::bind(function () use ($loader) {
    32             $loader->prefixLengthsPsr4 = ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::$prefixLengthsPsr4;
    33             $loader->prefixDirsPsr4 = ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::$prefixDirsPsr4;
    34             $loader->classMap = ComposerStaticInit828586c23bf9c162a8fb38f1fcafdbe1::$classMap;
     32            $loader->prefixLengthsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixLengthsPsr4;
     33            $loader->prefixDirsPsr4 = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$prefixDirsPsr4;
     34            $loader->classMap = ComposerStaticInitf2ecb409de8af704de7d72a1f05c8ffe::$classMap;
    3535
    3636        }, null, ClassLoader::class);
  • safety-exit/trunk/vendor/composer/installed.php

    r3057884 r3077243  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',
     6        'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '1cb3eaf2f8ba41f1af15db2e377ade91e50b9c9c',
     16            'reference' => '03efe7faf105c32a15dc545a5f0f807c13485306',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.