Completed
Branch FET/9575/invisible-recaptcha (4e0b6f)
by
unknown
44:51 queued 31:17
created
core/EE_Bootstrap.core.php 1 patch
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -18,86 +18,86 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    /**
22
-     * load_espresso_addons
23
-     * runs during the WP 'plugins_loaded' action at priority 1
24
-     * and is the initial loading phase for EE addons
25
-     * no other logic should be performed at this point
26
-     */
27
-    public static function load_espresso_addons()
28
-    {
29
-        do_action('AHEE__EE_Bootstrap__load_espresso_addons');
30
-    }
31
-
32
-
33
-
34
-    /**
35
-     * detect_activations_or_upgrades
36
-     * runs during the WP 'plugins_loaded' action at priority 3
37
-     * Now that all of the addons have been loaded,
38
-     * we can determine if anything needs activating or upgrading
39
-     */
40
-    public static function detect_activations_or_upgrades()
41
-    {
42
-        do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades');
43
-    }
44
-
45
-
46
-
47
-    /**
48
-     * load_core_configuration
49
-     * runs during the WP 'plugins_loaded' action at priority 5
50
-     * Now that the database is assumed to be at the correct version
51
-     * we can load and set all of the system configurations
52
-     */
53
-    public static function load_core_configuration()
54
-    {
55
-        do_action('AHEE__EE_Bootstrap__load_core_configuration');
56
-    }
57
-
58
-
59
-
60
-    /**
61
-     * register_shortcodes_modules_and_widgets
62
-     * runs during the WP 'plugins_loaded' action at priority 7
63
-     * and handles registering all o four shortcodes, modules and widgets
64
-     * so that they are ready to be used throughout the system
65
-     */
66
-    public static function register_shortcodes_modules_and_widgets()
67
-    {
68
-        do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets');
69
-    }
70
-
71
-
72
-
73
-    /**
74
-     * brew_espresso
75
-     * runs during the WP 'plugins_loaded' action at priority 9
76
-     * bootstrapping is considered complete at this point,
77
-     * so let the fun begin...
78
-     */
79
-    public static function brew_espresso()
80
-    {
81
-        do_action('AHEE__EE_Bootstrap__brew_espresso');
82
-    }
83
-
84
-
85
-
86
-    /**
87
-     * @deprecated 4.9.53
88
-     */
89
-    public function run_request_stack()
90
-    {
91
-    }
92
-
93
-
94
-
95
-    /**
96
-     * @deprecated 4.9.53
97
-     */
98
-    public function build_request_stack()
99
-    {
100
-    }
21
+	/**
22
+	 * load_espresso_addons
23
+	 * runs during the WP 'plugins_loaded' action at priority 1
24
+	 * and is the initial loading phase for EE addons
25
+	 * no other logic should be performed at this point
26
+	 */
27
+	public static function load_espresso_addons()
28
+	{
29
+		do_action('AHEE__EE_Bootstrap__load_espresso_addons');
30
+	}
31
+
32
+
33
+
34
+	/**
35
+	 * detect_activations_or_upgrades
36
+	 * runs during the WP 'plugins_loaded' action at priority 3
37
+	 * Now that all of the addons have been loaded,
38
+	 * we can determine if anything needs activating or upgrading
39
+	 */
40
+	public static function detect_activations_or_upgrades()
41
+	{
42
+		do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades');
43
+	}
44
+
45
+
46
+
47
+	/**
48
+	 * load_core_configuration
49
+	 * runs during the WP 'plugins_loaded' action at priority 5
50
+	 * Now that the database is assumed to be at the correct version
51
+	 * we can load and set all of the system configurations
52
+	 */
53
+	public static function load_core_configuration()
54
+	{
55
+		do_action('AHEE__EE_Bootstrap__load_core_configuration');
56
+	}
57
+
58
+
59
+
60
+	/**
61
+	 * register_shortcodes_modules_and_widgets
62
+	 * runs during the WP 'plugins_loaded' action at priority 7
63
+	 * and handles registering all o four shortcodes, modules and widgets
64
+	 * so that they are ready to be used throughout the system
65
+	 */
66
+	public static function register_shortcodes_modules_and_widgets()
67
+	{
68
+		do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets');
69
+	}
70
+
71
+
72
+
73
+	/**
74
+	 * brew_espresso
75
+	 * runs during the WP 'plugins_loaded' action at priority 9
76
+	 * bootstrapping is considered complete at this point,
77
+	 * so let the fun begin...
78
+	 */
79
+	public static function brew_espresso()
80
+	{
81
+		do_action('AHEE__EE_Bootstrap__brew_espresso');
82
+	}
83
+
84
+
85
+
86
+	/**
87
+	 * @deprecated 4.9.53
88
+	 */
89
+	public function run_request_stack()
90
+	{
91
+	}
92
+
93
+
94
+
95
+	/**
96
+	 * @deprecated 4.9.53
97
+	 */
98
+	public function build_request_stack()
99
+	{
100
+	}
101 101
 
