@@ -14,18 +14,18 @@ |
||
14 | 14 | */ |
15 | 15 | class EspressoEventsListTable extends RouteMatchSpecification |
16 | 16 | { |
17 | - /** |
|
18 | - * returns true if current request matches specification |
|
19 | - * |
|
20 | - * @since 4.9.71.p |
|
21 | - * @return boolean |
|
22 | - */ |
|
23 | - public function isMatchingRoute() |
|
24 | - { |
|
25 | - return $this->request->getRequestParam('page') === 'espresso_events' |
|
26 | - && ( |
|
27 | - $this->request->getRequestParam('action') === 'default' |
|
28 | - || $this->request->requestParamIsSet('action') === false |
|
29 | - ); |
|
30 | - } |
|
17 | + /** |
|
18 | + * returns true if current request matches specification |
|
19 | + * |
|
20 | + * @since 4.9.71.p |
|
21 | + * @return boolean |
|
22 | + */ |
|
23 | + public function isMatchingRoute() |
|
24 | + { |
|
25 | + return $this->request->getRequestParam('page') === 'espresso_events' |
|
26 | + && ( |
|
27 | + $this->request->getRequestParam('action') === 'default' |
|
28 | + || $this->request->requestParamIsSet('action') === false |
|
29 | + ); |
|
30 | + } |
|
31 | 31 | } |
@@ -14,14 +14,14 @@ |
||
14 | 14 | */ |
15 | 15 | class DoesNotMatchRouteSpecification extends RouteMatchSpecificationDecorator |
16 | 16 | { |
17 | - /** |
|
18 | - * returns true if current request matches specification |
|
19 | - * |
|
20 | - * @since 4.9.71.p |
|
21 | - * @return boolean |
|
22 | - */ |
|
23 | - public function isMatchingRoute() |
|
24 | - { |
|
25 | - return ! $this->specification->isMatchingRoute(); |
|
26 | - } |
|
17 | + /** |
|
18 | + * returns true if current request matches specification |
|
19 | + * |
|
20 | + * @since 4.9.71.p |
|
21 | + * @return boolean |
|
22 | + */ |
|
23 | + public function isMatchingRoute() |
|
24 | + { |
|
25 | + return ! $this->specification->isMatchingRoute(); |
|
26 | + } |
|
27 | 27 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | */ |
13 | 13 | interface RouteMatchSpecificationInterface |
14 | 14 | { |
15 | - /** |
|
16 | - * returns true if current request matches specification |
|
17 | - * |
|
18 | - * @since 4.9.71.p |
|
19 | - * @return boolean |
|
20 | - */ |
|
21 | - public function isMatchingRoute(); |
|
15 | + /** |
|
16 | + * returns true if current request matches specification |
|
17 | + * |
|
18 | + * @since 4.9.71.p |
|
19 | + * @return boolean |
|
20 | + */ |
|
21 | + public function isMatchingRoute(); |
|
22 | 22 | } |
@@ -12,42 +12,42 @@ |
||
12 | 12 | */ |
13 | 13 | interface BlockAssetManagerInterface |
14 | 14 | { |
15 | - /** |
|
16 | - * @since 4.9.71.p |
|
17 | - * @return string |
|
18 | - */ |
|
19 | - public function assetNamespace(); |
|
20 | - |
|
21 | - /** |
|
22 | - * @since 4.9.71.p |
|
23 | - * @return void |
|
24 | - */ |
|
25 | - public function setAssetHandles(); |
|
26 | - |
|
27 | - /** |
|
28 | - * @since 4.9.71.p |
|
29 | - * @return string |
|
30 | - */ |
|
31 | - public function getEditorScriptHandle(); |
|
32 | - |
|
33 | - |
|
34 | - /** |
|
35 | - * @since 4.9.71.p |
|
36 | - * @return string |
|
37 | - */ |
|
38 | - public function getEditorStyleHandle(); |
|
39 | - |
|
40 | - |
|
41 | - /** |
|
42 | - * @since 4.9.71.p |
|
43 | - * @return string |
|
44 | - */ |
|
45 | - public function getScriptHandle(); |
|
46 | - |
|
47 | - |
|
48 | - /** |
|
49 | - * @since 4.9.71.p |
|
50 | - * @return string |
|
51 | - */ |
|
52 | - public function getStyleHandle(); |
|
15 | + /** |
|
16 | + * @since 4.9.71.p |
|
17 | + * @return string |
|
18 | + */ |
|
19 | + public function assetNamespace(); |
|
20 | + |
|
21 | + /** |
|
22 | + * @since 4.9.71.p |
|
23 | + * @return void |
|
24 | + */ |
|
25 | + public function setAssetHandles(); |
|
26 | + |
|
27 | + /** |
|
28 | + * @since 4.9.71.p |
|
29 | + * @return string |
|
30 | + */ |
|
31 | + public function getEditorScriptHandle(); |
|
32 | + |
|
33 | + |
|
34 | + /** |
|
35 | + * @since 4.9.71.p |
|
36 | + * @return string |
|
37 | + */ |
|
38 | + public function getEditorStyleHandle(); |
|
39 | + |
|
40 | + |
|
41 | + /** |
|
42 | + * @since 4.9.71.p |
|
43 | + * @return string |
|
44 | + */ |
|
45 | + public function getScriptHandle(); |
|
46 | + |
|
47 | + |
|
48 | + /** |
|
49 | + * @since 4.9.71.p |
|
50 | + * @return string |
|
51 | + */ |
|
52 | + public function getStyleHandle(); |
|
53 | 53 | } |
54 | 54 | \ No newline at end of file |
@@ -15,16 +15,16 @@ |
||
15 | 15 | */ |
16 | 16 | interface DependencyResolverInterface |
17 | 17 | { |
18 | - /** |
|
19 | - * Used to configure and/or setup any aliases or recursions required by the DependencyResolver |
|
20 | - * |
|
21 | - * @since 4.9.71.p |
|
22 | - */ |
|
23 | - public function initialize(); |
|
18 | + /** |
|
19 | + * Used to configure and/or setup any aliases or recursions required by the DependencyResolver |
|
20 | + * |
|
21 | + * @since 4.9.71.p |
|
22 | + */ |
|
23 | + public function initialize(); |
|
24 | 24 | |
25 | - /** |
|
26 | - * @param string $fqcn Fully Qualified Class Name |
|
27 | - * @since 4.9.71.p |
|
28 | - */ |
|
29 | - public function resolveDependenciesForClass($fqcn); |
|
25 | + /** |
|
26 | + * @param string $fqcn Fully Qualified Class Name |
|
27 | + * @since 4.9.71.p |
|
28 | + */ |
|
29 | + public function resolveDependenciesForClass($fqcn); |
|
30 | 30 | } |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * Note: this file should only be required right before calling the function the shim is for. This is to ensure that |
5 | 5 | * it does not override any existing definition of the function in WP. |
6 | 6 | */ |
7 | -if (! function_exists('get_preview_post_link')) { |
|
7 | +if ( ! function_exists('get_preview_post_link')) { |
|
8 | 8 | /** |
9 | 9 | * Function was added in WordPress 4.4.0 |
10 | 10 | * |
@@ -16,13 +16,13 @@ discard block |
||
16 | 16 | function get_preview_post_link($post = null, $query_args = array(), $preview_link = '') |
17 | 17 | { |
18 | 18 | $post = get_post($post); |
19 | - if (! $post) { |
|
19 | + if ( ! $post) { |
|
20 | 20 | return ''; |
21 | 21 | } |
22 | 22 | |
23 | 23 | $post_type_object = get_post_type_object($post->post_type); |
24 | 24 | if (is_post_type_viewable($post_type_object)) { |
25 | - if (! $preview_link) { |
|
25 | + if ( ! $preview_link) { |
|
26 | 26 | $preview_link = set_url_scheme(get_permalink($post)); |
27 | 27 | } |
28 | 28 | |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | -if (! function_exists('is_post_type_viewable')) { |
|
45 | +if ( ! function_exists('is_post_type_viewable')) { |
|
46 | 46 | function is_post_type_viewable($post_type) |
47 | 47 | { |
48 | 48 | if (is_scalar($post_type)) { |
49 | 49 | $post_type = get_post_type_object($post_type); |
50 | - if (! $post_type) { |
|
50 | + if ( ! $post_type) { |
|
51 | 51 | return false; |
52 | 52 | } |
53 | 53 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | -if (! function_exists('wp_scripts_get_suffix')) { |
|
59 | +if ( ! function_exists('wp_scripts_get_suffix')) { |
|
60 | 60 | /** |
61 | 61 | * Returns the suffix that can be used for the scripts. |
62 | 62 | * |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | static $suffixes; |
74 | 74 | |
75 | 75 | if ($suffixes === null) { |
76 | - include(ABSPATH . WPINC . '/version.php'); // include an unmodified $wp_version |
|
76 | + include(ABSPATH.WPINC.'/version.php'); // include an unmodified $wp_version |
|
77 | 77 | |
78 | 78 | $develop_src = false !== strpos($wp_version, '-src'); |
79 | 79 | |
80 | - if (! defined('SCRIPT_DEBUG')) { |
|
80 | + if ( ! defined('SCRIPT_DEBUG')) { |
|
81 | 81 | define('SCRIPT_DEBUG', $develop_src); |
82 | 82 | } |
83 | 83 | $suffix = SCRIPT_DEBUG ? '' : '.min'; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | -if (! function_exists('get_user_locale')) { |
|
97 | +if ( ! function_exists('get_user_locale')) { |
|
98 | 98 | /** |
99 | 99 | * Shim for get_user_locale that was added in WP 4.7.0 |
100 | 100 | * |
@@ -5,105 +5,105 @@ |
||
5 | 5 | * it does not override any existing definition of the function in WP. |
6 | 6 | */ |
7 | 7 | if (! function_exists('get_preview_post_link')) { |
8 | - /** |
|
9 | - * Function was added in WordPress 4.4.0 |
|
10 | - * |
|
11 | - * @param null $post |
|
12 | - * @param array $query_args |
|
13 | - * @param string $preview_link |
|
14 | - * @return mixed |
|
15 | - */ |
|
16 | - function get_preview_post_link($post = null, $query_args = array(), $preview_link = '') |
|
17 | - { |
|
18 | - $post = get_post($post); |
|
19 | - if (! $post) { |
|
20 | - return ''; |
|
21 | - } |
|
8 | + /** |
|
9 | + * Function was added in WordPress 4.4.0 |
|
10 | + * |
|
11 | + * @param null $post |
|
12 | + * @param array $query_args |
|
13 | + * @param string $preview_link |
|
14 | + * @return mixed |
|
15 | + */ |
|
16 | + function get_preview_post_link($post = null, $query_args = array(), $preview_link = '') |
|
17 | + { |
|
18 | + $post = get_post($post); |
|
19 | + if (! $post) { |
|
20 | + return ''; |
|
21 | + } |
|
22 | 22 | |
23 | - $post_type_object = get_post_type_object($post->post_type); |
|
24 | - if (is_post_type_viewable($post_type_object)) { |
|
25 | - if (! $preview_link) { |
|
26 | - $preview_link = set_url_scheme(get_permalink($post)); |
|
27 | - } |
|
23 | + $post_type_object = get_post_type_object($post->post_type); |
|
24 | + if (is_post_type_viewable($post_type_object)) { |
|
25 | + if (! $preview_link) { |
|
26 | + $preview_link = set_url_scheme(get_permalink($post)); |
|
27 | + } |
|
28 | 28 | |
29 | - $query_args['preview'] = 'true'; |
|
30 | - $preview_link = add_query_arg($query_args, $preview_link); |
|
31 | - } |
|
29 | + $query_args['preview'] = 'true'; |
|
30 | + $preview_link = add_query_arg($query_args, $preview_link); |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * Filters the URL used for a post preview. |
|
35 | - * |
|
36 | - * @since 2.0.5 |
|
37 | - * @since 4.0.0 Added the `$post` parameter. |
|
38 | - * @param string $preview_link URL used for the post preview. |
|
39 | - * @param WP_Post $post Post object. |
|
40 | - */ |
|
41 | - return apply_filters('preview_post_link', $preview_link, $post); |
|
42 | - } |
|
33 | + /** |
|
34 | + * Filters the URL used for a post preview. |
|
35 | + * |
|
36 | + * @since 2.0.5 |
|
37 | + * @since 4.0.0 Added the `$post` parameter. |
|
38 | + * @param string $preview_link URL used for the post preview. |
|
39 | + * @param WP_Post $post Post object. |
|
40 | + */ |
|
41 | + return apply_filters('preview_post_link', $preview_link, $post); |
|
42 | + } |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if (! function_exists('is_post_type_viewable')) { |
46 | - function is_post_type_viewable($post_type) |
|
47 | - { |
|
48 | - if (is_scalar($post_type)) { |
|
49 | - $post_type = get_post_type_object($post_type); |
|
50 | - if (! $post_type) { |
|
51 | - return false; |
|
52 | - } |
|
53 | - } |
|
46 | + function is_post_type_viewable($post_type) |
|
47 | + { |
|
48 | + if (is_scalar($post_type)) { |
|
49 | + $post_type = get_post_type_object($post_type); |
|
50 | + if (! $post_type) { |
|
51 | + return false; |
|
52 | + } |
|
53 | + } |
|
54 | 54 | |
55 | - return $post_type->publicly_queryable || ($post_type->_builtin && $post_type->public); |
|
56 | - } |
|
55 | + return $post_type->publicly_queryable || ($post_type->_builtin && $post_type->public); |
|
56 | + } |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | if (! function_exists('wp_scripts_get_suffix')) { |
60 | - /** |
|
61 | - * Returns the suffix that can be used for the scripts. |
|
62 | - * |
|
63 | - * There are two suffix types, the normal one and the dev suffix. |
|
64 | - * |
|
65 | - * @since 5.0.0 |
|
66 | - * |
|
67 | - * @param string $type The type of suffix to retrieve. |
|
68 | - * @return string The script suffix. |
|
69 | - */ |
|
70 | - function wp_scripts_get_suffix($type = '') |
|
71 | - { |
|
72 | - global $wp_version; |
|
73 | - static $suffixes; |
|
60 | + /** |
|
61 | + * Returns the suffix that can be used for the scripts. |
|
62 | + * |
|
63 | + * There are two suffix types, the normal one and the dev suffix. |
|
64 | + * |
|
65 | + * @since 5.0.0 |
|
66 | + * |
|
67 | + * @param string $type The type of suffix to retrieve. |
|
68 | + * @return string The script suffix. |
|
69 | + */ |
|
70 | + function wp_scripts_get_suffix($type = '') |
|
71 | + { |
|
72 | + global $wp_version; |
|
73 | + static $suffixes; |
|
74 | 74 | |
75 | - if ($suffixes === null) { |
|
76 | - include(ABSPATH . WPINC . '/version.php'); // include an unmodified $wp_version |
|
75 | + if ($suffixes === null) { |
|
76 | + include(ABSPATH . WPINC . '/version.php'); // include an unmodified $wp_version |
|
77 | 77 | |
78 | - $develop_src = false !== strpos($wp_version, '-src'); |
|
78 | + $develop_src = false !== strpos($wp_version, '-src'); |
|
79 | 79 | |
80 | - if (! defined('SCRIPT_DEBUG')) { |
|
81 | - define('SCRIPT_DEBUG', $develop_src); |
|
82 | - } |
|
83 | - $suffix = SCRIPT_DEBUG ? '' : '.min'; |
|
84 | - $dev_suffix = $develop_src ? '' : '.min'; |
|
80 | + if (! defined('SCRIPT_DEBUG')) { |
|
81 | + define('SCRIPT_DEBUG', $develop_src); |
|
82 | + } |
|
83 | + $suffix = SCRIPT_DEBUG ? '' : '.min'; |
|
84 | + $dev_suffix = $develop_src ? '' : '.min'; |
|
85 | 85 | |
86 | - $suffixes = array('suffix' => $suffix, 'dev_suffix' => $dev_suffix); |
|
87 | - } |
|
86 | + $suffixes = array('suffix' => $suffix, 'dev_suffix' => $dev_suffix); |
|
87 | + } |
|
88 | 88 | |
89 | - if ($type === 'dev') { |
|
90 | - return $suffixes['dev_suffix']; |
|
91 | - } |
|
89 | + if ($type === 'dev') { |
|
90 | + return $suffixes['dev_suffix']; |
|
91 | + } |
|
92 | 92 | |
93 | - return $suffixes['suffix']; |
|
94 | - } |
|
93 | + return $suffixes['suffix']; |
|
94 | + } |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if (! function_exists('get_user_locale')) { |
98 | - /** |
|
99 | - * Shim for get_user_locale that was added in WP 4.7.0 |
|
100 | - * |
|
101 | - * @param int $user_id |
|
102 | - * @return string |
|
103 | - * @since 4.9.73.p |
|
104 | - */ |
|
105 | - function get_user_locale($user_id = 0) |
|
106 | - { |
|
107 | - return get_locale(); |
|
108 | - } |
|
98 | + /** |
|
99 | + * Shim for get_user_locale that was added in WP 4.7.0 |
|
100 | + * |
|
101 | + * @param int $user_id |
|
102 | + * @return string |
|
103 | + * @since 4.9.73.p |
|
104 | + */ |
|
105 | + function get_user_locale($user_id = 0) |
|
106 | + { |
|
107 | + return get_locale(); |
|
108 | + } |
|
109 | 109 | } |
110 | 110 | \ No newline at end of file |
@@ -18,17 +18,17 @@ |
||
18 | 18 | */ |
19 | 19 | class RestPasswordRequiredException extends RestException |
20 | 20 | { |
21 | - public function __construct($previous = null) |
|
22 | - { |
|
23 | - parent::__construct( |
|
24 | - 'rest_post_password_required', |
|
25 | - esc_html__('A password is required to access this content.', 'event_espresso'), |
|
26 | - array( |
|
27 | - 'status' => 403, |
|
28 | - ), |
|
29 | - $previous |
|
30 | - ); |
|
31 | - } |
|
21 | + public function __construct($previous = null) |
|
22 | + { |
|
23 | + parent::__construct( |
|
24 | + 'rest_post_password_required', |
|
25 | + esc_html__('A password is required to access this content.', 'event_espresso'), |
|
26 | + array( |
|
27 | + 'status' => 403, |
|
28 | + ), |
|
29 | + $previous |
|
30 | + ); |
|
31 | + } |
|
32 | 32 | } |
33 | 33 | // End of file RestPasswordRequired.php |
34 | 34 | // Location: EventEspresso\core\exceptions/RestPasswordRequired.php |
@@ -18,27 +18,27 @@ |
||
18 | 18 | */ |
19 | 19 | class ModelConfigurationException extends DomainException |
20 | 20 | { |
21 | - /** |
|
22 | - * ModelConfigurationException constructor. |
|
23 | - * |
|
24 | - * @param EEM_Base $model |
|
25 | - * @param string $message Describe what's misconfigured about this model (don't bother mentioning which model, |
|
26 | - * that will be automatically added to the message based on the $model provided in the previous parameter). |
|
27 | - * @param int $code |
|
28 | - * @param Exception $previous |
|
29 | - */ |
|
30 | - public function __construct(EEM_Base $model, $message, $code = 0, Exception $previous = null) |
|
31 | - { |
|
32 | - $message_part_1 = sprintf( |
|
33 | - /* |
|
21 | + /** |
|
22 | + * ModelConfigurationException constructor. |
|
23 | + * |
|
24 | + * @param EEM_Base $model |
|
25 | + * @param string $message Describe what's misconfigured about this model (don't bother mentioning which model, |
|
26 | + * that will be automatically added to the message based on the $model provided in the previous parameter). |
|
27 | + * @param int $code |
|
28 | + * @param Exception $previous |
|
29 | + */ |
|
30 | + public function __construct(EEM_Base $model, $message, $code = 0, Exception $previous = null) |
|
31 | + { |
|
32 | + $message_part_1 = sprintf( |
|
33 | + /* |
|
34 | 34 | * translators: 1: the model name |
35 | 35 | */ |
36 | - esc_html__('The model "%1$s" appears to be misconfigured.', 'event_espresso'), |
|
37 | - $model->get_this_model_name() |
|
38 | - ); |
|
39 | - $message = $message_part_1 . ' ' . $message; |
|
40 | - parent::__construct($message, $code, $previous); |
|
41 | - } |
|
36 | + esc_html__('The model "%1$s" appears to be misconfigured.', 'event_espresso'), |
|
37 | + $model->get_this_model_name() |
|
38 | + ); |
|
39 | + $message = $message_part_1 . ' ' . $message; |
|
40 | + parent::__construct($message, $code, $previous); |
|
41 | + } |
|
42 | 42 | } |
43 | 43 | // End of file ModelConfigurationException.php |
44 | 44 | // Location: EventEspresso\core\exceptions/ModelConfigurationException.php |
@@ -36,7 +36,7 @@ |
||
36 | 36 | esc_html__('The model "%1$s" appears to be misconfigured.', 'event_espresso'), |
37 | 37 | $model->get_this_model_name() |
38 | 38 | ); |
39 | - $message = $message_part_1 . ' ' . $message; |
|
39 | + $message = $message_part_1.' '.$message; |
|
40 | 40 | parent::__construct($message, $code, $previous); |
41 | 41 | } |
42 | 42 | } |
@@ -16,17 +16,17 @@ |
||
16 | 16 | */ |
17 | 17 | class RestPasswordIncorrectException extends RestException |
18 | 18 | { |
19 | - public function __construct($previous = null) |
|
20 | - { |
|
21 | - parent::__construct( |
|
22 | - 'rest_post_incorrect_password', |
|
23 | - esc_html__('Incorrect password.', 'event_espresso'), |
|
24 | - array( |
|
25 | - 'status' => 403, |
|
26 | - ), |
|
27 | - $previous |
|
28 | - ); |
|
29 | - } |
|
19 | + public function __construct($previous = null) |
|
20 | + { |
|
21 | + parent::__construct( |
|
22 | + 'rest_post_incorrect_password', |
|
23 | + esc_html__('Incorrect password.', 'event_espresso'), |
|
24 | + array( |
|
25 | + 'status' => 403, |
|
26 | + ), |
|
27 | + $previous |
|
28 | + ); |
|
29 | + } |
|
30 | 30 | } |
31 | 31 | // End of file RestPasswordIncorrectException.php |
32 | 32 | // Location: EventEspresso\core\exceptions/RestPasswordIncorrectException.php |