1 | <?php namespace EventEspresso\core\libraries\rest_api\changes; |
||
16 | class ChangesIn40836 extends ChangesInBase |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * Adds hooks so requests to 4.8.29 don't have the checkin endpoints |
||
21 | */ |
||
22 | public function setHooks() |
||
63 | |||
64 | |||
65 | |||
66 | /** |
||
67 | * Don't show "calculate" as an query param option in the index |
||
68 | * |
||
69 | * @param array $query_params |
||
70 | * @param EEM_Base $model |
||
71 | * @param string $version |
||
72 | * @return array |
||
73 | */ |
||
74 | public function removeCalculateQueryParam($query_params, EEM_Base $model, $version) |
||
81 | |||
82 | |||
83 | |||
84 | /** |
||
85 | * Removes the "_calculate_fields" part of entity responses before 4.8.36 |
||
86 | * |
||
87 | * @param array $entity_response_array |
||
88 | * @param EEM_Base $model |
||
89 | * @param string $request_context |
||
90 | * @param WP_REST_Request $request |
||
91 | * @param Read $controller |
||
92 | * @return array |
||
93 | */ |
||
94 | public function removeCalculatedFieldsFromResponse( |
||
106 | |||
107 | |||
108 | |||
109 | /** |
||
110 | * Removes the new headers for requests before 4.8.36 |
||
111 | * |
||
112 | * @param array $headers |
||
113 | * @param Controller_Base $controller |
||
114 | * @param string $version |
||
115 | * @return array |
||
116 | */ |
||
117 | public function removeHeadersNewInThisVersion( |
||
136 | |||
137 | |||
138 | |||
139 | /** |
||
140 | * Puts the 'featured_image_url' back in for responses before 4.8.36. |
||
141 | * |
||
142 | * @param array $entity_response_array |
||
143 | * @param EEM_Base $model |
||
144 | * @param string $request_context |
||
145 | * @param WP_REST_Request $request |
||
146 | * @param Read $controller |
||
147 | * @return array |
||
148 | */ |
||
149 | public function addOldFeaturedImagePartOfCptEntities( |
||
167 | |||
168 | |||
169 | |||
170 | /** |
||
171 | * If the value was infinity, we now use null in our JSON responses, |
||
172 | * but before this version we used -1. |
||
173 | * |
||
174 | * @param mixed $new_value |
||
175 | * @param \EE_Model_Field_Base $field_obj |
||
176 | * @param mixed $original_value |
||
177 | * @param string $requested_value |
||
178 | * @return mixed |
||
179 | */ |
||
180 | public function useNegativeOneForInfinityBeforeThisVersion( |
||
194 | } |
||
195 |