| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly. |
| 2 |
|
| 3 |
|
| 4 |
// Verify nonce for security |
| 5 |
if (isset($_POST['eshb_save_meta'])) { |
| 6 |
wp_verify_nonce( sanitize_text_field(wp_unslash($_POST['eshb_save_meta'])), 'eshb_save_meta_box_nonce'); |
| 7 |
} |
| 8 |
|
| 9 |
$demo = get_option( 'eshb_demo_mode', false ); |
| 10 |
$text = ( ! empty( $demo ) ) ? 'Deactivate' : 'Activate'; |
| 11 |
$status = ( ! empty( $demo ) ) ? 'deactivate' : 'activate'; |
| 12 |
$class = ( ! empty( $demo ) ) ? ' csf-warning-primary' : ''; |
| 13 |
$section = ( ! empty( $_GET[ 'section' ] ) ) ? sanitize_text_field( wp_unslash( $_GET[ 'section' ] ) ) : 'about'; |
| 14 |
$links = array( |
| 15 |
'about' => 'About', |
| 16 |
'quickstart' => 'Quick Start', |
| 17 |
'documentation' => 'Documentation', |
| 18 |
'free-vs-premium' => 'Free vs Premium', |
| 19 |
'support' => 'Support', |
| 20 |
'relnotes' => 'Release Notes', |
| 21 |
); |
| 22 |
|
| 23 |
?> |
| 24 |
<div class="eshb-welcome eshb-welcome-wrap"> |
| 25 |
|
| 26 |
<h1>Welcome to Codestar Framework v<?php echo esc_attr( ESHB::$version ); ?></h1> |
| 27 |
|
| 28 |
<p class="csf-about-text">A Simple and Lightweight WordPress Option Framework for Themes and Plugins</p> |
| 29 |
|
| 30 |
<p class="csf-demo-button"><a href="<?php echo esc_url( add_query_arg( array( 'csf-demo' => $status ) ) ); ?>" class="button button-primary<?php echo esc_attr( $class ); ?>"><?php echo esc_attr( $text ); ?> Demo</a></p> |
| 31 |
|
| 32 |
<div class="csf-logo"> |
| 33 |
<div class="csf--effects"><i></i><i></i><i></i><i></i></div> |
| 34 |
<div class="csf--wp-logos"> |
| 35 |
<div class="csf--wp-logo"></div> |
| 36 |
<div class="csf--wp-plugin-logo"></div> |
| 37 |
</div> |
| 38 |
<div class="csf--text">Codestar Framework</div> |
| 39 |
<div class="csf--text csf--version">v<?php echo esc_attr( ESHB::$version ); ?></div> |
| 40 |
</div> |
| 41 |
|
| 42 |
<h2 class="nav-tab-wrapper wp-clearfix"> |
| 43 |
<?php |
| 44 |
|
| 45 |
foreach ( $links as $key => $link ) { |
| 46 |
|
| 47 |
if ( ESHB::$premium && $key === 'free-vs-premium' ) { continue; } |
| 48 |
|
| 49 |
$activate = ( $section === $key ) ? ' nav-tab-active' : ''; |
| 50 |
|
| 51 |
echo '<a href="'. esc_url( add_query_arg( array( 'page' => 'eshb-welcome', 'section' => $key ), admin_url( 'tools.php' ) ) ) .'" class="nav-tab'. esc_attr( $activate ) .'">'. esc_attr( $link ) .'</a>'; |
| 52 |
|
| 53 |
} |
| 54 |
|
| 55 |
?> |
| 56 |
</h2> |
| 57 |
|