102 102
 }
103 103
 // End of file EE_Bootstrap.core.php
Please login to merge, or discard this patch.
core/services/request/LegacyRequestInterface.php 1 patch
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -15,125 +15,125 @@
 block discarded – undo
15 15
 interface LegacyRequestInterface
16 16
 {
17 17
 
18
-    /**
19
-     * @return array
20
-     */
21
-    public function get_params();
18
+	/**
19
+	 * @return array
20
+	 */
21
+	public function get_params();
22 22
 
23 23
 
24
-    /**
25
-     * @return array
26
-     */
27
-    public function post_params();
24
+	/**
25
+	 * @return array
26
+	 */
27
+	public function post_params();
28 28
 
29 29
 
30
-    /**
31
-     * @return array
32
-     */
33
-    public function cookie_params();
30
+	/**
31
+	 * @return array
32
+	 */
33
+	public function cookie_params();
34 34
 
35 35
 
36
-    /**
37
-     * @return array
38
-     */
39
-    public function server_params();
36
+	/**
37
+	 * @return array
38
+	 */
39
+	public function server_params();
40 40
 
41 41
 
42
-    /**
43
-     * returns contents of $_REQUEST
44
-     *
45
-     * @return array
46
-     */
47
-    public function params();
42
+	/**
43
+	 * returns contents of $_REQUEST
44
+	 *
45
+	 * @return array
46
+	 */
47
+	public function params();
48 48
 
49 49
 
50
-    /**
51
-     * @param      $key
52
-     * @param      $value
53
-     * @param bool $override_ee
54
-     * @return    void
55
-     */
56
-    public function set($key, $value, $override_ee = false);
50
+	/**
51
+	 * @param      $key
52
+	 * @param      $value
53
+	 * @param bool $override_ee
54
+	 * @return    void
55
+	 */
56
+	public function set($key, $value, $override_ee = false);
57 57
 
58 58
 
59
-    /**
60
-     * returns   the value for a request param if the given key exists
61
-     *
62
-     * @param       $key
63
-     * @param null  $default
64
-     * @return mixed
65
-     */
66
-    public function get($key, $default = null);
59
+	/**
60
+	 * returns   the value for a request param if the given key exists
61
+	 *
62
+	 * @param       $key
63
+	 * @param null  $default
64
+	 * @return mixed
65
+	 */
66
+	public function get($key, $default = null);
67 67
 
68 68
 
69
-    /**
70
-     * check if param exists
71
-     *
72
-     * @param       $key
73
-     * @return bool
74
-     */
75
-    public function is_set($key);
69
+	/**
70
+	 * check if param exists
71
+	 *
72
+	 * @param       $key
73
+	 * @return bool
74
+	 */
75
+	public function is_set($key);
76 76
 
77 77
 
78
-    /**
79
-     * remove param
80
-     *
81
-     * @param      $key
82
-     * @param bool $unset_from_global_too
83
-     */
84
-    public function un_set($key, $unset_from_global_too = false);
78
+	/**
79
+	 * remove param
80
+	 *
81
+	 * @param      $key
82
+	 * @param bool $unset_from_global_too
83
+	 */
84
+	public function un_set($key, $unset_from_global_too = false);
85 85
 
86 86
 
87
-    /**
88
-     * @return string
89
-     */
90
-    public function ip_address();
87
+	/**
88
+	 * @return string
89
+	 */
90
+	public function ip_address();
91 91
 
92 92
 
93
-    /**
94
-     * @return bool
95
-     */
96
-    public function isAdmin();
93
+	/**
94
+	 * @return bool
95
+	 */
96
+	public function isAdmin();
97 97
 
98 98
 
99
-    /**
100
-     * @return mixed
101
-     */
102
-    public function isAjax();
99
+	/**
100
+	 * @return mixed
101
+	 */
102
+	public function isAjax();
103 103
 
104 104
 
105
-    /**
106
-     * @return mixed
107
-     */
108
-    public function isFrontAjax();
105
+	/**
106
+	 * @return mixed
107
+	 */
108
+	public function isFrontAjax();
109 109
 
110 110
 
111
-    /**
112
-     * @return mixed|string
113
-     */
114
-    public function requestUri();
111
+	/**
112
+	 * @return mixed|string
113
+	 */
114
+	public function requestUri();
115 115
 
116 116
 
117
-    /**
118
-     * @return string
119
-     */
120
-    public function userAgent();
117
+	/**
118
+	 * @return string
119
+	 */
120
+	public function userAgent();
121 121
 
122 122
 
123
-    /**
124
-     * @param string $user_agent
125
-     */
126
-    public function setUserAgent($user_agent = '');
123
+	/**
124
+	 * @param string $user_agent
125
+	 */
126
+	public function setUserAgent($user_agent = '');
127 127
 
128 128
 
129
-    /**
130
-     * @return bool
131
-     */
132
-    public function isBot();
129
+	/**
130
+	 * @return bool
131
+	 */
132
+	public function isBot();
133 133
 
134 134
 
135
-    /**
136
-     * @param bool $is_bot
137
-     */
138
-    public function setIsBot($is_bot);
135
+	/**
136
+	 * @param bool $is_bot
137
+	 */
138
+	public function setIsBot($is_bot);
139 139
 }
