@@ -15,23 +15,23 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class WordPressPostsEditorEdit extends RouteMatchSpecification |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * returns true if current request matches specification |
|
| 20 | - * |
|
| 21 | - * @since 4.9.71.p |
|
| 22 | - * @return boolean |
|
| 23 | - */ |
|
| 24 | - public function isMatchingRoute() |
|
| 25 | - { |
|
| 26 | - global $post; |
|
| 27 | - return strpos($this->request->requestUri(), 'wp-admin/post.php') !== false |
|
| 28 | - && ( |
|
| 29 | - $this->request->getRequestParam('post_type', 'post') === 'post' |
|
| 30 | - || ( |
|
| 31 | - $post instanceof WP_Post |
|
| 32 | - && $post->post_type === 'post' |
|
| 33 | - ) |
|
| 34 | - ) |
|
| 35 | - && $this->request->getRequestParam('action') === 'edit'; |
|
| 36 | - } |
|
| 18 | + /** |
|
| 19 | + * returns true if current request matches specification |
|
| 20 | + * |
|
| 21 | + * @since 4.9.71.p |
|
| 22 | + * @return boolean |
|
| 23 | + */ |
|
| 24 | + public function isMatchingRoute() |
|
| 25 | + { |
|
| 26 | + global $post; |
|
| 27 | + return strpos($this->request->requestUri(), 'wp-admin/post.php') !== false |
|
| 28 | + && ( |
|
| 29 | + $this->request->getRequestParam('post_type', 'post') === 'post' |
|
| 30 | + || ( |
|
| 31 | + $post instanceof WP_Post |
|
| 32 | + && $post->post_type === 'post' |
|
| 33 | + ) |
|
| 34 | + ) |
|
| 35 | + && $this->request->getRequestParam('action') === 'edit'; |
|
| 36 | + } |
|
| 37 | 37 | } |
@@ -14,15 +14,15 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | class EspressoAttendeePostTypeEditor 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_registrations' |
|
| 26 | - && $this->request->getRequestParam('action') === 'edit_attendee'; |
|
| 27 | - } |
|
| 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_registrations' |
|
| 26 | + && $this->request->getRequestParam('action') === 'edit_attendee'; |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -15,15 +15,15 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class WordPressPostTypeEditor extends RouteMatchSpecification |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * returns true if current request matches specification |
|
| 20 | - * |
|
| 21 | - * @since 4.9.71.p |
|
| 22 | - * @return boolean |
|
| 23 | - */ |
|
| 24 | - public function isMatchingRoute() |
|
| 25 | - { |
|
| 26 | - return strpos($this->request->requestUri(), 'wp-admin/post.php') !== false |
|
| 27 | - || strpos($this->request->requestUri(), 'wp-admin/post-new.php') !== false; |
|
| 28 | - } |
|
| 18 | + /** |
|
| 19 | + * returns true if current request matches specification |
|
| 20 | + * |
|
| 21 | + * @since 4.9.71.p |
|
| 22 | + * @return boolean |
|
| 23 | + */ |
|
| 24 | + public function isMatchingRoute() |
|
| 25 | + { |
|
| 26 | + return strpos($this->request->requestUri(), 'wp-admin/post.php') !== false |
|
| 27 | + || strpos($this->request->requestUri(), 'wp-admin/post-new.php') !== false; |
|
| 28 | + } |
|
| 29 | 29 | } |
@@ -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 | } |
@@ -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 |