init
This commit is contained in:
17
wp-content/themes/flatsome/inc/admin/panel/Logo.svg
Normal file
17
wp-content/themes/flatsome/inc/admin/panel/Logo.svg
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="184px" height="186px" viewBox="0 0 184 186" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 3.8.1 (29687) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Logo-white</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Logo-white" fill="#FFFFFF">
|
||||
<g>
|
||||
<path d="M92.6963305,153.35517 L69.6726254,130.331465 L92.6963305,107.30776 L92.6963305,66.7055226 L49.3715069,110.030346 L32.472925,93.1317642 L92.6963305,32.9083587 L92.6963305,0.803652143 L0.106126393,93.3938562 L92.6963305,185.98406 L92.6963305,153.35517 Z"></path>
|
||||
</g>
|
||||
<g opacity="0.502623601" transform="translate(136.800003, 93.000000) scale(-1, 1) translate(-136.800003, -93.000000) translate(90.300003, 0.000000)">
|
||||
<path d="M92.6963305,153.35517 L69.6726254,130.331465 L92.6963305,107.30776 L92.6963305,66.7055226 L49.3715069,110.030346 L32.472925,93.1317642 L92.6963305,32.9083587 L92.6963305,0.803652143 L0.106126393,93.3938562 L92.6963305,185.98406 L92.6963305,153.35517 Z" opacity="0.387068563"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
BIN
wp-content/themes/flatsome/inc/admin/panel/img/documentation.png
Normal file
BIN
wp-content/themes/flatsome/inc/admin/panel/img/documentation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
wp-content/themes/flatsome/inc/admin/panel/img/emailsupport.png
Normal file
BIN
wp-content/themes/flatsome/inc/admin/panel/img/emailsupport.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
wp-content/themes/flatsome/inc/admin/panel/img/videos.png
Normal file
BIN
wp-content/themes/flatsome/inc/admin/panel/img/videos.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
53
wp-content/themes/flatsome/inc/admin/panel/panel.css
Normal file
53
wp-content/themes/flatsome/inc/admin/panel/panel.css
Normal file
@@ -0,0 +1,53 @@
|
||||
li.toplevel_page_flatsome-panel img{
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
padding-top: 4px!important;
|
||||
}
|
||||
|
||||
.panel.flatsome-panel {
|
||||
margin-left: -10px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
|
||||
.flatsome-panel .about-wrap .nav-tab{
|
||||
font-size: 14px;
|
||||
margin-right: 5px;
|
||||
margin-left: 0;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.flatsome-panel .fl-badge {
|
||||
background-image: url(Logo.svg)!important;
|
||||
}
|
||||
|
||||
.flatsome-panel .about-wrap .nav-tab-wrapper{
|
||||
margin-bottom: 20px!important;
|
||||
}
|
||||
|
||||
.flatsome-panel .about-wrap .flatsome-panel h2{
|
||||
text-align: left;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.flatsome-panel .about-wrap .flatsome-panel .inner-panel{
|
||||
padding: 0 20px 30px 20px;
|
||||
background-color: #FFF;
|
||||
margin: 15px 10px;
|
||||
box-shadow: 1px 1px 5px 1px rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
.flatsome-panel .about-wrap .cols{display: flex;}
|
||||
.flatsome-panel .about-wrap .inner-panel{flex:1;}
|
||||
.flatsome-panel .inner-panel{
|
||||
transition: opacity .3s;
|
||||
}
|
||||
.flatsome-panel .inner-panel:hover{
|
||||
opacity: 1!important;
|
||||
}
|
||||
.flatsome-panel .inner-panel.success{border-color: green!important; opacity: .6}
|
||||
.flatsome-panel .inner-panel.success h5{color: green!important;}
|
||||
|
||||
.flatsome-token-migrator__selector {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
58
wp-content/themes/flatsome/inc/admin/panel/panel.js
Normal file
58
wp-content/themes/flatsome/inc/admin/panel/panel.js
Normal file
@@ -0,0 +1,58 @@
|
||||
jQuery(function ($) {
|
||||
var errorMessage = window.flatsomePanelOptions.errorMessage
|
||||
|
||||
$('.flatsome-registration-form').each(function (i, el) {
|
||||
var $code = $('.flatsome-registration-form__code', el)
|
||||
var $selector = $('.flatsome-token-migrator__select', el)
|
||||
var $errors = $('.flatsome-token-migrator__errors', el)
|
||||
var $spinner = $('.spinner')
|
||||
var isFetched = false
|
||||
|
||||
$selector.on('click', function () {
|
||||
if (isFetched) return
|
||||
|
||||
$spinner.addClass('is-active')
|
||||
|
||||
$.getJSON(window.ajaxurl, {
|
||||
action: 'flatsome_purchase_codes'
|
||||
})
|
||||
.then(function (res) {
|
||||
if (Array.isArray(res.available)) {
|
||||
$errors.empty()
|
||||
$selector.append(
|
||||
res.available.map(function (data) {
|
||||
var purchasedAt = wp.date.date('F j, Y', data.purchasedAt)
|
||||
return $('<option value="' + data.id + '">' + data.code + ' (' + purchasedAt + ')</option>')
|
||||
})
|
||||
)
|
||||
$selector.append($('<option value="">Enter another purchase code</option>'))
|
||||
} else {
|
||||
$errors.html(
|
||||
'<div class="notice notice-error notice-alt inline" style="display:block!important;margin-bottom:15px!important"><p>' + (res.message || errorMessage) + '</p></div>'
|
||||
)
|
||||
}
|
||||
|
||||
isFetched = Array.isArray(res.available)
|
||||
$spinner.removeClass('is-active')
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error(err)
|
||||
$errors.html(
|
||||
'<div class="notice notice-error notice-alt inline" style="display:block!important;margin-bottom:15px!important"><p>' + (err.message || errorMessage) + '</p></div>'
|
||||
)
|
||||
isFetched = false
|
||||
$spinner.removeClass('is-active')
|
||||
})
|
||||
})
|
||||
|
||||
$selector.on('change', function (event) {
|
||||
if (event.target.value) {
|
||||
$code.slideUp(250)
|
||||
} else {
|
||||
$code.slideDown(250, function () {
|
||||
$code.find('input').trigger('focus')
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
129
wp-content/themes/flatsome/inc/admin/panel/panel.php
Normal file
129
wp-content/themes/flatsome/inc/admin/panel/panel.php
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Flatsome Admin Panel
|
||||
*/
|
||||
class Flatsome_Admin {
|
||||
|
||||
/**
|
||||
* Sets up the welcome screen
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'admin_menu', array( $this, 'flatsome_panel_register_menu' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'flatsome_panel_style' ) );
|
||||
add_action( 'wp_ajax_flatsome_purchase_codes', array( $this, 'flatsome_purchase_codes' ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load welcome screen css.
|
||||
*
|
||||
* @since 1.4.4
|
||||
*/
|
||||
public function flatsome_panel_style() {
|
||||
$uri = get_template_directory_uri();
|
||||
$theme = wp_get_theme( get_template() );
|
||||
$version = $theme->get( 'Version' );
|
||||
|
||||
wp_enqueue_style( 'flatsome-panel-css', $uri . '/inc/admin/panel/panel.css', array(), $version );
|
||||
wp_enqueue_script( 'flatsome-panel', $uri . '/inc/admin/panel/panel.js', array( 'jquery', 'wp-date' ), $version, true );
|
||||
wp_localize_script( 'flatsome-panel', 'flatsomePanelOptions', array(
|
||||
'errorMessage' => __( 'Sorry, an error occurred while accessing the API.', 'flatsome' ),
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of available purchase codes for a token.
|
||||
*/
|
||||
public function flatsome_purchase_codes() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
return wp_send_json_error();
|
||||
}
|
||||
|
||||
if ( is_a( flatsome_envato()->registration, 'Flatsome_Envato_Registration' ) ) {
|
||||
$result = flatsome_envato()->registration->get_purchase_codes();
|
||||
|
||||
if ( is_wp_error( $result ) ) {
|
||||
return wp_send_json_error();
|
||||
} else {
|
||||
return wp_send_json( $result );
|
||||
}
|
||||
}
|
||||
|
||||
return wp_send_json_error();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the dashboard page
|
||||
* @see add_theme_page()
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function flatsome_panel_register_menu() {
|
||||
add_menu_page( 'Welcome to Flatsome', 'Flatsome', 'manage_options', 'flatsome-panel', array( $this, 'flatsome_panel_welcome' ), get_template_directory_uri() . '/assets/img/logo-icon.svg', '2' );
|
||||
add_submenu_page( 'flatsome-panel', 'Theme Registration', 'Theme Registration', 'manage_options', 'admin.php?page=flatsome-panel' );
|
||||
add_submenu_page( 'flatsome-panel', 'Help & Guides', 'Help & Guides', 'manage_options', 'flatsome-panel-support', array( $this, 'flatsome_panel_support' ) );
|
||||
add_submenu_page( 'flatsome-panel', 'Change log', 'Change log', 'manage_options', 'flatsome-panel-changelog', array( $this, 'flatsome_panel_changelog' ) );
|
||||
add_submenu_page( 'flatsome-panel', '', 'Theme Options', 'manage_options', 'customize.php' );
|
||||
}
|
||||
|
||||
/**
|
||||
* The welcome screen
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function flatsome_panel_welcome() {
|
||||
?>
|
||||
<div class="flatsome-panel">
|
||||
<div class="wrap about-wrap">
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/top.php'; ?>
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/tab-activate.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function flatsome_panel_getting_started() {
|
||||
?>
|
||||
<div class="flatsome-panel">
|
||||
<div class="wrap about-wrap">
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/top.php'; ?>
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/tab-guide.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function flatsome_panel_tutorials() {
|
||||
?>
|
||||
<div class="flatsome-panel">
|
||||
<div class="wrap about-wrap">
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/top.php'; ?>
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/tab-tutorials.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function flatsome_panel_support() {
|
||||
?>
|
||||
<div class="flatsome-panel">
|
||||
<div class="wrap about-wrap">
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/top.php'; ?>
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/tab-support.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function flatsome_panel_changelog() {
|
||||
?>
|
||||
<div class="flatsome-panel">
|
||||
<div class="wrap about-wrap">
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/top.php'; ?>
|
||||
<?php require get_template_directory() . '/inc/admin/panel/sections/tab-changelog.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['Flatsome_Admin'] = new Flatsome_Admin();
|
@@ -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>
|
@@ -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>
|
@@ -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">►</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">►</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">►</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">►</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">►</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>
|
@@ -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>
|
@@ -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>
|
@@ -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&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&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&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&showinfo=0" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
29
wp-content/themes/flatsome/inc/admin/panel/sections/top.php
Normal file
29
wp-content/themes/flatsome/inc/admin/panel/sections/top.php
Normal 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>
|
Reference in New Issue
Block a user