Please login to merge, or discard this patch.
core/services/request/Response.php 2 patches
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -18,130 +18,130 @@
 block discarded – undo
18 18
 class Response implements ResponseInterface
19 19
 {
20 20
 
21
-    /**
22
-     * @var array $notice
23
-     */
24
-    protected $notice = array();
21
+	/**
22
+	 * @var array $notice
23
+	 */
24
+	protected $notice = array();
25 25
 
26
-    /**
27
-     * rendered output to be returned to WP
28
-     *
29
-     * @var string $output
30
-     */
31
-    protected $output = '';
26
+	/**
27
+	 * rendered output to be returned to WP
28
+	 *
29
+	 * @var string $output
30
+	 */
31
+	protected $output = '';
32 32
 
33
-    /**
34
-     * @var bool
35
-     */
36
-    protected $request_terminated = false;
33
+	/**
34
+	 * @var bool
35
+	 */
36
+	protected $request_terminated = false;
37 37
 
38
-    /**
39
-     * @var bool $deactivate_plugin
40
-     */
41
-    protected $deactivate_plugin = false;
38
+	/**
39
+	 * @var bool $deactivate_plugin
40
+	 */
41
+	protected $deactivate_plugin = false;
42 42
 
43 43
 
44
-    /**
45
-     * EE_Response constructor.
46
-     */
47
-    public function __construct()
48
-    {
49
-        $this->terminateRequest(false);
50
-    }
44
+	/**
45
+	 * EE_Response constructor.
46
+	 */
47
+	public function __construct()
48
+	{
49
+		$this->terminateRequest(false);
50
+	}
51 51
 
52 52
 
53 53
 
54
-    /**
55
-     * @param $key
56
-     * @param $value
57
-     * @return    void
58
-     */
59
-    public function setNotice($key, $value)
60
-    {
61
-        $this->notice[ $key ] = $value;
62
-    }
54
+	/**
55
+	 * @param $key
56
+	 * @param $value
57
+	 * @return    void
58
+	 */
59
+	public function setNotice($key, $value)
60
+	{
61
+		$this->notice[ $key ] = $value;
62
+	}
63 63
 
64 64
 
65 65
 
66
-    /**
67
-     * @param $key
68
-     * @return    mixed
69
-     */
70
-    public function getNotice($key)
71
-    {
72
-        return isset($this->notice[ $key ]) ? $this->notice[ $key ] : null;
73
-    }
66
+	/**
67
+	 * @param $key
68
+	 * @return    mixed
69
+	 */
70
+	public function getNotice($key)
71
+	{
72
+		return isset($this->notice[ $key ]) ? $this->notice[ $key ] : null;
73
+	}
74 74
 
75 75
 
76 76
 
77
-    /**
78
-     * @return array
79
-     */
80
-    public function getNotices()
81
-    {
82
-        return $this->notice;
83
-    }
77
+	/**
78
+	 * @return array
79
+	 */
80
+	public function getNotices()
81
+	{
82
+		return $this->notice;
83
+	}
84 84
 
85 85
 
86 86
 
87
-    /**
88
-     * @param string $string
89
-     * @param bool   $append
90
-     */
91
-    public function addOutput($string, $append = true)
92
-    {
93
-        $this->output = $append ? $this->output . $string : $string . $this->output;
94
-    }
87
+	/**
88
+	 * @param string $string
89
+	 * @param bool   $append
90
+	 */
91
+	public function addOutput($string, $append = true)
92
+	{
93
+		$this->output = $append ? $this->output . $string : $string . $this->output;
94
+	}
95 95
 
96 96
 
97 97
 
98
-    /**
99
-     * @return string
100
-     */
101
-    public function getOutput()
102
-    {
103
-        return $this->output;
104
-    }
98
+	/**
99
+	 * @return string
100
+	 */
101
+	public function getOutput()
102
+	{
103
+		return $this->output;
104
+	}
105 105
 
106 106
 
107 107
 
108
-    /**
109
-     * @return boolean
110
-     */
111
-    public function requestTerminated()
112
-    {
113
-        return $this->request_terminated;
114
-    }
108
+	/**
109
+	 * @return boolean
110
+	 */
111
+	public function requestTerminated()
112
+	{
113
+		return $this->request_terminated;
114
+	}
115 115
 
116 116
 
117 117
 
118
-    /**
119
-     * @param boolean $request_terminated
120
-     */
121
-    public function terminateRequest($request_terminated = true)
122
-    {
123
-        $this->request_terminated = filter_var($request_terminated, FILTER_VALIDATE_BOOLEAN);
124
-    }
118
+	/**
119
+	 * @param boolean $request_terminated
120
+	 */
121
+	public function terminateRequest($request_terminated = true)
122
+	{
123
+		$this->request_terminated = filter_var($request_terminated, FILTER_VALIDATE_BOOLEAN);
124
+	}
125 125
 
126 126
 
127 127
 
128
-    /**
129
-     * @return boolean
130
-     */
131
-    public function pluginDeactivated()
132
-    {
133
-        return $this->deactivate_plugin;
134
-    }
128
+	/**
129
+	 * @return boolean
130
+	 */
131
+	public function pluginDeactivated()
132
+	{
133
+		return $this->deactivate_plugin;
134
+	}
135 135
 
136 136
 
137 137
 
138
-    /**
139
-     * sets $deactivate_plugin to true
140
-     */
141
-    public function deactivatePlugin()
142
-    {
143
-        $this->deactivate_plugin = true;
144
-    }
138
+	/**
139
+	 * sets $deactivate_plugin to true
140
+	 */
141
+	public function deactivatePlugin()
142
+	{
143
+		$this->deactivate_plugin = true;
144
+	}
145 145
 
146 146
 
147 147
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function setNotice($key, $value)
60 60
     {
61
-        $this->notice[ $key ] = $value;
61
+        $this->notice[$key] = $value;
62 62
     }
63 63
 
64 64
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function getNotice($key)
71 71
     {
72
-        return isset($this->notice[ $key ]) ? $this->notice[ $key ] : null;
72
+        return isset($this->notice[$key]) ? $this->notice[$key] : null;
73 73
     }
74 74
 
75 75
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function addOutput($string, $append = true)
92 92
     {
93
-        $this->output = $append ? $this->output . $string : $string . $this->output;
93
+        $this->output = $append ? $this->output.$string : $string.$this->output;
94 94
     }
95 95
 
96 96
 
Please login to merge, or discard this patch.
core/services/request/RequestStackCoreAppInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
 interface RequestStackCoreAppInterface
17 17
 {
18 18
 
19
-    /**
20
-     * gives the core app a chance to handle the response after the request stack has fully processed
21
-     *
22
-     * @param RequestInterface $request
23
-     * @param ResponseInterface      $response
24
-     */
25
-    public function handleResponse(RequestInterface $request, ResponseInterface $response);
19
+	/**
20
+	 * gives the core app a chance to handle the response after the request stack has fully processed
21
+	 *
22
+	 * @param RequestInterface $request
23
+	 * @param ResponseInterface      $response
24
+	 */
25
+	public function handleResponse(RequestInterface $request, ResponseInterface $response);
26 26
 
27 27
 }
28 28
 // Location: RequestStackCoreApp.php
Please login to merge, or discard this patch.
core/services/request/middleware/BotDetector.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -21,25 +21,25 @@
 block discarded – undo
21 21
 class BotDetector extends Middleware
22 22
 {
23 23
 
24
-    /**
25
-     * converts a Request to a Response
26
-     *
27
-     * @param RequestInterface $request
28
-     * @param ResponseInterface      $response
29
-     * @return ResponseInterface
30
-     */
31
-    public function handleRequest(RequestInterface $request, ResponseInterface $response)
32
-    {
33
-        $this->request  = $request;
34
-        $this->response = $response;
35
-        /** @var CrawlerDetect $CrawlerDetect */
36
-        $CrawlerDetect = $this->loader->getShared('EventEspressoVendor\Jaybizzle\CrawlerDetect\CrawlerDetect');
37
-        // Check and record the user agent of the current 'visitor'
38
-        $this->request->setIsBot($CrawlerDetect->isCrawler());
39
-        $this->request->setUserAgent($CrawlerDetect->userAgent());
40
-        $this->response = $this->processRequestStack($this->request, $this->response);
41
-        return $this->response;
42
-    }
24
+	/**
25
+	 * converts a Request to a Response
26
+	 *
27
+	 * @param RequestInterface $request
28
+	 * @param ResponseInterface      $response
29
+	 * @return ResponseInterface
30
+	 */
31
+	public function handleRequest(RequestInterface $request, ResponseInterface $response)
32
+	{
33
+		$this->request  = $request;
34
+		$this->response = $response;
35
+		/** @var CrawlerDetect $CrawlerDetect */
36
+		$CrawlerDetect = $this->loader->getShared('EventEspressoVendor\Jaybizzle\CrawlerDetect\CrawlerDetect');
37
+		// Check and record the user agent of the current 'visitor'
38
+		$this->request->setIsBot($CrawlerDetect->isCrawler());
39
+		$this->request->setUserAgent($CrawlerDetect->userAgent());
40
+		$this->response = $this->processRequestStack($this->request, $this->response);
41
+		return $this->response;
42
+	}
43 43
 
44 44
 }
45 45
 // Location: BotDetector.php
Please login to merge, or discard this patch.
core/services/request/middleware/PreProductionVersionWarning.php 2 patches
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -22,95 +22,95 @@
 block discarded – undo
22 22
 class PreProductionVersionWarning extends Middleware
23 23
 {
24 24
 
25
-    /**
26
-     * converts a Request to a Response
27
-     *
28
-     * @param RequestInterface $request
29
-     * @param ResponseInterface      $response
30
-     * @return ResponseInterface
31
-     */
32
-    public function handleRequest(RequestInterface $request, ResponseInterface $response)
33
-    {
34
-        $this->request  = $request;
35
-        $this->response = $response;
36
-        $this->displayPreProductionVersionWarning();
37
-        $this->response = $this->processRequestStack($this->request, $this->response);
38
-        return $this->response;
39
-    }
40
-
41
-
42
-
43
-    /**
44
-     * displays message on frontend of site notifying admin that EE has been temporarily placed into maintenance mode
45
-     *
46
-     * @return void
47
-     */
48
-    public function displayPreProductionVersionWarning()
49
-    {
50
-        // skip AJAX requests
51
-        if ($this->request->isAjax()) {
52
-            return;
53
-        }
54
-        // skip stable releases
55
-        if (substr(EVENT_ESPRESSO_VERSION, -5) !== '.beta') {
56
-            return;
57
-        }
58
-        // site admin has authorized use of non-stable release candidate for production
59
-        if (defined('ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE') && ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE) {
60
-            return;
61
-        }
62
-        // post release candidate warning
63
-        if ($this->request->isAdmin()) {
64
-            add_action('admin_notices', array($this, 'preProductionVersionAdminNotice'), -999);
65
-        } else {
66
-            add_action('shutdown', array($this, 'preProductionVersionWarningNotice'), 10);
67
-        }
68
-    }
69
-
70
-
71
-
72
-    /**
73
-     * displays admin notice that current version of EE is not a stable release
74
-     *
75
-     * @return void
76
-     * @throws InvalidDataTypeException
77
-     */
78
-    public function preProductionVersionAdminNotice()
79
-    {
80
-        new PersistentAdminNotice(
81
-            'preProductionVersionAdminNotice_' . EVENT_ESPRESSO_VERSION,
82
-            $this->warningNotice()
83
-        );
84
-    }
85
-
86
-
87
-    /**
88
-     * displays message on frontend of site notifying admin that current version of EE is not a stable release
89
-     *
90
-     * @return void
91
-     */
92
-    public function preProductionVersionWarningNotice()
93
-    {
94
-        echo '<div id="ee-release-candidate-notice-dv" class="ee-really-important-notice-dv"><p>';
95
-        echo $this->warningNotice();
96
-        echo '</p></div>';
97
-    }
98
-
99
-
100
-    /**
101
-     * @return string
102
-     */
103
-    private function warningNotice()
104
-    {
105
-        return sprintf(
106
-            esc_html__(
107
-                'This version of Event Espresso is for testing and/or evaluation purposes only. It is %1$snot%2$s considered a stable release and should therefore %1$snot%2$s be activated on a live or production website.',
108
-                'event_espresso'
109
-            ),
110
-            '<strong>',
111
-            '</strong>'
112
-        );
113
-    }
25
+	/**
26
+	 * converts a Request to a Response
27
+	 *
28
+	 * @param RequestInterface $request
29
+	 * @param ResponseInterface      $response
30
+	 * @return ResponseInterface
31
+	 */
32
+	public function handleRequest(RequestInterface $request, ResponseInterface $response)
33
+	{
34
+		$this->request  = $request;
35
+		$this->response = $response;
36
+		$this->displayPreProductionVersionWarning();
37
+		$this->response = $this->processRequestStack($this->request, $this->response);
38
+		return $this->response;
39
+	}
40
+
41
+
42
+
43
+	/**
44
+	 * displays message on frontend of site notifying admin that EE has been temporarily placed into maintenance mode
45
+	 *
46
+	 * @return void
47
+	 */
48
+	public function displayPreProductionVersionWarning()
49
+	{
50
+		// skip AJAX requests
51
+		if ($this->request->isAjax()) {
52
+			return;
53
+		}
54
+		// skip stable releases
55
+		if (substr(EVENT_ESPRESSO_VERSION, -5) !== '.beta') {
56
+			return;
57
+		}
58
+		// site admin has authorized use of non-stable release candidate for production
59
+		if (defined('ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE') && ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE) {
60
+			return;
61
+		}
62
+		// post release candidate warning
63
+		if ($this->request->isAdmin()) {
64
+			add_action('admin_notices', array($this, 'preProductionVersionAdminNotice'), -999);
65
+		} else {
66
+			add_action('shutdown', array($this, 'preProductionVersionWarningNotice'), 10);
67
+		}
68
+	}
69
+
70
+
71
+
72
+	/**
73
+	 * displays admin notice that current version of EE is not a stable release
74
+	 *
75
+	 * @return void
76
+	 * @throws InvalidDataTypeException
77
+	 */
78
+	public function preProductionVersionAdminNotice()
79
+	{
80
+		new PersistentAdminNotice(
81
+			'preProductionVersionAdminNotice_' . EVENT_ESPRESSO_VERSION,
82
+			$this->warningNotice()
83
+		);
84
+	}
85
+
86
+
87
+	/**
88
+	 * displays message on frontend of site notifying admin that current version of EE is not a stable release
89
+	 *
90
+	 * @return void
91
+	 */
92
+	public function preProductionVersionWarningNotice()
93
+	{
94
+		echo '<div id="ee-release-candidate-notice-dv" class="ee-really-important-notice-dv"><p>';
95
+		echo $this->warningNotice();
96
+		echo '</p></div>';
97
+	}
98
+
99
+
100
+	/**
101
+	 * @return string
102
+	 */
103
+	private function warningNotice()
104
+	{
105
+		return sprintf(
106
+			esc_html__(
107
+				'This version of Event Espresso is for testing and/or evaluation purposes only. It is %1$snot%2$s considered a stable release and should therefore %1$snot%2$s be activated on a live or production website.',
108
+				'event_espresso'
109
+			),
110
+			'<strong>',
111
+			'</strong>'
112
+		);
113
+	}
114 114
 
115 115
 }
116 116
 // Location: NonProductionReadyVersionWarning.php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     public function preProductionVersionAdminNotice()
79 79
     {
80 80
         new PersistentAdminNotice(
81
-            'preProductionVersionAdminNotice_' . EVENT_ESPRESSO_VERSION,
81
+            'preProductionVersionAdminNotice_'.EVENT_ESPRESSO_VERSION,
82 82
             $this->warningNotice()
83 83
         );
84 84
     }
Please login to merge, or discard this patch.
core/services/request/ResponseInterface.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -16,69 +16,69 @@
 block discarded – undo
16 16
 interface ResponseInterface
17 17
 {
18 18
 
19
-    /**
20
-     *    set_notice
21
-     *
22
-     * @access    public
23
-     * @param $key
24
-     * @param $value
25
-     * @return    void
26
-     */
27
-    public function setNotice($key, $value);
19
+	/**
20
+	 *    set_notice
21
+	 *
22
+	 * @access    public
23
+	 * @param $key
24
+	 * @param $value
25
+	 * @return    void
26
+	 */
27
+	public function setNotice($key, $value);
28 28
 
29
-    /**
30
-     *    get_notice
31
-     *
32
-     * @access    public
33
-     * @param $key
34
-     * @return    mixed
35
-     */
36
-    public function getNotice($key);
29
+	/**
30
+	 *    get_notice
31
+	 *
32
+	 * @access    public
33
+	 * @param $key
34
+	 * @return    mixed
35
+	 */
36
+	public function getNotice($key);
37 37
 
38
-    /**
39
-     *    get_notices
40
-     *
41
-     * @access    public
42
-     * @return    array
43
-     */
44
-    public function getNotices();
38
+	/**
39
+	 *    get_notices
40
+	 *
41
+	 * @access    public
42
+	 * @return    array
43
+	 */
44
+	public function getNotices();
45 45
 
46
-    /**
47
-     *    add_output
48
-     *
49
-     * @access    public
50
-     * @param      $string
51
-     * @param bool $append
52
-     */
53
-    public function addOutput($string, $append = true);
46
+	/**
47
+	 *    add_output
48
+	 *
49
+	 * @access    public
50
+	 * @param      $string
51
+	 * @param bool $append
52
+	 */
53
+	public function addOutput($string, $append = true);
54 54
 
55
-    /**
56
-     *    get_output
57
-     *
58
-     * @access    public
59
-     * @return    string
60
-     */
61
-    public function getOutput();
55
+	/**
56
+	 *    get_output
57
+	 *
58
+	 * @access    public
59
+	 * @return    string
60
+	 */
61
+	public function getOutput();
62 62
 
63
-    /**
64
-     * @return boolean
65
-     */
66
-    public function requestTerminated();
63
+	/**
64
+	 * @return boolean
65
+	 */
66
+	public function requestTerminated();
67 67
 
68
-    /**
69
-     * @param boolean $request_terminated
70
-     */
71
-    public function terminateRequest($request_terminated = true);
68
+	/**
69
+	 * @param boolean $request_terminated
70
+	 */
71
+	public function terminateRequest($request_terminated = true);
72 72
 
73
-    /**
74
-     * @return boolean
75
-     */
76
-    public function pluginDeactivated();
73
+	/**
74
+	 * @return boolean
75
+	 */
76
+	public function pluginDeactivated();
77 77
 
78
-    /**
79
-     * sets $deactivate_plugin to true
80
-     */
81
-    public function deactivatePlugin();
78
+	/**
79
+	 * sets $deactivate_plugin to true
80
+	 */
81
+	public function deactivatePlugin();
82 82
 
83 83
 }
84 84
 // Location: ResponseInterface.php
Please login to merge, or discard this patch.
core/services/loaders/LoaderInterface.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -11,49 +11,49 @@
 block discarded – undo
11 11
 interface LoaderInterface
12 12
 {
13 13
 
14
-    /**
15
-     * Can be for instantiating a new instance of a class,
16
-     * or for getting a shared instance of a class (default)
17
-     *
18
-     * @param string $fqcn
19
-     * @param array  $arguments
20
-     * @param bool   $shared
21
-     * @return mixed
22
-     */
23
-    public function load($fqcn, $arguments = array(), $shared = true);
24
-
25
-    /**
26
-     * Used for instantiating a new instance of a class
27
-     *
28
-     * @param string $fqcn
29
-     * @param array  $arguments
30
-     * @return mixed
31
-     */
32
-    public function getNew($fqcn, $arguments = array());
33
-
34
-    /**
35
-     * Used for getting a shared instance of a class
36
-     *
37
-     * @param string $fqcn
38
-     * @param array  $arguments
39
-     * @return mixed
40
-     */
41
-    public function getShared($fqcn, $arguments = array());
42
-
43
-
44
-    /**
45
-     * @param string $fqcn
46
-     * @param mixed  $object
47
-     * @return bool
48
-     * @throws InvalidArgumentException
49
-     */
50
-    public function share($fqcn, $object);
51
-
52
-
53
-    /**
54
-     * calls reset() on loader if method exists
55
-     */
56
-    public function reset();
14
+	/**
15
+	 * Can be for instantiating a new instance of a class,
16
+	 * or for getting a shared instance of a class (default)
17
+	 *
18
+	 * @param string $fqcn
19
+	 * @param array  $arguments
20
+	 * @param bool   $shared
21
+	 * @return mixed
22
+	 */
23
+	public function load($fqcn, $arguments = array(), $shared = true);
24
+
25
+	/**
26
+	 * Used for instantiating a new instance of a class
27
+	 *
28
+	 * @param string $fqcn
29
+	 * @param array  $arguments
30
+	 * @return mixed
31
+	 */
32
+	public function getNew($fqcn, $arguments = array());
33
+
34
+	/**
35
+	 * Used for getting a shared instance of a class
36
+	 *
37
+	 * @param string $fqcn
38
+	 * @param array  $arguments
39
+	 * @return mixed
40
+	 */
41
+	public function getShared($fqcn, $arguments = array());
42
+
43
+
44
+	/**
45
+	 * @param string $fqcn
46
+	 * @param mixed  $object
47
+	 * @return bool
48
+	 * @throws InvalidArgumentException
49
+	 */
50
+	public function share($fqcn, $object);
51
+
52
+
53
+	/**
54
+	 * calls reset() on loader if method exists
55
+	 */
56
+	public function reset();
57 57
 
58 58
 }
59 59
 // End of file LoaderInterface.php
Please login to merge, or discard this patch.
core/services/loaders/CachingLoaderDecoratorInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 interface CachingLoaderDecoratorInterface extends LoaderDecoratorInterface
15 15
 {
16 16
 
17
-    /**
18
-     * @param string $fqcn
19
-     * @param mixed  $object
20
-     * @return bool
21
-     * @throws InvalidArgumentException
22
-     */
23
-    public function share($fqcn, $object);
17
+	/**
18
+	 * @param string $fqcn
19
+	 * @param mixed  $object
20
+	 * @return bool
21
+	 * @throws InvalidArgumentException
22
+	 */
23
+	public function share($fqcn, $object);
24 24
 
25 25
 }
26 26
 // End of file LoaderInterface.php
Please login to merge, or discard this patch.