>
*/
private static function header_action_allowed() {
return array(
'a' => array(
'href' => true,
'class' => true,
),
'button' => array(
'type' => true,
'form' => true,
'class' => true,
),
);
}
/**
* @param string $current_slug Current slug.
* @return list>
*/
private static function nav_items( $current_slug ) {
$attention = Detector::attention_count();
$items = array(
array(
'slug' => 'reactwoo-atomic',
'label' => __( 'Overview', 'reactwoo-atomic' ),
'icon' => 'O',
'url' => Menu::url( 'reactwoo-atomic' ),
),
array(
'slug' => 'reactwoo-atomic-elements',
'label' => __( 'Elements', 'reactwoo-atomic' ),
'icon' => 'E',
'url' => Menu::url( 'reactwoo-atomic-elements' ),
),
array(
'slug' => 'reactwoo-atomic-licence',
'label' => ( Distribution::is_wporg() && ! Edition::is_pro() ) ? __( 'Add-ons', 'reactwoo-atomic' ) : __( 'Licence', 'reactwoo-atomic' ),
'icon' => 'L',
'url' => Menu::url( 'reactwoo-atomic-licence' ),
),
array(
'slug' => 'reactwoo-atomic-integrations',
'label' => __( 'Integrations', 'reactwoo-atomic' ),
'icon' => 'I',
'url' => Menu::url( 'reactwoo-atomic-integrations' ),
'badge' => $attention > 0 ? (string) $attention : '',
),
array(
'slug' => 'reactwoo-atomic-settings',
'label' => __( 'Settings', 'reactwoo-atomic' ),
'icon' => 'S',
'url' => Menu::url( 'reactwoo-atomic-settings' ),
),
);
foreach ( $items as &$item ) {
$item['active'] = $current_slug === $item['slug'];
}
return $items;
}
}