Skip to content

Commit

Permalink
Pass getOption directly
Browse files Browse the repository at this point in the history
  • Loading branch information
tfirdaus committed Jan 25, 2025
1 parent e2f7f2e commit a640064
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/setting-page/fieldset/DashboardWidgetsFieldset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const DashboardWidgetsFieldset = () => {
);
const labelId = useId();
const registeredWidgets = inlineData.$wp.dashboardWidgets || [];
const widgetsEnabled = getOption( 'dashboard_widgets_enabled' ) ?? null;

return (
<SwitchFieldset
Expand All @@ -38,7 +37,9 @@ export const DashboardWidgetsFieldset = () => {
}
>
<CheckboxGroup
defaultValue={ widgetsEnabled }
defaultValue={ getOption(
'dashboard_widgets_enabled'
) }
label={ __( 'Widgets', 'syntatis-feature-flipper' ) }
description={ __(
'Unchecked widgets will be hidden from the dashboard.',
Expand Down

0 comments on commit a640064

Please sign in to comment.