| @@ -3,14 +3,41 @@ | ||
| 3 | 3 | <?php |
| 4 | 4 | /** |
| 5 | 5 | * @var array $template_types |
| 6 | 6 | */ |
| 7 | + $__type = isset($_GET['type']) ? $_GET['type'] : 'all'; | |
| 7 | 8 | foreach ( $template_types as $typename => $type ) { |
| 8 | - echo wp_kses( sprintf( '<li class="nav-tab %1$s"><a href="%2$s">%3$s</a></li>', esc_attr( $typename ), esc_url( $type['url'] ), $type['label'] ), 'post' ); | |
| 9 | + $classes = esc_attr( $typename ); | |
| 10 | + $classes .= $__type === $typename ? ' active' : ''; | |
| 11 | + echo wp_kses( sprintf( '<li class="nav-tab %1$s"><a href="%2$s">%3$s</a></li>', $classes, esc_url( $type['url'] ), $type['label'] ), 'post' ); | |
| 9 | 12 | } |
| 10 | 13 | ?> |
| 11 | 14 | </ul> |
| 12 | 15 | |
| 16 | + <?php if(isset($_GET['type']) && 'settings' === $_GET['type']):?> | |
| 17 | + <div id="templately-fsi-revert-wrapper" style="clear: both; background: #fff; padding: 20px;" class="rendered"> | |
| 18 | + <div class="templately-fsi-revert-notice__content"> | |
| 19 | + <h3><?php _e("Revert to previous website", "templately");?></h3> | |
| 20 | + | |
| 21 | + <p><?php _e("Here you can revert back to your old website. We will restore previous settings, posts, pages, menus, etc.", "templately");?></p> | |
| 22 | + | |
| 23 | + <div class="templately-fsi-revert-notice__actions"> | |
| 24 | + <button | |
| 25 | + class="button" | |
| 26 | + <?php echo $has_revert ? '' : 'disabled';?> | |
| 27 | + title="<?php echo $has_revert ? '' : __('Nothing to revert', 'templately');?>" | |
| 28 | + > | |
| 29 | + <span><?php _e("Revert Now", 'templately');?></span> | |
| 30 | + </button> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | + </div> | |
| 34 | + <style> | |
| 35 | + #posts-filter, .templately-builder-nav .subsubsub{ | |
| 36 | + display: none; | |
| 37 | + } | |
| 38 | + </style> | |
| 39 | + <?php endif;?> | |
| 13 | 40 | <ul class="subsubsub"> |
| 14 | 41 | <?php |
| 15 | 42 | /** |
| 16 | 43 | * @var array $tabs |
| @@ -21,5 +48,5 @@ | ||
| 21 | 48 | } |
| 22 | 49 | } |
| 23 | 50 | ?> |
| 24 | 51 | </ul> |
| 25 | -</div> | |
| 52 | +</div> | |