@@ -13,27 +13,27 @@ |
||
13 | 13 | { |
14 | 14 | |
15 | 15 | |
16 | - /** |
|
17 | - * @deprecated |
|
18 | - * @param EE_Request $request |
|
19 | - * @param EE_Response $response |
|
20 | - * @return EE_Response |
|
21 | - */ |
|
22 | - public function handle_request(EE_Request $request, EE_Response $response) |
|
23 | - { |
|
24 | - EE_Error::doing_it_wrong( |
|
25 | - __METHOD__, |
|
26 | - sprintf( |
|
27 | - esc_html__( |
|
28 | - 'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
29 | - 'event_espresso' |
|
30 | - ), |
|
31 | - 'EventEspresso\core\services\request\middleware\DetectLogin', |
|
32 | - '\core\services\request', |
|
33 | - 'EventEspresso\core\services\request' |
|
34 | - ), |
|
35 | - '4.9.52' |
|
36 | - ); |
|
37 | - return $response; |
|
38 | - } |
|
16 | + /** |
|
17 | + * @deprecated |
|
18 | + * @param EE_Request $request |
|
19 | + * @param EE_Response $response |
|
20 | + * @return EE_Response |
|
21 | + */ |
|
22 | + public function handle_request(EE_Request $request, EE_Response $response) |
|
23 | + { |
|
24 | + EE_Error::doing_it_wrong( |
|
25 | + __METHOD__, |
|
26 | + sprintf( |
|
27 | + esc_html__( |
|
28 | + 'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
29 | + 'event_espresso' |
|
30 | + ), |
|
31 | + 'EventEspresso\core\services\request\middleware\DetectLogin', |
|
32 | + '\core\services\request', |
|
33 | + 'EventEspresso\core\services\request' |
|
34 | + ), |
|
35 | + '4.9.52' |
|
36 | + ); |
|
37 | + return $response; |
|
38 | + } |
|
39 | 39 | } |
@@ -17,75 +17,75 @@ |
||
17 | 17 | { |
18 | 18 | |
19 | 19 | |
20 | - /** |
|
21 | - * @deprecated |
|
22 | - * @param EE_Request $request |
|
23 | - * @param EE_Response $response |
|
24 | - * @return EE_Response |
|
25 | - */ |
|
26 | - public function handle_request(EE_Request $request, EE_Response $response) |
|
27 | - { |
|
28 | - EE_Error::doing_it_wrong( |
|
29 | - __METHOD__, |
|
30 | - sprintf( |
|
31 | - esc_html__( |
|
32 | - 'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
33 | - 'event_espresso' |
|
34 | - ), |
|
35 | - 'EventEspresso\core\services\request\middleware\RecommendedVersions', |
|
36 | - '\core\services\request', |
|
37 | - 'EventEspresso\core\services\request' |
|
38 | - ), |
|
39 | - '4.9.52' |
|
40 | - ); |
|
41 | - return $response; |
|
42 | - } |
|
20 | + /** |
|
21 | + * @deprecated |
|
22 | + * @param EE_Request $request |
|
23 | + * @param EE_Response $response |
|
24 | + * @return EE_Response |
|
25 | + */ |
|
26 | + public function handle_request(EE_Request $request, EE_Response $response) |
|
27 | + { |
|
28 | + EE_Error::doing_it_wrong( |
|
29 | + __METHOD__, |
|
30 | + sprintf( |
|
31 | + esc_html__( |
|
32 | + 'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
33 | + 'event_espresso' |
|
34 | + ), |
|
35 | + 'EventEspresso\core\services\request\middleware\RecommendedVersions', |
|
36 | + '\core\services\request', |
|
37 | + 'EventEspresso\core\services\request' |
|
38 | + ), |
|
39 | + '4.9.52' |
|
40 | + ); |
|
41 | + return $response; |
|
42 | + } |
|
43 | 43 | |
44 | 44 | |
45 | - /** |
|
46 | - * @deprecated |
|
47 | - * @param string $version_to_check |
|
48 | - * @param string $operator |
|
49 | - * @return bool |
|
50 | - */ |
|
51 | - public static function check_wp_version($version_to_check = EE_MIN_WP_VER_REQUIRED, $operator = '>=') |
|
52 | - { |
|
53 | - EE_Error::doing_it_wrong( |
|
54 | - __METHOD__, |
|
55 | - sprintf( |
|
56 | - esc_html__( |
|
57 | - 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
58 | - 'event_espresso' |
|
59 | - ), |
|
60 | - 'EventEspresso\core\services\request\middleware\RecommendedVersions::compareWordPressVersion()', |
|
61 | - '\core\services\request', |
|
62 | - 'EventEspresso\core\services\request' |
|
63 | - ), |
|
64 | - '4.9.52', |
|
65 | - '5.0.0' |
|
66 | - ); |
|
67 | - return RecommendedVersions::compareWordPressVersion($version_to_check, $operator); |
|
68 | - } |
|
45 | + /** |
|
46 | + * @deprecated |
|
47 | + * @param string $version_to_check |
|
48 | + * @param string $operator |
|
49 | + * @return bool |
|
50 | + */ |
|
51 | + public static function check_wp_version($version_to_check = EE_MIN_WP_VER_REQUIRED, $operator = '>=') |
|
52 | + { |
|
53 | + EE_Error::doing_it_wrong( |
|
54 | + __METHOD__, |
|
55 | + sprintf( |
|
56 | + esc_html__( |
|
57 | + 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
58 | + 'event_espresso' |
|
59 | + ), |
|
60 | + 'EventEspresso\core\services\request\middleware\RecommendedVersions::compareWordPressVersion()', |
|
61 | + '\core\services\request', |
|
62 | + 'EventEspresso\core\services\request' |
|
63 | + ), |
|
64 | + '4.9.52', |
|
65 | + '5.0.0' |
|
66 | + ); |
|
67 | + return RecommendedVersions::compareWordPressVersion($version_to_check, $operator); |
|
68 | + } |
|
69 | 69 | |
70 | 70 | |
71 | - /** |
|
72 | - * @deprecated |
|
73 | - * @return void |
|
74 | - */ |
|
75 | - public function minimum_wp_version_error() |
|
76 | - { |
|
77 | - EE_Error::doing_it_wrong( |
|
78 | - __METHOD__, |
|
79 | - sprintf( |
|
80 | - esc_html__( |
|
81 | - 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
82 | - 'event_espresso' |
|
83 | - ), |
|
84 | - 'EventEspresso\core\services\request\middleware\RecommendedVersions::minimumWpVersionError()', |
|
85 | - '\core\services\request', |
|
86 | - 'EventEspresso\core\services\request' |
|
87 | - ), |
|
88 | - '4.9.52' |
|
89 | - ); |
|
90 | - } |
|
71 | + /** |
|
72 | + * @deprecated |
|
73 | + * @return void |
|
74 | + */ |
|
75 | + public function minimum_wp_version_error() |
|
76 | + { |
|
77 | + EE_Error::doing_it_wrong( |
|
78 | + __METHOD__, |
|
79 | + sprintf( |
|
80 | + esc_html__( |
|
81 | + 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
82 | + 'event_espresso' |
|
83 | + ), |
|
84 | + 'EventEspresso\core\services\request\middleware\RecommendedVersions::minimumWpVersionError()', |
|
85 | + '\core\services\request', |
|
86 | + 'EventEspresso\core\services\request' |
|
87 | + ), |
|
88 | + '4.9.52' |
|
89 | + ); |
|
90 | + } |
|
91 | 91 | } |
@@ -20,27 +20,27 @@ |
||
20 | 20 | abstract class EE_Middleware implements EEI_Request_Decorator |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * @deprecated |
|
25 | - * @param EE_Request $request |
|
26 | - * @param EE_Response $response |
|
27 | - * @return EE_Response |
|
28 | - */ |
|
29 | - protected function process_request_stack(EE_Request $request, EE_Response $response) |
|
30 | - { |
|
31 | - EE_Error::doing_it_wrong( |
|
32 | - __METHOD__, |
|
33 | - sprintf( |
|
34 | - esc_html__( |
|
35 | - 'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
36 | - 'event_espresso' |
|
37 | - ), |
|
38 | - 'EventEspresso\core\services\request\middleware\Middleware', |
|
39 | - '\core\services\request', |
|
40 | - 'EventEspresso\core\services\request' |
|
41 | - ), |
|
42 | - '4.9.52' |
|
43 | - ); |
|
44 | - return $response; |
|
45 | - } |
|
23 | + /** |
|
24 | + * @deprecated |
|
25 | + * @param EE_Request $request |
|
26 | + * @param EE_Response $response |
|
27 | + * @return EE_Response |
|
28 | + */ |
|
29 | + protected function process_request_stack(EE_Request $request, EE_Response $response) |
|
30 | + { |
|
31 | + EE_Error::doing_it_wrong( |
|
32 | + __METHOD__, |
|
33 | + sprintf( |
|
34 | + esc_html__( |
|
35 | + 'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
36 | + 'event_espresso' |
|
37 | + ), |
|
38 | + 'EventEspresso\core\services\request\middleware\Middleware', |
|
39 | + '\core\services\request', |
|
40 | + 'EventEspresso\core\services\request' |
|
41 | + ), |
|
42 | + '4.9.52' |
|
43 | + ); |
|
44 | + return $response; |
|
45 | + } |
|
46 | 46 | } |
@@ -14,87 +14,87 @@ |
||
14 | 14 | { |
15 | 15 | |
16 | 16 | |
17 | - /** |
|
18 | - * @deprecated 4.9.53 |
|
19 | - * @param EE_Request $request |
|
20 | - * @param EE_Response $response |
|
21 | - * @return EE_Response |
|
22 | - */ |
|
23 | - public function handle_request(EE_Request $request, EE_Response $response) |
|
24 | - { |
|
25 | - $this->_request = $request; |
|
26 | - $this->_response = $response; |
|
27 | - $this->display_alpha_banner_warning(); |
|
28 | - $this->_response = $this->process_request_stack($this->_request, $this->_response); |
|
29 | - return $this->_response; |
|
30 | - } |
|
17 | + /** |
|
18 | + * @deprecated 4.9.53 |
|
19 | + * @param EE_Request $request |
|
20 | + * @param EE_Response $response |
|
21 | + * @return EE_Response |
|
22 | + */ |
|
23 | + public function handle_request(EE_Request $request, EE_Response $response) |
|
24 | + { |
|
25 | + $this->_request = $request; |
|
26 | + $this->_response = $response; |
|
27 | + $this->display_alpha_banner_warning(); |
|
28 | + $this->_response = $this->process_request_stack($this->_request, $this->_response); |
|
29 | + return $this->_response; |
|
30 | + } |
|
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * @deprecated |
|
35 | - * @return string |
|
36 | - */ |
|
37 | - public function display_alpha_banner_warning() |
|
38 | - { |
|
39 | - EE_Error::doing_it_wrong( |
|
40 | - __METHOD__, |
|
41 | - sprintf( |
|
42 | - esc_html__( |
|
43 | - 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
44 | - 'event_espresso' |
|
45 | - ), |
|
46 | - 'EventEspresso\core\services\request\middleware\PreProductionVersionWarning::displayPreProductionVersionWarning()', |
|
47 | - '\core\services\request', |
|
48 | - 'EventEspresso\core\services\request' |
|
49 | - ), |
|
50 | - '4.9.52', |
|
51 | - '4.10.0' |
|
52 | - ); |
|
53 | - } |
|
33 | + /** |
|
34 | + * @deprecated |
|
35 | + * @return string |
|
36 | + */ |
|
37 | + public function display_alpha_banner_warning() |
|
38 | + { |
|
39 | + EE_Error::doing_it_wrong( |
|
40 | + __METHOD__, |
|
41 | + sprintf( |
|
42 | + esc_html__( |
|
43 | + 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
44 | + 'event_espresso' |
|
45 | + ), |
|
46 | + 'EventEspresso\core\services\request\middleware\PreProductionVersionWarning::displayPreProductionVersionWarning()', |
|
47 | + '\core\services\request', |
|
48 | + 'EventEspresso\core\services\request' |
|
49 | + ), |
|
50 | + '4.9.52', |
|
51 | + '4.10.0' |
|
52 | + ); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - /** |
|
57 | - * @deprecated |
|
58 | - * @return void |
|
59 | - */ |
|
60 | - public function alpha_banner_admin_notice() |
|
61 | - { |
|
62 | - EE_Error::doing_it_wrong( |
|
63 | - __METHOD__, |
|
64 | - sprintf( |
|
65 | - esc_html__( |
|
66 | - 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
67 | - 'event_espresso' |
|
68 | - ), |
|
69 | - 'EventEspresso\core\services\request\middleware\PreProductionVersionWarning::preProductionVersionAdminNotice()', |
|
70 | - '\core\services\request', |
|
71 | - 'EventEspresso\core\services\request' |
|
72 | - ), |
|
73 | - '4.9.52', |
|
74 | - '4.10.0' |
|
75 | - ); |
|
76 | - } |
|
56 | + /** |
|
57 | + * @deprecated |
|
58 | + * @return void |
|
59 | + */ |
|
60 | + public function alpha_banner_admin_notice() |
|
61 | + { |
|
62 | + EE_Error::doing_it_wrong( |
|
63 | + __METHOD__, |
|
64 | + sprintf( |
|
65 | + esc_html__( |
|
66 | + 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
67 | + 'event_espresso' |
|
68 | + ), |
|
69 | + 'EventEspresso\core\services\request\middleware\PreProductionVersionWarning::preProductionVersionAdminNotice()', |
|
70 | + '\core\services\request', |
|
71 | + 'EventEspresso\core\services\request' |
|
72 | + ), |
|
73 | + '4.9.52', |
|
74 | + '4.10.0' |
|
75 | + ); |
|
76 | + } |
|
77 | 77 | |
78 | 78 | |
79 | - /** |
|
80 | - * @deprecated |
|
81 | - * @return void |
|
82 | - */ |
|
83 | - public function alpha_banner_warning_notice() |
|
84 | - { |
|
85 | - EE_Error::doing_it_wrong( |
|
86 | - __METHOD__, |
|
87 | - sprintf( |
|
88 | - esc_html__( |
|
89 | - 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
90 | - 'event_espresso' |
|
91 | - ), |
|
92 | - 'EventEspresso\core\services\request\middleware\PreProductionVersionWarning::preProductionVersionWarningNotice()', |
|
93 | - '\core\services\request', |
|
94 | - 'EventEspresso\core\services\request' |
|
95 | - ), |
|
96 | - '4.9.52', |
|
97 | - '4.10.0' |
|
98 | - ); |
|
99 | - } |
|
79 | + /** |
|
80 | + * @deprecated |
|
81 | + * @return void |
|
82 | + */ |
|
83 | + public function alpha_banner_warning_notice() |
|
84 | + { |
|
85 | + EE_Error::doing_it_wrong( |
|
86 | + __METHOD__, |
|
87 | + sprintf( |
|
88 | + esc_html__( |
|
89 | + 'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace', |
|
90 | + 'event_espresso' |
|
91 | + ), |
|
92 | + 'EventEspresso\core\services\request\middleware\PreProductionVersionWarning::preProductionVersionWarningNotice()', |
|
93 | + '\core\services\request', |
|
94 | + 'EventEspresso\core\services\request' |
|
95 | + ), |
|
96 | + '4.9.52', |
|
97 | + '4.10.0' |
|
98 | + ); |
|
99 | + } |
|
100 | 100 | } |
@@ -14,78 +14,78 @@ |
||
14 | 14 | { |
15 | 15 | |
16 | 16 | |
17 | - /** |
|
18 | - * load_espresso_addons |
|
19 | - * runs during the WP 'plugins_loaded' action at priority 1 |
|
20 | - * and is the initial loading phase for EE addons |
|
21 | - * no other logic should be performed at this point |
|
22 | - */ |
|
23 | - public static function load_espresso_addons() |
|
24 | - { |
|
25 | - do_action('AHEE__EE_Bootstrap__load_espresso_addons'); |
|
26 | - } |
|
17 | + /** |
|
18 | + * load_espresso_addons |
|
19 | + * runs during the WP 'plugins_loaded' action at priority 1 |
|
20 | + * and is the initial loading phase for EE addons |
|
21 | + * no other logic should be performed at this point |
|
22 | + */ |
|
23 | + public static function load_espresso_addons() |
|
24 | + { |
|
25 | + do_action('AHEE__EE_Bootstrap__load_espresso_addons'); |
|
26 | + } |
|
27 | 27 | |
28 | 28 | |
29 | - /** |
|
30 | - * detect_activations_or_upgrades |
|
31 | - * runs during the WP 'plugins_loaded' action at priority 3 |
|
32 | - * Now that all of the addons have been loaded, |
|
33 | - * we can determine if anything needs activating or upgrading |
|
34 | - */ |
|
35 | - public static function detect_activations_or_upgrades() |
|
36 | - { |
|
37 | - do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades'); |
|
38 | - } |
|
29 | + /** |
|
30 | + * detect_activations_or_upgrades |
|
31 | + * runs during the WP 'plugins_loaded' action at priority 3 |
|
32 | + * Now that all of the addons have been loaded, |
|
33 | + * we can determine if anything needs activating or upgrading |
|
34 | + */ |
|
35 | + public static function detect_activations_or_upgrades() |
|
36 | + { |
|
37 | + do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades'); |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | - /** |
|
42 | - * load_core_configuration |
|
43 | - * runs during the WP 'plugins_loaded' action at priority 5 |
|
44 | - * Now that the database is assumed to be at the correct version |
|
45 | - * we can load and set all of the system configurations |
|
46 | - */ |
|
47 | - public static function load_core_configuration() |
|
48 | - { |
|
49 | - do_action('AHEE__EE_Bootstrap__load_core_configuration'); |
|
50 | - } |
|
41 | + /** |
|
42 | + * load_core_configuration |
|
43 | + * runs during the WP 'plugins_loaded' action at priority 5 |
|
44 | + * Now that the database is assumed to be at the correct version |
|
45 | + * we can load and set all of the system configurations |
|
46 | + */ |
|
47 | + public static function load_core_configuration() |
|
48 | + { |
|
49 | + do_action('AHEE__EE_Bootstrap__load_core_configuration'); |
|
50 | + } |
|
51 | 51 | |
52 | 52 | |
53 | - /** |
|
54 | - * register_shortcodes_modules_and_widgets |
|
55 | - * runs during the WP 'plugins_loaded' action at priority 7 |
|
56 | - * and handles registering all o four shortcodes, modules and widgets |
|
57 | - * so that they are ready to be used throughout the system |
|
58 | - */ |
|
59 | - public static function register_shortcodes_modules_and_widgets() |
|
60 | - { |
|
61 | - do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets'); |
|
62 | - } |
|
53 | + /** |
|
54 | + * register_shortcodes_modules_and_widgets |
|
55 | + * runs during the WP 'plugins_loaded' action at priority 7 |
|
56 | + * and handles registering all o four shortcodes, modules and widgets |
|
57 | + * so that they are ready to be used throughout the system |
|
58 | + */ |
|
59 | + public static function register_shortcodes_modules_and_widgets() |
|
60 | + { |
|
61 | + do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets'); |
|
62 | + } |
|
63 | 63 | |
64 | 64 | |
65 | - /** |
|
66 | - * brew_espresso |
|
67 | - * runs during the WP 'plugins_loaded' action at priority 9 |
|
68 | - * bootstrapping is considered complete at this point, |
|
69 | - * so let the fun begin... |
|
70 | - */ |
|
71 | - public static function brew_espresso() |
|
72 | - { |
|
73 | - do_action('AHEE__EE_Bootstrap__brew_espresso'); |
|
74 | - } |
|
65 | + /** |
|
66 | + * brew_espresso |
|
67 | + * runs during the WP 'plugins_loaded' action at priority 9 |
|
68 | + * bootstrapping is considered complete at this point, |
|
69 | + * so let the fun begin... |
|
70 | + */ |
|
71 | + public static function brew_espresso() |
|
72 | + { |
|
73 | + do_action('AHEE__EE_Bootstrap__brew_espresso'); |
|
74 | + } |
|
75 | 75 | |
76 | 76 | |
77 | - /** |
|
78 | - * @deprecated 4.9.53 |
|
79 | - */ |
|
80 | - public function run_request_stack() |
|
81 | - { |
|
82 | - } |
|
77 | + /** |
|
78 | + * @deprecated 4.9.53 |
|
79 | + */ |
|
80 | + public function run_request_stack() |
|
81 | + { |
|
82 | + } |
|
83 | 83 | |
84 | 84 | |
85 | - /** |
|
86 | - * @deprecated 4.9.53 |
|
87 | - */ |
|
88 | - public function build_request_stack() |
|
89 | - { |
|
90 | - } |
|
85 | + /** |
|
86 | + * @deprecated 4.9.53 |
|
87 | + */ |
|
88 | + public function build_request_stack() |
|
89 | + { |
|
90 | + } |
|
91 | 91 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | return htmlspecialchars($string); |
47 | 47 | } else { |
48 | 48 | if ($translate === false) { |
49 | - return self::ee_tep_parse_input_field_data($string, array( '"' => '"' )); |
|
49 | + return self::ee_tep_parse_input_field_data($string, array('"' => '"')); |
|
50 | 50 | } else { |
51 | 51 | return self::ee_tep_parse_input_field_data($string, $translate); |
52 | 52 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return false; |
85 | 85 | } |
86 | 86 | } else { |
87 | - if (( $value !== '' ) && ( strtolower($value) !== 'null' ) && ( strlen(trim($value)) > 0 )) { |
|
87 | + if (($value !== '') && (strtolower($value) !== 'null') && (strlen(trim($value)) > 0)) { |
|
88 | 88 | return true; |
89 | 89 | } else { |
90 | 90 | return false; |
@@ -12,108 +12,108 @@ |
||
12 | 12 | { |
13 | 13 | |
14 | 14 | |
15 | - /** |
|
16 | - * _admin_format_content |
|
17 | - * Text formatting function for wp_editor. |
|
18 | - * This should fix all of the formatting issues of text output from the database. |
|
19 | - * |
|
20 | - * @static |
|
21 | - * @access public |
|
22 | - * @param string $content content to format |
|
23 | - * @return string formatted content |
|
24 | - */ |
|
25 | - public static function admin_format_content($content = '') |
|
26 | - { |
|
27 | - return wpautop(stripslashes_deep(html_entity_decode($content, ENT_QUOTES, "UTF-8"))); |
|
28 | - } |
|
15 | + /** |
|
16 | + * _admin_format_content |
|
17 | + * Text formatting function for wp_editor. |
|
18 | + * This should fix all of the formatting issues of text output from the database. |
|
19 | + * |
|
20 | + * @static |
|
21 | + * @access public |
|
22 | + * @param string $content content to format |
|
23 | + * @return string formatted content |
|
24 | + */ |
|
25 | + public static function admin_format_content($content = '') |
|
26 | + { |
|
27 | + return wpautop(stripslashes_deep(html_entity_decode($content, ENT_QUOTES, "UTF-8"))); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * ee_tep_output_string |
|
34 | - * todo: we need a description for this. |
|
35 | - * |
|
36 | - * @static |
|
37 | - * @access public |
|
38 | - * @param string $string string to handle |
|
39 | - * @param boolean $translate //todo what is this for? |
|
40 | - * @param boolean $protected true then we run htmlspecialchars and return |
|
41 | - * @return string |
|
42 | - */ |
|
43 | - public static function ee_tep_output_string($string, $translate = false, $protected = false) |
|
44 | - { |
|
45 | - if ($protected === true) { |
|
46 | - return htmlspecialchars($string); |
|
47 | - } else { |
|
48 | - if ($translate === false) { |
|
49 | - return self::ee_tep_parse_input_field_data($string, array( '"' => '"' )); |
|
50 | - } else { |
|
51 | - return self::ee_tep_parse_input_field_data($string, $translate); |
|
52 | - } |
|
53 | - } |
|
54 | - } |
|
32 | + /** |
|
33 | + * ee_tep_output_string |
|
34 | + * todo: we need a description for this. |
|
35 | + * |
|
36 | + * @static |
|
37 | + * @access public |
|
38 | + * @param string $string string to handle |
|
39 | + * @param boolean $translate //todo what is this for? |
|
40 | + * @param boolean $protected true then we run htmlspecialchars and return |
|
41 | + * @return string |
|
42 | + */ |
|
43 | + public static function ee_tep_output_string($string, $translate = false, $protected = false) |
|
44 | + { |
|
45 | + if ($protected === true) { |
|
46 | + return htmlspecialchars($string); |
|
47 | + } else { |
|
48 | + if ($translate === false) { |
|
49 | + return self::ee_tep_parse_input_field_data($string, array( '"' => '"' )); |
|
50 | + } else { |
|
51 | + return self::ee_tep_parse_input_field_data($string, $translate); |
|
52 | + } |
|
53 | + } |
|
54 | + } |
|
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | - /** |
|
59 | - * ee_tep_parse_input_field_data |
|
60 | - * |
|
61 | - * @param string $data string to be "translated" |
|
62 | - * @param array ] $parse array in the form array( 'from' => 'to', ... ) |
|
63 | - * @return string |
|
64 | - */ |
|
65 | - public static function ee_tep_parse_input_field_data($data, $parse) |
|
66 | - { |
|
67 | - return strtr(trim($data), $parse); |
|
68 | - } |
|
58 | + /** |
|
59 | + * ee_tep_parse_input_field_data |
|
60 | + * |
|
61 | + * @param string $data string to be "translated" |
|
62 | + * @param array ] $parse array in the form array( 'from' => 'to', ... ) |
|
63 | + * @return string |
|
64 | + */ |
|
65 | + public static function ee_tep_parse_input_field_data($data, $parse) |
|
66 | + { |
|
67 | + return strtr(trim($data), $parse); |
|
68 | + } |
|
69 | 69 | |
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * [ee_tep_not_null description] |
|
74 | - * |
|
75 | - * @param string | array $value [description] |
|
76 | - * @return bool [description] |
|
77 | - */ |
|
78 | - public static function ee_tep_not_null($value) |
|
79 | - { |
|
80 | - if (is_array($value)) { |
|
81 | - if (count($value) > 0) { |
|
82 | - return true; |
|
83 | - } else { |
|
84 | - return false; |
|
85 | - } |
|
86 | - } else { |
|
87 | - if (( $value !== '' ) && ( strtolower($value) !== 'null' ) && ( strlen(trim($value)) > 0 )) { |
|
88 | - return true; |
|
89 | - } else { |
|
90 | - return false; |
|
91 | - } |
|
92 | - } |
|
93 | - } |
|
72 | + /** |
|
73 | + * [ee_tep_not_null description] |
|
74 | + * |
|
75 | + * @param string | array $value [description] |
|
76 | + * @return bool [description] |
|
77 | + */ |
|
78 | + public static function ee_tep_not_null($value) |
|
79 | + { |
|
80 | + if (is_array($value)) { |
|
81 | + if (count($value) > 0) { |
|
82 | + return true; |
|
83 | + } else { |
|
84 | + return false; |
|
85 | + } |
|
86 | + } else { |
|
87 | + if (( $value !== '' ) && ( strtolower($value) !== 'null' ) && ( strlen(trim($value)) > 0 )) { |
|
88 | + return true; |
|
89 | + } else { |
|
90 | + return false; |
|
91 | + } |
|
92 | + } |
|
93 | + } |
|
94 | 94 | |
95 | 95 | |
96 | 96 | |
97 | - /** |
|
98 | - * Formats a date |
|
99 | - * |
|
100 | - * @param string $date |
|
101 | - * @param string $format - format for the date |
|
102 | - * @deprecated 4.6.12 Note, a search revealed this was not used anywhere in core or in our |
|
103 | - * addons at time of writing this. So just deprecated in case of third party use. |
|
104 | - * @return string |
|
105 | - * @deprecated v4.6.21 |
|
106 | - */ |
|
107 | - public static function event_date_display($date, $format = '') |
|
108 | - { |
|
109 | - EE_Error::doing_it_wrong( |
|
110 | - __METHOD__, |
|
111 | - esc_html__( |
|
112 | - 'This method is deprecated as of EE 4.6.12. Currently it does not reformat as with prior behaviour but just returns the incoming string. Please use the EE_Datetime helpers for Datetime on the event to display as desired.', |
|
113 | - 'event_espresso' |
|
114 | - ), |
|
115 | - '4.6.21' |
|
116 | - ); |
|
117 | - return $date; |
|
118 | - } |
|
97 | + /** |
|
98 | + * Formats a date |
|
99 | + * |
|
100 | + * @param string $date |
|
101 | + * @param string $format - format for the date |
|
102 | + * @deprecated 4.6.12 Note, a search revealed this was not used anywhere in core or in our |
|
103 | + * addons at time of writing this. So just deprecated in case of third party use. |
|
104 | + * @return string |
|
105 | + * @deprecated v4.6.21 |
|
106 | + */ |
|
107 | + public static function event_date_display($date, $format = '') |
|
108 | + { |
|
109 | + EE_Error::doing_it_wrong( |
|
110 | + __METHOD__, |
|
111 | + esc_html__( |
|
112 | + 'This method is deprecated as of EE 4.6.12. Currently it does not reformat as with prior behaviour but just returns the incoming string. Please use the EE_Datetime helpers for Datetime on the event to display as desired.', |
|
113 | + 'event_espresso' |
|
114 | + ), |
|
115 | + '4.6.21' |
|
116 | + ); |
|
117 | + return $date; |
|
118 | + } |
|
119 | 119 | } |
@@ -11,42 +11,42 @@ |
||
11 | 11 | class EEH_Base |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * @var array $uri_segment_array URL segments |
|
16 | - * @access private |
|
17 | - */ |
|
14 | + /** |
|
15 | + * @var array $uri_segment_array URL segments |
|
16 | + * @access private |
|
17 | + */ |
|
18 | 18 | // final private function __construct() {} |
19 | 19 | |
20 | - /** |
|
21 | - * @ override magic methods |
|
22 | - * @ return void |
|
23 | - */ |
|
24 | - public function __set($a, $b) |
|
25 | - { |
|
26 | - return false; |
|
27 | - } |
|
28 | - public function __get($a) |
|
29 | - { |
|
30 | - return false; |
|
31 | - } |
|
32 | - public function __isset($a) |
|
33 | - { |
|
34 | - return false; |
|
35 | - } |
|
36 | - public function __unset($a) |
|
37 | - { |
|
38 | - return false; |
|
39 | - } |
|
40 | - public function __clone() |
|
41 | - { |
|
42 | - return false; |
|
43 | - } |
|
44 | - public function __wakeup() |
|
45 | - { |
|
46 | - return false; |
|
47 | - } |
|
48 | - public function __destruct() |
|
49 | - { |
|
50 | - return false; |
|
51 | - } |
|
20 | + /** |
|
21 | + * @ override magic methods |
|
22 | + * @ return void |
|
23 | + */ |
|
24 | + public function __set($a, $b) |
|
25 | + { |
|
26 | + return false; |
|
27 | + } |
|
28 | + public function __get($a) |
|
29 | + { |
|
30 | + return false; |
|
31 | + } |
|
32 | + public function __isset($a) |
|
33 | + { |
|
34 | + return false; |
|
35 | + } |
|
36 | + public function __unset($a) |
|
37 | + { |
|
38 | + return false; |
|
39 | + } |
|
40 | + public function __clone() |
|
41 | + { |
|
42 | + return false; |
|
43 | + } |
|
44 | + public function __wakeup() |
|
45 | + { |
|
46 | + return false; |
|
47 | + } |
|
48 | + public function __destruct() |
|
49 | + { |
|
50 | + return false; |
|
51 | + } |
|
52 | 52 | } |
@@ -13,70 +13,70 @@ |
||
13 | 13 | { |
14 | 14 | |
15 | 15 | |
16 | - /** |
|
17 | - * $CPT - the current page, if it utilizes CPTs |
|
18 | - * |
|
19 | - * @var object |
|
20 | - * @access protected |
|
21 | - */ |
|
22 | - protected $CPT = null; |
|
16 | + /** |
|
17 | + * $CPT - the current page, if it utilizes CPTs |
|
18 | + * |
|
19 | + * @var object |
|
20 | + * @access protected |
|
21 | + */ |
|
22 | + protected $CPT = null; |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * class constructor |
|
27 | - * |
|
28 | - * @access private |
|
29 | - * @param array $arguments |
|
30 | - * @return \EE_CPT_Default_Strategy |
|
31 | - */ |
|
32 | - public function __construct($arguments = array()) |
|
33 | - { |
|
34 | - $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null; |
|
35 | - } |
|
25 | + /** |
|
26 | + * class constructor |
|
27 | + * |
|
28 | + * @access private |
|
29 | + * @param array $arguments |
|
30 | + * @return \EE_CPT_Default_Strategy |
|
31 | + */ |
|
32 | + public function __construct($arguments = array()) |
|
33 | + { |
|
34 | + $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null; |
|
35 | + } |
|
36 | 36 | |
37 | 37 | |
38 | - /** |
|
39 | - * pre_get_posts |
|
40 | - * |
|
41 | - * @access public |
|
42 | - * @param \WP_Query $WP_Query |
|
43 | - * @return \WP_Query |
|
44 | - */ |
|
45 | - public function pre_get_posts(WP_Query $WP_Query) |
|
46 | - { |
|
47 | - if (! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) { |
|
48 | - return $WP_Query; |
|
49 | - } |
|
50 | - return $WP_Query; |
|
51 | - } |
|
38 | + /** |
|
39 | + * pre_get_posts |
|
40 | + * |
|
41 | + * @access public |
|
42 | + * @param \WP_Query $WP_Query |
|
43 | + * @return \WP_Query |
|
44 | + */ |
|
45 | + public function pre_get_posts(WP_Query $WP_Query) |
|
46 | + { |
|
47 | + if (! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) { |
|
48 | + return $WP_Query; |
|
49 | + } |
|
50 | + return $WP_Query; |
|
51 | + } |
|
52 | 52 | |
53 | 53 | |
54 | - /** |
|
55 | - * wp |
|
56 | - * |
|
57 | - * @access public |
|
58 | - * @param \WP_Post[] $posts |
|
59 | - * @param \WP_Query $WP_Query |
|
60 | - * @return \WP_Post[] |
|
61 | - */ |
|
62 | - public function the_posts($posts, WP_Query $WP_Query) |
|
63 | - { |
|
64 | - return $posts; |
|
65 | - } |
|
54 | + /** |
|
55 | + * wp |
|
56 | + * |
|
57 | + * @access public |
|
58 | + * @param \WP_Post[] $posts |
|
59 | + * @param \WP_Query $WP_Query |
|
60 | + * @return \WP_Post[] |
|
61 | + */ |
|
62 | + public function the_posts($posts, WP_Query $WP_Query) |
|
63 | + { |
|
64 | + return $posts; |
|
65 | + } |
|
66 | 66 | |
67 | 67 | |
68 | - /** |
|
69 | - * get_EE_post_type_metadata |
|
70 | - * |
|
71 | - * @access public |
|
72 | - * @param mixed $meta_value |
|
73 | - * @param int $post_id |
|
74 | - * @param string $meta_key |
|
75 | - * @param string $single |
|
76 | - * @return mixed |
|
77 | - */ |
|
78 | - public function get_EE_post_type_metadata($meta_value = null, $post_id, $meta_key, $single) |
|
79 | - { |
|
80 | - return $meta_value; |
|
81 | - } |
|
68 | + /** |
|
69 | + * get_EE_post_type_metadata |
|
70 | + * |
|
71 | + * @access public |
|
72 | + * @param mixed $meta_value |
|
73 | + * @param int $post_id |
|
74 | + * @param string $meta_key |
|
75 | + * @param string $single |
|
76 | + * @return mixed |
|
77 | + */ |
|
78 | + public function get_EE_post_type_metadata($meta_value = null, $post_id, $meta_key, $single) |
|
79 | + { |
|
80 | + return $meta_value; |
|
81 | + } |
|
82 | 82 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | */ |
45 | 45 | public function pre_get_posts(WP_Query $WP_Query) |
46 | 46 | { |
47 | - if (! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) { |
|
47 | + if ( ! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) { |
|
48 | 48 | return $WP_Query; |
49 | 49 | } |
50 | 50 | return $WP_Query; |
@@ -24,39 +24,39 @@ |
||
24 | 24 | class EE_CPT_Attendee_Strategy |
25 | 25 | { |
26 | 26 | |
27 | - /** |
|
28 | - * $CPT - the current page, if it utilizes CPTs |
|
29 | - * |
|
30 | - * @var array |
|
31 | - * @access protected |
|
32 | - */ |
|
33 | - protected $CPT = null; |
|
27 | + /** |
|
28 | + * $CPT - the current page, if it utilizes CPTs |
|
29 | + * |
|
30 | + * @var array |
|
31 | + * @access protected |
|
32 | + */ |
|
33 | + protected $CPT = null; |
|
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * class constructor |
|
38 | - * |
|
39 | - * @access public |
|
40 | - * @param array $arguments |
|
41 | - * @return \EE_CPT_Attendee_Strategy |
|
42 | - */ |
|
43 | - public function __construct($arguments = array()) |
|
44 | - { |
|
45 | - $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null; |
|
46 | - $WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : null; |
|
47 | - } |
|
36 | + /** |
|
37 | + * class constructor |
|
38 | + * |
|
39 | + * @access public |
|
40 | + * @param array $arguments |
|
41 | + * @return \EE_CPT_Attendee_Strategy |
|
42 | + */ |
|
43 | + public function __construct($arguments = array()) |
|
44 | + { |
|
45 | + $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null; |
|
46 | + $WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : null; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * the_posts |
|
52 | - * |
|
53 | - * @access public |
|
54 | - * @param $posts |
|
55 | - * @param WP_Query $wp_query |
|
56 | - * @return void |
|
57 | - */ |
|
58 | - public function the_posts($posts, WP_Query $wp_query) |
|
59 | - { |
|
60 | - return $posts; |
|
61 | - } |
|
50 | + /** |
|
51 | + * the_posts |
|
52 | + * |
|
53 | + * @access public |
|
54 | + * @param $posts |
|
55 | + * @param WP_Query $wp_query |
|
56 | + * @return void |
|
57 | + */ |
|
58 | + public function the_posts($posts, WP_Query $wp_query) |
|
59 | + { |
|
60 | + return $posts; |
|
61 | + } |
|
62 | 62 | } |