This commit is contained in:
nguyen dung
2022-02-18 16:43:41 +07:00
commit 39b8cb3612
4470 changed files with 1378320 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<?php
/**
* Welcome screen getting started template
*/
?>
<div id="tab-activate" class="col cols panel flatsome-panel">
<div class="inner-panel">
<h3><?php esc_html_e( 'Theme registration', 'flatsome' ); ?></h3>
<?php echo flatsome_envato()->admin->render_directory_warning(); ?>
<?php echo flatsome_envato()->admin->render_registration_form(); ?>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<?php
/**
* Theme Change log
*/
?>
<div id="tab-changelog" class="coltwo-col panel flatsome-panel">
<div class="inner-panel">
<pre style="padding:30px; overflow: auto;">
<?php require get_template_directory() . '/changes.txt'; ?>
</pre>
</div>
</div>

View File

@@ -0,0 +1,75 @@
<?php
/**
* Tab Guide
*/
?>
<div id="tab-guide" class="col two-col panel flatsome-panel">
<div class="cols">
<div class="inner-panel success" style="border-left:4px solid #006799;">
<h5 style="color: #006799">STEP 1</h5>
<h3>Activate Theme</h3>
<p>Install the plugins you want to use that are included with Flatsome.</p>
<a href="<?php echo admin_url().'admin.php?page=flatsome-panel-plugins'; ?>" class="button">Add License</a>
</div>
<div class="inner-panel" style="border-left:4px solid #006799;">
<h5 style="color: #006799">STEP 1</h5>
<h3>Install and setup plugins</h3>
<p>Install the plugins you want to use that are included with Flatsome.</p>
<a href="<?php echo admin_url().'admin.php?page=flatsome-panel-plugins'; ?>" class="button">Install Plugins</a>
<a href="#" class="button" title="Video Guide">&#9658;</a>
</div>
<div class="inner-panel" style="border-left:4px solid #006799;">
<h5 style="color: #006799">STEP 2</h5>
<h3>Import Demo Data</h3>
<p>Import Demo Data to get started quickly with Flatsome.</p>
<a href="<?php echo admin_url().'themes.php?page=pt-one-click-demo-import'; ?>" class="button">Import Demo Data</a>
<a href="#" class="button" title="Video Guide">&#9658;</a>
</div>
</div>
<div class="cols">
<div class="inner-panel" style="border-left:4px solid #006799;">
<h5 style="color: #006799">STEP 3</h5>
<h3>Setup Homepage and Blog</h3>
<p>Select a page you want to use as homepage.</p>
<a href="<?php echo admin_url().'options-reading.php'; ?>" class="button">Setup Blog and Homepage</a>
<a href="#" class="button" title="Video Guide">&#9658;</a>
</div>
<div class="inner-panel" style="border-left:4px solid #006799;">
<h5 style="color: #006799">STEP 4</h5>
<h3>Assign Menus</h3>
<p>Click here to setup menus. Learn more about menus <a hfer="#">here </a></p>
<a href="<?php echo admin_url().'nav-menus.php'; ?>" class="button">Assign Menus</a>
<a href="#" class="button" title="Video Guide">&#9658;</a>
</div>
<div class="inner-panel" style="border-left:4px solid #006799;">
<h5 style="color: #006799">STEP 5</h5>
<h3>Change Header Style</h3>
<p>Now it's time to start customizing the header.</p>
<a href="<?php echo admin_url().'customize.php?url=&autofocus%5Bpanel%5D=header-presets'; ?>" class="button">Header Presets</a> <a href="#" class="button" title="Video Guide">&#9658;</a>
</div>
</div>
<div class="cols">
<div class="inner-panel">
<h3>Start Customizing!</h3>
<p>Now it's time to start customizing the style of the page.</p>
<a href="<?php echo admin_url().'customize.php'; ?>" class="button button-primary">Open Customizer</a>
</div>
<div class="inner-panel">
<h3>Need more help?</h3>
<p>We have created many video tutorials to get you started with creating your site.</p>
<a href="https://uxthemes.helpscoutdocs.com" class="button" style="margin-right: 5px;">Theme Documentation</a>
<a href="https://docs.woocommerce.com/documentation/plugins/woocommerce/" class="button">WooCommerce Documentation</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,206 @@
<div id="tab-plugins" class="panel flatsome-panel">
<?php
if ( isset( $_GET['flatsome-deactivate'] ) && 'deactivate-plugin' == $_GET['flatsome-deactivate'] ) {
check_admin_referer( 'flatsome-deactivate', 'flatsome-deactivate-nonce' );
$plugins = TGM_Plugin_Activation::$instance->plugins;
foreach ( $plugins as $plugin ) {
if ( $plugin['slug'] == $_GET['plugin'] ) {
deactivate_plugins( $plugin['file_path'] );
}
}
} if ( isset( $_GET['flatsome-activate'] ) && 'activate-plugin' == $_GET['flatsome-activate'] ) {
check_admin_referer( 'flatsome-activate', 'flatsome-activate-nonce' );
$plugins = TGM_Plugin_Activation::$instance->plugins;
foreach ( $plugins as $plugin ) {
if ( isset( $_GET['plugin'] ) && $plugin['slug'] == $_GET['plugin'] ) {
activate_plugin( $plugin['file_path'] );
}
}
}
function plugin_link( $item ) {
$installed_plugins = get_plugins();
$item['sanitized_plugin'] = $item['name'];
$actions = array();
// We have a repo plugin
if ( ! $item['version'] ) {
$item['version'] = TGM_Plugin_Activation::$instance->does_plugin_have_update( $item['slug'] );
}
/** We need to display the 'Install' hover link */
if ( ! isset( $installed_plugins[$item['file_path']] ) ) {
$actions = array(
'install' => sprintf(
'<a href="%1$s" class="button button-primary" title="Install %2$s">Install</a>',
esc_url( wp_nonce_url(
add_query_arg(
array(
'page' => urlencode( TGM_Plugin_Activation::$instance->menu ),
'plugin' => urlencode( $item['slug'] ),
'plugin_name' => urlencode( $item['sanitized_plugin'] ),
'plugin_source' => urlencode( $item['source'] ),
'tgmpa-install' => 'install-plugin',
'return_url' => 'flatsome-panel',
),
TGM_Plugin_Activation::$instance->get_tgmpa_url()
),
'tgmpa-install',
'tgmpa-nonce'
) ),
$item['sanitized_plugin']
),
);
}
/** We need to display the 'Activate' hover link */
elseif ( is_plugin_inactive( $item['file_path'] ) ) {
$actions = array(
'activate' => sprintf(
'<a href="%1$s" class="button button-primary" title="Activate %2$s">Activate</a>',
esc_url( add_query_arg(
array(
'plugin' => urlencode( $item['slug'] ),
'plugin_name' => urlencode( $item['sanitized_plugin'] ),
'plugin_source' => urlencode( $item['source'] ),
'flatsome-activate' => 'activate-plugin',
'flatsome-activate-nonce' => wp_create_nonce( 'flatsome-activate' ),
),
admin_url( 'admin.php?page=flatsome-panel-plugins' )
) ),
$item['sanitized_plugin']
),
);
}
/** We need to display the 'Update' hover link */
elseif ( version_compare( $installed_plugins[$item['file_path']]['Version'], $item['version'], '<' ) ) {
$actions = array(
'update' => sprintf(
'<a href="%1$s" class="button button-primary" title="Install %2$s">Update</a>',
wp_nonce_url(
add_query_arg(
array(
'page' => urlencode( TGM_Plugin_Activation::$instance->menu ),
'plugin' => urlencode( $item['slug'] ),
'return_url' => 'flatsome-panel',
'tgmpa-update' => 'update-plugin',
'plugin_source' => urlencode( $item['source'] ),
'version' => urlencode( $item['version'] ),
),
TGM_Plugin_Activation::$instance->get_tgmpa_url()
),
'tgmpa-update',
'tgmpa-nonce'
),
$item['sanitized_plugin']
),
);
} elseif ( is_plugin_active( $item['file_path'] ) ) {
$actions = array(
'deactivate' => sprintf(
'<a href="%1$s" class="button button-primary" title="Deactivate %2$s">Deactivate</a>',
esc_url( add_query_arg(
array(
'plugin' => urlencode( $item['slug'] ),
'plugin_name' => urlencode( $item['sanitized_plugin'] ),
'plugin_source' => urlencode( $item['source'] ),
'flatsome-deactivate' => 'deactivate-plugin',
'flatsome-deactivate-nonce' => wp_create_nonce( 'flatsome-deactivate' ),
),
admin_url( 'admin.php?page=flatsome-panel-plugins' )
) ),
$item['sanitized_plugin']
),
);
}
return $actions;
}
$flatsome_theme = wp_get_theme();
if ( $flatsome_theme->parent_theme ) {
$template_dir = basename( get_template_directory() );
$flatsome_theme = wp_get_theme( $template_dir );
}
$plugins = TGM_Plugin_Activation::$instance->plugins;
// Move plugins to top
$plugins = array('woocommerce' => $plugins['woocommerce']) + $plugins;
$installed_plugins = get_plugins();
?>
<style>
.theme-browser .theme .theme-screenshot:after{
padding-top: 75%!important;
}
.theme-browser .theme .theme-name{
font-size: 12px;
}
.theme-browser .theme {
margin: 0 2% 2% 0!important;
width: 32%!important;
box-shadow: 1px 1px 5px 1px rgba(0,0,0,.1);
}
.theme-browser .theme:nth-child(3n){
margin-right: 0!important;
}
.theme .plugin-info{position: absolute; bottom:0; width:100%; left:0; text-align: center; font-size: 11px; opacity: 0;} .theme:hover .plugin-info{opacity: 1}</style>
<div class="flatsome-demo-themes flatsome-install-plugins" style="margin-top:35px;">
<div class="theme-browser rendered">
<?php foreach ( $plugins as $plugin ) : ?>
<?php
$class = '';
$plugin_status = '';
$file_path = $plugin['file_path'];
$plugin_action = plugin_link( $plugin );
if ( is_plugin_active( $file_path ) ) {
$plugin_status = 'active';
$class = 'active';
}
?>
<div class="theme <?php echo $class; ?>">
<div class="theme-wrapper">
<div class="theme-screenshot">
<img src="<?php echo $plugin['image_url']; ?>" alt="" />
<div class="plugin-info">
<?php if ( isset( $installed_plugins[ $plugin['file_path'] ] ) ) : ?>
<?php printf( __( 'Version: %1s | <a href="%2s" target="_blank">%3s</a>', 'flatsome_admin' ), $installed_plugins[ $plugin['file_path'] ]['Version'], $installed_plugins[ $plugin['file_path'] ]['AuthorURI'], $installed_plugins[ $plugin['file_path'] ]['Author'] ); ?>
<?php elseif ( 'bundled' == $plugin['source_type'] ) : ?>
<?php printf( esc_attr__( 'Available Version: %s', 'flatsome_admin' ), $plugin['version'] ); ?>
<?php endif; ?>
</div>
</div>
<h3 class="theme-name">
<?php if ( 'active' == $plugin_status ) : ?>
<span><?php printf( __( 'Active: %s', 'flatsome_admin' ), $plugin['name'] ); ?></span>
<?php else : ?>
<?php echo $plugin['name']; ?>
<?php endif; ?>
</h3>
<div class="theme-actions">
<?php foreach ( $plugin_action as $action ) { echo $action; } ?>
</div>
<?php if ( isset( $plugin_action['update'] ) && $plugin_action['update'] ) : ?>
<div class="theme-update">
<?php printf( __( 'Update Available: Version %s', 'flatsome_admin' ), $plugin['version'] ); ?>
</div>
<?php endif; ?>
<?php if ( isset( $plugin['required'] ) && $plugin['required'] ) : ?>
<div class="plugin-required">
<?php esc_html_e( 'Required', 'flatsome_admin' ); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,59 @@
<?php
/**
* Welcome screen getting started template
*/
?>
<div id="tab-support" class="coltwo-col panel flatsome-panel">
<div class="cols">
<div class="inner-panel" style="text-align: center;">
<img style="width:100px; margin:30px 15px 0;" src="<?php echo get_template_directory_uri().'/inc/admin/panel/img/videos.png'; ?>"/>
<h3>How-to Videos</h3>
<p>Our How-to videos is perfect for learning about Flatsome and what is possible.</p>
<a href="https://www.youtube.com/channel/UCeccZ4VQ8b5ZoMI-wU6qgFg" target="_blank" class="button button-primary">
<?php _e( 'Open Videos', 'flatsome-admin' ); ?></a>
</div>
<div class="inner-panel" style="text-align: center;">
<img style="width:100px; margin:30px 15px 0;" src="<?php echo get_template_directory_uri().'/inc/admin/panel/img/documentation.png'; ?>"/>
<h3>Online Documentation</h3>
<p>The first place you should look if you have any problems is our theme documentation.</p>
<a href="http://uxthemes.helpscoutdocs.com" target="_blank" class="button button-primary">
<?php _e( 'Open Documentation', 'flatsome-admin' ); ?></a>
</div>
<div class="inner-panel" style="text-align: center;">
<img style="width:100px; margin:30px 15px 0;" src="<?php echo get_template_directory_uri().'/inc/admin/panel/img/emailsupport.png'; ?>"/> <h3>Premium E-mail Support</h3>
<p>All customers of Flatsome has access to premium e-mail support.</p>
<?php if(!flatsome_is_theme_enabled()) { ?>
<a href="<?php echo admin_url().'admin.php?page=flatsome-panel';?>" class="button button-primary">Activate Theme to get support</a>
<?php } else { ?>
<a href="https://themeforest.net/item/flatsome-multipurpose-responsive-woocommerce-theme/5484319/support" target="_blank" rel="noopener noreferrer" class="button button-primary">
<?php _e( 'Send us a Support Ticket', 'flatsome-admin' ); ?>
</a>
<br><br><small><a href="https://themeforest.net/page/item_support_policy" target="_blank">What does support include?</a></small>
<?php } ?>
</div>
</div>
<div class="cols">
<div class="inner-panel" style="text-align: center;">
<h3>Flatsome Community</h3>
<p>Join our community and get help from other Flatsome Users.</p>
<a href="//www.facebook.com/groups/flatsome/" class="button button-primary">
<?php _e( 'Join Community', 'flatsome-admin' ); ?></a>
</div>
<div class="inner-panel" style="text-align: center;">
<h3>Feature Requests</h3>
<p>Send Feature Request for Flatsome Theme and vote for the ones you like.</p>
<a href="//uxthemes.canny.io/flatsome" class="button button-primary">
<?php _e( 'Feature Requests', 'flatsome-admin' ); ?></a>
</div>
</div>
</div>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Tab Tutorials
*/
?>
<div id="tab-tutorials" class="col two-col panel flatsome-panel">
<div class="cols">
<div class="inner-panel">
<h4>How to create a slider</h4>
<iframe width="100%" height="250px" src="https://www.youtube.com/embed/YmpC89BDUZ4?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="inner-panel">
<h4>How to create a slider</h4>
<iframe width="100%" height="250px" src="https://www.youtube.com/embed/YmpC89BDUZ4?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="cols">
<div class="inner-panel">
<h4>How to create a slider</h4>
<iframe width="100%" height="250px" src="https://www.youtube.com/embed/YmpC89BDUZ4?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="inner-panel">
<h4>How to create a slider</h4>
<iframe width="100%" height="250px" src="https://www.youtube.com/embed/YmpC89BDUZ4?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Flatome Panel
*/
?>
<?php add_thickbox(); ?>
<?php $flatsome_ver = wp_get_theme( get_template() ); ?>
<h1>
<?php echo '<strong>Welcome to Flatsome</strong>'; ?>
</h1>
<div class="about-text">
<?php _e( 'Thanks for Choosing Flatsome - The worlds most powerful WooCommerce and Multi-Purpose Theme. This page will help you quickly get up and running with Flatsome.', 'flatsome-admin' ); ?>
<br><br>
<a href="<?php echo admin_url().'admin.php?page=flatsome-setup'; ?>" class="button button-primary button-large"><?php _e('Setup Wizard', 'flatsome-admin' ); ?></a>
</div>
<div class="wp-badge fl-badge">Version <?php echo $flatsome_ver['Version']; ?></div>
<h2 class="nav-tab-wrapper">
<?php $url = admin_url().'admin.php?page=flatsome-panel' ?>
<a href="<?php echo $url; ?>" class="nav-tab <?php if($_GET['page'] == 'flatsome-panel') echo 'nav-tab-active'; ?>"><?php _e('Theme Registration', 'flatsome-admin' ); ?></a>
<a href="<?php echo $url.'-support'; ?>" class="nav-tab <?php if($_GET['page'] == 'flatsome-panel-support') echo 'nav-tab-active'; ?>"><?php _e( 'Help & Guides', 'flatsome-admin' ); ?></a>
<a href="<?php echo $url.'-changelog'; ?>" class="nav-tab <?php if($_GET['page'] == 'flatsome-panel-changelog') echo 'nav-tab-active'; ?>"><?php _e( 'Change log', 'flatsome-admin' ); ?></a>
</h2>
<script type="text/javascript">!function(e,t,n){function a(){var e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],"complete"===t.readyState)return a();e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}(window,document,window.Beacon||function(){});</script>
<script type="text/javascript">window.Beacon('init', 'e1ec051d-ef26-4fa7-9fe1-ddb133afb116')</script>