← All changes
|
includes/page-resource-capacity/class-wpbc-settings-api-capacity.php
+15
-4
11.7
→
11.9
View file →
| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Capacity Rules settings API. |
| 4 | 4 | * |
| @@ -122,9 +122,9 @@ | ||
| 122 | 122 | 'tr_class' => '', |
| 123 | 123 | ); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - if ( ! class_exists( 'wpdev_bk_personal' ) ) { | |
| 126 | + if ( ! class_exists( 'wpdev_bk_personal' ) ) { | |
| 127 | 127 | $this->fields['booking_quantity_control__promote_upgrade'] = array( |
| 128 | 128 | 'type' => 'checkbox', |
| 129 | 129 | 'default' => 'On', |
| 130 | 130 | 'value' => 'On', |
| @@ -176,11 +176,22 @@ | ||
| 176 | 176 | </div> |
| 177 | 177 | </div> |
| 178 | 178 | </div> |
| 179 | 179 | </td></tr>', |
| 180 | - ); | |
| 181 | - } | |
| 182 | - } | |
| 180 | + ); | |
| 181 | + } | |
| 182 | + | |
| 183 | + /** | |
| 184 | + * Filters fields displayed and saved by the Booking Capacity settings page. | |
| 185 | + * | |
| 186 | + * Edition modules may append fields while the shared Settings API continues | |
| 187 | + * to own rendering, checkbox normalization, and persistence mechanics. | |
| 188 | + * | |
| 189 | + * @param array $fields Registered settings fields. | |
| 190 | + * @param array $default_options_values Default option names and values. | |
| 191 | + */ | |
| 192 | + $this->fields = apply_filters( 'wpbc_resource_capacity_settings_fields', $this->fields, $default_options_values ); | |
| 193 | + } | |
| 183 | 194 | |
| 184 | 195 | /** |
| 185 | 196 | * Get selectable booking-form fields for Quantity Control. |
| 186 | 197 | * |