plugin-header.php
134 lines
| 1 | <?php |
| 2 | |
| 3 | // If this file is called directly, abort. |
| 4 | if ( !defined( 'ABSPATH' ) ) { |
| 5 | exit; |
| 6 | } |
| 7 | $plugin_name = DSALV_PLUGIN_NAME; |
| 8 | $version_label = __( 'Free Version', 'linked-variation' ); |
| 9 | ?> |
| 10 | <div id="dotsstoremain"> |
| 11 | <div class="all-pad"> |
| 12 | <header class="dots-header"> |
| 13 | <div class="dots-plugin-details"> |
| 14 | <div class="dots-header-left"> |
| 15 | <div class="dots-logo-main"> |
| 16 | <div class="logo-image"> |
| 17 | <img src="<?php echo esc_url( DSALV_PLUGIN_URL . 'admin/images/plugin-header-image.png' ) ; ?>"> |
| 18 | </div> |
| 19 | <div class="plugin-version"> |
| 20 | <span><?php esc_html_e( $version_label, 'linked-variation' ); ?> <?php echo esc_html( DSALV_PLUGIN_VERSION ); ?></span> |
| 21 | </div> |
| 22 | </div> |
| 23 | <div class="plugin-name"> |
| 24 | <div class="title"><?php esc_html_e( $plugin_name, 'linked-variation' ); ?></div> |
| 25 | <div class="desc"><?php esc_html_e( 'Advanced Linked Variation allows users to show various products or product variants as variations of a WooCommerce product, without adding it as that product’s variant in reality.', 'linked-variation' ); ?></div> |
| 26 | </div> |
| 27 | </div> |
| 28 | <div class="dots-header-right"> |
| 29 | <div class="button-group"> |
| 30 | <div class="button-dots"> |
| 31 | <span class="support_dotstore_image"> |
| 32 | <a target="_blank" href="<?php echo esc_url( 'http://www.thedotstore.com/support/' ) ; ?>"> |
| 33 | <span class="dashicons dashicons-sos"></span> |
| 34 | <strong><?php esc_html_e( 'Quick Support', 'linked-variation' ); ?></strong> |
| 35 | </a> |
| 36 | </span> |
| 37 | </div> |
| 38 | |
| 39 | <div class="button-dots"> |
| 40 | <span class="support_dotstore_image"> |
| 41 | <a target="_blank" href="<?php echo esc_url( 'https://docs.thedotstore.com/collection/492-woocommerce-linked-variations' ) ; ?>"> |
| 42 | <span class="dashicons dashicons-media-text"></span> |
| 43 | <strong><?php esc_html_e( 'Documentation', 'linked-variation' ); ?></strong> |
| 44 | </a> |
| 45 | </span> |
| 46 | </div> |
| 47 | </div> |
| 48 | </div> |
| 49 | </div> |
| 50 | <?php |
| 51 | $current_page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); |
| 52 | $pl_post_type = filter_input( INPUT_GET, 'post_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); |
| 53 | if( empty( $pl_post_type ) ){ |
| 54 | $pl_post_type = get_post_type( get_the_ID() ); |
| 55 | } |
| 56 | $alv_settings_page = ( isset( $current_page ) && 'alv-settings' === $current_page ? 'active' : '' ); |
| 57 | $alv_getting_started = ( isset( $current_page ) && 'alv-get-started' === $current_page ? 'active' : '' ); |
| 58 | $alv_information = ( isset( $current_page ) && 'alv-information' === $current_page ? 'active' : '' ); |
| 59 | $linked_var_group = ( isset( $pl_post_type ) && 'dsalv' === $pl_post_type ? 'active' : '' ); |
| 60 | |
| 61 | if ( isset( $current_page ) && 'alv-information' === $current_page || isset( $current_page ) && 'alv-get-started' === $current_page ) { |
| 62 | $alv_about = 'active'; |
| 63 | } else { |
| 64 | $alv_about = ''; |
| 65 | } |
| 66 | ?> |
| 67 | <div class="dots-menu-main"> |
| 68 | <nav> |
| 69 | <ul> |
| 70 | <li> |
| 71 | <a class="dotstore_plugin <?php |
| 72 | echo esc_attr( $alv_settings_page ) ; |
| 73 | ?>" href="<?php |
| 74 | echo esc_url( add_query_arg( array( |
| 75 | 'page' => 'alv-settings', |
| 76 | ), admin_url( 'admin.php' ) ) ) ; |
| 77 | ?>"><?php |
| 78 | esc_html_e( 'Linked Variations Settings', 'linked-variation' ); |
| 79 | ?> |
| 80 | </a> |
| 81 | </li> |
| 82 | <li> |
| 83 | <a class="dotstore_plugin <?php |
| 84 | echo esc_attr( $linked_var_group ) ; |
| 85 | ?>" href="edit.php?post_type=dsalv"><?php |
| 86 | esc_html_e( 'Linked Variations Group', 'linked-variation' ); |
| 87 | ?> |
| 88 | </a> |
| 89 | </li> |
| 90 | <li> |
| 91 | <a class="dotstore_plugin <?php |
| 92 | echo esc_attr( $alv_about ) ; |
| 93 | ?>" href="<?php |
| 94 | echo esc_url( add_query_arg( array( |
| 95 | 'page' => 'alv-get-started', |
| 96 | ), admin_url( 'admin.php' ) ) ) ; |
| 97 | ?>"><?php |
| 98 | esc_html_e( 'About Plugin', 'linked-variation' ); |
| 99 | ?></a> |
| 100 | <ul class="sub-menu"> |
| 101 | <li><a class="dotstore_plugin <?php |
| 102 | echo esc_attr( $alv_getting_started ) ; |
| 103 | ?>" href="<?php |
| 104 | echo esc_url( add_query_arg( array( |
| 105 | 'page' => 'alv-get-started', |
| 106 | ), admin_url( 'admin.php' ) ) ) ; |
| 107 | ?>"><?php |
| 108 | esc_html_e( 'Getting Started', 'linked-variation' ); |
| 109 | ?></a></li> |
| 110 | <li><a class="dotstore_plugin <?php |
| 111 | echo esc_attr( $alv_information ) ; |
| 112 | ?>" href="<?php |
| 113 | echo esc_url( add_query_arg( array( |
| 114 | 'page' => 'alv-information', |
| 115 | ), admin_url( 'admin.php' ) ) ) ; |
| 116 | ?>"><?php |
| 117 | esc_html_e( 'Quick info', 'linked-variation' ); |
| 118 | ?></a></li> |
| 119 | </ul> |
| 120 | </li> |
| 121 | <li> |
| 122 | <a class="dotstore_plugin"><?php esc_html_e( 'Dotstore', 'linked-variation' ); ?></a> |
| 123 | <ul class="sub-menu"> |
| 124 | <li><a target="_blank" href="<?php echo esc_url( 'www.thedotstore.com/woocommerce-plugins' ) ; ?>"><?php esc_html_e( 'WooCommerce Plugins', 'linked-variation' );?></a></li> |
| 125 | <li><a target="_blank" href="<?php echo esc_url( 'www.thedotstore.com/wordpress-plugins' ) ;?>"><?php esc_html_e( 'Wordpress Plugins', 'linked-variation' ); ?></a></li><br> |
| 126 | <li><a target="_blank" href="<?php echo esc_url( 'www.thedotstore.com/support' ); ?>"><?php esc_html_e( 'Contact Support', 'linked-variation' ); ?></a></li> |
| 127 | </ul> |
| 128 | </li> |
| 129 | </ul> |
| 130 | </nav> |
| 131 | </div> |
| 132 | </header> |
| 133 | <div class="dots-settings-inner-main"> |
| 134 |