@@ -18,61 +18,61 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class RestIncomingQueryParamContext |
| 20 | 20 | { |
| 21 | - /** |
|
| 22 | - * @var EEM_Base |
|
| 23 | - */ |
|
| 24 | - private $model; |
|
| 25 | - /** |
|
| 26 | - * @var string |
|
| 27 | - */ |
|
| 28 | - private $requested_version; |
|
| 29 | - /** |
|
| 30 | - * @var boolean |
|
| 31 | - */ |
|
| 32 | - private $writing; |
|
| 21 | + /** |
|
| 22 | + * @var EEM_Base |
|
| 23 | + */ |
|
| 24 | + private $model; |
|
| 25 | + /** |
|
| 26 | + * @var string |
|
| 27 | + */ |
|
| 28 | + private $requested_version; |
|
| 29 | + /** |
|
| 30 | + * @var boolean |
|
| 31 | + */ |
|
| 32 | + private $writing; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * RestIncomingQueryParamContext constructor. |
|
| 36 | - * @param EEM_Base $model |
|
| 37 | - * @param string $requested_version |
|
| 38 | - * @param boolean $writing |
|
| 39 | - */ |
|
| 40 | - public function __construct(EEM_Base $model, $requested_version, $writing) |
|
| 41 | - { |
|
| 42 | - $this->model = $model; |
|
| 43 | - $this->requested_version = (string) $requested_version; |
|
| 44 | - $this->writing = filter_var($writing, FILTER_VALIDATE_BOOLEAN); |
|
| 45 | - } |
|
| 34 | + /** |
|
| 35 | + * RestIncomingQueryParamContext constructor. |
|
| 36 | + * @param EEM_Base $model |
|
| 37 | + * @param string $requested_version |
|
| 38 | + * @param boolean $writing |
|
| 39 | + */ |
|
| 40 | + public function __construct(EEM_Base $model, $requested_version, $writing) |
|
| 41 | + { |
|
| 42 | + $this->model = $model; |
|
| 43 | + $this->requested_version = (string) $requested_version; |
|
| 44 | + $this->writing = filter_var($writing, FILTER_VALIDATE_BOOLEAN); |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * Gets the model currently being requested, eg class EEM_Event |
|
| 49 | - * @since 4.9.72.p |
|
| 50 | - * @return EEM_Base |
|
| 51 | - */ |
|
| 52 | - public function getModel() |
|
| 53 | - { |
|
| 54 | - return $this->model; |
|
| 55 | - } |
|
| 47 | + /** |
|
| 48 | + * Gets the model currently being requested, eg class EEM_Event |
|
| 49 | + * @since 4.9.72.p |
|
| 50 | + * @return EEM_Base |
|
| 51 | + */ |
|
| 52 | + public function getModel() |
|
| 53 | + { |
|
| 54 | + return $this->model; |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Gets the version being requested, eg 4.8.36 |
|
| 59 | - * @since 4.9.72.p |
|
| 60 | - * @return string |
|
| 61 | - */ |
|
| 62 | - public function getRequestedVersion() |
|
| 63 | - { |
|
| 64 | - return $this->requested_version; |
|
| 65 | - } |
|
| 57 | + /** |
|
| 58 | + * Gets the version being requested, eg 4.8.36 |
|
| 59 | + * @since 4.9.72.p |
|
| 60 | + * @return string |
|
| 61 | + */ |
|
| 62 | + public function getRequestedVersion() |
|
| 63 | + { |
|
| 64 | + return $this->requested_version; |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * Gets if the current request is for a writing request or just simple read |
|
| 69 | - * @since 4.9.72.p |
|
| 70 | - * @return bool |
|
| 71 | - */ |
|
| 72 | - public function isWriting() |
|
| 73 | - { |
|
| 74 | - return $this->writing; |
|
| 75 | - } |
|
| 67 | + /** |
|
| 68 | + * Gets if the current request is for a writing request or just simple read |
|
| 69 | + * @since 4.9.72.p |
|
| 70 | + * @return bool |
|
| 71 | + */ |
|
| 72 | + public function isWriting() |
|
| 73 | + { |
|
| 74 | + return $this->writing; |
|
| 75 | + } |
|
| 76 | 76 | } |
| 77 | 77 | // End of file RestIncomingQueryParamContext.php |
| 78 | 78 | // Location: EventEspresso\core\libraries\rest_api/RestIncomingQueryParamContext.php |
@@ -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 |
@@ -12,45 +12,45 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | class EE_Password_Field extends EE_Text_Field_Base |
| 14 | 14 | { |
| 15 | - /** |
|
| 16 | - * @var array |
|
| 17 | - */ |
|
| 18 | - protected $protected_fields; |
|
| 15 | + /** |
|
| 16 | + * @var array |
|
| 17 | + */ |
|
| 18 | + protected $protected_fields; |
|
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * EE_Password_Field constructor. |
|
| 22 | - * @param $table_column |
|
| 23 | - * @param $nicename |
|
| 24 | - * @param $nullable |
|
| 25 | - * @param null $default_value |
|
| 26 | - * @param array $protected_fields |
|
| 27 | - */ |
|
| 28 | - public function __construct($table_column, $nicename, $nullable, $default_value = null, $protected_fields = array()) |
|
| 29 | - { |
|
| 30 | - $this->protected_fields = $protected_fields; |
|
| 31 | - parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
| 32 | - } |
|
| 20 | + /** |
|
| 21 | + * EE_Password_Field constructor. |
|
| 22 | + * @param $table_column |
|
| 23 | + * @param $nicename |
|
| 24 | + * @param $nullable |
|
| 25 | + * @param null $default_value |
|
| 26 | + * @param array $protected_fields |
|
| 27 | + */ |
|
| 28 | + public function __construct($table_column, $nicename, $nullable, $default_value = null, $protected_fields = array()) |
|
| 29 | + { |
|
| 30 | + $this->protected_fields = $protected_fields; |
|
| 31 | + parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Returns the names of the fields on this model that this password field should protect |
|
| 36 | - * @since 4.9.74.p |
|
| 37 | - * @return array |
|
| 38 | - */ |
|
| 39 | - public function protectedFields() |
|
| 40 | - { |
|
| 41 | - return $this->protected_fields; |
|
| 42 | - } |
|
| 34 | + /** |
|
| 35 | + * Returns the names of the fields on this model that this password field should protect |
|
| 36 | + * @since 4.9.74.p |
|
| 37 | + * @return array |
|
| 38 | + */ |
|
| 39 | + public function protectedFields() |
|
| 40 | + { |
|
| 41 | + return $this->protected_fields; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Returns whether or not the specified field is protected by this model |
|
| 46 | - * @since 4.9.74.p |
|
| 47 | - * @param $field_name |
|
| 48 | - * @return bool |
|
| 49 | - */ |
|
| 50 | - public function fieldIsProtected($field_name) |
|
| 51 | - { |
|
| 52 | - return in_array($field_name, $this->protectedFields(), true); |
|
| 53 | - } |
|
| 44 | + /** |
|
| 45 | + * Returns whether or not the specified field is protected by this model |
|
| 46 | + * @since 4.9.74.p |
|
| 47 | + * @param $field_name |
|
| 48 | + * @return bool |
|
| 49 | + */ |
|
| 50 | + public function fieldIsProtected($field_name) |
|
| 51 | + { |
|
| 52 | + return in_array($field_name, $this->protectedFields(), true); |
|
| 53 | + } |
|
| 54 | 54 | } |
| 55 | 55 | // End of file EE_Password_Field.php |
| 56 | 56 | // Location: ${NAMESPACE}/EE_Password_Field.php |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | * check whether count of tickets is approaching the potential |
| 58 | 58 | * limits for the server. |
| 59 | 59 | */ |
| 60 | - if (! empty($data['input_count'])) { |
|
| 60 | + if ( ! empty($data['input_count'])) { |
|
| 61 | 61 | $response['max_input_vars_check'] = $this->environment->max_input_vars_limit_check( |
| 62 | 62 | $data['input_count'] |
| 63 | 63 | ); |
@@ -15,52 +15,52 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class EventEditorHeartbeat |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * @var Domain $domain |
|
| 20 | - */ |
|
| 21 | - protected $domain; |
|
| 18 | + /** |
|
| 19 | + * @var Domain $domain |
|
| 20 | + */ |
|
| 21 | + protected $domain; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * @var EE_Environment_Config $environment |
|
| 25 | - */ |
|
| 26 | - protected $environment; |
|
| 23 | + /** |
|
| 24 | + * @var EE_Environment_Config $environment |
|
| 25 | + */ |
|
| 26 | + protected $environment; |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * EventEditorHeartbeat constructor. |
|
| 31 | - * |
|
| 32 | - * @param Domain $domain |
|
| 33 | - * @param EE_Environment_Config $environment |
|
| 34 | - */ |
|
| 35 | - public function __construct(Domain $domain, EE_Environment_Config $environment) |
|
| 36 | - { |
|
| 37 | - $this->domain = $domain; |
|
| 38 | - $this->environment = $environment; |
|
| 39 | - if ($this->domain->isCaffeinated()) { |
|
| 40 | - add_filter('heartbeat_received', array($this, 'heartbeatResponse'), 10, 2); |
|
| 41 | - } |
|
| 42 | - } |
|
| 29 | + /** |
|
| 30 | + * EventEditorHeartbeat constructor. |
|
| 31 | + * |
|
| 32 | + * @param Domain $domain |
|
| 33 | + * @param EE_Environment_Config $environment |
|
| 34 | + */ |
|
| 35 | + public function __construct(Domain $domain, EE_Environment_Config $environment) |
|
| 36 | + { |
|
| 37 | + $this->domain = $domain; |
|
| 38 | + $this->environment = $environment; |
|
| 39 | + if ($this->domain->isCaffeinated()) { |
|
| 40 | + add_filter('heartbeat_received', array($this, 'heartbeatResponse'), 10, 2); |
|
| 41 | + } |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * This will be used to listen for any heartbeat data packages coming via the WordPress heartbeat API and handle |
|
| 47 | - * accordingly. |
|
| 48 | - * |
|
| 49 | - * @param array $response The existing heartbeat response array. |
|
| 50 | - * @param array $data The incoming data package. |
|
| 51 | - * @return array possibly appended response. |
|
| 52 | - */ |
|
| 53 | - public function heartbeatResponse($response, $data) |
|
| 54 | - { |
|
| 55 | - /** |
|
| 56 | - * check whether count of tickets is approaching the potential |
|
| 57 | - * limits for the server. |
|
| 58 | - */ |
|
| 59 | - if (! empty($data['input_count'])) { |
|
| 60 | - $response['max_input_vars_check'] = $this->environment->max_input_vars_limit_check( |
|
| 61 | - $data['input_count'] |
|
| 62 | - ); |
|
| 63 | - } |
|
| 64 | - return $response; |
|
| 65 | - } |
|
| 45 | + /** |
|
| 46 | + * This will be used to listen for any heartbeat data packages coming via the WordPress heartbeat API and handle |
|
| 47 | + * accordingly. |
|
| 48 | + * |
|
| 49 | + * @param array $response The existing heartbeat response array. |
|
| 50 | + * @param array $data The incoming data package. |
|
| 51 | + * @return array possibly appended response. |
|
| 52 | + */ |
|
| 53 | + public function heartbeatResponse($response, $data) |
|
| 54 | + { |
|
| 55 | + /** |
|
| 56 | + * check whether count of tickets is approaching the potential |
|
| 57 | + * limits for the server. |
|
| 58 | + */ |
|
| 59 | + if (! empty($data['input_count'])) { |
|
| 60 | + $response['max_input_vars_check'] = $this->environment->max_input_vars_limit_check( |
|
| 61 | + $data['input_count'] |
|
| 62 | + ); |
|
| 63 | + } |
|
| 64 | + return $response; |
|
| 65 | + } |
|
| 66 | 66 | } |
@@ -19,53 +19,53 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | class SettingsForm extends PayPalSettingsForm |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * SettingsForm constructor. |
|
| 24 | - * |
|
| 25 | - * @param array $options_array |
|
| 26 | - * @param string $help_tab_link |
|
| 27 | - * @throws InvalidDataTypeException |
|
| 28 | - * @throws InvalidInterfaceException |
|
| 29 | - * @throws InvalidArgumentException |
|
| 30 | - */ |
|
| 31 | - public function __construct(array $options_array = array(), $help_tab_link = '') |
|
| 32 | - { |
|
| 33 | - $options_array = array_replace_recursive( |
|
| 34 | - array( |
|
| 35 | - 'extra_meta_inputs' => array( |
|
| 36 | - 'request_shipping_addr' => new EE_Yes_No_Input( |
|
| 37 | - array( |
|
| 38 | - 'html_label_text' => sprintf( |
|
| 39 | - esc_html__('Request Shipping Address %s', 'event_espresso'), |
|
| 40 | - $help_tab_link |
|
| 41 | - ), |
|
| 42 | - 'html_help_text' => esc_html__( |
|
| 43 | - // @codingStandardsIgnoreStart |
|
| 44 | - 'If set to "Yes", then a shipping address will be requested on the PayPal checkout page.', |
|
| 45 | - // @codingStandardsIgnoreEnd |
|
| 46 | - 'event_espresso' |
|
| 47 | - ), |
|
| 48 | - 'required' => true, |
|
| 49 | - 'default' => false, |
|
| 50 | - ) |
|
| 51 | - ), |
|
| 52 | - 'image_url' => new EE_Admin_File_Uploader_Input( |
|
| 53 | - array( |
|
| 54 | - 'html_label_text' => sprintf( |
|
| 55 | - esc_html__('Image URL %s', 'event_espresso'), |
|
| 56 | - $help_tab_link |
|
| 57 | - ), |
|
| 58 | - 'html_help_text' => esc_html__( |
|
| 59 | - 'Used for your business/personal logo on the PayPal page', |
|
| 60 | - 'event_espresso' |
|
| 61 | - ), |
|
| 62 | - 'required' => false, |
|
| 63 | - ) |
|
| 64 | - ), |
|
| 65 | - ) |
|
| 66 | - ), |
|
| 67 | - $options_array |
|
| 68 | - ); |
|
| 69 | - parent::__construct($options_array, $help_tab_link); |
|
| 70 | - } |
|
| 22 | + /** |
|
| 23 | + * SettingsForm constructor. |
|
| 24 | + * |
|
| 25 | + * @param array $options_array |
|
| 26 | + * @param string $help_tab_link |
|
| 27 | + * @throws InvalidDataTypeException |
|
| 28 | + * @throws InvalidInterfaceException |
|
| 29 | + * @throws InvalidArgumentException |
|
| 30 | + */ |
|
| 31 | + public function __construct(array $options_array = array(), $help_tab_link = '') |
|
| 32 | + { |
|
| 33 | + $options_array = array_replace_recursive( |
|
| 34 | + array( |
|
| 35 | + 'extra_meta_inputs' => array( |
|
| 36 | + 'request_shipping_addr' => new EE_Yes_No_Input( |
|
| 37 | + array( |
|
| 38 | + 'html_label_text' => sprintf( |
|
| 39 | + esc_html__('Request Shipping Address %s', 'event_espresso'), |
|
| 40 | + $help_tab_link |
|
| 41 | + ), |
|
| 42 | + 'html_help_text' => esc_html__( |
|
| 43 | + // @codingStandardsIgnoreStart |
|
| 44 | + 'If set to "Yes", then a shipping address will be requested on the PayPal checkout page.', |
|
| 45 | + // @codingStandardsIgnoreEnd |
|
| 46 | + 'event_espresso' |
|
| 47 | + ), |
|
| 48 | + 'required' => true, |
|
| 49 | + 'default' => false, |
|
| 50 | + ) |
|
| 51 | + ), |
|
| 52 | + 'image_url' => new EE_Admin_File_Uploader_Input( |
|
| 53 | + array( |
|
| 54 | + 'html_label_text' => sprintf( |
|
| 55 | + esc_html__('Image URL %s', 'event_espresso'), |
|
| 56 | + $help_tab_link |
|
| 57 | + ), |
|
| 58 | + 'html_help_text' => esc_html__( |
|
| 59 | + 'Used for your business/personal logo on the PayPal page', |
|
| 60 | + 'event_espresso' |
|
| 61 | + ), |
|
| 62 | + 'required' => false, |
|
| 63 | + ) |
|
| 64 | + ), |
|
| 65 | + ) |
|
| 66 | + ), |
|
| 67 | + $options_array |
|
| 68 | + ); |
|
| 69 | + parent::__construct($options_array, $help_tab_link); |
|
| 70 | + } |
|
| 71 | 71 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <div class="padding"> |
| 2 | 2 | <p><?php |
| 3 | - printf( |
|
| 4 | - esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'), |
|
| 5 | - '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank" rel="noopener noreferrer">', |
|
| 6 | - '</a>' |
|
| 7 | - ); ?></p> |
|
| 3 | + printf( |
|
| 4 | + esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'), |
|
| 5 | + '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank" rel="noopener noreferrer">', |
|
| 6 | + '</a>' |
|
| 7 | + ); ?></p> |
|
| 8 | 8 | </div> |
| 9 | 9 | \ No newline at end of file |