Skip to content

Commit 04c5c82

Browse files
committed
- clean up switch statement, removing any cases that are not explicitly triggered. That will allow the wpgraphql/acf/match_location_rule action to fire and the other rules can be compensated via that action
1 parent 0e32225 commit 04c5c82

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/LocationRules/LocationRules.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,6 @@ public function determine_rules( string $field_group_name, string $param, string
266266
case 'page_template':
267267
$this->determine_post_template_rules( $field_group_name, $param, $operator, $value );
268268
break;
269-
case 'post_status':
270-
break;
271-
case 'post_format':
272-
case 'post_category':
273-
case 'post_taxonomy':
274-
break;
275269
case 'post':
276270
$this->determine_post_rules( $field_group_name, $param, $operator, $value );
277271
break;
@@ -284,15 +278,6 @@ public function determine_rules( string $field_group_name, string $param, string
284278
// we can add the field group to the Page type
285279
$this->set_graphql_type( $field_group_name, 'Page' );
286280
break;
287-
case 'current_user':
288-
case 'current_user_role':
289-
// @todo:
290-
// Right now, if you set current_user or current_user_role as the only rule,
291-
// ACF adds the field group to every possible location in the Admin.
292-
// This seems a bit heavy handed. 🤔
293-
// We need to think through this a bit more, and how this rule
294-
// Can be composed with other rules, etc.
295-
break;
296281
case 'user_form':
297282
case 'user_role':
298283
// If user_role or user_form params are set, we need to expose the field group
@@ -308,9 +293,6 @@ public function determine_rules( string $field_group_name, string $param, string
308293
case 'comment':
309294
$this->determine_comment_rules( $field_group_name, $param, $operator, $value );
310295
break;
311-
case 'widget':
312-
// @todo: Widgets are not currently supported in WPGraphQL
313-
break;
314296
case 'block':
315297
$this->determine_block_rules( $field_group_name, $param, $operator, $value );
316298
break;

0 commit comments

Comments
 (0)