| @@ -97,9 +97,14 @@ | ||
| 97 | 97 | </form></div>'; |
| 98 | 98 | // Added by Ash/Upwork |
| 99 | 99 | echo '<div id="visualizer-types" class="visualizer-clearfix">'; |
| 100 | 100 | echo '<ul>'; |
| 101 | - foreach ( $this->types as $type => $label ) { | |
| 101 | + foreach ( $this->types as $type => $array ) { | |
| 102 | + $label = $array['name']; | |
| 103 | + $link = '<a class="page-numbers" href="' . esc_url( add_query_arg( array( 'type' => $type, 'vpage' => false ) ) ) . '">'; | |
| 104 | + if ( ! $array['enabled'] ) { | |
| 105 | + $link = "<a class='pro-upsell page-numbers' href='" . Visualizer_Plugin::PRO_TEASER_URL . "' target='_blank'>"; | |
| 106 | + } | |
| 102 | 107 | echo '<li class="visualizer-list-item">'; |
| 103 | 108 | if ( $type == $this->type ) { |
| 104 | 109 | echo '<a class="page-numbers current" href="', esc_url( add_query_arg( 'vpage', false ) ), '">'; |
| 105 | 110 | echo $label; |
| @@ -104,9 +109,9 @@ | ||
| 104 | 109 | echo '<a class="page-numbers current" href="', esc_url( add_query_arg( 'vpage', false ) ), '">'; |
| 105 | 110 | echo $label; |
| 106 | 111 | echo '</a>'; |
| 107 | 112 | } else { |
| 108 | - echo '<a class="page-numbers" href="', esc_url( add_query_arg( array( 'type' => $type, 'vpage' => false ) ) ), '">'; | |
| 113 | + echo $link; | |
| 109 | 114 | echo $label; |
| 110 | 115 | echo '</a>'; |
| 111 | 116 | } |
| 112 | 117 | echo '</li>'; |