This code snippet utilizes hook_form_alter to ensure that the 'Default' display tab remains visible in the Views UI edit form of Drupal 7, allowing users to easily access and modify default display settings even when additional displays are present.
Source code viewer
/** * Implements hook_form_FORM_ID_alter(). */ function HOOK_form_views_ui_edit_form_alter(&$form, &$form_state, $form_id) { // Ensure the "Default" display is always shown. // Set the default display as visible. $form['displays']['top']['tabs']['default']['#access'] = TRUE; } }Programming Language: PHP