-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add class to use options from blog 1 on subsites. (#1265)
* feat: add class to use options from blog 1 on subsites. * fix: wip * fix: populate select admin page * fix: decide to use a field group mapping instead. * fix: hide fields that cannot be edited on this site * feat: implement filter functionality in frontend. * fix: remove static enable. * fix: lint * fix: add field configuration * fix: rename to CommonFieldGroups * fix: remove unnneccesary comments * feat: add tests for PopulateCommonFieldGroupSelectTest * fix: do not have multiple class declaration stacked in test file. * feat: make more testable & add tests for DisableFieldsThatAreCommonlyManagedOnSubsites * fix: add public function if wpservice is missing acf_get_fields. * fix: lint * fix: add tests & implement contracts in site switcher. * fix: rename tests with more descriptive names. * fix: remove seo redirect decorator. Implemented elsewhere. --------- Co-authored-by: Sebastian Thulin <sebastian.thulin@helsingborg.se>
- Loading branch information
1 parent
f6839a0
commit 5dfd224
Showing
20 changed files
with
1,228 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
[{ | ||
"key": "group_678e65a73edb3", | ||
"title": "Common Field Groups", | ||
"fields": [ | ||
{ | ||
"key": "field_678fb6b1caa9e", | ||
"label": "Common Field Groups Feature Description", | ||
"name": "", | ||
"aria-label": "", | ||
"type": "message", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"message": "This feature allows you to select fields that should be manage from the main site id (that is this site). Field groups will not be rendered on the subsites; Instead a link will be rendered to take the user to the main site for editing of the option. \r\n\r\nPlease select the field groups that you want to manage centrally below.", | ||
"new_lines": "wpautop", | ||
"esc_html": 0 | ||
}, | ||
{ | ||
"key": "field_678e65abcf203", | ||
"label": "Common Field Groups", | ||
"name": "sitewide_common_acf_fieldgroups", | ||
"aria-label": "", | ||
"type": "repeater", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"acfe_repeater_stylised_button": 0, | ||
"layout": "table", | ||
"pagination": 0, | ||
"min": 0, | ||
"max": 0, | ||
"collapsed": "", | ||
"button_label": "L\u00e4gg till rad", | ||
"rows_per_page": 20, | ||
"sub_fields": [ | ||
{ | ||
"key": "field_678e6610d5287", | ||
"label": "Select a fieldgroup", | ||
"name": "sitewide_common_acf_fieldgroup_value", | ||
"aria-label": "", | ||
"type": "select", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"choices": { | ||
"group_678e65a73edb3": "Common Field Groups", | ||
"group_5aa1543e70216": "Report settings" | ||
}, | ||
"default_value": false, | ||
"return_format": "value", | ||
"multiple": 0, | ||
"allow_null": 0, | ||
"ui": 0, | ||
"ajax": 0, | ||
"placeholder": "", | ||
"allow_custom": 0, | ||
"search_placeholder": "", | ||
"parent_repeater": "field_678e65abcf203" | ||
} | ||
] | ||
} | ||
], | ||
"location": [ | ||
[ | ||
{ | ||
"param": "options_page", | ||
"operator": "==", | ||
"value": "common-field-groups" | ||
} | ||
] | ||
], | ||
"menu_order": 0, | ||
"position": "normal", | ||
"style": "default", | ||
"label_placement": "left", | ||
"instruction_placement": "label", | ||
"hide_on_screen": "", | ||
"active": true, | ||
"description": "", | ||
"show_in_rest": 0, | ||
"acfe_display_title": "", | ||
"acfe_autosync": [ | ||
"json" | ||
], | ||
"acfe_form": 0, | ||
"acfe_meta": "", | ||
"acfe_note": "" | ||
}] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.