Changeset 3219885
- Timestamp:
- 01/09/2025 09:35:30 PM (15 months ago)
- Location:
- safety-exit
- Files:
-
- 14 added
- 4 deleted
- 20 edited
- 1 copied
-
tags/1.8.0 (copied) (copied from safety-exit/trunk)
-
tags/1.8.0/composer.json (modified) (1 diff)
-
tags/1.8.0/composer.lock (modified) (3 diffs)
-
tags/1.8.0/lib/Admin.php (added)
-
tags/1.8.0/lib/Exceptions (added)
-
tags/1.8.0/lib/Exceptions/InvalidSetting.php (added)
-
tags/1.8.0/lib/Frontend.php (added)
-
tags/1.8.0/lib/Helpers (added)
-
tags/1.8.0/lib/Helpers/Settings.php (added)
-
tags/1.8.0/lib/Safety_Exit_Admin.php (deleted)
-
tags/1.8.0/lib/Safety_Exit_Frontend.php (deleted)
-
tags/1.8.0/readme.txt (modified) (2 diffs)
-
tags/1.8.0/safety-exit.php (modified) (4 diffs)
-
tags/1.8.0/tests/Unit/FrontendTest.php (modified) (7 diffs)
-
tags/1.8.0/tests/Unit/SettingsTest.php (added)
-
tags/1.8.0/vendor/autoload.php (modified) (1 diff)
-
tags/1.8.0/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.8.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/1.8.0/vendor/composer/autoload_static.php (modified) (3 diffs)
-
tags/1.8.0/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/composer.json (modified) (1 diff)
-
trunk/composer.lock (modified) (3 diffs)
-
trunk/lib/Admin.php (added)
-
trunk/lib/Exceptions (added)
-
trunk/lib/Exceptions/InvalidSetting.php (added)
-
trunk/lib/Frontend.php (added)
-
trunk/lib/Helpers (added)
-
trunk/lib/Helpers/Settings.php (added)
-
trunk/lib/Safety_Exit_Admin.php (deleted)
-
trunk/lib/Safety_Exit_Frontend.php (deleted)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/safety-exit.php (modified) (4 diffs)
-
trunk/tests/Unit/FrontendTest.php (modified) (7 diffs)
-
trunk/tests/Unit/SettingsTest.php (added)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
safety-exit/tags/1.8.0/composer.json
r3057884 r3219885 5 5 "require-dev": { 6 6 "pestphp/pest": "^2.34", 7 "brain/monkey": "^2.6" 7 "brain/monkey": "^2.6", 8 "symfony/var-dumper": "^7.2" 8 9 }, 9 10 "config": { -
safety-exit/tags/1.8.0/composer.lock
r3057884 r3219885 5 5 "This file is @generated automatically" 6 6 ], 7 "content-hash": " f2ecb409de8af704de7d72a1f05c8ffe",7 "content-hash": "85412737557de168d25fde3e0a4536ea", 8 8 "packages": [], 9 9 "packages-dev": [ … … 3622 3622 }, 3623 3623 { 3624 "name": "symfony/var-dumper", 3625 "version": "v7.2.0", 3626 "source": { 3627 "type": "git", 3628 "url": "https://github.com/symfony/var-dumper.git", 3629 "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c" 3630 }, 3631 "dist": { 3632 "type": "zip", 3633 "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c6a22929407dec8765d6e2b6ff85b800b245879c", 3634 "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c", 3635 "shasum": "" 3636 }, 3637 "require": { 3638 "php": ">=8.2", 3639 "symfony/polyfill-mbstring": "~1.0" 3640 }, 3641 "conflict": { 3642 "symfony/console": "<6.4" 3643 }, 3644 "require-dev": { 3645 "ext-iconv": "*", 3646 "symfony/console": "^6.4|^7.0", 3647 "symfony/http-kernel": "^6.4|^7.0", 3648 "symfony/process": "^6.4|^7.0", 3649 "symfony/uid": "^6.4|^7.0", 3650 "twig/twig": "^3.12" 3651 }, 3652 "bin": [ 3653 "Resources/bin/var-dump-server" 3654 ], 3655 "type": "library", 3656 "autoload": { 3657 "files": [ 3658 "Resources/functions/dump.php" 3659 ], 3660 "psr-4": { 3661 "Symfony\\Component\\VarDumper\\": "" 3662 }, 3663 "exclude-from-classmap": [ 3664 "/Tests/" 3665 ] 3666 }, 3667 "notification-url": "https://packagist.org/downloads/", 3668 "license": [ 3669 "MIT" 3670 ], 3671 "authors": [ 3672 { 3673 "name": "Nicolas Grekas", 3674 "email": "p@tchwork.com" 3675 }, 3676 { 3677 "name": "Symfony Community", 3678 "homepage": "https://symfony.com/contributors" 3679 } 3680 ], 3681 "description": "Provides mechanisms for walking through any arbitrary PHP variable", 3682 "homepage": "https://symfony.com", 3683 "keywords": [ 3684 "debug", 3685 "dump" 3686 ], 3687 "support": { 3688 "source": "https://github.com/symfony/var-dumper/tree/v7.2.0" 3689 }, 3690 "funding": [ 3691 { 3692 "url": "https://symfony.com/sponsor", 3693 "type": "custom" 3694 }, 3695 { 3696 "url": "https://github.com/fabpot", 3697 "type": "github" 3698 }, 3699 { 3700 "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 3701 "type": "tidelift" 3702 } 3703 ], 3704 "time": "2024-11-08T15:48:14+00:00" 3705 }, 3706 { 3624 3707 "name": "ta-tikoma/phpunit-architecture-test", 3625 3708 "version": "0.8.4", … … 3798 3881 }, 3799 3882 "platform-dev": [], 3800 "plugin-api-version": "2. 3.0"3883 "plugin-api-version": "2.6.0" 3801 3884 } -
safety-exit/tags/1.8.0/readme.txt
r3077243 r3219885 4 4 Donate link: https://tomascordero.com 5 5 Requires at least: 5.2.0 6 Tested up to: 6. 4.36 Tested up to: 6.7.1 7 7 Requires PHP: 5.6.0 8 Stable tag: 1. 7.18 Stable tag: 1.8.0 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.8.0: 51 - Improved backend code structure for stability 52 - Added a warning for out dated PHP versions in preparation for 2.0 release 50 53 1.7.1: 51 54 - Fix: Security fix -
safety-exit/tags/1.8.0/safety-exit.php
r3077243 r3219885 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.114 * Version: 1.8.0 15 15 * Author: Tomas Cordero 16 16 * Author URI: https://tomascordero.com … … 21 21 require plugin_dir_path( __FILE__ ) . '/vendor/autoload.php'; 22 22 23 use SafetyExit\ Safety_Exit_Frontend;24 use SafetyExit\ Safety_Exit_Admin;23 use SafetyExit\Frontend; 24 use SafetyExit\Admin; 25 25 26 26 $path = realpath(dirname(__FILE__) . '/../../../')."/wp-includes/pluggable.php"; … … 59 59 if ( is_admin() ){ 60 60 if(current_user_can('administrator')){ 61 $admin = new Safety_Exit_Admin(__FILE__);61 $admin = new Admin(__FILE__); 62 62 $admin->init(); 63 63 } … … 68 68 && $url_path !== '/login' 69 69 ){ 70 $frontend = new Safety_Exit_Frontend(__FILE__);70 $frontend = new Frontend(__FILE__); 71 71 $frontend->init(); 72 72 } -
safety-exit/tags/1.8.0/tests/Unit/FrontendTest.php
r3057884 r3219885 1 1 <?php 2 2 3 use SafetyExit\ Safety_Exit_Frontend;3 use SafetyExit\Frontend; 4 4 use Brain\Monkey\Functions; 5 5 … … 48 48 it('calls wp_enqueue_scripts and wp_head actions on init', function () { 49 49 50 $safetyExitFrontend = new Safety_Exit_Frontend();50 $safetyExitFrontend = new Frontend(); 51 51 52 52 53 $this->assertInstanceOf( Safety_Exit_Frontend::class, $safetyExitFrontend);53 $this->assertInstanceOf(Frontend::class, $safetyExitFrontend); 54 54 55 55 // Assert that add_action was called with the expected parameters … … 69 69 70 70 it('enqueues the necessary styles and scripts', function () { 71 $safetyExitFrontend = new Safety_Exit_Frontend();71 $safetyExitFrontend = new Frontend(); 72 72 73 73 // Assert that wp_enqueue_style and wp_enqueue_script were called with the expected parameters … … 88 88 89 89 it('does not enqueue font-awesome-free style if sftExt_rectangle_icon_onOff is no', function () { 90 $safetyExitFrontend = new Safety_Exit_Frontend();90 $safetyExitFrontend = new Frontend(); 91 91 92 92 Functions\expect('wp_enqueue_style') … … 112 112 Functions\when('get_the_ID')->justReturn(1); 113 113 Functions\when('is_front_page')->justReturn(false); 114 $safetyExitFrontend = new Safety_Exit_Frontend(); 114 Functions\when('esc_attr')->alias(function($text) { 115 return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); 116 }); 117 $safetyExitFrontend = new Frontend(); 115 118 $safetyExitFrontend->run_setup(); 116 119 $js = $safetyExitFrontend->generate_js(); … … 125 128 Functions\when('get_the_ID')->justReturn(1); 126 129 Functions\when('is_front_page')->justReturn(false); 127 $safetyExitFrontend = new Safety_Exit_Frontend(); 130 Functions\when('esc_attr')->alias(function($text) { 131 return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); 132 }); 133 $safetyExitFrontend = new Frontend(); 128 134 $safetyExitFrontend->run_setup(); 129 135 $css = $safetyExitFrontend->generate_css(); … … 138 144 Functions\when('get_the_ID')->justReturn(1); 139 145 Functions\when('is_front_page')->justReturn(false); 140 $safetyExitFrontend = new Safety_Exit_Frontend(); 146 Functions\when('esc_attr')->alias(function($text) { 147 return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); 148 }); 149 $safetyExitFrontend = new Frontend(); 141 150 $safetyExitFrontend->run_setup(); 142 151 $html = $safetyExitFrontend->generate_html(); 143 $this->assertIsString($html); 152 $minifiedHtml = preg_replace('/\s+/', ' ', trim($html)); 153 $this->assertIsString($minifiedHtml); 144 154 145 $this->assertEquals($ html, "<button id=\"sftExt-frontend-button\" class=\"bottom right rectangle\" data-new-tab=\"https://google.com\" data-url=\"https://google.com\"><div class=\"sftExt-inner\"><i class=\"fas fa-times\"></i><span>Safety Exit</span></div></button>");155 $this->assertEquals($minifiedHtml, "<button id=\"sftExt-frontend-button\" class=\"bottom right rectangle\" data-new-tab=\"https://google.com\" data-url=\"https://google.com\"> <div class=\"sftExt-inner\"> <i class=\"fas fa-times\"></i><span>Safety Exit</span> </div> </button>"); 146 156 147 157 }); -
safety-exit/tags/1.8.0/vendor/autoload.php
r3077243 r3219885 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe::getLoader();25 return ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea::getLoader(); -
safety-exit/tags/1.8.0/vendor/composer/autoload_classmap.php
r3057884 r3219885 8 8 return array( 9 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 10 'SafetyExit\\Safety_Exit_Admin' => $baseDir . '/lib/Safety_Exit_Admin.php', 11 'SafetyExit\\Safety_Exit_Frontend' => $baseDir . '/lib/Safety_Exit_Frontend.php', 10 'SafetyExit\\Admin' => $baseDir . '/lib/Admin.php', 11 'SafetyExit\\Exceptions\\InvalidSetting' => $baseDir . '/lib/Exceptions/InvalidSetting.php', 12 'SafetyExit\\Frontend' => $baseDir . '/lib/Frontend.php', 13 'SafetyExit\\Helpers\\Settings' => $baseDir . '/lib/Helpers/Settings.php', 12 14 ); -
safety-exit/tags/1.8.0/vendor/composer/autoload_real.php
r3077243 r3219885 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe5 class ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit85412737557de168d25fde3e0a4536ea::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
safety-exit/tags/1.8.0/vendor/composer/autoload_static.php
r3077243 r3219885 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe7 class ComposerStaticInit85412737557de168d25fde3e0a4536ea 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 23 23 public static $classMap = array ( 24 24 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 25 'SafetyExit\\Safety_Exit_Admin' => __DIR__ . '/../..' . '/lib/Safety_Exit_Admin.php', 26 'SafetyExit\\Safety_Exit_Frontend' => __DIR__ . '/../..' . '/lib/Safety_Exit_Frontend.php', 25 'SafetyExit\\Admin' => __DIR__ . '/../..' . '/lib/Admin.php', 26 'SafetyExit\\Exceptions\\InvalidSetting' => __DIR__ . '/../..' . '/lib/Exceptions/InvalidSetting.php', 27 'SafetyExit\\Frontend' => __DIR__ . '/../..' . '/lib/Frontend.php', 28 'SafetyExit\\Helpers\\Settings' => __DIR__ . '/../..' . '/lib/Helpers/Settings.php', 27 29 ); 28 30 … … 30 32 { 31 33 return \Closure::bind(function () use ($loader) { 32 $loader->prefixLengthsPsr4 = ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::$prefixLengthsPsr4;33 $loader->prefixDirsPsr4 = ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::$prefixDirsPsr4;34 $loader->classMap = ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::$classMap;34 $loader->prefixLengthsPsr4 = ComposerStaticInit85412737557de168d25fde3e0a4536ea::$prefixLengthsPsr4; 35 $loader->prefixDirsPsr4 = ComposerStaticInit85412737557de168d25fde3e0a4536ea::$prefixDirsPsr4; 36 $loader->classMap = ComposerStaticInit85412737557de168d25fde3e0a4536ea::$classMap; 35 37 36 38 }, null, ClassLoader::class); -
safety-exit/tags/1.8.0/vendor/composer/installed.php
r3077243 r3219885 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 03efe7faf105c32a15dc545a5f0f807c13485306',6 'reference' => 'ef1aa1bb2cce47efc83ddab8dbd4a132f27a62c6', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 03efe7faf105c32a15dc545a5f0f807c13485306',16 'reference' => 'ef1aa1bb2cce47efc83ddab8dbd4a132f27a62c6', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
safety-exit/trunk/composer.json
r3057884 r3219885 5 5 "require-dev": { 6 6 "pestphp/pest": "^2.34", 7 "brain/monkey": "^2.6" 7 "brain/monkey": "^2.6", 8 "symfony/var-dumper": "^7.2" 8 9 }, 9 10 "config": { -
safety-exit/trunk/composer.lock
r3057884 r3219885 5 5 "This file is @generated automatically" 6 6 ], 7 "content-hash": " f2ecb409de8af704de7d72a1f05c8ffe",7 "content-hash": "85412737557de168d25fde3e0a4536ea", 8 8 "packages": [], 9 9 "packages-dev": [ … … 3622 3622 }, 3623 3623 { 3624 "name": "symfony/var-dumper", 3625 "version": "v7.2.0", 3626 "source": { 3627 "type": "git", 3628 "url": "https://github.com/symfony/var-dumper.git", 3629 "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c" 3630 }, 3631 "dist": { 3632 "type": "zip", 3633 "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c6a22929407dec8765d6e2b6ff85b800b245879c", 3634 "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c", 3635 "shasum": "" 3636 }, 3637 "require": { 3638 "php": ">=8.2", 3639 "symfony/polyfill-mbstring": "~1.0" 3640 }, 3641 "conflict": { 3642 "symfony/console": "<6.4" 3643 }, 3644 "require-dev": { 3645 "ext-iconv": "*", 3646 "symfony/console": "^6.4|^7.0", 3647 "symfony/http-kernel": "^6.4|^7.0", 3648 "symfony/process": "^6.4|^7.0", 3649 "symfony/uid": "^6.4|^7.0", 3650 "twig/twig": "^3.12" 3651 }, 3652 "bin": [ 3653 "Resources/bin/var-dump-server" 3654 ], 3655 "type": "library", 3656 "autoload": { 3657 "files": [ 3658 "Resources/functions/dump.php" 3659 ], 3660 "psr-4": { 3661 "Symfony\\Component\\VarDumper\\": "" 3662 }, 3663 "exclude-from-classmap": [ 3664 "/Tests/" 3665 ] 3666 }, 3667 "notification-url": "https://packagist.org/downloads/", 3668 "license": [ 3669 "MIT" 3670 ], 3671 "authors": [ 3672 { 3673 "name": "Nicolas Grekas", 3674 "email": "p@tchwork.com" 3675 }, 3676 { 3677 "name": "Symfony Community", 3678 "homepage": "https://symfony.com/contributors" 3679 } 3680 ], 3681 "description": "Provides mechanisms for walking through any arbitrary PHP variable", 3682 "homepage": "https://symfony.com", 3683 "keywords": [ 3684 "debug", 3685 "dump" 3686 ], 3687 "support": { 3688 "source": "https://github.com/symfony/var-dumper/tree/v7.2.0" 3689 }, 3690 "funding": [ 3691 { 3692 "url": "https://symfony.com/sponsor", 3693 "type": "custom" 3694 }, 3695 { 3696 "url": "https://github.com/fabpot", 3697 "type": "github" 3698 }, 3699 { 3700 "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 3701 "type": "tidelift" 3702 } 3703 ], 3704 "time": "2024-11-08T15:48:14+00:00" 3705 }, 3706 { 3624 3707 "name": "ta-tikoma/phpunit-architecture-test", 3625 3708 "version": "0.8.4", … … 3798 3881 }, 3799 3882 "platform-dev": [], 3800 "plugin-api-version": "2. 3.0"3883 "plugin-api-version": "2.6.0" 3801 3884 } -
safety-exit/trunk/readme.txt
r3077243 r3219885 4 4 Donate link: https://tomascordero.com 5 5 Requires at least: 5.2.0 6 Tested up to: 6. 4.36 Tested up to: 6.7.1 7 7 Requires PHP: 5.6.0 8 Stable tag: 1. 7.18 Stable tag: 1.8.0 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.8.0: 51 - Improved backend code structure for stability 52 - Added a warning for out dated PHP versions in preparation for 2.0 release 50 53 1.7.1: 51 54 - Fix: Security fix -
safety-exit/trunk/safety-exit.php
r3077243 r3219885 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.114 * Version: 1.8.0 15 15 * Author: Tomas Cordero 16 16 * Author URI: https://tomascordero.com … … 21 21 require plugin_dir_path( __FILE__ ) . '/vendor/autoload.php'; 22 22 23 use SafetyExit\ Safety_Exit_Frontend;24 use SafetyExit\ Safety_Exit_Admin;23 use SafetyExit\Frontend; 24 use SafetyExit\Admin; 25 25 26 26 $path = realpath(dirname(__FILE__) . '/../../../')."/wp-includes/pluggable.php"; … … 59 59 if ( is_admin() ){ 60 60 if(current_user_can('administrator')){ 61 $admin = new Safety_Exit_Admin(__FILE__);61 $admin = new Admin(__FILE__); 62 62 $admin->init(); 63 63 } … … 68 68 && $url_path !== '/login' 69 69 ){ 70 $frontend = new Safety_Exit_Frontend(__FILE__);70 $frontend = new Frontend(__FILE__); 71 71 $frontend->init(); 72 72 } -
safety-exit/trunk/tests/Unit/FrontendTest.php
r3057884 r3219885 1 1 <?php 2 2 3 use SafetyExit\ Safety_Exit_Frontend;3 use SafetyExit\Frontend; 4 4 use Brain\Monkey\Functions; 5 5 … … 48 48 it('calls wp_enqueue_scripts and wp_head actions on init', function () { 49 49 50 $safetyExitFrontend = new Safety_Exit_Frontend();50 $safetyExitFrontend = new Frontend(); 51 51 52 52 53 $this->assertInstanceOf( Safety_Exit_Frontend::class, $safetyExitFrontend);53 $this->assertInstanceOf(Frontend::class, $safetyExitFrontend); 54 54 55 55 // Assert that add_action was called with the expected parameters … … 69 69 70 70 it('enqueues the necessary styles and scripts', function () { 71 $safetyExitFrontend = new Safety_Exit_Frontend();71 $safetyExitFrontend = new Frontend(); 72 72 73 73 // Assert that wp_enqueue_style and wp_enqueue_script were called with the expected parameters … … 88 88 89 89 it('does not enqueue font-awesome-free style if sftExt_rectangle_icon_onOff is no', function () { 90 $safetyExitFrontend = new Safety_Exit_Frontend();90 $safetyExitFrontend = new Frontend(); 91 91 92 92 Functions\expect('wp_enqueue_style') … … 112 112 Functions\when('get_the_ID')->justReturn(1); 113 113 Functions\when('is_front_page')->justReturn(false); 114 $safetyExitFrontend = new Safety_Exit_Frontend(); 114 Functions\when('esc_attr')->alias(function($text) { 115 return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); 116 }); 117 $safetyExitFrontend = new Frontend(); 115 118 $safetyExitFrontend->run_setup(); 116 119 $js = $safetyExitFrontend->generate_js(); … … 125 128 Functions\when('get_the_ID')->justReturn(1); 126 129 Functions\when('is_front_page')->justReturn(false); 127 $safetyExitFrontend = new Safety_Exit_Frontend(); 130 Functions\when('esc_attr')->alias(function($text) { 131 return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); 132 }); 133 $safetyExitFrontend = new Frontend(); 128 134 $safetyExitFrontend->run_setup(); 129 135 $css = $safetyExitFrontend->generate_css(); … … 138 144 Functions\when('get_the_ID')->justReturn(1); 139 145 Functions\when('is_front_page')->justReturn(false); 140 $safetyExitFrontend = new Safety_Exit_Frontend(); 146 Functions\when('esc_attr')->alias(function($text) { 147 return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); 148 }); 149 $safetyExitFrontend = new Frontend(); 141 150 $safetyExitFrontend->run_setup(); 142 151 $html = $safetyExitFrontend->generate_html(); 143 $this->assertIsString($html); 152 $minifiedHtml = preg_replace('/\s+/', ' ', trim($html)); 153 $this->assertIsString($minifiedHtml); 144 154 145 $this->assertEquals($ html, "<button id=\"sftExt-frontend-button\" class=\"bottom right rectangle\" data-new-tab=\"https://google.com\" data-url=\"https://google.com\"><div class=\"sftExt-inner\"><i class=\"fas fa-times\"></i><span>Safety Exit</span></div></button>");155 $this->assertEquals($minifiedHtml, "<button id=\"sftExt-frontend-button\" class=\"bottom right rectangle\" data-new-tab=\"https://google.com\" data-url=\"https://google.com\"> <div class=\"sftExt-inner\"> <i class=\"fas fa-times\"></i><span>Safety Exit</span> </div> </button>"); 146 156 147 157 }); -
safety-exit/trunk/vendor/autoload.php
r3077243 r3219885 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe::getLoader();25 return ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea::getLoader(); -
safety-exit/trunk/vendor/composer/autoload_classmap.php
r3057884 r3219885 8 8 return array( 9 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 10 'SafetyExit\\Safety_Exit_Admin' => $baseDir . '/lib/Safety_Exit_Admin.php', 11 'SafetyExit\\Safety_Exit_Frontend' => $baseDir . '/lib/Safety_Exit_Frontend.php', 10 'SafetyExit\\Admin' => $baseDir . '/lib/Admin.php', 11 'SafetyExit\\Exceptions\\InvalidSetting' => $baseDir . '/lib/Exceptions/InvalidSetting.php', 12 'SafetyExit\\Frontend' => $baseDir . '/lib/Frontend.php', 13 'SafetyExit\\Helpers\\Settings' => $baseDir . '/lib/Helpers/Settings.php', 12 14 ); -
safety-exit/trunk/vendor/composer/autoload_real.php
r3077243 r3219885 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe5 class ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit f2ecb409de8af704de7d72a1f05c8ffe', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit85412737557de168d25fde3e0a4536ea', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit85412737557de168d25fde3e0a4536ea::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
safety-exit/trunk/vendor/composer/autoload_static.php
r3077243 r3219885 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe7 class ComposerStaticInit85412737557de168d25fde3e0a4536ea 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 23 23 public static $classMap = array ( 24 24 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 25 'SafetyExit\\Safety_Exit_Admin' => __DIR__ . '/../..' . '/lib/Safety_Exit_Admin.php', 26 'SafetyExit\\Safety_Exit_Frontend' => __DIR__ . '/../..' . '/lib/Safety_Exit_Frontend.php', 25 'SafetyExit\\Admin' => __DIR__ . '/../..' . '/lib/Admin.php', 26 'SafetyExit\\Exceptions\\InvalidSetting' => __DIR__ . '/../..' . '/lib/Exceptions/InvalidSetting.php', 27 'SafetyExit\\Frontend' => __DIR__ . '/../..' . '/lib/Frontend.php', 28 'SafetyExit\\Helpers\\Settings' => __DIR__ . '/../..' . '/lib/Helpers/Settings.php', 27 29 ); 28 30 … … 30 32 { 31 33 return \Closure::bind(function () use ($loader) { 32 $loader->prefixLengthsPsr4 = ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::$prefixLengthsPsr4;33 $loader->prefixDirsPsr4 = ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::$prefixDirsPsr4;34 $loader->classMap = ComposerStaticInit f2ecb409de8af704de7d72a1f05c8ffe::$classMap;34 $loader->prefixLengthsPsr4 = ComposerStaticInit85412737557de168d25fde3e0a4536ea::$prefixLengthsPsr4; 35 $loader->prefixDirsPsr4 = ComposerStaticInit85412737557de168d25fde3e0a4536ea::$prefixDirsPsr4; 36 $loader->classMap = ComposerStaticInit85412737557de168d25fde3e0a4536ea::$classMap; 35 37 36 38 }, null, ClassLoader::class); -
safety-exit/trunk/vendor/composer/installed.php
r3077243 r3219885 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 03efe7faf105c32a15dc545a5f0f807c13485306',6 'reference' => 'ef1aa1bb2cce47efc83ddab8dbd4a132f27a62c6', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 03efe7faf105c32a15dc545a5f0f807c13485306',16 'reference' => 'ef1aa1bb2cce47efc83ddab8dbd4a132f27a62c6', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.