| 1 |
<div class="updraft_site_actions btn-group btn-group-sm more-option-container"> |
| 2 |
<button id="btn_group_drop" type="button" class="btn btn-primary more-option" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 3 |
<span class="dashicons dashicons-menu"></span> |
| 4 |
<span class="label hidden invisible"><?php _e('More', 'updraftcentral'); ?></span> |
| 5 |
</button> |
| 6 |
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="btn_group_drop" data-site_id="<?php echo $site->site_id; ?>"> |
| 7 |
<?php |
| 8 |
if (empty($site->description)) { |
| 9 |
?> |
| 10 |
<a class="dropdown-item" href="#"> |
| 11 |
<span class="updraft-dropdown-item updraftcentral_site_adddescription"> |
| 12 |
<span class="dashicons dashicons-edit"> </span> |
| 13 |
<span><?php _e('Site configuration', 'updraftcentral'); ?></span> |
| 14 |
</span> |
| 15 |
</a> |
| 16 |
<?php |
| 17 |
} else { |
| 18 |
?> |
| 19 |
<a class="dropdown-item" href="#"> |
| 20 |
<span class="updraft-dropdown-item updraftcentral_site_adddescription updraftcentral_site_editdescription"> |
| 21 |
<span class="dashicons dashicons-edit"> </span> |
| 22 |
<span><?php _e('Site configuration', 'updraftcentral'); ?></span> |
| 23 |
</span> |
| 24 |
</a> |
| 25 |
<?php |
| 26 |
} |
| 27 |
?> |
| 28 |
<a class="dropdown-item" href="#"> |
| 29 |
<span class="updraft-dropdown-item updraftcentral_site_delete"> |
| 30 |
<span class="dashicons dashicons-no-alt"></span> |
| 31 |
<span><?php _e('Remove site', 'updraftcentral'); ?></span> |
| 32 |
</span> |
| 33 |
</a> |
| 34 |
<?php |
| 35 |
|
| 36 |
// Return items/menus should be in the following format: array(array('id' => integer, 'visibility' => 'hidden|visible', 'class' => 'anyclassname', 'dashicon' => 'unlock', 'label' => 'menu label of choice')) |
| 37 |
$extra_site_menus = apply_filters('updraftcentral_extra_site_menus', array(), $site->site_id); |
| 38 |
if (!empty($extra_site_menus)) { |
| 39 |
foreach ($extra_site_menus as $menu) { |
| 40 |
$display = ('hidden' === $menu['visibility']) ? 'none' : 'block'; |
| 41 |
?> |
| 42 |
<a id="<?php echo $menu['id']; ?>" class="dropdown-item" href="#" style="display:<?php echo $display; ?>;"> |
| 43 |
<span class="updraft-dropdown-item <?php echo $menu['class']; ?>"> |
| 44 |
<span class="dashicons dashicons-<?php echo $menu['dashicon']; ?>"> </span> |
| 45 |
<span><?php echo $menu['label']; ?></span> |
| 46 |
</span> |
| 47 |
</a> |
| 48 |
<?php |
| 49 |
} |
| 50 |
} |
| 51 |
?> |
| 52 |
</div> |
| 53 |
</div> |