contact.php
3 years ago
google-analytics.php
5 years ago
index.php
9 years ago
loginform.php
5 years ago
maintenance.php
3 years ago
network-settings.php
3 years ago
notices.php
3 years ago
settings.php
3 years ago
sidebar.php
3 years ago
wizard.php
3 years ago
wpmm-page-template.php
3 years ago
sidebar.php
61 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Sidebar |
| 4 | * |
| 5 | * @version 2.4.0 |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | ?> |
| 10 | <div id="sidebar" class="wrapper-cell"> |
| 11 | <div class="sidebar_box info_box"> |
| 12 | <h3><?php esc_html_e( 'Plugin Info', 'wp-maintenance-mode' ); ?></h3> |
| 13 | <div class="inside"> |
| 14 | <?php $plugin_data = wpmm_plugin_info( $this->plugin_slug ); ?> |
| 15 | <ul> |
| 16 | <li><?php esc_html_e( 'Name', 'wp-maintenance-mode' ); ?>: |
| 17 | <?php |
| 18 | echo ! empty( $plugin_data['Name'] ) ? esc_html( $plugin_data['Name'] ) : ''; |
| 19 | echo ! empty( $plugin_data['Version'] ) ? esc_html( ' v' . $plugin_data['Version'] ) : ''; |
| 20 | ?> |
| 21 | </li> |
| 22 | <li><?php esc_html_e( 'Author', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['AuthorName'] ) ? esc_html( $plugin_data['AuthorName'] ) : ''; ?></li> |
| 23 | <li><?php esc_html_e( 'Website', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['AuthorURI'] ) ? '<a href="' . esc_url( wpmm_get_utmized_url( $plugin_data['AuthorURI'], array( 'campaign' => 'plugininfo' ) ) ) . '" target="_blank">' . esc_html( $plugin_data['AuthorName'] ) . $this->get_external_link_icon() . '</a>' : ''; ?></li> |
| 24 | <li><?php esc_html_e( 'Twitter', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['Twitter'] ) ? '<a href="' . esc_url( 'https://twitter.com/' . $plugin_data['Twitter'] ) . '" target="_blank">@' . esc_html( $plugin_data['Twitter'] ) . $this->get_external_link_icon() . '</a>' : ''; ?></li> |
| 25 | <li><?php esc_html_e( 'GitHub', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['GitHub Plugin URI'] ) ? '<a href="' . esc_url( wpmm_get_utmized_url( $plugin_data['GitHub Plugin URI'], array( 'campaign' => 'plugininfo' ) ) ) . '" target="_blank">' . esc_html( basename( $plugin_data['GitHub Plugin URI'] ) ) . $this->get_external_link_icon() . '</a>' : ''; ?></li> |
| 26 | </ul> |
| 27 | </div> |
| 28 | </div> |
| 29 | |
| 30 | <?php |
| 31 | $banners = wpmm_get_banners(); |
| 32 | |
| 33 | if ( ! empty( $banners ) ) { |
| 34 | ?> |
| 35 | <div class="sidebar_box themes_box"> |
| 36 | <h3><?php esc_html_e( 'Recommended', 'wp-maintenance-mode' ); ?></h3> |
| 37 | <div class="inside"> |
| 38 | <ul> |
| 39 | <?php |
| 40 | foreach ( $banners as $item ) { |
| 41 | $item['image'] = wpmm_get_banner_url( $item['image'] ); |
| 42 | |
| 43 | if ( $item['utm'] ) { |
| 44 | $item['link'] = wpmm_get_utmized_url( |
| 45 | $item['link'], |
| 46 | array( |
| 47 | 'campaign' => 'recommended', |
| 48 | 'content' => sanitize_key( $item['title'] ), |
| 49 | ) |
| 50 | ); |
| 51 | } |
| 52 | |
| 53 | printf( '<li><a href="%s" target="_blank" title="%s"><img src="%s" alt="%s" width="280" height="160" /></a></li>', esc_url( $item['link'] ), esc_attr( $item['title'] ), esc_url( $item['image'] ), esc_attr( $item['title'] ) ); |
| 54 | } |
| 55 | ?> |
| 56 | </ul> |
| 57 | </div> |
| 58 | </div> |
| 59 | <?php } ?> |
| 60 | </div> |
| 61 |