[ 'class' => [], 'width' => [], 'height' => [], 'viewbox' => [], 'fill' => [], 'stroke' => [], 'stroke-width' => [], 'stroke-linecap' => [], 'stroke-linejoin' => [], 'aria-hidden' => [] ],
'path' => [ 'd' => [] ],
'polyline' => [ 'points' => [] ],
'circle' => [ 'cx' => [], 'cy' => [], 'r' => [], 'fill' => [] ],
'rect' => [ 'x' => [], 'y' => [], 'width' => [], 'height' => [], 'rx' => [], 'ry' => [] ],
'line' => [ 'x1' => [], 'y1' => [], 'x2' => [], 'y2' => [] ],
'polygon' => [ 'points' => [] ],
'ellipse' => [ 'cx' => [], 'cy' => [], 'rx' => [], 'ry' => [] ],
'span' => [ 'class' => [], 'aria-hidden' => [] ],
];
$dashboard_summary = Plugin::get_dashboard_summary();
$dashboard_notices = Plugin::get_dashboard_notices();
$dismissed_notices = Plugin::get_dismissed_notice_ids();
$hidden_notices = 0;
foreach ( $dashboard_notices as $notice_key => $notice ) {
if ( 'warning' !== ( $notice['severity'] ?? '' ) && in_array( $notice['id'] ?? '', $dismissed_notices, true ) ) {
unset( $dashboard_notices[ $notice_key ] );
++$hidden_notices;
}
}
$pro_features = Plugin::get_pro_features();
?>
',
];
foreach( $fields as $key => $group ) {
$group_subgroups = Plugin::get_plugin_subgroups( $key );
$field_to_sub = [];
foreach( $group_subgroups as $sub_key => $sub ) {
foreach( ( $sub['field_ids'] ?? [] ) as $fid ) {
$field_to_sub[ $fid ] = $sub_key;
}
}
$fields_by_sub = [];
foreach( $group['fields'] as $field ) {
$sub_key = $field_to_sub[ $field['id'] ] ?? '_general';
$fields_by_sub[ $sub_key ][] = $field;
}
$ordered_keys = [];
foreach( $group_subgroups as $sk => $_ ) {
if( !empty( $fields_by_sub[ $sk ] ) ) {
$ordered_keys[] = $sk;
}
}
if( !empty( $fields_by_sub['_general'] ) ) {
$ordered_keys[] = '_general';
}
$first_sub = !empty( $ordered_keys ) ? $ordered_keys[0] : '';
$has_sidebar = count( $ordered_keys ) > 1;
?>