first commit
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
/**
|
||||
* About
|
||||
*
|
||||
* @package Ocean_Extra
|
||||
* @category Core
|
||||
* @author OceanWP
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Start Class
|
||||
class Ocean_Extra_About {
|
||||
|
||||
/**
|
||||
* Get things started
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'admin_menu', array( $this, 'add_page' ), 99 );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'css' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add sub menu page
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add_page() {
|
||||
add_submenu_page(
|
||||
'oceanwp-panel',
|
||||
esc_html__( 'About OceanWP', 'ocean-extra' ),
|
||||
esc_html__( 'About OceanWP', 'ocean-extra' ),
|
||||
'manage_options',
|
||||
'oceanwp-panel-about',
|
||||
array( $this, 'create_admin_page' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render about page
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function create_admin_page() { ?>
|
||||
|
||||
<div class="wrap oceanwp-about-panel about-wrap">
|
||||
|
||||
<?php
|
||||
// Get theme version #
|
||||
$theme_data = wp_get_theme();
|
||||
$theme_version = $theme_data->get( 'Version' );
|
||||
|
||||
// Affiliate link
|
||||
$ref_url = '';
|
||||
$aff_ref = apply_filters( 'ocean_affiliate_ref', $ref_url ); ?>
|
||||
|
||||
<div class="title-wrap clr">
|
||||
|
||||
<h1 class="oceanwp-title"><?php esc_html_e( 'OceanWP', 'ocean-extra' ); ?><sup class="version"><?php echo esc_html( $theme_version ); ?></sup></h1>
|
||||
|
||||
<ul class="social-wrap clr">
|
||||
<li><a href="https://twitter.com/OceanWordPress" class="twitter" title="<?php esc_html_e( 'Join us on Twitter', 'ocean-extra' ); ?>" target="_blank"><i class="dashicons dashicons-twitter"></i></a></li>
|
||||
<li><a href="https://www.facebook.com/OceanWordPress" class="facebook" title="<?php esc_html_e( 'Join us on Facebook', 'ocean-extra' ); ?>" target="_blank"><i class="dashicons dashicons-facebook-alt"></i></a></li>
|
||||
<li><a href="https://github.com/oceanwp" class="github" title="<?php esc_html_e( 'Find us on GitHub', 'ocean-extra' ); ?>" target="_blank"><i class="dashicons dashicons-admin-plugins"></i></a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-content">
|
||||
|
||||
<div class="oceanwp-bloc">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Thank you for using OceanWP', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'OceanWP is the perfect theme for your project. Lightweight and highly extendible, it will enable you to create almost any type of site with a beautiful & professional design. There are several options to personalise your website, multiple widget regions, a responsive design and much more. Developers will love his extensible codebase making it a joy to customise and extend.', 'ocean-extra' ); ?></p>
|
||||
|
||||
<p><strong><?php esc_html_e( 'The perfect theme to use with your favorite page builder!', 'ocean-extra' ); ?></strong></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-bloc blue">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Extend his functionalities with our extensions', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'Check our free and premium extensions that extend OceanWP’s functionality and make it more powerful.', 'ocean-extra' ); ?></p>
|
||||
|
||||
<ul class="oceanwp-list clr">
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-extra/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Ocean Extra', 'ocean-extra' ); ?> - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'Add extra features like metaboxes, import/export and a panel to activate the extensions.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-elementor-widgets/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Elementor Widgets', 'ocean-extra' ); ?> - <span class="price">$39</span></a>
|
||||
<p><?php esc_html_e( 'Add some awesome new widgets to the popular free page builder Elementor.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-custom-sidebar/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Custom Sidebar', 'ocean-extra' ); ?> - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'Generates an unlimited number of sidebars and place them on any page or post.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-sticky-header/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Sticky Header', 'ocean-extra' ); ?> - <span class="price">$29</span></a>
|
||||
<p><?php esc_html_e( 'A simple extension to attach the header at the top of your screen with an animation.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-footer-callout/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Footer Callout', 'ocean-extra' ); ?> - <span class="price">$29</span></a>
|
||||
<p><?php esc_html_e( 'Add some relevant/important information about your company or product in your footer.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-side-panel/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Side Panel', 'ocean-extra' ); ?> - <span class="price">$29</span></a>
|
||||
<p><?php esc_html_e( 'Display a panel on the right or left with your favorite widgets by clicking on an icon in the menu.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-demo-import/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Demo Import', 'ocean-extra' ); ?> - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'Import the OceanWP demo content, widgets and customizer settings with one click.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://oceanwp.org/extension/ocean-social-sharing/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'Social Sharing', 'ocean-extra' ); ?> - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'A simple extension to add your prefered social sharing buttons to your single posts.', 'ocean-extra' ); ?></p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="oceanwp-btn">
|
||||
<a href="https://oceanwp.org/extensions/<?php echo esc_attr( $aff_ref ); ?>" class="oceanwp-button" target="_blank"><?php esc_html_e( 'View all OceanWP extensions', 'ocean-extra' ); ?> →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-bloc">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Create your WordPress site quickly with Themecloud', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><strong><?php esc_html_e( 'What is Themecloud?', 'ocean-extra' ); ?></strong> <?php esc_html_e( 'It’s a better way to build WordPress websites, instant setup, no coding required. They are removed all of the technical hurdles standing between you and your ideal site. Don’t worry about installations, configurations, migrations and maintenance. Focus on creating stellar content – and watch your business skyrocket! Not convinced yet?', 'ocean-extra' ); ?> <a href="https://www.wpkube.com/create-wordpress-sites-quickly-themecloud/" target="_blank"><?php esc_html_e( 'Look at this great review from WPKube', 'ocean-extra' ); ?></a></p>
|
||||
|
||||
<p class="themecloud-price"><?php esc_html_e( 'From $9.90/mo', 'ocean-extra' ); ?> <span class="small-text"><?php esc_html_e( '( 15-day free trial, no credit card required )', 'ocean-extra' ); ?></span></p>
|
||||
|
||||
<div class="oceanwp-btn">
|
||||
<a href="http://www.themecloud.io/#_l_4a" class="oceanwp-button" target="_blank"><?php esc_html_e( 'Learn more about Themecloud', 'ocean-extra' ); ?> →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( current_user_can( 'customize' ) ) { ?>
|
||||
|
||||
<div class="oceanwp-bloc customize">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Getting started with OceanWP', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'Take a look in the options of the Customizer and see yourself how easy and quick to customize the theme as you wish.', 'ocean-extra' ); ?></p>
|
||||
|
||||
<ul class="oceanwp-list clr">
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Upload your logo', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Add your own logo and retina logo used for the mobile design.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=custom_logo' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Add your favicon', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'The favicon is used as a browser and app icon for your website.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=site_icon' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Choose your primary color', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Replace the default primary and hover color by your own colors.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=ocean_primary_color' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Change the links color', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Choose the color and hover color of your links for the entire site.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=ocean_links_color' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Choose your typography', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Choose your own typography for any parts of your website.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[panel]=ocean_typography_panel' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Top bar options', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Enable/Disable the top bar, add your own paddings and colors.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=ocean_top_bar' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Header options', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Choose the style, the height and the colors for your site header.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=ocean_header_style' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="option-title"><?php esc_html_e( 'Footer bottom options', 'ocean-extra' ); ?></span>
|
||||
<p><?php esc_html_e( 'Add your copyright, paddings and colors for the footer bottom.', 'ocean-extra' ); ?></p>
|
||||
<a class="option-link" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=ocean_footer_bottom' ) ); ?>" target="_blank"><?php esc_html_e( 'Go to the option', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
// Customizer url
|
||||
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
|
||||
$customize_url = add_query_arg(
|
||||
array(
|
||||
'return' => urlencode( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
|
||||
),
|
||||
'customize.php'
|
||||
);
|
||||
} ?>
|
||||
<div class="oceanwp-btn">
|
||||
<a href="<?php echo esc_url( $customize_url ); ?>" class="oceanwp-button load-customize hide-if-no-customize"><?php esc_html_e( 'Customize Your Site', 'ocean-extra' ); ?> →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="oceanwp-bloc col-2">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Contribute to OceanWP', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'You’ve found a bug? Want to contribute a patch, create a new feature or extension?', 'ocean-extra' ); ?>
|
||||
<a class="github-link" href="https://github.com/oceanwp/oceanwp/" target="_blank"><?php esc_html_e( 'GitHub is the place to go!', 'ocean-extra' ); ?></a></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-bloc col-2 second">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Get support', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'You can find a wide range of information on how to use and customise OceanWP in our', 'ocean-extra' ); ?> <a href="http://docs.oceanwp.org/" target="_blank"><?php esc_html_e( 'documentation', 'ocean-extra' ); ?></a>. <?php esc_html_e( 'If you need help?', 'ocean-extra' ); ?> <a href="https://oceanwp.org/support/<?php echo esc_attr( $aff_ref ); ?>" target="_blank"><?php esc_html_e( 'open a support ticket', 'ocean-extra' ); ?></a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-bloc">
|
||||
|
||||
<h2 class="bloc-title"><?php esc_html_e( 'Recommended plugins', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'Below you will find links to plugins I personally like and recommend. None of these plugins are required for your theme to work, they simply add additional functionality.', 'ocean-extra' ); ?></p>
|
||||
|
||||
<ul class="oceanwp-list clr">
|
||||
<li><a href="http://wordpress.org/plugins/contact-form-7/" target="_blank">Contact Form 7 - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'Manage multiple contact forms and customize the form and the mail contents with markups.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="http://www.gravityforms.com/" target="_blank">Gravity Forms - <span class="price">$39</span></a>
|
||||
<p><?php esc_html_e( 'Gravity Forms is the easiest tool to create advanced forms for your WordPress powered website.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="https://wordpress.org/plugins/elementor/" target="_blank">Elementor - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="https://wordpress.org/plugins/beaver-builder-lite-version/" target="_blank">Beaver Builder - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'A drag and drop WordPress Page Builder. Create with ease beautiful & professional pages.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="https://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431?ref=OceanWP" target="_blank">Visual Composer - <span class="price">$34</span></a>
|
||||
<p><?php esc_html_e( 'Visual Composer is the ultimate plugin for building every WordPress site without coding.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="https://codecanyon.net/item/slider-revolution-responsive-wordpress-plugin/2751380?ref=OceanWP" target="_blank">Slider Revolution - <span class="price">$19</span></a>
|
||||
<p><?php esc_html_e( 'It’s not just a slider, build modern & mobile friendly presentations for your website in no time.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="https://wordpress.org/plugins/ultimate-member/" target="_blank">Ultimate Member - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'A powerful and flexible plugin that makes it a breeze for users to sign-up and become members.', 'ocean-extra' ); ?></p></li>
|
||||
<li><a href="https://wordpress.org/plugins/woocommerce/" target="_blank">WooCommerce - <span class="price"><?php esc_html_e( 'free', 'ocean-extra' ); ?></span></a>
|
||||
<p><?php esc_html_e( 'WooCommerce is a free eCommerce plugin that allows you to sell anything, beautifully.', 'ocean-extra' ); ?></p></li>
|
||||
</ul>
|
||||
|
||||
<div class="oceanwp-btn">
|
||||
<a href="https://oceanwp.org/recommended-plugins/<?php echo esc_attr( $aff_ref ); ?>" class="oceanwp-button" target="_blank"><?php esc_html_e( 'More Recommended Plugins', 'ocean-extra' ); ?> →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- .wrap about-wrap -->
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Load about css
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function css( $hook ) {
|
||||
|
||||
// Only load scripts when needed
|
||||
if ( OE_ADMIN_PANEL_HOOK_PREFIX . '-about' != $hook ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_style( 'oceanwp-about', plugins_url( '/assets/css/about.min.css', __FILE__ ) );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
new Ocean_Extra_About();
|
||||
@@ -0,0 +1,526 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Installer
|
||||
*
|
||||
* @package Ocean_Extra
|
||||
* @category Core
|
||||
* @author Darren Cooney
|
||||
* @link https://github.com/dcooney/wordpress-plugin-installer
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Start Class
|
||||
class Ocean_Extra_Plugin_Installer {
|
||||
|
||||
public function start() {
|
||||
add_action( 'wp_ajax_oe_plugin_installer', array( $this, 'oe_plugin_installer' ) );
|
||||
add_action( 'wp_ajax_oe_plugin_activation', array( $this, 'oe_plugin_activation' ) );
|
||||
add_action( 'wp_ajax_oe_premium_plugin_activation', array( $this, 'oe_premium_plugin_activation' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the display of the free plugins
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function init( $plugins ) { ?>
|
||||
|
||||
<?php
|
||||
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
||||
|
||||
foreach( $plugins as $plugin ) :
|
||||
|
||||
$button_classes = 'install button';
|
||||
$button_text = __( 'Install Now', 'ocean-extra' );
|
||||
|
||||
$api = plugins_api( 'plugin_information',
|
||||
array(
|
||||
'slug' => sanitize_file_name( $plugin['slug'] ),
|
||||
'fields' => array(
|
||||
'short_description' => true,
|
||||
'sections' => false,
|
||||
'requires' => false,
|
||||
'downloaded' => true,
|
||||
'last_updated' => false,
|
||||
'added' => false,
|
||||
'tags' => false,
|
||||
'compatibility' => false,
|
||||
'homepage' => false,
|
||||
'donate_link' => false,
|
||||
'icons' => true,
|
||||
'banners' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
if ( ! is_wp_error( $api ) ) { // confirm error free
|
||||
|
||||
$main_plugin_file = Ocean_Extra_Plugin_Installer::get_plugin_file( $plugin['slug'] ); // Get main plugin file
|
||||
|
||||
if ( self::check_file_extension( $main_plugin_file ) ) { // check file extension
|
||||
if ( is_plugin_active( $main_plugin_file ) ) {
|
||||
// plugin activation, confirmed!
|
||||
$button_classes = 'button disabled';
|
||||
$button_text = __('Activated', 'ocean-extra');
|
||||
} else {
|
||||
// It's installed, let's activate it
|
||||
$button_classes = 'activate button button-primary';
|
||||
$button_text = __('Activate', 'ocean-extra');
|
||||
}
|
||||
}
|
||||
|
||||
// Send plugin data to template
|
||||
self::render_template( $plugin, $api, $button_text, $button_classes );
|
||||
|
||||
}
|
||||
|
||||
endforeach; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Render display template for each free plugin
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function render_template( $plugin, $api, $button_text, $button_classes ) { ?>
|
||||
|
||||
<div class="plugin">
|
||||
<div class="plugin-wrap">
|
||||
<img src="<?php echo $api->icons['1x']; ?>" alt="">
|
||||
<h2><?php echo $api->name; ?></h2>
|
||||
<p><?php echo $api->short_description; ?></p>
|
||||
|
||||
<p class="plugin-author"><?php _e( 'By', 'ocean-extra' ); ?> <?php echo $api->author; ?></p>
|
||||
</div>
|
||||
|
||||
<ul class="activation-row">
|
||||
<li>
|
||||
<a class="<?php echo $button_classes; ?>" data-slug="<?php echo $api->slug; ?>" data-name="<?php echo $api->name; ?>" href="<?php echo get_admin_url(); ?>update.php?action=install-plugin&plugin=<?php echo $api->slug; ?>&_wpnonce=<?php echo wp_create_nonce('install-plugin_'. $api->slug) ?>"><?php echo $button_text; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/" target="_blank"><?php _e( 'More Details', 'ocean-extra' ); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the display of the premium plugins
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function init_premium( $plugins ) { ?>
|
||||
|
||||
<?php
|
||||
foreach( $plugins as $plugin ) :
|
||||
|
||||
$button_classes = '';
|
||||
$button_text = '';
|
||||
|
||||
$api = array(
|
||||
'slug' => isset( $plugin['slug'] ) ? $plugin['slug'] : '',
|
||||
'url' => isset( $plugin['url'] ) ? $plugin['url'] : '',
|
||||
'full_url' => isset( $plugin['full_url'] ) ? $plugin['full_url'] : '',
|
||||
'name' => isset( $plugin['name'] ) ? $plugin['name'] : '',
|
||||
'description' => isset( $plugin['description'] ) ? $plugin['description'] : '',
|
||||
'icons' => isset( $plugin['icons'] ) ? $plugin['icons'] : '',
|
||||
'author' => isset( $plugin['author'] ) ? $plugin['author'] : '',
|
||||
'author_url' => isset( $plugin['author_url'] ) ? $plugin['author_url'] : '',
|
||||
);
|
||||
|
||||
if ( ! is_wp_error( $api ) ) { // confirm error free
|
||||
|
||||
$main_plugin_file = Ocean_Extra_Plugin_Installer::get_plugin_file( $plugin['slug'] ); // Get main plugin file
|
||||
|
||||
if ( self::check_file_extension( $main_plugin_file ) ) { // check file extension
|
||||
if ( is_plugin_active( $main_plugin_file ) ) {
|
||||
// plugin activation, confirmed!
|
||||
$button_classes = 'button disabled';
|
||||
$button_text = __('Activated', 'ocean-extra');
|
||||
} else {
|
||||
// It's installed, let's activate it
|
||||
$button_classes = 'activate button button-primary premium-activation';
|
||||
$button_text = __('Activate', 'ocean-extra');
|
||||
}
|
||||
}
|
||||
|
||||
// Send plugin data to template
|
||||
self::render_premium_template( $plugin, $api, $button_text, $button_classes );
|
||||
|
||||
}
|
||||
|
||||
endforeach; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Render display template for each premium plugin
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function render_premium_template( $plugin, $api, $button_text, $button_classes ) {
|
||||
|
||||
// Var
|
||||
$slug = $api['slug'];
|
||||
$url = $api['url'];
|
||||
$full_url = $api['full_url'];
|
||||
$name = $api['name'];
|
||||
$description = $api['description'];
|
||||
$icons = $api['icons'];
|
||||
$author = $api['author'];
|
||||
$author_url = $api['author_url'];
|
||||
|
||||
// Affiliate link
|
||||
$ref_url = '';
|
||||
$aff_ref = apply_filters( 'ocean_affiliate_ref', $ref_url );
|
||||
|
||||
// Add & is has referal link
|
||||
if ( $aff_ref ) {
|
||||
$if_ref = '&';
|
||||
} else {
|
||||
$if_ref = '?';
|
||||
} ?>
|
||||
|
||||
<div class="plugin">
|
||||
<div class="plugin-wrap">
|
||||
|
||||
<?php
|
||||
if ( $icons ) { ?>
|
||||
<img src="<?php echo $icons; ?>" alt="<?php echo $name; ?>" />
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( $name ) { ?>
|
||||
<h2><?php echo $name; ?></h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( $description ) { ?>
|
||||
<p><?php echo $description; ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( $author ) { ?>
|
||||
<p class="plugin-author"><?php _e( 'By', 'ocean-extra' ); ?> <a href="<?php echo $author_url; ?>"><?php echo $author; ?></a></p>
|
||||
<?php
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<ul class="activation-row">
|
||||
<li>
|
||||
<?php
|
||||
// Get main plugin file
|
||||
$main_plugin_file = Ocean_Extra_Plugin_Installer::get_plugin_file( $plugin['slug'] );
|
||||
|
||||
// If the plugin is installed
|
||||
if ( self::check_file_extension( $main_plugin_file ) ) { ?>
|
||||
|
||||
<a class="<?php echo $button_classes; ?>" data-slug="<?php echo $slug; ?>" data-name="<?php echo $name; ?>" href="<?php echo get_admin_url(); ?>update.php?action=install-plugin&plugin=<?php echo $slug; ?>&_wpnonce=<?php echo wp_create_nonce('install-plugin_'. $slug) ?>"><?php echo $button_text; ?></a>
|
||||
|
||||
<?php
|
||||
// If the plugin is not installed
|
||||
} else {
|
||||
|
||||
// If full url, used for the rec. plugins tab
|
||||
if ( $full_url ) { ?>
|
||||
<a class="button premium-link" href="<?php echo $full_url; ?>" target="_blank"><?php _e( 'Get This Plugin', 'ocean-extra' ); ?></a>
|
||||
<?php
|
||||
} else { ?>
|
||||
<a class="button premium-link" href="<?php echo $url; ?><?php echo $slug; ?>/<?php echo esc_attr( $aff_ref ); ?><?php echo $if_ref; ?>utm_source=admin-extensions&utm_medium=extension&utm_campaign=OWP-extensions-page&utm_content=<?php echo $name; ?>" target="_blank"><?php _e( 'Get This Add On', 'ocean-extra' ); ?></a>
|
||||
<?php
|
||||
}
|
||||
|
||||
} ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
// If full url, used for the rec. plugins tab
|
||||
if ( $full_url ) { ?>
|
||||
<a href="<?php echo $full_url; ?>" target="_blank"><?php _e( 'More Details', 'ocean-extra' ); ?></a>
|
||||
<?php
|
||||
} else { ?>
|
||||
<a href="<?php echo $url; ?><?php echo $slug; ?>/<?php echo esc_attr( $aff_ref ); ?><?php echo $if_ref; ?>utm_source=admin-extensions&utm_medium=extension&utm_campaign=OWP-extensions-page&utm_content=<?php echo $name; ?>" target="_blank"><?php _e( 'More Details', 'ocean-extra' ); ?></a>
|
||||
<?php
|
||||
} ?>
|
||||
</li>
|
||||
<li class="ribbon">
|
||||
<?php _e( 'Premium', 'ocean-extra' ); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* An Ajax method for installing plugin
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function oe_plugin_installer() {
|
||||
|
||||
if ( ! current_user_can('install_plugins') ) {
|
||||
wp_die( __( 'Sorry, you are not allowed to install plugins on this site.', 'ocean-extra' ) );
|
||||
}
|
||||
|
||||
$nonce = $_POST["nonce"];
|
||||
$plugin = $_POST["plugin"];
|
||||
|
||||
// Check our nonce, if they don't match then bounce!
|
||||
if ( ! wp_verify_nonce( $nonce, 'oe_installer_nonce' ) ) {
|
||||
wp_die( __( 'Error - unable to verify nonce, please try again.', 'ocean-extra') );
|
||||
}
|
||||
|
||||
// Include required libs for installation
|
||||
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php' );
|
||||
|
||||
// Get Plugin Info
|
||||
$api = plugins_api( 'plugin_information',
|
||||
array(
|
||||
'slug' => $plugin,
|
||||
'fields' => array(
|
||||
'short_description' => false,
|
||||
'sections' => false,
|
||||
'requires' => false,
|
||||
'rating' => false,
|
||||
'ratings' => false,
|
||||
'downloaded' => false,
|
||||
'last_updated' => false,
|
||||
'added' => false,
|
||||
'tags' => false,
|
||||
'compatibility' => false,
|
||||
'homepage' => false,
|
||||
'donate_link' => false,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$skin = new WP_Ajax_Upgrader_Skin();
|
||||
$upgrader = new Plugin_Upgrader( $skin );
|
||||
$upgrader->install( $api->download_link );
|
||||
|
||||
if ( $api->name ) {
|
||||
$status = 'success';
|
||||
$msg = $api->name .' successfully installed.';
|
||||
} else {
|
||||
$status = 'failed';
|
||||
$msg = 'There was an error installing '. $api->name .'.';
|
||||
}
|
||||
|
||||
$json = array(
|
||||
'status' => $status,
|
||||
'msg' => $msg,
|
||||
);
|
||||
|
||||
wp_send_json( $json );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate plugin via Ajax
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function oe_plugin_activation() {
|
||||
|
||||
if ( ! current_user_can( 'install_plugins' ) ) {
|
||||
wp_die( __( 'Sorry, you are not allowed to activate plugins on this site.', 'ocean-extra' ) );
|
||||
}
|
||||
|
||||
$nonce = $_POST["nonce"];
|
||||
$plugin = $_POST["plugin"];
|
||||
|
||||
// Check our nonce, if they don't match then bounce!
|
||||
if ( ! wp_verify_nonce( $nonce, 'oe_installer_nonce' ) ) {
|
||||
die( __( 'Error - unable to verify nonce, please try again.', 'ocean-extra' ) );
|
||||
}
|
||||
|
||||
|
||||
// Include required libs for activation
|
||||
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php' );
|
||||
|
||||
|
||||
// Get Plugin Info
|
||||
$api = plugins_api( 'plugin_information',
|
||||
array(
|
||||
'slug' => $plugin,
|
||||
'fields' => array(
|
||||
'short_description' => false,
|
||||
'sections' => false,
|
||||
'requires' => false,
|
||||
'rating' => false,
|
||||
'ratings' => false,
|
||||
'downloaded' => false,
|
||||
'last_updated' => false,
|
||||
'added' => false,
|
||||
'tags' => false,
|
||||
'compatibility' => false,
|
||||
'homepage' => false,
|
||||
'donate_link' => false,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
if ( $api->name ) {
|
||||
$main_plugin_file = Ocean_Extra_Plugin_Installer::get_plugin_file( $plugin );
|
||||
$status = 'success';
|
||||
if ( $main_plugin_file ) {
|
||||
activate_plugin( $main_plugin_file );
|
||||
$msg = $api->name .' successfully activated.';
|
||||
}
|
||||
} else {
|
||||
$status = 'failed';
|
||||
$msg = 'There was an error activating '. $api->name .'.';
|
||||
}
|
||||
|
||||
$json = array(
|
||||
'status' => $status,
|
||||
'msg' => $msg,
|
||||
);
|
||||
|
||||
wp_send_json( $json );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate premium plugin via Ajax
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function oe_premium_plugin_activation() {
|
||||
|
||||
if ( ! current_user_can( 'install_plugins' ) ) {
|
||||
wp_die( __( 'Sorry, you are not allowed to activate plugins on this site.', 'ocean-extra' ) );
|
||||
}
|
||||
|
||||
$nonce = $_POST["nonce"];
|
||||
$plugin = $_POST["plugin"];
|
||||
|
||||
// Check our nonce, if they don't match then bounce!
|
||||
if ( ! wp_verify_nonce( $nonce, 'oe_installer_nonce' ) ) {
|
||||
die( __( 'Error - unable to verify nonce, please try again.', 'ocean-extra' ) );
|
||||
}
|
||||
|
||||
|
||||
// Include required libs for activation
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php' );
|
||||
|
||||
|
||||
// Get Plugin Info
|
||||
$api = array(
|
||||
'slug' => $plugin,
|
||||
'name' => $plugin['name'],
|
||||
);
|
||||
|
||||
if ( $api['name'] ) {
|
||||
$main_plugin_file = Ocean_Extra_Plugin_Installer::get_plugin_file( $plugin );
|
||||
$status = 'success';
|
||||
if ( $main_plugin_file ) {
|
||||
activate_plugin( $main_plugin_file );
|
||||
$msg = $api['name'] .' successfully activated.';
|
||||
}
|
||||
} else {
|
||||
$status = 'failed';
|
||||
$msg = 'There was an error activating '. $api['name'] .'.';
|
||||
}
|
||||
|
||||
$json = array(
|
||||
'status' => $status,
|
||||
'msg' => $msg,
|
||||
);
|
||||
|
||||
wp_send_json( $json );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A method to get the main plugin file
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function get_plugin_file( $plugin_slug ) {
|
||||
require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); // Load plugin lib
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
foreach( $plugins as $plugin_file => $plugin_info ) {
|
||||
|
||||
// Get the basename of the plugin e.g. [askismet]/askismet.php
|
||||
$slug = dirname( plugin_basename( $plugin_file ) );
|
||||
|
||||
if( $slug ) {
|
||||
if ( $slug == $plugin_slug ) {
|
||||
return $plugin_file; // If $slug = $plugin_name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper to check file extension
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function check_file_extension( $filename ) {
|
||||
if ( substr( strrchr( $filename, '.' ), 1 ) === 'php' ) {
|
||||
// has .php exension
|
||||
return true;
|
||||
} else {
|
||||
// ./wp-content/plugins
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load scripts
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function enqueue_scripts( $hook ) {
|
||||
|
||||
// Only load scripts when needed
|
||||
if ( OE_ADMIN_PANEL_HOOK_PREFIX . '-extensions' != $hook
|
||||
&& OE_ADMIN_PANEL_HOOK_PREFIX . '-rec-plugins' != $hook ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// JS
|
||||
wp_enqueue_script( 'oceanwp-installer', plugins_url( '/js/installer.min.js', __FILE__ ), array( 'jquery' ) );
|
||||
|
||||
wp_localize_script( 'oceanwp-installer', 'oe_installer_localize', array(
|
||||
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||
'admin_nonce' => wp_create_nonce( 'oe_installer_nonce' ),
|
||||
'install_now' => __( 'Are you sure you want to install this plugin?', 'ocean-extra' ),
|
||||
'install_btn' => __( 'Install Now', 'ocean-extra' ),
|
||||
'activate_btn' => __( 'Activate', 'ocean-extra' ),
|
||||
'installed_btn' => __( 'Activated', 'ocean-extra' )
|
||||
) );
|
||||
|
||||
// CSS
|
||||
wp_enqueue_style( 'oceanwp-installer', plugins_url( '/css/installer.min.css', __FILE__ ) );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// initialize
|
||||
$ocean_extra_plugin_installer = new Ocean_Extra_Plugin_Installer();
|
||||
$ocean_extra_plugin_installer->start();
|
||||
@@ -0,0 +1,74 @@
|
||||
.oceanwp-about-panel .clr:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
.oceanwp-about-panel a { text-decoration: none; transition: all .3s ease; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; }
|
||||
.oceanwp-about-panel a:focus { -webkit-box-shadow: none; box-shadow: none; }
|
||||
.oceanwp-about-panel .title-wrap { margin: 8px 0 30px; }
|
||||
.oceanwp-about-panel .oceanwp-title { float: left; margin: 0; }
|
||||
.oceanwp-about-panel .oceanwp-title .version { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 3px; margin-left: 12px; background-color: #fff; color: #13aff0; }
|
||||
.oceanwp-about-panel .social-wrap { float: right; margin: 0; }
|
||||
.oceanwp-about-panel .social-wrap li { float: left; margin: 0; }
|
||||
.oceanwp-about-panel .social-wrap li a { display: inline-block; width: 50px; height: 50px; line-height: 50px; border: 1px solid #ccc; border-radius: 50%; margin-left: 10px; text-align: center; }
|
||||
.oceanwp-about-panel .social-wrap li a i { line-height: inherit; }
|
||||
.oceanwp-about-panel .social-wrap li a.twitter { color: #46d4fe; }
|
||||
.oceanwp-about-panel .social-wrap li a.twitter:hover { background-color: #46d4fe; color: #fff; border-color: #46d4fe; }
|
||||
.oceanwp-about-panel .social-wrap li a.facebook { color: #37589b; }
|
||||
.oceanwp-about-panel .social-wrap li a.facebook:hover { background-color: #37589b; color: #fff; border-color: #37589b; }
|
||||
.oceanwp-about-panel .social-wrap li a.github { color: #60b044; }
|
||||
.oceanwp-about-panel .social-wrap li a.github:hover { background-color: #60b044; color: #fff; border-color: #60b044; }
|
||||
|
||||
.oceanwp-about-panel .oceanwp-bloc.col-2 { float: left; width: 49%; }
|
||||
.oceanwp-about-panel .oceanwp-bloc.col-2.second { float: right; clear: none; }
|
||||
.oceanwp-about-panel .oceanwp-bloc.col-2 .github-link { display: block; }
|
||||
|
||||
.oceanwp-about-panel .oceanwp-bloc { display: block; position: relative; padding: 40px 80px; background: #fff; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 30px; text-align: center; clear: both; box-sizing: border-box; }
|
||||
.oceanwp-about-panel .oceanwp-bloc.blue { border-color: #13aff0; }
|
||||
.oceanwp-about-panel .oceanwp-bloc h2.bloc-title { position: relative; margin: 0 0 30px; padding: 0 0 20px; font-size: 20px; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }
|
||||
.oceanwp-about-panel .oceanwp-bloc h2.bloc-title:after { content: ''; position: absolute; bottom: 0; left: 50%; margin-left: -30px; width: 60px; height: 2px; background-color: #13aff0; }
|
||||
.oceanwp-about-panel .oceanwp-bloc p { font-size: 15px; line-height: 1.8; color: #777; margin: 0 0 20px; }
|
||||
.oceanwp-about-panel .oceanwp-bloc p:last-child { margin: 0; }
|
||||
.oceanwp-about-panel .oceanwp-bloc p.themecloud-price { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: #32b6c0; }
|
||||
.oceanwp-about-panel .oceanwp-bloc p.themecloud-price .small-text { display: block; color: #777; font-size: 12px; text-transform: lowercase; }
|
||||
.oceanwp-about-panel .oceanwp-bloc .oceanwp-btn { display: block; }
|
||||
.oceanwp-about-panel .oceanwp-bloc .oceanwp-button { display: inline-block; font-size: 12px; font-weight: 600; color: #333; border-bottom: 1px solid; padding-bottom: 2px; text-transform: uppercase; letter-spacing: 1px; }
|
||||
.oceanwp-about-panel .oceanwp-bloc .oceanwp-button:hover { color: #13aff0; }
|
||||
|
||||
.oceanwp-about-panel .oceanwp-bloc.customize ul.oceanwp-list li p { margin: 0 0 10px; }
|
||||
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list { margin: 0 -26px 20px -26px; border-bottom: 1px solid #eee; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list .option-title { display: block; margin: 0 0 13px; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list .option-link { display: inline-block; font-size: 12px; color: #13aff0; border-bottom: 1px solid; padding-bottom: 2px; margin: 0; letter-spacing: 0.6px; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list .option-link:hover { color: #0b7cac; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li { position: relative; float: left; width: 25%; border-top: 1px solid #eee; padding: 26px; margin-bottom: 0; box-sizing: border-box; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li:after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background-color: #eee; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li:nth-child(4n+1) { clear: both; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li:nth-child(4n):after { right: auto; left: -1px; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li a { display: block; margin: 0 0 13px; color: #13aff0; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li a:hover { color: #0b7cac; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li a .price { color: #45B964; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li p { font-size: 12px; line-height: 1.6; }
|
||||
|
||||
/* RTL */
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-title { float: right; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-title .version { margin-right: 12px; margin-left: 0; }
|
||||
.appearance_page_oceanwp-about .about-wrap .social-wrap { float: left; }
|
||||
.appearance_page_oceanwp-about .about-wrap .social-wrap li { float: right; }
|
||||
.appearance_page_oceanwp-about .about-wrap .social-wrap li a { margin-right: 10px; margin-left: 0; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-bloc.col-2 { float: right; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-bloc.col-2.second { float: left; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-bloc h2.bloc-title:after { right: 50%; left: auto; margin-right: -30px; margin-left: 0; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-bloc ul.oceanwp-list li { float: right; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-bloc ul.oceanwp-list li:after { left: 0; right: auto; }
|
||||
.appearance_page_oceanwp-about .about-wrap .oceanwp-bloc ul.oceanwp-list li:nth-child(4n):after { right: -1px; left: auto; }
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (max-width: 767px) {
|
||||
.oceanwp-about-panel .oceanwp-bloc.col-2 { float: none; width: 100%; }
|
||||
.oceanwp-about-panel .oceanwp-bloc.col-2.second { float: none; clear: none; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li { float: none; width: 100%; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li:after { display: none; }
|
||||
.oceanwp-about-panel .oceanwp-bloc ul.oceanwp-list li:nth-child(4n+1) { clear: none; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.oceanwp-about-panel .social-wrap { display: none; }
|
||||
.oceanwp-about-panel .oceanwp-bloc { padding: 20px 30px; }
|
||||
}
|
||||
@@ -0,0 +1,642 @@
|
||||
.owp-clr:after {
|
||||
content: '';
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
clear: both;
|
||||
zoom: 1;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.owp-demo-wrap {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-about-description {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-about-description p {
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
line-height: 1.8;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.owp-demo-wrap hr {
|
||||
margin: 32px 0 40px;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .themes {
|
||||
margin: 0 -15px;
|
||||
min-width: 100% !important; /* Fix the zoom image bug */
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-header-bar {
|
||||
display: inline-block;
|
||||
width: -webkit-calc(100% - 40px);
|
||||
width: calc(100% - 40px);
|
||||
margin: 20px 0 30px;
|
||||
padding: 0 20px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation {
|
||||
font-size: 13px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation ul {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation li {
|
||||
float: left;
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation li.active a,
|
||||
.owp-demo-wrap .owp-navigation li.active a:hover {
|
||||
border-bottom: 4px solid #666;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation li a {
|
||||
display: block;
|
||||
padding: 15px 0;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
border-bottom: 4px solid #fff;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation li a:hover {
|
||||
cursor: pointer;
|
||||
color: #00a0d2;
|
||||
border-bottom: 4px solid #fff;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-search-input {
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
-webkit-transition: 50ms border-color ease-in-out;
|
||||
transition: 50ms border-color ease-in-out;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
|
||||
}
|
||||
|
||||
.owp-demo-wrap .theme-wrap {
|
||||
float: left;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 33.33%;
|
||||
padding: 0 15px 30px 15px;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .theme {
|
||||
float: none;
|
||||
width: 100% !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.owp-is-fadeout {
|
||||
-webkit-animation: owp-fade linear 200ms 1 forwards;
|
||||
animation: owp-fade linear 200ms 1 forwards;
|
||||
}
|
||||
|
||||
.owp-is-fadein {
|
||||
-webkit-animation: owp-fade linear 200ms 1 reverse forwards;
|
||||
animation: owp-fade linear 200ms 1 reverse forwards;
|
||||
}
|
||||
|
||||
@-webkit-keyframes owp-fade {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes owp-fade {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-import-loader {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.demo-import-loader.preview-all {
|
||||
background: rgba(255, 255, 255, .7);
|
||||
}
|
||||
|
||||
.demo-import-loader i {
|
||||
font-size: 32px;
|
||||
line-height: 32px;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: -16px auto 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.preview-icon i.custom-loader:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -15px;
|
||||
margin-top: -15px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
opacity: .8;
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
border-color: rgba(0,0,0,0.2);
|
||||
border-left-color: #000;
|
||||
z-index: 99;
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
-ms-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
-ms-animation: spinner 0.6s infinite linear;
|
||||
-webkit-animation: spinner 0.6s infinite linear;
|
||||
-o-animation: spinner 0.6s infinite linear;
|
||||
-moz-animation: spinner 0.6s infinite linear;
|
||||
animation: spinner 0.6s infinite linear;
|
||||
}
|
||||
|
||||
.preview-icon i {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@-webkit-keyframes spinner {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spinner {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#owp-demo-popup-wrap {
|
||||
display: none;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#owp-demo-popup-wrap,
|
||||
#owp-demo-popup-wrap .owp-demo-popup-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.owp-demo-popup-overlay {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.owp-demo-popup-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.owp-demo-popup-container:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.owp-demo-popup-content-wrap {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
max-width: 100%;
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
.owp-demo-popup-content-inner {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
width: 600px;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
z-index: 1000;
|
||||
-webkit-box-shadow: 3px 3px 20px 0 rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 3px 3px 20px 0 rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 3px 3px 20px 0 rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.owp-demo-popup-content-inner a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.owp-demo-popup-content-inner .owp-demo-popup-close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #333;
|
||||
opacity: .5;
|
||||
font-weight: 300;
|
||||
font-size: 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.owp-demo-popup-content-inner .owp-demo-popup-close:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#owp-demo-popup-content h2.title {
|
||||
position: relative;
|
||||
font-size: 15px;
|
||||
text-transform: uppercase;
|
||||
padding: 25px 15px 18px;
|
||||
margin: 0 0 20px;
|
||||
letter-spacing: 0.6px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#owp-demo-popup-content h2.title:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -43px;
|
||||
display: inline-block;
|
||||
width: 86px;
|
||||
height: 2px;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.owp-popup-text {
|
||||
padding: 0 30px 20px;
|
||||
}
|
||||
|
||||
.owp-popup-text p {
|
||||
font-size: 14px;
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
.owp-required-plugins-wrap {
|
||||
border-top: 3px solid #eaeaea;
|
||||
padding-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.owp-required-plugins-wrap h3 {
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
.owp-required-plugins {
|
||||
margin: 25px auto 0;
|
||||
}
|
||||
|
||||
.owp-required-plugins .owp-plugin {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.owp-required-plugins .owp-plugin:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.owp-required-plugins h2 {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 28px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.owp-required-plugins .button {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#owp-demo-popup-content .owp-button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
background-color: #13aff0;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
margin: 0;
|
||||
padding: 20px 20px;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
letter-spacing: .1em;
|
||||
line-height: 1;
|
||||
outline: none;
|
||||
box-shadow: none !important;
|
||||
-webkit-transition: all .3s ease;
|
||||
-moz-transition: all .3s ease;
|
||||
-ms-transition: all .3s ease;
|
||||
-o-transition: all .3s ease;
|
||||
transition: all .3s ease;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#owp-demo-popup-content .owp-button:hover {
|
||||
background-color: #0b7cac;
|
||||
}
|
||||
|
||||
#owp-demo-import-form,
|
||||
.owp-loader,
|
||||
.owp-last {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#owp-demo-import-form ul.owp-popup-text,
|
||||
.owp-loader .owp-import-status {
|
||||
width: 360px;
|
||||
max-width: 100%;
|
||||
margin: 30px auto 10px;
|
||||
}
|
||||
|
||||
.owp-loader .owp-import-status p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.owp-loader .owp-import-status p:before {
|
||||
display: inline-block;
|
||||
font: 400 18px/1 dashicons;
|
||||
vertical-align: bottom;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.owp-loader .owp-import-status .owp-imported:before {
|
||||
content: '\f147';
|
||||
color: #79ba49;
|
||||
}
|
||||
|
||||
.owp-loader .owp-import-status .owp-importing:before {
|
||||
content: '\f463';
|
||||
color: #f56e28;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-animation: spinner 2s infinite linear;
|
||||
animation: spinner 2s infinite linear;
|
||||
}
|
||||
|
||||
.owp-loader .owp-import-status .owp-importing-failed {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.owp-loader .owp-import-status .owp-importing-failed:before {
|
||||
content: '\f158';
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.owp-last {
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.owp-last .checkmark {
|
||||
display: block;
|
||||
width: 130px;
|
||||
height: 130px;
|
||||
margin: 0 auto;
|
||||
-webkit-animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
|
||||
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
|
||||
border-radius: 50%;
|
||||
-webkit-box-shadow: inset 0 0 0 #5bc142;
|
||||
box-shadow: inset 0 0 0 #5bc142;
|
||||
stroke-width: 2;
|
||||
stroke: #fff;
|
||||
stroke-miterlimit: 10;
|
||||
}
|
||||
|
||||
.owp-last .checkmark-circle {
|
||||
-webkit-animation: stroke .6s cubic-bezier(.65, 0, .45, 1) forwards;
|
||||
animation: stroke .6s cubic-bezier(.65, 0, .45, 1) forwards;
|
||||
stroke-dasharray: 166;
|
||||
stroke-dashoffset: 166;
|
||||
stroke-width: 2;
|
||||
stroke-miterlimit: 10;
|
||||
stroke: #5bc142;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.owp-last .checkmark-check {
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
-webkit-animation: stroke .3s cubic-bezier(.65, 0, .45, 1) .8s forwards;
|
||||
animation: stroke .3s cubic-bezier(.65, 0, .45, 1) .8s forwards;
|
||||
stroke-dasharray: 48;
|
||||
stroke-dashoffset: 48;
|
||||
}
|
||||
|
||||
@-webkit-keyframes stroke {
|
||||
100% {
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes stroke {
|
||||
100% {
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes scale {
|
||||
0%,
|
||||
100% {
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale3d(1.1, 1.1, 1);
|
||||
transform: scale3d(1.1, 1.1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes scale {
|
||||
0%,
|
||||
100% {
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale3d(1.1, 1.1, 1);
|
||||
transform: scale3d(1.1, 1.1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fill {
|
||||
100% {
|
||||
-webkit-box-shadow: inset 0 0 0 100px #5bc142;
|
||||
box-shadow: inset 0 0 0 100px #5bc142;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fill {
|
||||
100% {
|
||||
-webkit-box-shadow: inset 0 0 0 100px #5bc142;
|
||||
box-shadow: inset 0 0 0 100px #5bc142;
|
||||
}
|
||||
}
|
||||
|
||||
.owp-last h3 {
|
||||
font-size: 20px;
|
||||
margin: 30px 0 10px;
|
||||
}
|
||||
|
||||
.owp-last p {
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.owp-last a {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
padding-bottom: 3px;
|
||||
border-bottom: 2px solid;
|
||||
margin-top: 6px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.6px;
|
||||
}
|
||||
|
||||
.owp-last a:after {
|
||||
content: '\f345';
|
||||
font: 400 16px/1 dashicons;
|
||||
vertical-align: bottom;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
/* RTL */
|
||||
.rtl .owp-demo-wrap .theme-wrap,
|
||||
.rtl .owp-demo-wrap .owp-navigation,
|
||||
.rtl .owp-demo-wrap .owp-navigation li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.rtl .owp-demo-popup-content-wrap {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.rtl .owp-demo-popup-content-inner .owp-demo-popup-close {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.rtl .owp-required-plugins .button {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (min-width: 1640px) {
|
||||
.owp-demo-wrap .theme-wrap {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1080px) {
|
||||
.owp-demo-wrap .theme-wrap {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 850px) {
|
||||
.owp-demo-popup-container:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 780px) {
|
||||
.owp-demo-wrap .theme {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .theme-actions {
|
||||
position: relative;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .theme-browser .theme .theme-actions .button-primary {
|
||||
margin-right: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 640px) {
|
||||
.owp-demo-wrap .owp-navigation {
|
||||
width: -webkit-calc(100% - 180px);
|
||||
width: calc(100% - 180px);
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-navigation li a {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.owp-demo-wrap .owp-search-input {
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
height: 30px;
|
||||
margin: 0;
|
||||
margin-top: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 580px) {
|
||||
.owp-demo-wrap .theme-wrap {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
.oceanwp-extensions-panel * {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body .oceanwp-extensions-panel h2:first-child,
|
||||
.oceanwp-extensions-panel .oceanwp-desc {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .oceanwp-desc {
|
||||
margin: 6px 0 30px;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .extensions-wrap {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .extensions-wrap li {
|
||||
width: 33.33%;
|
||||
padding: 0 10px 20px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .extensions-wrap li .owp-card-top {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
min-height: 140px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom: 0;
|
||||
padding: 20px;
|
||||
text-decoration: none;
|
||||
-webkit-transition: all .3s ease;
|
||||
-moz-transition: all .3s ease;
|
||||
-ms-transition: all .3s ease;
|
||||
-o-transition: all .3s ease;
|
||||
transition: all .3s ease;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .owp-img {
|
||||
padding-right: 15px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .owp-img img {
|
||||
max-width: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel h3 {
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .owp-description p {
|
||||
color: #777;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .owp-card-btn {
|
||||
display: block;
|
||||
background-color: #13aff0;
|
||||
color: #fff;
|
||||
padding: 12px 10px;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
-webkit-transition: all .3s ease;
|
||||
-moz-transition: all .3s ease;
|
||||
-ms-transition: all .3s ease;
|
||||
-o-transition: all .3s ease;
|
||||
transition: all .3s ease;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .owp-card-btn:hover {
|
||||
background-color: #0b7cac;
|
||||
}
|
||||
|
||||
.oceanwp-extensions-panel .owp-card-btn:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* RTL */
|
||||
.rtl .oceanwp-extensions-panel .owp-img {
|
||||
padding-left: 15px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (max-width: 1180px) {
|
||||
.oceanwp-extensions-panel .extensions-wrap li {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 780px) {
|
||||
.oceanwp-extensions-panel .extensions-wrap li {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.oceanwp-extensions-panel *{-webkit-box-sizing:border-box;box-sizing:border-box}.oceanwp-extensions-panel .oceanwp-desc,body .oceanwp-extensions-panel h2:first-child{padding-left:10px;padding-right:10px}.oceanwp-extensions-panel .oceanwp-desc{margin:6px 0 30px}.oceanwp-extensions-panel .extensions-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.oceanwp-extensions-panel .extensions-wrap li{width:33.33%;padding:0 10px 20px;margin:0;overflow:hidden}.oceanwp-extensions-panel .extensions-wrap li .owp-card-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-align-items:center;align-items:center;min-height:140px;background-color:#fff;border:1px solid #ddd;border-bottom:0;padding:20px;text-decoration:none;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:hover{background-color:#f1f1f1}.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:focus{-webkit-box-shadow:none;box-shadow:none}.oceanwp-extensions-panel .owp-img{padding-right:15px;line-height:1}.oceanwp-extensions-panel .owp-img img{max-width:80px;border-radius:50%}.oceanwp-extensions-panel h3{margin:0 0 15px}.oceanwp-extensions-panel .owp-description p{color:#777;font-size:14px;margin:0}.oceanwp-extensions-panel .owp-card-btn{display:block;background-color:#13aff0;color:#fff;padding:12px 10px;font-size:13px;line-height:1;font-weight:600;text-transform:uppercase;text-decoration:none;text-align:center;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}.oceanwp-extensions-panel .owp-card-btn:hover{background-color:#0b7cac}.oceanwp-extensions-panel .owp-card-btn:focus{-webkit-box-shadow:none;box-shadow:none}.rtl .oceanwp-extensions-panel .owp-img{padding-left:15px;padding-right:0}@media only screen and (max-width:1180px){.oceanwp-extensions-panel .extensions-wrap li{width:50%}}@media only screen and (max-width:780px){.oceanwp-extensions-panel .extensions-wrap li{width:100%}}
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Import/Export page */
|
||||
.oceanwp-import-export { margin: 25px 40px 0 20px; max-width: 1050px; }
|
||||
.oceanwp-import-export > h2 { margin: 0 0 16px !important; }
|
||||
.oceanwp-import-export p.submit { padding-bottom: 0; }
|
||||
.oceanwp-import-export .clr:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
.oceanwp-import-export .oceanwp-bloc.col-2 { float: left; width: 49%; }
|
||||
.oceanwp-import-export .oceanwp-bloc.col-2.second { float: right; clear: none; }
|
||||
.oceanwp-import-export .hndle { cursor: initial !important; }
|
||||
.oceanwp-import-export .oceanwp-export p:first-child { margin-bottom: 16px; }
|
||||
.oceanwp-import-export .oceanwp-export p:last-child { margin-top: 0; }
|
||||
|
||||
/* RTL */
|
||||
body.rtl .oceanwp-import-export { margin: 25px 20px 0 40px; }
|
||||
body.rtl .oceanwp-import-export .oceanwp-bloc.col-2 { float: right; }
|
||||
body.rtl .oceanwp-import-export .oceanwp-bloc.col-2.second { float: left; }
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (max-width: 767px) {
|
||||
.oceanwp-import-export .oceanwp-bloc.col-2,
|
||||
body.rtl .oceanwp-import-export .oceanwp-bloc.col-2 { float: none; width: 100%; }
|
||||
.oceanwp-import-export .oceanwp-bloc.col-2.second,
|
||||
body.rtl .oceanwp-import-export .oceanwp-bloc.col-2.second { float: none; clear: none; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.oceanwp-import-export{margin:25px 40px 0 20px;max-width:1050px}.oceanwp-import-export>h2{margin:0 0 16px!important}.oceanwp-import-export p.submit{padding-bottom:0}.oceanwp-import-export .clr:after{content:'';display:block;height:0;clear:both;visibility:hidden;zoom:1}.oceanwp-import-export .oceanwp-bloc.col-2{float:left;width:49%}.oceanwp-import-export .oceanwp-bloc.col-2.second{float:right;clear:none}.oceanwp-import-export .hndle{cursor:initial!important}.oceanwp-import-export .oceanwp-export p:first-child{margin-bottom:16px}.oceanwp-import-export .oceanwp-export p:last-child{margin-top:0}body.rtl .oceanwp-import-export{margin:25px 20px 0 40px}body.rtl .oceanwp-import-export .oceanwp-bloc.col-2{float:right}body.rtl .oceanwp-import-export .oceanwp-bloc.col-2.second{float:left}@media only screen and (max-width:767px){.oceanwp-import-export .oceanwp-bloc.col-2,body.rtl .oceanwp-import-export .oceanwp-bloc.col-2{float:none;width:100%}.oceanwp-import-export .oceanwp-bloc.col-2.second,body.rtl .oceanwp-import-export .oceanwp-bloc.col-2.second{float:none;clear:none}}
|
||||
@@ -0,0 +1,77 @@
|
||||
/* General */
|
||||
a:focus, .wp-core-ui .button-link:focus,
|
||||
.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus,
|
||||
.wp-core-ui .button:focus { -webkit-box-shadow: none; box-shadow: none; }
|
||||
.wp-core-ui .button-link:focus,
|
||||
.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus,
|
||||
.wp-core-ui .button:focus { border-color: #999; }
|
||||
.wrap .oceanwp-desc { padding: 10px 15px; margin: 12px 0 25px; }
|
||||
.wrap .oceanwp-callout { background-color: #fff; color: #444; border: 1px solid #e5e5e5; padding: 22px 20px; border-radius: 3px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
|
||||
.wrap .oceanwp-callout p { margin: 0; }
|
||||
|
||||
/* Plugins */
|
||||
.oe-plugin-installer { box-sizing: border-box; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; flex-flow: row wrap; -webkit-flex-flow: row wrap; justify-content: space-between; width: 102%; position: relative; left: -1%; }
|
||||
.oe-plugin-installer:after { content: ''; flex: auto; }
|
||||
.oe-plugin-installer * { box-sizing: border-box; }
|
||||
.oe-plugin-installer .plugin { width: 31.333%; margin: 0 1% 30px; padding: 0; overflow: hidden; text-align: left; border: 1px solid #e1e1e1; background: #fff; position: relative; border-radius: 2px; }
|
||||
.oe-plugin-installer .plugin:hover { border-color: #cecece; }
|
||||
.oe-plugin-installer .plugin-wrap { padding: 20px 20px 95px 145px; min-height: 214px; display: block; position: relative; }
|
||||
.oe-plugin-installer li a,
|
||||
.oe-plugin-installer .plugin-wrap a { text-decoration: none; }
|
||||
.oe-plugin-installer .plugin-wrap img { display: block; position: absolute; left: 20px; top: 20px; max-width: 108px; max-height: 108px; border: 1px solid #f7f7f7; }
|
||||
.oe-plugin-installer .plugin-wrap h2,
|
||||
.oe-plugin-installer .plugin-wrap p { padding: 0; margin: 0; font-size: 17px; font-weight: 600; color: #333; line-height: 1.4; }
|
||||
.oe-plugin-installer .plugin-wrap p { padding: 10px 0 0; margin: 0; font-size: 14px; font-weight: 400; color: #777; }
|
||||
.oe-plugin-installer .plugin-wrap p.plugin-author { font-size: 13px; padding-top: 20px; font-style: italic; }
|
||||
.oe-plugin-installer .activation-row { display: block; margin: 0; padding: 20px; background: #f7f7f7; border-top: 1px solid #e1e1e1; border-radius: 0 0 2px 2px; position: absolute; bottom: 0; width: 100%; overflow: hidden; border-radius: 0 0 2px 2px; text-align: left; }
|
||||
.oe-plugin-installer .activation-row li { display: inline-block; vertical-align: top; margin: 0 10px 0 0; font-size: 13px; line-height: 27px; }
|
||||
|
||||
/* Ribbon */
|
||||
.oe-plugin-installer li.ribbon { float: right; background-color: #67ce6b; color: #fff; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-align: center; text-transform: uppercase; border-radius: 3px; margin: 0; }
|
||||
|
||||
/* Notice */
|
||||
.oceanwp-admin-notice { display: inline-block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin: 12px 0 25px; padding: 12px 16px; width: 100%; box-shadow: 0 1px 1px rgba(0,0,0,.04); border: 1px solid #e5e5e5; background-color: #fff; color: #555; font-size: 13px; }
|
||||
.oceanwp-admin-notice .alignleft { font-size: 15px; line-height: 38px; }
|
||||
.oceanwp-admin-notice a.button-primary { height: auto; font-size: 13px; font-weight: 600; line-height: 1; background-color: #13aff0; border: 0; color: #fff; padding: 12px 25px; text-transform: uppercase; letter-spacing: 1px; border-radius: 30px; text-align: center; transition: all .3s ease; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; text-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
||||
.oceanwp-admin-notice a.button-primary:hover { background-color: #0b7cac; }
|
||||
.oceanwp-admin-notice a.button-secondary { opacity: 0.7 }
|
||||
.oceanwp-admin-notice a.button-secondary:hover { opacity: 0.9 }
|
||||
.oceanwp-admin-notice a { text-decoration: none;color: #3ba1da }
|
||||
.oceanwp-admin-notice a:hover { color: #44b0ec }
|
||||
|
||||
/* RTL */
|
||||
body.rtl .oe-plugin-installer { right: -1%; left: auto; }
|
||||
body.rtl .oe-plugin-installer .plugin { text-align: right; }
|
||||
body.rtl .oe-plugin-installer .plugin-wrap { padding: 20px 145px 95px 20px; }
|
||||
body.rtl .oe-plugin-installer .plugin-wrap img { right: 20px; left: auto; }
|
||||
body.rtl .oe-plugin-installer .activation-row { border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0; text-align: right; }
|
||||
body.rtl .oe-plugin-installer .activation-row li { margin: 0 0 0 10px; }
|
||||
body.rtl .oe-plugin-installer li.ribbon { float: left; }
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (max-width: 1280px) {
|
||||
.oceanwp-admin-notice { text-align: center; }
|
||||
.oceanwp-admin-notice .alignleft,
|
||||
.oceanwp-admin-notice .alignright { float: none; }
|
||||
.oceanwp-admin-notice .alignleft { line-height: 1.5; }
|
||||
.oceanwp-admin-notice a.button-primary { margin: 15px 0 5px; }
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1170px) {
|
||||
.oe-plugin-installer .plugin { width: 48%; margin: 0 1% 15px; }
|
||||
}
|
||||
|
||||
@media screen and (max-width: 960px) {
|
||||
.oe-plugin-installer .plugin-wrap { padding: 20px 20px 95px 115px; min-height: 214px; }
|
||||
.oe-plugin-installer .plugin-wrap img { max-width: 78px; max-height: 78px; }
|
||||
body.rtl .oe-plugin-installer .plugin-wrap { padding: 20px 115px 95px 20px; }
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
.oe-plugin-installer { width: 100%; position: static; }
|
||||
.oe-plugin-installer .plugin { width: 100%; margin: 0 0 20px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 320px) {
|
||||
.oceanwp-admin-notice a.button-primary { padding: 12px 18px; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.oe-plugin-installer,.oe-plugin-installer *{box-sizing:border-box}.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none;box-shadow:none}.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{border-color:#999}.wrap .oceanwp-desc{padding:10px 15px;margin:12px 0 25px}.wrap .oceanwp-callout{background-color:#fff;color:#444;border:1px solid #e5e5e5;padding:22px 20px;border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,.04)}.wrap .oceanwp-callout p{margin:0}.oe-plugin-installer{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;flex-flow:row wrap;-webkit-flex-flow:row wrap;justify-content:space-between;width:102%;position:relative;left:-1%}.oe-plugin-installer:after{content:'';flex:auto}.oe-plugin-installer .plugin{width:31.333%;margin:0 1% 30px;padding:0;overflow:hidden;text-align:left;border:1px solid #e1e1e1;background:#fff;position:relative;border-radius:2px}.oe-plugin-installer .plugin:hover{border-color:#cecece}.oe-plugin-installer .plugin-wrap{padding:20px 20px 95px 145px;min-height:214px;display:block;position:relative}.oe-plugin-installer .plugin-wrap a,.oe-plugin-installer li a{text-decoration:none}.oe-plugin-installer .plugin-wrap img{display:block;position:absolute;left:20px;top:20px;max-width:108px;max-height:108px;border:1px solid #f7f7f7}.oe-plugin-installer .plugin-wrap h2,.oe-plugin-installer .plugin-wrap p{padding:0;margin:0;font-size:17px;font-weight:600;color:#333;line-height:1.4}.oe-plugin-installer .plugin-wrap p{padding:10px 0 0;margin:0;font-size:14px;font-weight:400;color:#777}.oe-plugin-installer .plugin-wrap p.plugin-author{font-size:13px;padding-top:20px;font-style:italic}.oe-plugin-installer .activation-row{display:block;margin:0;padding:20px;background:#f7f7f7;border-top:1px solid #e1e1e1;position:absolute;bottom:0;width:100%;overflow:hidden;border-radius:0 0 2px 2px;text-align:left}.oceanwp-admin-notice a.button-primary,.oe-plugin-installer li.ribbon{font-weight:600;text-transform:uppercase;letter-spacing:1px;text-align:center}.oe-plugin-installer .activation-row li{display:inline-block;vertical-align:top;margin:0 10px 0 0;font-size:13px;line-height:27px}.oe-plugin-installer li.ribbon{float:right;background-color:#67ce6b;color:#fff;padding:0 10px;font-size:12px;border-radius:3px;margin:0}.oceanwp-admin-notice{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:12px 0 25px;padding:12px 16px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background-color:#fff;color:#555;font-size:13px}.oceanwp-admin-notice .alignleft{font-size:15px;line-height:38px}.oceanwp-admin-notice a.button-primary{height:auto;font-size:13px;line-height:1;background-color:#13aff0;border:0;color:#fff;padding:12px 25px;border-radius:30px;transition:all .3s ease;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.oceanwp-admin-notice a.button-primary:hover{background-color:#0b7cac}.oceanwp-admin-notice a.button-secondary{opacity:.7}.oceanwp-admin-notice a.button-secondary:hover{opacity:.9}.oceanwp-admin-notice a{text-decoration:none;color:#3ba1da}.oceanwp-admin-notice a:hover{color:#44b0ec}body.rtl .oe-plugin-installer{right:-1%;left:auto}body.rtl .oe-plugin-installer .plugin{text-align:right}body.rtl .oe-plugin-installer .plugin-wrap{padding:20px 145px 95px 20px}body.rtl .oe-plugin-installer .plugin-wrap img{right:20px;left:auto}body.rtl .oe-plugin-installer .activation-row{border-radius:0 2px 2px 0;text-align:right}body.rtl .oe-plugin-installer .activation-row li{margin:0 0 0 10px}body.rtl .oe-plugin-installer li.ribbon{float:left}@media only screen and (max-width:1280px){.oceanwp-admin-notice{text-align:center}.oceanwp-admin-notice .alignleft,.oceanwp-admin-notice .alignright{float:none}.oceanwp-admin-notice .alignleft{line-height:1.5}.oceanwp-admin-notice a.button-primary{margin:15px 0 5px}}@media screen and (max-width:1170px){.oe-plugin-installer .plugin{width:48%;margin:0 1% 15px}}@media screen and (max-width:960px){.oe-plugin-installer .plugin-wrap{padding:20px 20px 95px 115px;min-height:214px}.oe-plugin-installer .plugin-wrap img{max-width:78px;max-height:78px}body.rtl .oe-plugin-installer .plugin-wrap{padding:20px 115px 95px 20px}}@media screen and (max-width:640px){.oe-plugin-installer{width:100%;position:static}.oe-plugin-installer .plugin{width:100%;margin:0 0 20px}}@media only screen and (max-width:320px){.oceanwp-admin-notice a.button-primary{padding:12px 18px}}
|
||||
@@ -0,0 +1,43 @@
|
||||
.clr:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
a:focus, .button, .wp-core-ui .button-link:focus,
|
||||
.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus,
|
||||
.wp-core-ui .button:focus { -webkit-box-shadow: none !important; box-shadow: none !important; }
|
||||
body .button.owp-button { background-color: #13aff0; color: #fff; height: auto; font-size: 12px; line-height: 1; font-weight: 600; text-transform: uppercase; margin: 0; padding: 14px 20px; border: 0; cursor: pointer; text-align: center; letter-spacing: .1em; border-radius: 3px; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; transition: all .3s ease; }
|
||||
body .button.owp-button:hover,
|
||||
body .button.owp-button:focus,
|
||||
body .button.owp-button:active { background-color: #0b7cac; color: #fff; }
|
||||
body .button.owp-button:active { -webkit-transform: none; -ms-transform: none; transform: none; }
|
||||
|
||||
/* Licenses tab */
|
||||
#oceanwp-license-form .form-table, #oceanwp-license-form thead, #oceanwp-license-form tbody, #oceanwp-license-form tfoot,
|
||||
#oceanwp-license-form tr, #oceanwp-license-form td, #oceanwp-license-form th, #oceanwp-license-form caption { display: block; }
|
||||
#oceanwp-license-form .form-table tr { float: left; margin: 0 15px 15px 0; background: #fff; border: 1px solid #ccc; width: 30.5%; max-width: 350px; padding: 14px; min-height: 220px; position: relative; box-sizing: border-box; }
|
||||
#oceanwp-license-form .form-table th { background: #f9f9f9; padding: 14px; border-bottom: 1px solid #ccc; margin: -14px -14px 20px; width: 100%; }
|
||||
#oceanwp-license-form .form-table td { padding: 0; }
|
||||
#oceanwp-license-form td input.regular-text { margin: 0 0 8px; width: 100%; }
|
||||
#oceanwp-license-form .oceanwp-license-data[class*="oceanwp-license-"] { position: absolute; background: #fafafa; padding: 14px; border-top: 1px solid #eee; margin: 20px -14px -14px; min-height: 67px; width: 100%; bottom: 14px; box-sizing: border-box; }
|
||||
#oceanwp-license-form .oceanwp-license-data[class*="oceanwp-license-"] a { color: #444; }
|
||||
#oceanwp-license-form .oceanwp-license-data[class*="oceanwp-license-"] a:hover { text-decoration: none; }
|
||||
#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice { background-color: #00a0d2; color: #fff; border-color: #00a0d2; }
|
||||
#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg { background-color: #e24e4e; color: #fff; border-color: #e24e4e; }
|
||||
#oceanwp-license-form .oceanwp-license-data.oceanwp-license-error-msg { background-color: #ffebcd; border-color: #ffebcd; }
|
||||
#oceanwp-license-form .oceanwp-license-data p { font-size: 13px; margin-top: 0; }
|
||||
#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a,
|
||||
#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a { color: #fff; }
|
||||
#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a:hover,
|
||||
#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a:hover { text-decoration: none; }
|
||||
#oceanwp-license-form p.submit { clear: both; }
|
||||
|
||||
#oceanwp-license-form .form-table.bundle-block tr { max-width: 500px; }
|
||||
#oceanwp-license-form .form-table.bundle-block th { background-color: #13aff0; color: #fff; }
|
||||
|
||||
/* RTL */
|
||||
body.rtl #oceanwp-license-form .form-table tr { float: right; margin: 0 0 15px 15px; }
|
||||
|
||||
@media screen and ( max-width: 1100px ) {
|
||||
#oceanwp-license-form .form-table tr { width: 46%; max-width: none; min-height: 230px; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 600px ) {
|
||||
#oceanwp-license-form .form-table tr { width: 100%; min-height: 230px; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.clr:after{content:'';display:block;height:0;clear:both;visibility:hidden;zoom:1}.button,.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none!important;box-shadow:none!important}body .button.owp-button{background-color:#13aff0;color:#fff;height:auto;font-size:12px;line-height:1;font-weight:600;text-transform:uppercase;margin:0;padding:14px 20px;border:0;cursor:pointer;text-align:center;letter-spacing:.1em;border-radius:3px;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}body .button.owp-button:active,body .button.owp-button:focus,body .button.owp-button:hover{background-color:#0b7cac;color:#fff}body .button.owp-button:active{-webkit-transform:none;-ms-transform:none;transform:none}#oceanwp-license-form .form-table,#oceanwp-license-form caption,#oceanwp-license-form tbody,#oceanwp-license-form td,#oceanwp-license-form tfoot,#oceanwp-license-form th,#oceanwp-license-form thead,#oceanwp-license-form tr{display:block}#oceanwp-license-form .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}#oceanwp-license-form .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}#oceanwp-license-form .form-table td{padding:0}#oceanwp-license-form td input.regular-text{margin:0 0 8px;width:100%}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-] a{color:#444}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-] a:hover{text-decoration:none}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg{background-color:#e24e4e;color:#fff;border-color:#e24e4e}#oceanwp-license-form .oceanwp-license-data.oceanwp-license-error-msg{background-color:#ffebcd;border-color:#ffebcd}#oceanwp-license-form .oceanwp-license-data p{font-size:13px;margin-top:0}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a,#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a{color:#fff}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a:hover,#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a:hover{text-decoration:none}#oceanwp-license-form p.submit{clear:both}#oceanwp-license-form .form-table.bundle-block tr{max-width:500px}#oceanwp-license-form .form-table.bundle-block th{background-color:#13aff0;color:#fff}body.rtl #oceanwp-license-form .form-table tr{float:right;margin:0 0 15px 15px}@media screen and (max-width:1100px){#oceanwp-license-form .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:600px){#oceanwp-license-form .form-table tr{width:100%;min-height:230px}}
|
||||
@@ -0,0 +1,38 @@
|
||||
.wrap .ocean-extra-notice { position: relative; border: none; padding: 0; }
|
||||
.wrap .ocean-extra-notice:after { content: ''; display: block; visibility: hidden; clear: both; zoom: 1; height: 0; }
|
||||
.ocean-extra-notice .notice-inner { position: relative; }
|
||||
.ocean-extra-notice span.icon-side { color: #fff; position: absolute; top: 0; left: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -moz-align-items: center; align-items: center; font-size: 30px; width: 60px; height: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
||||
.ocean-extra-notice span.dashicons-heart { background-color: #13aff0; }
|
||||
.ocean-extra-notice .notice-content { padding: 10px 40px 15px 74px; }
|
||||
.ocean-extra-notice .notice-content p { font-size: 14px; }
|
||||
.ocean-extra-notice .notice-content p:first-child { margin-top: 0; }
|
||||
.ocean-extra-notice .notice-content p:last-child { margin-bottom: 0; }
|
||||
.ocean-extra-notice .notice-content a { text-decoration: none; -webkit-box-shadow: none !important; box-shadow: none !important; }
|
||||
.ocean-extra-notice .notice-content a.btn { height: auto; font-size: 12px; line-height: 1; background-color: #13aff0; color: #fff; border: 1px solid #13aff0; padding: 10px 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; text-shadow: none; transition: all .3s ease; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; }
|
||||
.ocean-extra-notice .notice-content a.btn:hover { background-color: #0b7cac; border-color: #0b7cac; }
|
||||
.ocean-extra-notice .notice-content a.btn.button-secondary { background-color: #f2f2f2; color: #666; border-color: #dadada; margin-left: 10px; }
|
||||
.ocean-extra-notice .notice-content a.btn.button-secondary:hover { background-color: #e6e6e6; border-color: #e6e6e6; }
|
||||
.ocean-extra-notice a.dismiss { position: absolute; top: 10px; right: 10px; text-decoration: none; color: #13aff0; -webkit-box-shadow: none !important; box-shadow: none !important; }
|
||||
|
||||
/* Rating notice */
|
||||
.ocean-extra-notice.oe-rating-notice span.dashicons-star-filled { background-color: #ffb900; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content p:last-child { margin-top: 20px; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content a.btn { background-color: #ffb900; border-color: #ffb900; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content a.btn:hover { background-color: #e6a803; border-color: #e6a803; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content a.btn.button-secondary { background-color: #f2f2f2; color: #666; border-color: #dadada; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content a.btn.button-secondary:hover { background-color: #e6e6e6; border-color: #e6e6e6; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content a span { vertical-align: middle; }
|
||||
.ocean-extra-notice.oe-rating-notice .notice-content a span.dashicons { font-size: 1.4em; padding-right: 5px; height: auto; }
|
||||
.ocean-extra-notice.oe-rating-notice a.dismiss { color: #ffb900; }
|
||||
|
||||
body.rtl .ocean-extra-notice span.dashicons-heart { right: 0; left: auto; }
|
||||
body.rtl .ocean-extra-notice .notice-content { padding-right: 74px; padding-left: 40px; }
|
||||
body.rtl .ocean-extra-notice .notice-content a.btn.button-secondary { margin-right: 10px; margin-left: 0; }
|
||||
body.rtl .ocean-extra-notice a.dismiss { left: 10px; right: auto; }
|
||||
body.rtl .ocean-extra-notice.oe-rating-notice .notice-content a span.dashicons { padding-left: 5px; padding-right: 0; }
|
||||
|
||||
@media screen and ( max-width: 480px ) {
|
||||
.ocean-extra-notice span.dashicons-heart { display: none; }
|
||||
.ocean-extra-notice .notice-content { padding-left: 14px; }
|
||||
body.rtl .ocean-extra-notice .notice-content { padding-right: 14px; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.wrap .ocean-extra-notice{position:relative;border:none;padding:0}.wrap .ocean-extra-notice:after{content:'';display:block;visibility:hidden;clear:both;zoom:1;height:0}.ocean-extra-notice .notice-inner{position:relative}.ocean-extra-notice span.icon-side{color:#fff;position:absolute;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;font-size:30px;width:60px;height:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ocean-extra-notice span.dashicons-heart{background-color:#13aff0}.ocean-extra-notice .notice-content{padding:10px 40px 15px 74px}.ocean-extra-notice .notice-content p{font-size:14px}.ocean-extra-notice .notice-content p:first-child{margin-top:0}.ocean-extra-notice .notice-content p:last-child{margin-bottom:0}.ocean-extra-notice .notice-content a{text-decoration:none;-webkit-box-shadow:none!important;box-shadow:none!important}.ocean-extra-notice .notice-content a.btn{height:auto;font-size:12px;line-height:1;background-color:#13aff0;color:#fff;border:1px solid #13aff0;padding:10px 18px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;text-shadow:none;transition:all .3s ease;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease}.ocean-extra-notice .notice-content a.btn:hover{background-color:#0b7cac;border-color:#0b7cac}.ocean-extra-notice .notice-content a.btn.button-secondary{background-color:#f2f2f2;color:#666;border-color:#dadada;margin-left:10px}.ocean-extra-notice .notice-content a.btn.button-secondary:hover{background-color:#e6e6e6;border-color:#e6e6e6}.ocean-extra-notice a.dismiss{position:absolute;top:10px;right:10px;text-decoration:none;color:#13aff0;-webkit-box-shadow:none!important;box-shadow:none!important}.ocean-extra-notice.oe-rating-notice span.dashicons-star-filled{background-color:#ffb900}.ocean-extra-notice.oe-rating-notice .notice-content p:last-child{margin-top:20px}.ocean-extra-notice.oe-rating-notice .notice-content a.btn{background-color:#ffb900;border-color:#ffb900}.ocean-extra-notice.oe-rating-notice .notice-content a.btn:hover{background-color:#e6a803;border-color:#e6a803}.ocean-extra-notice.oe-rating-notice .notice-content a.btn.button-secondary{background-color:#f2f2f2;color:#666;border-color:#dadada}.ocean-extra-notice.oe-rating-notice .notice-content a.btn.button-secondary:hover{background-color:#e6e6e6;border-color:#e6e6e6}.ocean-extra-notice.oe-rating-notice .notice-content a span{vertical-align:middle}.ocean-extra-notice.oe-rating-notice .notice-content a span.dashicons{font-size:1.4em;padding-right:5px;height:auto}.ocean-extra-notice.oe-rating-notice a.dismiss{color:#ffb900}body.rtl .ocean-extra-notice span.dashicons-heart{right:0;left:auto}body.rtl .ocean-extra-notice .notice-content{padding-right:74px;padding-left:40px}body.rtl .ocean-extra-notice .notice-content a.btn.button-secondary{margin-right:10px;margin-left:0}body.rtl .ocean-extra-notice a.dismiss{left:10px;right:auto}body.rtl .ocean-extra-notice.oe-rating-notice .notice-content a span.dashicons{padding-left:5px;padding-right:0}@media screen and (max-width:480px){.ocean-extra-notice span.dashicons-heart{display:none}.ocean-extra-notice .notice-content{padding-left:14px}body.rtl .ocean-extra-notice .notice-content{padding-right:14px}}
|
||||
@@ -0,0 +1,135 @@
|
||||
.clr:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
a:focus, .button, .wp-core-ui .button-link:focus,
|
||||
.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus,
|
||||
.wp-core-ui .button:focus { -webkit-box-shadow: none !important; box-shadow: none !important; }
|
||||
body .button.owp-button { background-color: #13aff0; color: #fff; height: auto; font-size: 12px; line-height: 1; font-weight: 600; text-transform: uppercase; margin: 0; padding: 14px 20px; border: 0; cursor: pointer; text-align: center; letter-spacing: .1em; border-radius: 3px; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; transition: all .3s ease; }
|
||||
body .button.owp-button:hover,
|
||||
body .button.owp-button:focus,
|
||||
body .button.owp-button:active { background-color: #0b7cac; color: #fff; }
|
||||
body .button.owp-button:active { -webkit-transform: none; -ms-transform: none; transform: none; }
|
||||
|
||||
/* Settings wrap */
|
||||
.wrap.oceanwp-theme-panel { margin-right: 40px; }
|
||||
.oceanwp-settings .left { float: left; width: 75%; margin-top: 20px; }
|
||||
.oceanwp-settings .right { float: right; width: 23%; margin-top: 30px; }
|
||||
.oceanwp-settings .oceanwp-title { font-size: 26px; line-height: 1.6; margin: 0 0 3px 8px; }
|
||||
.oceanwp-settings .oceanwp-desc { margin: 0 0 30px 8px; font-size: 15px; }
|
||||
.oceanwp-settings .divider { display: block; height: 1px; margin: 40px 0 33px; border-bottom: 1px solid #ccc; }
|
||||
|
||||
/* Customizer panels */
|
||||
.oceanwp-panels .column-wrap { float: left; position: relative; width: 32.33%; margin: 0 0.5% 1% 0.5%; overflow: hidden; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
||||
.oceanwp-panels .column-name { display: block; background-color: #fff; border: 2px solid #eee; padding: 25px 25px 20px; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; transition: all .3s ease; }
|
||||
.oceanwp-panels .column-name:hover { border-color: #ddd; }
|
||||
.oceanwp-panels .column-name h3.title { float: left; display: block; position: relative; font-size: 18px; color: #333; margin: 0; z-index: 2; }
|
||||
.oceanwp-panels .column-name .desc { display: block; position: relative; font-size: 17px; line-height: 1.6; font-weight: 400; color: #777; z-index: 2; }
|
||||
.oceanwp-panels input[type=checkbox] { float: right; width: 22px; height: 22px; min-width: 22px; margin: 0; }
|
||||
.oceanwp-panels input[type=checkbox]:checked:before { width: 22px; font-size: 27px; }
|
||||
.oceanwp-panels p.submit { display: inline-block; width: 100%; margin: 10px 0 0 0.5%; padding: 0; clear: both; }
|
||||
|
||||
/* Customizer options */
|
||||
.oceanwp-options .options-inner { display: -webkit-box; display: -ms-flexbox; display: flex; flex-wrap: wrap; margin-top: 30px; }
|
||||
.oceanwp-options .column-wrap { display: -webkit-box; display: -ms-flexbox; display: flex; position: relative; background: #fff; border: 1px solid #ccc; width: 24%; min-height: 150px; margin: 0 0.5% 1% 0.5%; padding: 25px 25px 20px; overflow: hidden; box-sizing: border-box; }
|
||||
.oceanwp-options .column-wrap.hidden { display: none !important; }
|
||||
.oceanwp-options .column-inner { display: -webkit-box; display: -ms-flexbox; display: flex; flex-direction: column; }
|
||||
.oceanwp-options .title { display: block; position: relative; font-size: 17px; color: #333; margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid #eaeaea; text-transform: capitalize; }
|
||||
.oceanwp-options .desc { flex: 1 0 auto; display: block; margin: 0 0 20px; font-size: 14px; line-height: 1.6; font-weight: 400; color: #777; }
|
||||
.oceanwp-options .bottom-column { padding: 20px 0 0; border-top: 1px solid #eaeaea; margin: 0; }
|
||||
.oceanwp-options .bottom-column .option-link { font-size: 12px; font-weight: 600; line-height: 1.6; text-transform: uppercase; letter-spacing: .6px; text-decoration: none; }
|
||||
|
||||
/* Sidebar */
|
||||
.oceanwp-wizard { margin-bottom: 15px; }
|
||||
.oceanwp-wizard a { width: 100%; }
|
||||
|
||||
.oceanwp-bloc { display: inline-block; position: relative; width: 100%; background-color: #fff; margin: 0 auto 15px auto; border-radius: 3px; border: 1px solid #e5e5e5; -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04); box-shadow: 0 1px 1px rgba(0,0,0,.04); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; overflow: hidden; }
|
||||
.oceanwp-bloc h3 { display: block; font-size: 14px; font-weight: 600; padding: 12px 10px; background-color: #13aff0; color: #fff; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 22px; text-align: center; }
|
||||
.oceanwp-bloc .content-wrap { position: relative; padding: 0 30px 25px; z-index: 2; text-align: center; }
|
||||
.oceanwp-bloc p.content { font-size: 14px; color: #5a5a5a; margin: 0; }
|
||||
body .oceanwp-bloc .button.owp-button { margin: 22px 0 10px; }
|
||||
.oceanwp-bloc p.bottom-text { color: #5a5a5a; font-size: 12px; font-weight: 600; font-style: italic; margin: 0; }
|
||||
.oceanwp-bloc i { position: absolute; bottom: -30px; right: -26px; width: auto; height: auto; font-size: 120px; opacity: .07; z-index: 1; }
|
||||
|
||||
.oceanwp-bundle { background-color: #2794da; background: -moz-linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2386c5 58%); background: -webkit-linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2794da 58%); background: linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2794da 58%); color: #fff; }
|
||||
.oceanwp-bundle .owp-text { text-align: center; margin: 0; padding: 25px 10px; }
|
||||
.oceanwp-bundle a.logo-text { display: inline-block; font-size: 38px; line-height: 1; color: #fff; text-decoration: none; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; transition: all .3s ease; }
|
||||
.oceanwp-bundle a.logo-text:hover { opacity: .6; }
|
||||
.oceanwp-bundle a.logo-text .circle { display: inline-block; width: 5px; height: 5px; background-color: #fff; border-radius: 50%; }
|
||||
.oceanwp-bundle p.content { color: #fff; }
|
||||
.oceanwp-bundle p.content a { color: #afd8f3; text-decoration: underline; }
|
||||
.oceanwp-bundle p.content a:hover { text-decoration: none; }
|
||||
body .oceanwp-bundle .button.owp-button { display: block; background-color: #1d2428; color: #fff; margin-top: 30px; }
|
||||
body .oceanwp-bundle .button.owp-button:hover { background-color: #303e4c; }
|
||||
|
||||
.oceanwp-facebook { background-color: #3b5998; color: #fff; }
|
||||
.oceanwp-facebook .owp-img { position: relative; z-index: 2; padding: 30px 30px 0; margin: 0 0 18px; text-align: center; }
|
||||
.oceanwp-facebook .owp-img img { max-width: 200px; }
|
||||
.oceanwp-bloc.oceanwp-facebook p.content { color: #fff; }
|
||||
body .oceanwp-facebook .button.owp-button { background-color: #fff; color: #3b5998; }
|
||||
body .oceanwp-facebook .button.owp-button:hover { background-color: #597dca; color: #fff; }
|
||||
.owp-ribbon { position: absolute; top: 0; left: 0; width: 100px; height: 100px; z-index: 1; overflow: hidden; }
|
||||
.owp-ribbon > div { background-color: #3fc387; left: 0; width: 200%; margin-top: 28px; font-size: 13px; line-height: 2; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; text-align: center; -webkit-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg); -ms-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg); transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg); }
|
||||
|
||||
.oceanwp-buttons { display: inline-block; width: 100%; }
|
||||
body .oceanwp-buttons .button.owp-button { padding: 14px 10px; }
|
||||
body .oceanwp-buttons .button.owp-button.owp-yt-btn { background-color: #e62117; float: left; width: 48%; }
|
||||
body .oceanwp-buttons .button.owp-button.owp-yt-btn:hover { background-color: #b31217; }
|
||||
body .oceanwp-buttons .button.owp-button.owp-doc-btn { background-color: #2e3243; float: right; width: 48%; }
|
||||
body .oceanwp-buttons .button.owp-button.owp-doc-btn:hover { background-color: #262939; }
|
||||
body .oceanwp-buttons .button.owp-button.owp-support-btn { background-color: #13aff0; width: 100%; margin-top: 10px; }
|
||||
body .oceanwp-buttons .button.owp-button.owp-support-btn:hover { background-color: #0b7cac; }
|
||||
|
||||
/* RTL */
|
||||
body.rtl .wrap.oceanwp-theme-panel { margin-left: 40px; margin-right: 0; }
|
||||
body.rtl .oceanwp-settings .left { float: right; }
|
||||
body.rtl .oceanwp-settings .right { float: left; }
|
||||
body.rtl .oceanwp-settings .oceanwp-title { margin: 0 8px 3px 0; }
|
||||
body.rtl .oceanwp-settings .oceanwp-desc { margin: 0 8px 30px 0; }
|
||||
body.rtl .oceanwp-panels .column-wrap { float: right; }
|
||||
body.rtl .oceanwp-panels .column-name h3.title { float: right; }
|
||||
body.rtl .oceanwp-panels input[type=checkbox] { float: left; }
|
||||
body.rtl .oceanwp-panels p.submit { margin: 10px 0.5% 0 0; }
|
||||
body.rtl .oceanwp-bloc i { left: -26px; right: auto; }
|
||||
body.rtl .oceanwp-buttons .button.owp-button.owp-yt-btn { float: right; }
|
||||
body.rtl .oceanwp-buttons .button.owp-button.owp-doc-btn { float: left; }
|
||||
body.rtl .owp-ribbon { right: 0; left: auto; -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); }
|
||||
body.rtl .owp-ribbon > div { right: 0; left: auto; -webkit-transform: translateY(-50%) translateX(0) translateX(35px) rotate(-45deg); -ms-transform: translateY(-50%) translateX(0) translateX(35px) rotate(-45deg); transform: translateY(-50%) translateX(0) translateX(35px) rotate(-45deg); }
|
||||
|
||||
@media screen and ( max-width: 1280px ) {
|
||||
.wrap.oceanwp-theme-panel { margin-right: 20px; }
|
||||
.oceanwp-settings .left,
|
||||
.oceanwp-settings .right { float: none; width: 100%; }
|
||||
.oceanwp-options .column-wrap { width: 32.33%; }
|
||||
.oceanwp-bloc,
|
||||
.oceanwp-buttons { width: 49%; }
|
||||
.oceanwp-review,
|
||||
.oceanwp-facebook.has-bundle { float: left; }
|
||||
.oceanwp-facebook.has-bundle { clear: left; }
|
||||
.oceanwp-bundle,
|
||||
.oceanwp-facebook,
|
||||
.oceanwp-buttons.has-bundle { float: right; }
|
||||
.oceanwp-buttons.has-bundle { clear: none; }
|
||||
.oceanwp-facebook { clear: none; }
|
||||
.oceanwp-buttons { float: left; clear: left; }
|
||||
body.rtl .wrap.oceanwp-theme-panel { margin-left: 20px; margin-right: 0; }
|
||||
body.rtl .oceanwp-review,
|
||||
body.rtl .oceanwp-facebook.has-bundle { float: right; }
|
||||
body.rtl .oceanwp-facebook.has-bundle { clear: right; }
|
||||
body.rtl .oceanwp-bundle,
|
||||
body.rtl .oceanwp-buttons.has-bundle { float: left; }
|
||||
body.rtl .oceanwp-facebook { float: left; }
|
||||
body.rtl .oceanwp-buttons { float: right; clear: right; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1100px ) {
|
||||
.oceanwp-panels .column-wrap,
|
||||
.oceanwp-options .column-wrap { width: 49%; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 600px ) {
|
||||
.oceanwp-panels .column-wrap,
|
||||
.oceanwp-options .column-wrap { width: 100%; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 480px ) {
|
||||
.oceanwp-bloc,
|
||||
.oceanwp-buttons { float: none !important; width: 100%; min-width: 100%; }
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
.push-monkey-bootstrap * {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.push-monkey {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.push-monkey-bootstrap .container-fluid {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.push-monkey-bootstrap .panel {
|
||||
float: left;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
border: 0px;
|
||||
border-top: 2px solid #E5E5E5;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
-moz-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading {
|
||||
padding: 10px;
|
||||
background: #F5F5F5;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
border-top-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading .panel-title-image {
|
||||
float: left;
|
||||
width: 30px;
|
||||
border: 2px solid #D5D5D5;
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading .panel-title {
|
||||
margin: 0 0 0 7px;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 30px;
|
||||
display: block;
|
||||
float: left;
|
||||
color: #434A54;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading .panel-title-box {
|
||||
float: left;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading .panel-title-box h3 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 18px;
|
||||
color: #434A54;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading .panel-title-box span {
|
||||
font-size: 12px;
|
||||
color: #767676;
|
||||
font-weight: 400;
|
||||
line-height: 12px;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-heading,
|
||||
.push-monkey-bootstrap .panel .panel-footer,
|
||||
.push-monkey-bootstrap .panel .panel-body {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-body {
|
||||
padding: 15px;
|
||||
position: relative;
|
||||
}
|
||||
.push-monkey-bootstrap h3 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #434A54;
|
||||
}
|
||||
.push-monkey-bootstrap p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.push-monkey-bootstrap .panel.panel-success {
|
||||
border-top-color: #2fcc70;
|
||||
}
|
||||
.push-monkey-bootstrap .form-group {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
clear: both;
|
||||
}
|
||||
.push-monkey-bootstrap label {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
margin-bottom: 5px;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.push-monkey-bootstrap .col-xs-12 {
|
||||
width: 100%;
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.push-monkey-bootstrap .col-md-3,
|
||||
.push-monkey-bootstrap .col-md-4,
|
||||
.push-monkey-bootstrap .col-md-6 {
|
||||
float: left;
|
||||
}
|
||||
.push-monkey-bootstrap .col-md-3 {
|
||||
width: 25%;
|
||||
}
|
||||
.push-monkey-bootstrap .col-md-4 {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
.push-monkey-bootstrap .col-md-6 {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
.push-monkey-bootstrap .col-md-3,
|
||||
.push-monkey-bootstrap .col-md-4,
|
||||
.push-monkey-bootstrap .col-md-6 {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.push-monkey-bootstrap .switch {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0;
|
||||
}
|
||||
.push-monkey-bootstrap .switch input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
.push-monkey-bootstrap .switch input:checked + span:after {
|
||||
left: 21px;
|
||||
}
|
||||
.push-monkey-bootstrap .switch input:checked + span {
|
||||
background-color: #2fcc70;
|
||||
}
|
||||
.push-monkey-bootstrap .switch input:disabled + span {
|
||||
background-color: #CCC;
|
||||
}
|
||||
.push-monkey-bootstrap .switch span {
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
-moz-border-radius: 30px;
|
||||
-webkit-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
background-color: #E64330;
|
||||
border: 1px solid #E5E5E5;
|
||||
display: inline-block;
|
||||
-webkit-transition: all 200ms ease;
|
||||
-moz-transition: all 200ms ease;
|
||||
-ms-transition: all 200ms ease;
|
||||
-o-transition: all 200ms ease;
|
||||
transition: all 200ms ease;
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
left: 0px;
|
||||
}
|
||||
.push-monkey-bootstrap .switch span:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
width: 26px;
|
||||
top: 1px;
|
||||
bottom: 1px;
|
||||
left: 1px;
|
||||
-moz-border-radius: 30px;
|
||||
-webkit-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
-moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
|
||||
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
|
||||
-webkit-transition: all 200ms ease;
|
||||
-moz-transition: all 200ms ease;
|
||||
-ms-transition: all 200ms ease;
|
||||
-o-transition: all 200ms ease;
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
.push-monkey-bootstrap .switch.switch-small {
|
||||
margin: 6px 0px 4px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.push-monkey-bootstrap .switch.switch-small input:checked + span:after {
|
||||
left: 11px;
|
||||
}
|
||||
.push-monkey-bootstrap .switch.switch-small span {
|
||||
width: 30px;
|
||||
height: 20px;
|
||||
-moz-border-radius: 20px;
|
||||
-webkit-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.push-monkey-bootstrap .switch.switch-small span:after {
|
||||
width: 16px;
|
||||
}
|
||||
.push-monkey-bootstrap .help-block {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
color: #737373;
|
||||
}
|
||||
.push-monkey-bootstrap .form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
padding: 6px 12px;
|
||||
-webkit-appearance: none;
|
||||
border: 1px solid #D5D5D5;
|
||||
background: #F9F9F9;
|
||||
color: #555555;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.push-monkey-bootstrap .form-control:focus {
|
||||
border-color: #C5C5C5;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border-color: #C1C1C1;
|
||||
background: #FFF;
|
||||
}
|
||||
.push-monkey-bootstrap textarea.form-control {
|
||||
height: auto;
|
||||
}
|
||||
.push-monkey-bootstrap .panel .panel-footer {
|
||||
background: #F5F5F5;
|
||||
border: 0;
|
||||
border-top: 1px solid #E3E3E3;
|
||||
line-height: 30px;
|
||||
padding: 10px;
|
||||
}
|
||||
.push-monkey-bootstrap .pull-right {
|
||||
float: right;
|
||||
}
|
||||
.push-monkey-bootstrap .btn {
|
||||
background-color: #363636;
|
||||
border-color: #363636;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding: 4px 15px;
|
||||
line-height: 20px;
|
||||
font-weight: 400;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 200ms ease;
|
||||
-moz-transition: all 200ms ease;
|
||||
-ms-transition: all 200ms ease;
|
||||
-o-transition: all 200ms ease;
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
.push-monkey-bootstrap .btn:hover {
|
||||
background-color: #286090;
|
||||
border-color: #286090;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
.clr:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
|
||||
.wrap .oceanwp-desc { padding: 10px 15px; margin: 20px 8px; }
|
||||
.wrap .oceanwp-desc p { font-size: 14px; margin: 0; }
|
||||
|
||||
.oceanwp-modules .modules-top { display: block; margin: 15px 0.5%; }
|
||||
.oceanwp-modules .modules-top p.submit { display: inline-block; margin: 0; }
|
||||
.oceanwp-modules .modules-top p.submit input:active { vertical-align: baseline !important; }
|
||||
.oceanwp-modules .modules-top .owp-all-wrap { display: inline-block; margin-left: 15px; }
|
||||
.oceanwp-modules .modules-top .owp-all-wrap p { display: inline-block; font-size: 15px; line-height: 1.5; margin: 0; }
|
||||
.oceanwp-modules .modules-top .owp-all-wrap #owp-switch { float: none; display: inline-block; margin-left: 8px; }
|
||||
.oceanwp-modules .btn-switcher { float: right; border: 1px solid rgba(0,0,0,.1); border-radius: 10px; list-style: none; margin: 0; padding: 0; }
|
||||
.oceanwp-modules .btn-switcher li { float: left; border-right: 1px solid rgba(0,0,0,.1); margin: 0; }
|
||||
.oceanwp-modules .btn-switcher li:last-child { border-right: none; }
|
||||
.oceanwp-modules .btn-switcher li a { display: inline-block; background-color: #f5f5f5; color: #555; font-size: 12px; font-weight: 600; width: 50px; height: 28px; line-height: 28px; text-transform: uppercase; text-decoration: none; letter-spacing: 1px; text-align: center; -webkit-box-shadow: none; box-shadow: none; }
|
||||
.oceanwp-modules .btn-switcher li a:hover { background-color: #eee; }
|
||||
.oceanwp-modules .btn-switcher li.active a,
|
||||
.oceanwp-modules .btn-switcher li.active a:hover { background-color: #3498DB; color: #fff; }
|
||||
.oceanwp-modules .btn-switcher li:first-child a { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
|
||||
.oceanwp-modules .btn-switcher li:last-child a { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
|
||||
.is-fadeout { animation: fade linear 200ms 1 forwards; }
|
||||
.is-fadein { animation: fade linear 200ms 1 reverse forwards; }
|
||||
@keyframes fade { from { opacity: 1; } to { opacity: 0; } }
|
||||
|
||||
.oceanwp-modules .modules-inner { display: -webkit-box; display: -ms-flexbox; display: flex; flex-wrap: wrap; margin-top: 30px; }
|
||||
.oceanwp-modules .column-wrap { display: -webkit-box; display: -ms-flexbox; display: flex; position: relative; background: #fff; border: 1px solid #ccc; width: 24%; min-height: 150px; margin: 0 0.5% 1% 0.5%; padding: 25px 25px 20px; overflow: hidden; box-sizing: border-box; }
|
||||
.oceanwp-modules .column-wrap.hidden { display: none !important; }
|
||||
.oceanwp-modules .type { position: absolute; top: 0; right: 0; color: #fff; font-size: 12px; font-weight: 700; width: 50px; height: 30px; line-height: 30px; text-transform: uppercase; letter-spacing: 1px; border-bottom-left-radius: 5px; text-align: center; }
|
||||
.oceanwp-modules .type.js { background-color: #fea952; }
|
||||
.oceanwp-modules .type.css { background-color: #67ce6b; }
|
||||
.oceanwp-modules .column-inner { display: -webkit-box; display: -ms-flexbox; display: flex; flex-direction: column; width: 100%; }
|
||||
.oceanwp-modules .info { display: block; position: relative; font-size: 18px; color: #333; margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid #eaeaea; }
|
||||
.oceanwp-modules .desc { flex: 1 0 auto; display: block; margin: 0 0 20px; font-size: 16px; line-height: 1.6; font-weight: 400; color: #777; }
|
||||
.oceanwp-modules .bottom-column { padding: 20px 0 0; border-top: 1px solid #eaeaea; margin: 0; }
|
||||
.oceanwp-modules .bottom-column .title { float: left; margin-top: 3px; font-size: 12px; font-weight: 600; line-height: 16px; text-transform: uppercase; letter-spacing: 0.6px; }
|
||||
.oceanwp-modules #owp-switch { float: right; }
|
||||
.oceanwp-modules #owp-switch input { position: absolute; left: -9999px; }
|
||||
.oceanwp-modules #owp-switch label { position: relative; padding-left: 4em; padding-top: .25em; cursor: pointer; }
|
||||
.oceanwp-modules #owp-switch label:before,
|
||||
.oceanwp-modules #owp-switch label:after { content: ''; position: absolute; height: 1.80em; -webkit-transition: all .5s ease; -o-transition: all .5s ease; transition: all .5s ease; }
|
||||
.oceanwp-modules #owp-switch label:before { left: 0; top: 0; width: 3.70em; background-color: #dfd9ea; border-radius: 1.5em; z-index: 0; }
|
||||
.oceanwp-modules #owp-switch label:after { left: .15em; top: .1em; background-color: #fff; border-radius: 50%; width: 1.60em; height: 1.60em; }
|
||||
.oceanwp-modules #owp-switch input:checked + label:before { background-color: #72da67; border-color: #72da67; }
|
||||
.oceanwp-modules #owp-switch input:checked + label:after { left: 1.95em; }
|
||||
.oceanwp-modules p.submit { margin: 15px 0 0 0.5%; padding: 0; clear: both; }
|
||||
|
||||
/* RTL */
|
||||
body.rtl .oceanwp-modules p.submit { margin: 0; }
|
||||
body.rtl .oceanwp-modules .modules-top .owp-all-wrap { margin-right: 15px; margin-left: 0; }
|
||||
body.rtl .oceanwp-modules .modules-top .owp-all-wrap #owp-switch { margin-right: 8px; margin-left: 0; }
|
||||
body.rtl .oceanwp-modules .btn-switcher { float: left; }
|
||||
body.rtl .oceanwp-modules .btn-switcher li { float: right; border-left: 1px solid rgba(0,0,0,.1); border-right: none; }
|
||||
body.rtl .oceanwp-modules .btn-switcher li:last-child { border-left: none; }
|
||||
body.rtl .oceanwp-modules .btn-switcher li:first-child a { border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
|
||||
body.rtl .oceanwp-modules .btn-switcher li:last-child a { border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
||||
body.rtl .oceanwp-modules .type { left: 0; right: auto; border-bottom-right-radius: 5px; border-bottom-left-radius: 0; }
|
||||
body.rtl .oceanwp-modules .bottom-column .title { float: right; }
|
||||
body.rtl .oceanwp-modules #owp-switch { float: left; }
|
||||
body.rtl .oceanwp-modules p.submit { margin: 15px 0.5% 0 0; }
|
||||
|
||||
|
||||
@media screen and ( max-width: 1280px ) {
|
||||
.oceanwp-modules .column-wrap { width: 32.33%; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1100px ) {
|
||||
.oceanwp-modules .column-wrap { width: 49%; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 767px ) {
|
||||
.oceanwp-modules .modules-top .owp-all-wrap { display: block; margin: 10px 0 0; }
|
||||
.oceanwp-modules .modules-top { position: relative; }
|
||||
.oceanwp-modules .btn-switcher { position: absolute; top: 3px; right: 0; }
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 600px ) {
|
||||
.oceanwp-modules .column-wrap { width: 100%; }
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
.owp-sticky-notice {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background-color: #13aff0;
|
||||
color: #fff;
|
||||
max-width: 750px;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.owp-sticky-notice a {
|
||||
-webkit-transition: all .3s ease;
|
||||
-moz-transition: all .3s ease;
|
||||
-o-transition: all .3s ease;
|
||||
-ms-transition: all .3s ease;
|
||||
transition: all .3s ease;
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.owp-sticky-close {
|
||||
opacity: .5;
|
||||
font-size: 12px;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.owp-sticky-close:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.owp-sticky-close:before {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.owp-sticky-close:active:before,
|
||||
.owp-sticky-close:focus:before,
|
||||
.owp-sticky-close:hover:before {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.owp-sticky-notice p {
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.owp-sticky-notice p strong {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.owp-sticky-button {
|
||||
display: block;
|
||||
position: relative;
|
||||
background-color: #3b5998;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
padding: 26px 26px 26px 80px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.owp-sticky-button:hover {
|
||||
background-color: #527bd2;
|
||||
}
|
||||
|
||||
.owp-sticky-button:active,
|
||||
.owp-sticky-button:focus,
|
||||
.owp-sticky-button:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.owp-sticky-button i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 25px;
|
||||
font-size: 36px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
-webkit-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
/* RTL */
|
||||
body.rtl .owp-sticky-close {
|
||||
right: auto;
|
||||
}
|
||||
|
||||
body.rtl .owp-sticky-button {
|
||||
padding-left: 25px;
|
||||
padding-right: 80px;
|
||||
}
|
||||
|
||||
body.rtl .owp-sticky-button i {
|
||||
right: 25px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 959px) {
|
||||
body.rtl .owp-sticky-button {
|
||||
padding-right: 26px;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (max-width: 959px) {
|
||||
.owp-sticky-notice {
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.owp-sticky-button {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding-left: 26px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.owp-sticky-notice{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;background-color:#13aff0;color:#fff;max-width:750px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding:0;border:0;border-radius:5px;overflow:hidden}.owp-sticky-notice a{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease;-webkit-box-shadow:none!important;box-shadow:none!important}.owp-sticky-close{opacity:.5;font-size:12px;z-index:1;right:0;padding:10px}.owp-sticky-close:hover{opacity:1}.owp-sticky-close:before{color:#fff}.owp-sticky-close:active:before,.owp-sticky-close:focus:before,.owp-sticky-close:hover:before{color:#fff}.owp-sticky-notice p{font-size:15px;line-height:1.6;margin:0;padding:0;padding:20px}.owp-sticky-notice p strong{font-weight:800}.owp-sticky-button{display:block;position:relative;background-color:#3b5998;color:#fff;font-size:16px;font-weight:600;padding:26px 26px 26px 80px;text-decoration:none}.owp-sticky-button:hover{background-color:#527bd2}.owp-sticky-button:active,.owp-sticky-button:focus,.owp-sticky-button:hover{color:#fff}.owp-sticky-button i{position:absolute;top:50%;left:25px;font-size:36px;width:36px;height:36px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.rtl .owp-sticky-close{right:auto}body.rtl .owp-sticky-button{padding-left:25px;padding-right:80px}body.rtl .owp-sticky-button i{right:25px;left:auto}@media only screen and (max-width:959px){body.rtl .owp-sticky-button{padding-right:26px;padding-left:0}}@media only screen and (max-width:959px){.owp-sticky-notice{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.owp-sticky-button{width:100%;text-align:center;padding-left:26px}}
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 798 B |
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="1024.0159" height="205.05107" viewBox="0 0 1024.0159 205.05107" overflow="visible" enable-background="new 0 0 266 100" xml:space="preserve" id="svg2" inkscape:version="0.48.5 r10040" sodipodi:docname="Facebook Logo.svg" style="overflow:visible"><metadata id="metadata18"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs id="defs16">
|
||||
|
||||
|
||||
</defs><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="706" id="namedview14" showgrid="false" inkscape:zoom="2" inkscape:cx="952.94991" inkscape:cy="-20.974662" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="svg2" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" />
|
||||
|
||||
<g id="g3452"><path d="m 533.68944,99.64858 c -8.56058,0 -14.73149,2.80666 -20.98681,5.66722 l 0,64.70575 c 5.99291,0.57164 9.42745,0.57164 15.11573,0.57164 20.54636,0 23.36243,-9.40868 23.36243,-22.54708 l 0,-30.90621 c 0,-9.69918 -3.21901,-17.49132 -17.49135,-17.49132 z M 397.24253,96.117982 c -14.25356,0 -17.51005,7.827288 -17.51005,17.517098 l 0,5.44466 34.99904,0 0,-5.44466 c 0,-9.68981 -3.25183,-17.517098 -17.48899,-17.517098 z M 132.91866,163.47108 c 0,7.66564 3.61728,11.6484 11.60154,11.6484 8.56527,0 13.63508,-2.79262 19.88568,-5.6602 l 0,-15.35002 -18.72833,0 c -8.86281,0 -12.75889,1.64933 -12.75889,9.36182 z m 533.49966,-63.8225 c -14.27699,0 -19.22498,7.79214 -19.22498,17.49132 l 0,35.40437 c 0,9.7273 4.94799,17.54288 19.22498,17.54288 14.23955,0 19.22501,-7.81558 19.22501,-17.54288 l 0,-35.40437 c 0,-9.69918 -4.98546,-17.49132 -19.22501,-17.49132 z m -603.472008,103.51888 -41.971231,0 0,-101.59545 -20.975081,0 0,-35.00843 20.975081,0 0,-21.019583 C 20.975081,16.982942 32.813238,-5.8349611e-7 66.455815,-5.8349611e-7 l 28.010498,0 0,35.01546458349611 -17.507732,0 c -13.098584,0 -13.960734,4.891758 -13.960734,14.023984 l -0.05156,17.524132 31.716809,0 -3.710995,35.00843 -28.005814,0 0,101.59545 z m 143.447178,0.2624 -34.98031,0 -1.51579,-8.8464 c -15.9732,8.8464 -30.22912,10.28021 -39.63313,10.28021 -25.65363,0 -39.312146,-17.13992 -39.312146,-40.83967 0,-27.96363 15.933376,-37.94396 44.440546,-37.94396 l 29.01322,0 0,-6.04442 c 0,-14.26998 -1.63529,-18.4636 -23.58497,-18.4636 l -35.88931,0 3.5095,-35.008427 39.23016,0 c 48.16325,0 58.72223,15.214127 58.72223,53.753167 l 0,83.1131 z m 118.95793,-99.29013 c -21.76928,-3.72975 -28.01986,-4.549716 -38.49451,-4.549716 -18.81503,0 -24.50099,4.151426 -24.50099,20.126966 l 0,30.22211 c 0,15.97788 5.68596,20.14806 24.50099,20.14806 10.47465,0 16.72523,-0.83403 38.49451,-4.58251 l 0,34.14862 c -19.06803,4.27327 -31.48955,5.39781 -41.98998,5.39781 -45.06371,0 -62.97675,-23.69975 -62.97675,-57.93271 l 0,-24.52442 c 0,-34.263425 17.91303,-58.002991 62.97675,-58.002991 10.50043,0 22.92195,1.129229 41.98998,5.421231 l 0,34.12755 z m 131.35134,42.97863 -76.97028,0 0,2.82073 c 0,15.97788 5.69063,20.14806 24.50095,20.14806 16.9103,0 27.23034,-0.83403 48.95979,-4.58251 l 0,34.14862 c -20.95629,4.27327 -31.87608,5.39781 -52.43885,5.39781 -45.06603,0 -62.98845,-23.69975 -62.98845,-57.93271 l 0,-28.03862 c 0,-29.952673 13.29772,-54.488791 59.47661,-54.488791 46.17889,0 59.46023,24.250304 59.46023,54.488791 l 0,28.03862 z m 136.44222,0.6466 c 0,33.08969 -9.45553,57.22051 -66.74632,57.22051 -20.68693,0 -32.82259,-1.81801 -55.65552,-5.33221 l 0,-189.141127 41.95949,-7.0026306 0,66.1606336 c 9.06663,-3.368951 20.80406,-5.079187 31.48721,-5.079187 41.96423,0 48.95514,18.812661 48.95514,49.044131 l 0,34.12988 z m 134.50472,0.72159 c 0,28.54465 -11.78427,56.22716 -61.09081,56.22716 -49.32995,0 -61.33444,-27.68251 -61.33444,-56.22716 l 0,-27.56068 c 0,-28.558702 12.00449,-56.245903 61.33444,-56.245903 49.30654,0 61.09081,27.687201 61.09081,56.245903 l 0,27.56068 z m 134.411,0 c 0,28.54465 -11.79831,56.22716 -61.09545,56.22716 -49.32995,0 -61.3345,-27.68251 -61.3345,-56.22716 l 0,-27.56068 c 0,-28.558702 12.00455,-56.245903 61.3345,-56.245903 49.29714,0 61.09545,27.687201 61.09545,56.245903 l 0,27.56068 z M 1000,203.16746 l -45.48306,0 -38.4641,-64.21141 0,64.21141 -41.97355,0 0,-192.655327 41.97355,-7.0026306 0,124.0230576 38.4641,-60.96898 45.48306,0 -41.99234,66.53547 L 1000,203.16746 z M 800.82466,99.64858 c -14.25356,0 -19.20155,7.79214 -19.20155,17.49132 l 0,35.40437 c 0,9.7273 4.94799,17.54288 19.20155,17.54288 14.23486,0 19.27185,-7.81558 19.27185,-17.54288 l 0,-35.40437 c 0,-9.69918 -5.03699,-17.49132 -19.27185,-17.49132 z" id="path10" inkscape:connector-curvature="0" style="fill:#ffffff;fill-opacity:1" /><path d="m 1014.0664,183.29956 c 5.5365,0 9.9495,4.51584 9.9495,10.15513 0,5.7274 -4.413,10.19184 -9.9899,10.19184 -5.5475,0 -10.0487,-4.46444 -10.0487,-10.19184 0,-5.63929 4.5012,-10.15513 10.0487,-10.15513 l 0.04,0 z m -0.04,1.57871 c -4.4608,0 -8.1138,3.8403 -8.1138,8.57642 0,4.82423 3.653,8.61313 8.1541,8.61313 4.5049,0.0441 8.1029,-3.7889 8.1029,-8.56908 0,-4.78018 -3.598,-8.62047 -8.1029,-8.62047 l -0.04,0 z m -1.8945,14.48739 -1.8063,0 0,-11.32998 c 0.9472,-0.13218 1.8504,-0.26433 3.2015,-0.26433 1.7145,0 2.8343,0.35979 3.5208,0.85177 0.6646,0.49931 1.0244,1.26296 1.0244,2.34236 0,1.49794 -0.984,2.39376 -2.1992,2.7609 l 0,0.0881 c 0.9876,0.18357 1.6631,1.07939 1.8908,2.74621 0.2643,1.76228 0.536,2.43782 0.7159,2.80496 l -1.8908,0 c -0.268,-0.36715 -0.5397,-1.40248 -0.7673,-2.89307 -0.2643,-1.43919 -0.9913,-1.98256 -2.4378,-1.98256 l -1.252,0 0,4.87563 z m 0,-6.27077 1.307,0 c 1.4796,0 2.7389,-0.54337 2.7389,-1.94585 0,-0.99128 -0.7159,-1.98256 -2.7389,-1.98256 -0.5911,0 -0.9986,0.0441 -1.307,0.0881 l 0,3.8403 z" id="path12" inkscape:connector-curvature="0" style="fill:#ffffff;fill-opacity:1" /></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 798 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 594 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 744 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 804 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,536 @@
|
||||
( function( $ ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
$( document ).ready( function() {
|
||||
owpDemoImport.init();
|
||||
} );
|
||||
|
||||
var owpDemoImport = {
|
||||
|
||||
importData: {},
|
||||
allowPopupClosing: true,
|
||||
|
||||
init: function() {
|
||||
var that = this;
|
||||
|
||||
// Categories filter
|
||||
this.categoriesFilter();
|
||||
|
||||
// Search functionality.
|
||||
$( '.owp-search-input' ).on( 'keyup', function() {
|
||||
if ( 0 < $( this ).val().length ) {
|
||||
// Hide all items.
|
||||
$( '.owp-demo-wrap .themes' ).find( '.theme-wrap' ).hide();
|
||||
|
||||
// Show just the ones that have a match on the import name.
|
||||
$( '.owp-demo-wrap .themes' ).find( '.theme-wrap[data-name*="' + $( this ).val().toLowerCase() + '"]' ).show();
|
||||
} else {
|
||||
$( '.owp-demo-wrap .themes' ).find( '.theme-wrap' ).show();
|
||||
}
|
||||
} );
|
||||
|
||||
// Prevent the popup from showing when the live preview button
|
||||
$( '.owp-demo-wrap .theme-actions a.button' ).on( 'click', function( e ) {
|
||||
e.stopPropagation();
|
||||
} );
|
||||
|
||||
// Get demo data
|
||||
$( '.owp-open-popup' ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
// Vars
|
||||
var $selected_demo = $( this ).data( 'demo-id' ),
|
||||
$loading_icon = $( '.preview-' + $selected_demo ),
|
||||
$disable_preview = $( '.preview-all-' + $selected_demo );
|
||||
|
||||
$loading_icon.show();
|
||||
$disable_preview.show();
|
||||
|
||||
that.getDemoData( $selected_demo );
|
||||
} );
|
||||
|
||||
$( document ).on( 'click' , '.install-now', this.installNow );
|
||||
$( document ).on( 'click' , '.activate-now', this.activatePlugins );
|
||||
$( document ).on( 'wp-plugin-install-success' , this.installSuccess );
|
||||
$( document ).on( 'wp-plugin-installing' , this.pluginInstalling );
|
||||
$( document ).on( 'wp-plugin-install-error' , this.installError );
|
||||
|
||||
},
|
||||
|
||||
// Category filter.
|
||||
categoriesFilter: function() {
|
||||
|
||||
// Cache selector to all items
|
||||
var $items = $( '.owp-demo-wrap .themes' ).find( '.theme-wrap' ),
|
||||
fadeoutClass = 'owp-is-fadeout',
|
||||
fadeinClass = 'owp-is-fadein',
|
||||
animationDuration = 200;
|
||||
|
||||
// Hide all items.
|
||||
var fadeOut = function () {
|
||||
var dfd = $.Deferred();
|
||||
|
||||
$items.addClass( fadeoutClass );
|
||||
|
||||
setTimeout( function() {
|
||||
$items.removeClass( fadeoutClass ).hide();
|
||||
|
||||
dfd.resolve();
|
||||
}, animationDuration );
|
||||
|
||||
return dfd.promise();
|
||||
};
|
||||
|
||||
var fadeIn = function ( category, dfd ) {
|
||||
var filter = category ? '[data-categories*="' + category + '"]' : 'div';
|
||||
|
||||
if ( 'all' === category ) {
|
||||
filter = 'div';
|
||||
}
|
||||
|
||||
$items.filter( filter ).show().addClass( 'owp-is-fadein' );
|
||||
|
||||
setTimeout( function() {
|
||||
$items.removeClass( fadeinClass );
|
||||
|
||||
dfd.resolve();
|
||||
}, animationDuration );
|
||||
};
|
||||
|
||||
var animate = function ( category ) {
|
||||
var dfd = $.Deferred();
|
||||
|
||||
var promise = fadeOut();
|
||||
|
||||
promise.done( function () {
|
||||
fadeIn( category, dfd );
|
||||
} );
|
||||
|
||||
return dfd;
|
||||
};
|
||||
|
||||
$( '.owp-navigation-link' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
// Remove 'active' class from the previous nav list items.
|
||||
$( this ).parent().siblings().removeClass( 'active' );
|
||||
|
||||
// Add the 'active' class to this nav list item.
|
||||
$( this ).parent().addClass( 'active' );
|
||||
|
||||
var category = this.hash.slice(1);
|
||||
|
||||
// show/hide the right items, based on category selected
|
||||
var $container = $( '.owp-demo-wrap .themes' );
|
||||
$container.css( 'min-width', $container.outerHeight() );
|
||||
|
||||
var promise = animate( category );
|
||||
|
||||
promise.done( function () {
|
||||
$container.removeAttr( 'style' );
|
||||
} );
|
||||
} );
|
||||
|
||||
},
|
||||
|
||||
// Get demo data.
|
||||
getDemoData: function( demo_name ) {
|
||||
var that = this;
|
||||
|
||||
// Get import data
|
||||
$.ajax( {
|
||||
url: owpDemos.ajaxurl,
|
||||
type: 'get',
|
||||
|
||||
data: {
|
||||
action: 'owp_ajax_get_import_data',
|
||||
demo_name: demo_name,
|
||||
security: owpDemos.owp_import_data_nonce
|
||||
},
|
||||
|
||||
complete: function( data ) {
|
||||
that.importData = $.parseJSON( data.responseText );
|
||||
}
|
||||
} );
|
||||
|
||||
// Run the import
|
||||
$.ajax( {
|
||||
url: owpDemos.ajaxurl,
|
||||
type: 'get',
|
||||
|
||||
data: {
|
||||
action : 'owp_ajax_get_demo_data',
|
||||
demo_name: demo_name,
|
||||
demo_data_nonce: owpDemos.demo_data_nonce
|
||||
},
|
||||
|
||||
complete: function( data ) {
|
||||
that.runPopup( data );
|
||||
|
||||
// Vars
|
||||
var $loading_icon = $( '.preview-' + demo_name ),
|
||||
$disable_preview = $( '.preview-all-' + demo_name );
|
||||
|
||||
// Hide loader
|
||||
$loading_icon.hide();
|
||||
$disable_preview.hide();
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
},
|
||||
|
||||
// Run popup.
|
||||
runPopup: function( data ) {
|
||||
var that = this
|
||||
|
||||
var innerWidth = $( 'html' ).innerWidth();
|
||||
$( 'html' ).css( 'overflow', 'hidden' );
|
||||
var hiddenInnerWidth = $( 'html' ).innerWidth();
|
||||
$( 'html' ).css( 'margin-right', hiddenInnerWidth - innerWidth );
|
||||
|
||||
// Show popup
|
||||
$( '#owp-demo-popup-wrap' ).fadeIn();
|
||||
$( data.responseText ).appendTo( $( '#owp-demo-popup-content' ) );
|
||||
|
||||
// Close popup
|
||||
$( '.owp-demo-popup-close, .owp-demo-popup-overlay' ).on( 'click', function( e ) {
|
||||
e.preventDefault();
|
||||
if ( that.allowPopupClosing === true ) {
|
||||
that.closePopup();
|
||||
}
|
||||
} );
|
||||
|
||||
// Display the step two
|
||||
$( '.owp-plugins-next' ).on( 'click', function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
// Hide step one
|
||||
$( '#owp-demo-plugins' ).hide();
|
||||
|
||||
// Display step two
|
||||
$( '#owp-demo-import-form' ).show();
|
||||
|
||||
} );
|
||||
|
||||
// if clicked on import data button
|
||||
$( '#owp-demo-import-form' ).submit( function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
// Vars
|
||||
var demo = $( this ).find( '[name="owp_import_demo"]' ).val(),
|
||||
nonce = $( this ).find( '[name="owp_import_demo_data_nonce"]' ).val(),
|
||||
contentToImport = [];
|
||||
|
||||
// Check what need to be imported
|
||||
$( this ).find( 'input[type="checkbox"]' ).each( function() {
|
||||
if ( $( this ).is( ':checked' ) === true ) {
|
||||
contentToImport.push( $( this ).attr( 'name' ) );
|
||||
}
|
||||
} );
|
||||
|
||||
// Hide the checkboxes and show the loader
|
||||
$( this ).hide();
|
||||
$( '.owp-loader' ).show();
|
||||
|
||||
// Start importing the content
|
||||
that.importContent( {
|
||||
demo: demo,
|
||||
nonce: nonce,
|
||||
contentToImport: contentToImport,
|
||||
isXML: $( '#owp_import_xml' ).is( ':checked' )
|
||||
} );
|
||||
} );
|
||||
|
||||
},
|
||||
|
||||
// importing the content.
|
||||
importContent: function( importData ) {
|
||||
var that = this,
|
||||
currentContent,
|
||||
importingLimit,
|
||||
timerStart = Date.now(),
|
||||
ajaxData = {
|
||||
owp_import_demo: importData.demo,
|
||||
owp_import_demo_data_nonce: importData.nonce
|
||||
};
|
||||
|
||||
this.allowPopupClosing = false;
|
||||
$( '.owp-demo-popup-close' ).fadeOut();
|
||||
|
||||
// When all the selected content has been imported
|
||||
if ( importData.contentToImport.length === 0 ) {
|
||||
|
||||
// Show the imported screen after 1 second
|
||||
setTimeout( function() {
|
||||
$( '.owp-loader' ).hide();
|
||||
$( '.owp-last' ).show();
|
||||
}, 1000 );
|
||||
|
||||
// Notify the server that the importing process is complete
|
||||
$.ajax( {
|
||||
url: owpDemos.ajaxurl,
|
||||
type: 'post',
|
||||
data: {
|
||||
action: 'owp_after_import',
|
||||
owp_import_demo: importData.demo,
|
||||
owp_import_demo_data_nonce: importData.nonce,
|
||||
owp_import_is_xml: importData.isXML
|
||||
},
|
||||
complete: function( data ) {}
|
||||
} );
|
||||
|
||||
this.allowPopupClosing = true;
|
||||
$( '.owp-demo-popup-close' ).fadeIn();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the content that was selected to be imported.
|
||||
for ( var key in this.importData ) {
|
||||
|
||||
// Check if the current item in the iteration is in the list of importable content
|
||||
var contentIndex = $.inArray( this.importData[ key ][ 'input_name' ], importData.contentToImport );
|
||||
|
||||
// If it is:
|
||||
if ( contentIndex !== -1 ) {
|
||||
|
||||
// Get a reference to the current content
|
||||
currentContent = key;
|
||||
|
||||
// Remove the current content from the list of remaining importable content
|
||||
importData.contentToImport.splice( contentIndex, 1 );
|
||||
|
||||
// Get the AJAX action name that corresponds to the current content
|
||||
ajaxData.action = this.importData[ key ]['action'];
|
||||
|
||||
// After an item is found get out of the loop and execute the rest of the function
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Tell the user which content is currently being imported
|
||||
$( '.owp-import-status' ).append( '<p class="owp-importing">' + this.importData[ currentContent ]['loader'] + '</p>' );
|
||||
|
||||
// Tell the server to import the current content
|
||||
var ajaxRequest = $.ajax( {
|
||||
url: owpDemos.ajaxurl,
|
||||
type: 'post',
|
||||
data: ajaxData,
|
||||
complete: function( data ) {
|
||||
clearTimeout( importingLimit );
|
||||
|
||||
// Indicates if the importing of the content can continue
|
||||
var continueProcess = true;
|
||||
|
||||
// Check if the importing of the content was successful or if there was any error
|
||||
if ( data.status === 500 || data.status === 502 || data.status === 503 ) {
|
||||
$( '.owp-importing' )
|
||||
.addClass( 'owp-importing-failed' )
|
||||
.removeClass( 'owp-importing' )
|
||||
.text( owpDemos.content_importing_error + ' '+ data.status );
|
||||
} else if ( data.responseText.indexOf( 'successful import' ) !== -1 ) {
|
||||
$( '.owp-importing' ).addClass( 'owp-imported' ).removeClass( 'owp-importing' );
|
||||
} else {
|
||||
var errors = $.parseJSON( data.responseText ),
|
||||
errorMessage = '';
|
||||
|
||||
// Iterate through the list of errors
|
||||
for ( var error in errors ) {
|
||||
errorMessage += errors[ error ];
|
||||
|
||||
// If there was an error with the importing of the XML file, stop the process
|
||||
if ( error === 'xml_import_error' ) {
|
||||
continueProcess = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Display the error message
|
||||
$( '.owp-importing' )
|
||||
.addClass( 'owp-importing-failed' )
|
||||
.removeClass( 'owp-importing' )
|
||||
.text( errorMessage );
|
||||
|
||||
that.allowPopupClosing = true;
|
||||
$( '.owp-demo-popup-close' ).fadeIn();
|
||||
}
|
||||
|
||||
// Continue with the loading only if an important error was not encountered
|
||||
if ( continueProcess === true ) {
|
||||
|
||||
// Load the next content in the list
|
||||
that.importContent( importData );
|
||||
}
|
||||
|
||||
}
|
||||
} );
|
||||
|
||||
// Set a time limit of 15 minutes for the importing process.
|
||||
importingLimit = setTimeout( function() {
|
||||
|
||||
// Abort the AJAX request
|
||||
ajaxRequest.abort();
|
||||
|
||||
// Allow the popup to be closed
|
||||
that.allowPopupClosing = true;
|
||||
$( '.owp-demo-popup-close' ).fadeIn();
|
||||
|
||||
$( '.owp-importing' )
|
||||
.addClass( 'owp-importing-failed' )
|
||||
.removeClass( 'owp-importing' )
|
||||
.text( owpDemos.content_importing_error );
|
||||
}, 15 * 60 * 1000 );
|
||||
|
||||
},
|
||||
|
||||
// Close demo popup.
|
||||
closePopup: function() {
|
||||
$( 'html' ).css( {
|
||||
'overflow': '',
|
||||
'margin-right': ''
|
||||
} );
|
||||
|
||||
// Hide loader
|
||||
$( '.preview-icon' ).hide();
|
||||
$( '.preview-all' ).hide();
|
||||
|
||||
// Hide demo popup
|
||||
$( '#owp-demo-popup-wrap' ).fadeOut();
|
||||
|
||||
// Remove content in the popup
|
||||
setTimeout( function() {
|
||||
$( '#owp-demo-popup-content' ).html( '' );
|
||||
}, 600);
|
||||
},
|
||||
|
||||
// Install required plugins.
|
||||
installNow: function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
// Vars
|
||||
var $button = $( e.target ),
|
||||
$document = $( document );
|
||||
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
|
||||
wp.updates.requestFilesystemCredentials( e );
|
||||
|
||||
$document.on( 'credential-modal-cancel', function() {
|
||||
var $message = $( '.install-now.updating-message' );
|
||||
|
||||
$message
|
||||
.removeClass( 'updating-message' )
|
||||
.text( wp.updates.l10n.installNow );
|
||||
|
||||
wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
|
||||
} );
|
||||
}
|
||||
|
||||
wp.updates.installPlugin( {
|
||||
slug: $button.data( 'slug' )
|
||||
} );
|
||||
},
|
||||
|
||||
// Activate required plugins.
|
||||
activatePlugins: function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
// Vars
|
||||
var $button = $( e.target ),
|
||||
$init = $button.data( 'init' ),
|
||||
$slug = $button.data( 'slug' );
|
||||
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$button.addClass( 'updating-message button-primary' ).html( owpDemos.button_activating );
|
||||
|
||||
$.ajax( {
|
||||
url: owpDemos.ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : 'owp_ajax_required_plugins_activate',
|
||||
init : $init,
|
||||
},
|
||||
} ).done( function( result ) {
|
||||
|
||||
if ( result.success ) {
|
||||
|
||||
$button.removeClass( 'button-primary install-now activate-now updating-message' )
|
||||
.attr( 'disabled', 'disabled' )
|
||||
.addClass( 'disabled' )
|
||||
.text( owpDemos.button_active );
|
||||
|
||||
}
|
||||
|
||||
} );
|
||||
},
|
||||
|
||||
// Install success.
|
||||
installSuccess: function( e, response ) {
|
||||
e.preventDefault();
|
||||
|
||||
var $message = $( '.owp-plugin-' + response.slug ).find( '.button' );
|
||||
|
||||
// Transform the 'Install' button into an 'Activate' button.
|
||||
var $init = $message.data('init');
|
||||
|
||||
$message.removeClass( 'install-now installed button-disabled updated-message' )
|
||||
.addClass( 'updating-message' )
|
||||
.html( owpDemos.button_activating );
|
||||
|
||||
// WordPress adds "Activate" button after waiting for 1000ms. So we will run our activation after that.
|
||||
setTimeout( function() {
|
||||
|
||||
$.ajax( {
|
||||
url: owpDemos.ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : 'owp_ajax_required_plugins_activate',
|
||||
init : $init,
|
||||
},
|
||||
} ).done( function( result ) {
|
||||
|
||||
if ( result.success ) {
|
||||
|
||||
$message.removeClass( 'button-primary install-now activate-now updating-message' )
|
||||
.attr( 'disabled', 'disabled' )
|
||||
.addClass( 'disabled' )
|
||||
.text( owpDemos.button_active );
|
||||
|
||||
} else {
|
||||
$message.removeClass( 'updating-message' );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
}, 1200 );
|
||||
},
|
||||
|
||||
// Plugin installing.
|
||||
pluginInstalling: function( e, args ) {
|
||||
e.preventDefault();
|
||||
|
||||
var $card = $( '.owp-plugin-' + args.slug ),
|
||||
$button = $card.find( '.button' );
|
||||
|
||||
$button.addClass( 'updating-message' );
|
||||
},
|
||||
|
||||
// Plugin install error.
|
||||
installError: function( e, response ) {
|
||||
e.preventDefault();
|
||||
|
||||
var $card = $( '.owp-plugin-' + response.slug );
|
||||
|
||||
$card.removeClass( 'button-primary' ).addClass( 'disabled' ).html( wp.updates.l10n.installFailedShort );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} ) ( jQuery );
|
||||
@@ -0,0 +1,167 @@
|
||||
var oe_installer = oe_installer || {};
|
||||
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var is_loading = false;
|
||||
|
||||
/**
|
||||
* Install the plugin
|
||||
*/
|
||||
oe_installer.install_plugin = function( el, plugin ) {
|
||||
|
||||
// Confirm activation
|
||||
var r = confirm( oe_installer_localize.install_now );
|
||||
|
||||
if ( r ) {
|
||||
|
||||
is_loading = true;
|
||||
el.addClass( 'installing' );
|
||||
|
||||
$.ajax( {
|
||||
type : 'POST',
|
||||
url : oe_installer_localize.ajax_url,
|
||||
data : {
|
||||
action : 'oe_plugin_installer',
|
||||
plugin : plugin,
|
||||
nonce : oe_installer_localize.admin_nonce,
|
||||
dataType : 'json'
|
||||
},
|
||||
|
||||
success: function( data ) {
|
||||
if ( data ){
|
||||
if ( data.status === 'success' ) {
|
||||
el.attr( 'class', 'activate button button-primary' );
|
||||
el.html( oe_installer_localize.activate_btn );
|
||||
} else {
|
||||
el.removeClass( 'installing' );
|
||||
}
|
||||
} else {
|
||||
el.removeClass( 'installing' );
|
||||
}
|
||||
is_loading = false;
|
||||
},
|
||||
|
||||
error: function( xhr, status, error ) {
|
||||
console.log( status );
|
||||
el.removeClass( 'installing' );
|
||||
is_loading = false;
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate the plugin
|
||||
*/
|
||||
oe_installer.activate_plugin = function( el, plugin ) {
|
||||
|
||||
$.ajax( {
|
||||
type : 'POST',
|
||||
url : oe_installer_localize.ajax_url,
|
||||
data : {
|
||||
action : 'oe_plugin_activation',
|
||||
plugin : plugin,
|
||||
nonce : oe_installer_localize.admin_nonce,
|
||||
dataType : 'json'
|
||||
},
|
||||
|
||||
success: function( data ) {
|
||||
if ( data ) {
|
||||
if ( data.status === 'success' ) {
|
||||
el.attr( 'class', 'installed button disabled' );
|
||||
el.html( oe_installer_localize.installed_btn );
|
||||
}
|
||||
}
|
||||
is_loading = false;
|
||||
},
|
||||
|
||||
error: function( xhr, status, error ) {
|
||||
console.log( status );
|
||||
is_loading = false;
|
||||
}
|
||||
} );
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Activate the premium lugin
|
||||
*/
|
||||
oe_installer.activate_premium_plugin = function( el, plugin ) {
|
||||
|
||||
$.ajax( {
|
||||
type : 'POST',
|
||||
url : oe_installer_localize.ajax_url,
|
||||
data : {
|
||||
action : 'oe_premium_plugin_activation',
|
||||
plugin : plugin,
|
||||
nonce : oe_installer_localize.admin_nonce,
|
||||
dataType : 'json'
|
||||
},
|
||||
|
||||
success: function( data ) {
|
||||
if ( data ) {
|
||||
if ( data.status === 'success' ) {
|
||||
el.attr( 'class', 'installed button disabled' );
|
||||
el.html( oe_installer_localize.installed_btn );
|
||||
}
|
||||
}
|
||||
is_loading = false;
|
||||
},
|
||||
|
||||
error: function( xhr, status, error ) {
|
||||
console.log( status );
|
||||
is_loading = false;
|
||||
}
|
||||
} );
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Install/Activate Button Click
|
||||
*/
|
||||
$( document ).on( 'click', '.oe-plugin-installer a.button:not(.premium-link)', function( e ) {
|
||||
var el = $( this ),
|
||||
plugin = el.data( 'slug' );
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if ( ! el.hasClass( 'disabled' ) ) {
|
||||
|
||||
if ( is_loading ) return false;
|
||||
|
||||
// Installation
|
||||
if ( el.hasClass( 'install' ) ) {
|
||||
oe_installer.install_plugin( el, plugin );
|
||||
}
|
||||
|
||||
// Activation
|
||||
if ( el.hasClass( 'activate' ) ) {
|
||||
oe_installer.activate_plugin( el, plugin );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* Activate Premium Extension
|
||||
*/
|
||||
$( document ).on( 'click', '.oe-plugin-installer a.button.premium-activation', function( e ) {
|
||||
var el = $( this ),
|
||||
plugin = el.data( 'slug' );
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if ( ! el.hasClass( 'disabled' ) ) {
|
||||
|
||||
if ( is_loading ) return false;
|
||||
|
||||
// Activation
|
||||
if ( el.hasClass( 'activate' ) ) {
|
||||
oe_installer.activate_premium_plugin( el, plugin );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
var oe_installer=oe_installer||{};jQuery(document).ready(function(a){"use strict";var b=!1;oe_installer.install_plugin=function(c,d){var e=confirm(oe_installer_localize.install_now);e&&(b=!0,c.addClass("installing"),a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_plugin_installer",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status?(c.attr("class","activate button button-primary"),c.html(oe_installer_localize.activate_btn)):c.removeClass("installing"),b=!1},error:function(a,d,e){console.log(d),c.removeClass("installing"),b=!1}}))},oe_installer.activate_plugin=function(c,d){a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_plugin_activation",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status&&(c.attr("class","installed button disabled"),c.html(oe_installer_localize.installed_btn)),b=!1},error:function(a,c,d){console.log(c),b=!1}})},oe_installer.activate_premium_plugin=function(c,d){a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_premium_plugin_activation",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status&&(c.attr("class","installed button disabled"),c.html(oe_installer_localize.installed_btn)),b=!1},error:function(a,c,d){console.log(c),b=!1}})},a(document).on("click",".oe-plugin-installer a.button:not(.premium-link)",function(c){var d=a(this),e=d.data("slug");if(c.preventDefault(),!d.hasClass("disabled")){if(b)return!1;d.hasClass("install")&&oe_installer.install_plugin(d,e),d.hasClass("activate")&&oe_installer.activate_plugin(d,e)}}),a(document).on("click",".oe-plugin-installer a.button.premium-activation",function(c){var d=a(this),e=d.data("slug");if(c.preventDefault(),!d.hasClass("disabled")){if(b)return!1;d.hasClass("activate")&&oe_installer.activate_premium_plugin(d,e)}})});
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "Push Monkey Notification",
|
||||
"short_name": "Notification",
|
||||
"icons": [{
|
||||
"src": "/static/js/chrome/images/test.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}],
|
||||
"start_url": "./index.html?homescreen=1",
|
||||
"display": "standalone",
|
||||
"gcm_sender_id": "956785459164",
|
||||
"//": "gcm_user_visible_only is only needed until Chrome 44 is in stable ",
|
||||
"gcm_user_visible_only": true
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
var $j = jQuery.noConflict();
|
||||
|
||||
$j(document).ready(function(e) {
|
||||
|
||||
// Switcher buttons
|
||||
(function () {
|
||||
// Cache selector to all items
|
||||
var $items = $j( '.oceanwp-modules .modules-inner' ).find( '.column-wrap' ),
|
||||
fadeoutClass = 'is-fadeout',
|
||||
fadeinClass = 'is-fadein',
|
||||
animationDuration = 200;
|
||||
|
||||
// Hide all items.
|
||||
var fadeOut = function () {
|
||||
var dfd = jQuery.Deferred();
|
||||
|
||||
$items.addClass( fadeoutClass );
|
||||
|
||||
setTimeout( function() {
|
||||
$items.removeClass( fadeoutClass ).hide();
|
||||
|
||||
dfd.resolve();
|
||||
}, animationDuration );
|
||||
|
||||
return dfd.promise();
|
||||
};
|
||||
|
||||
var fadeIn = function ( type, dfd ) {
|
||||
var filter = type ? '[data-type*="' + type + '"]' : 'div';
|
||||
|
||||
if ( 'all' === type ) {
|
||||
filter = 'div';
|
||||
}
|
||||
|
||||
$items.filter( filter ).show().addClass( 'is-fadein' );
|
||||
|
||||
setTimeout( function() {
|
||||
$items.removeClass( fadeinClass );
|
||||
|
||||
dfd.resolve();
|
||||
}, animationDuration );
|
||||
};
|
||||
|
||||
var animate = function ( type ) {
|
||||
var dfd = jQuery.Deferred();
|
||||
|
||||
var promise = fadeOut();
|
||||
|
||||
promise.done( function () {
|
||||
fadeIn( type, dfd );
|
||||
} );
|
||||
|
||||
return dfd;
|
||||
};
|
||||
|
||||
$j( '.oceanwp-modules .btn-switcher li a' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
// Remove 'active' class from the previous nav list items.
|
||||
$j( this ).parent().siblings().removeClass( 'active' );
|
||||
|
||||
// Add the 'active' class to this nav list item.
|
||||
$j( this ).parent().addClass( 'active' );
|
||||
|
||||
var type = this.hash.slice(1);
|
||||
|
||||
// show/hide the right items, based on type selected
|
||||
var promise = animate( type );
|
||||
|
||||
promise.done();
|
||||
} );
|
||||
|
||||
$j( document ).on( 'click', '#owp-switch-all', function() {
|
||||
if ( $j( this ).is( ':checked' ) ) {
|
||||
$j( this ).closest( '.oceanwp-modules' ).find( 'input.owp-checkbox' ).prop( 'checked', true );
|
||||
} else {
|
||||
$j( this ).closest( '.oceanwp-modules' ).find( 'input.owp-checkbox' ).prop( 'checked', false );
|
||||
}
|
||||
} );
|
||||
}());
|
||||
|
||||
} );
|
||||
@@ -0,0 +1 @@
|
||||
var $j=jQuery.noConflict();$j(document).ready(function(e){function i(s){var e,n=jQuery.Deferred();return(e=jQuery.Deferred(),t.addClass(o),setTimeout(function(){t.removeClass(o).hide(),e.resolve()},200),e.promise()).done(function(){var e,o,i;o=n,i=(e=s)?'[data-type*="'+e+'"]':"div","all"===e&&(i="div"),t.filter(i).show().addClass("is-fadein"),setTimeout(function(){t.removeClass("is-fadein"),o.resolve()},200)}),n}var t,o;t=$j(".oceanwp-modules .modules-inner").find(".column-wrap"),o="is-fadeout",$j(".oceanwp-modules .btn-switcher li a").on("click",function(e){e.preventDefault(),$j(this).parent().siblings().removeClass("active"),$j(this).parent().addClass("active");var o=this.hash.slice(1);i(o).done()}),$j(document).on("click","#owp-switch-all",function(){$j(this).is(":checked")?$j(this).closest(".oceanwp-modules").find("input.owp-checkbox").prop("checked",!0):$j(this).closest(".oceanwp-modules").find("input.owp-checkbox").prop("checked",!1)})});
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* Install demos page
|
||||
*
|
||||
* @package Ocean_Extra
|
||||
* @category Core
|
||||
* @author OceanWP
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Start Class
|
||||
class OWP_Install_Demos {
|
||||
|
||||
/**
|
||||
* Start things up
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'admin_menu', array( $this, 'add_page' ), 999 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add sub menu page for the custom CSS input
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add_page() {
|
||||
|
||||
// If Pro Demos activated
|
||||
if ( class_exists( 'Ocean_Pro_Demos' ) ) {
|
||||
$title = '<span style="color: #36c786">' . esc_html__( 'Install Demos', 'ocean-pro-demos' ) . '</span>';
|
||||
} else {
|
||||
$title = esc_html__( 'Install Demos', 'ocean-extra' );
|
||||
}
|
||||
|
||||
add_submenu_page(
|
||||
'oceanwp-panel',
|
||||
esc_html__( 'Install Demos', 'ocean-extra' ),
|
||||
$title,
|
||||
'manage_options',
|
||||
'oceanwp-panel-install-demos',
|
||||
array( $this, 'create_admin_page' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Settings page output
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function create_admin_page() {
|
||||
|
||||
// Theme branding
|
||||
$brand = oceanwp_theme_branding(); ?>
|
||||
|
||||
<div class="owp-demo-wrap wrap">
|
||||
|
||||
<h2><?php echo esc_attr( $brand ); ?> - <?php esc_attr_e( 'Install Demos', 'ocean-extra' ); ?></h2>
|
||||
|
||||
<div class="theme-browser rendered">
|
||||
|
||||
<?php
|
||||
// Vars
|
||||
$demos = OceanWP_Demos::get_demos_data();
|
||||
$categories = OceanWP_Demos::get_demo_all_categories( $demos ); ?>
|
||||
|
||||
<?php if ( ! empty( $categories ) ) : ?>
|
||||
<div class="owp-header-bar">
|
||||
<nav class="owp-navigation">
|
||||
<ul>
|
||||
<li class="active"><a href="#all" class="owp-navigation-link"><?php esc_html_e( 'All', 'ocean-extra' ); ?></a></li>
|
||||
<?php foreach ( $categories as $key => $name ) : ?>
|
||||
<li><a href="#<?php echo esc_attr( $key ); ?>" class="owp-navigation-link"><?php echo esc_html( $name ); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div clas="owp-search">
|
||||
<input type="text" class="owp-search-input" name="owp-search" value="" placeholder="<?php esc_html_e( 'Search demos...', 'ocean-extra' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="themes wp-clearfix">
|
||||
|
||||
<?php
|
||||
// Loop through all demos
|
||||
foreach ( $demos as $demo => $key ) {
|
||||
|
||||
// Vars
|
||||
$item_categories = OceanWP_Demos::get_demo_item_categories( $key ); ?>
|
||||
|
||||
<div class="theme-wrap" data-categories="<?php echo esc_attr( $item_categories ); ?>" data-name="<?php echo esc_attr( strtolower( $demo ) ); ?>">
|
||||
|
||||
<div class="theme owp-open-popup" data-demo-id="<?php echo esc_attr( $demo ); ?>">
|
||||
|
||||
<div class="theme-screenshot">
|
||||
<img src="<?php echo OE_URL . 'includes/panel/demos/' . esc_attr( $demo ); ?>.jpg" />
|
||||
|
||||
<div class="demo-import-loader preview-all preview-all-<?php echo esc_attr( $demo ); ?>"></div>
|
||||
|
||||
<div class="demo-import-loader preview-icon preview-<?php echo esc_attr( $demo ); ?>"><i class="custom-loader"></i></div>
|
||||
</div>
|
||||
|
||||
<div class="theme-id-container">
|
||||
|
||||
<h2 class="theme-name" id="<?php echo esc_attr( $demo ); ?>"><span><?php echo ucwords( $demo ); ?></span></h2>
|
||||
|
||||
<div class="theme-actions">
|
||||
<a class="button button-primary" href="https://<?php echo esc_attr( $demo ); ?>.oceanwp.org/" target="_blank"><?php _e( 'Live Preview', 'ocean-extra' ); ?></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
}
|
||||
new OWP_Install_Demos();
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* Helpers class
|
||||
*/
|
||||
|
||||
class OWP_Demos_Helpers {
|
||||
|
||||
/**
|
||||
* Gets and returns url body using wp_remote_get
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function get_remote( $url ) {
|
||||
|
||||
// Get data
|
||||
$response = wp_remote_get( $url );
|
||||
|
||||
// Check for errors
|
||||
if ( is_wp_error( $response ) or ( wp_remote_retrieve_response_code( $response ) != 200 ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get remote body val
|
||||
$body = wp_remote_retrieve_body( $response );
|
||||
|
||||
// Return data
|
||||
if ( ! empty( $body ) ) {
|
||||
return $body;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a HTTP HEAD or GET request.
|
||||
*
|
||||
* If $file_path is a writable filename, this will do a GET request and write
|
||||
* the file to that path.
|
||||
*
|
||||
* This is a re-implementation of the deprecated wp_get_http() function from WP Core,
|
||||
* but this time using the recommended WP_Http() class and the WordPress filesystem.
|
||||
*
|
||||
* @param string $url URL to fetch.
|
||||
* @param string|bool $file_path Optional. File path to write request to. Default false.
|
||||
* @param array $args Optional. Arguments to be passed-on to the request.
|
||||
* @return bool|string False on failure and string of headers if HEAD request.
|
||||
*/
|
||||
public static function wp_get_http( $url, $file_path = false, $red = 1 ) {
|
||||
|
||||
// No need to proceed if we don't have a $url or a $file_path.
|
||||
if ( ! $url || ! $file_path ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$try_file_get_contents = false;
|
||||
|
||||
// Make sure we normalize $file_path.
|
||||
$file_path = wp_normalize_path( $file_path );
|
||||
|
||||
// Include the WP_Http class if it doesn't already exist.
|
||||
if ( ! class_exists( 'WP_Http' ) ) {
|
||||
include_once( wp_normalize_path( ABSPATH . WPINC . '/class-http.php' ) );
|
||||
}
|
||||
// Inlude the wp_remote_get function if it doesn't already exist.
|
||||
if ( ! function_exists( 'wp_remote_get' ) ) {
|
||||
include_once( wp_normalize_path( ABSPATH . WPINC . '/http.php' ) );
|
||||
}
|
||||
|
||||
$args = wp_parse_args( $args, array(
|
||||
'timeout' => 30,
|
||||
'user-agent' => 'avada-user-agent',
|
||||
) );
|
||||
$response = wp_remote_get( esc_url_raw( $url ), $args );
|
||||
$body = wp_remote_retrieve_body( $response );
|
||||
|
||||
// Try file_get_contents if body is empty.
|
||||
if ( empty( $body ) ) {
|
||||
if ( function_exists( 'ini_get' ) && ini_get( 'allow_url_fopen' ) ) {
|
||||
$body = @file_get_contents( $url );
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the Wordpress filesystem.
|
||||
global $wp_filesystem;
|
||||
if ( empty( $wp_filesystem ) ) {
|
||||
require_once( ABSPATH . '/wp-admin/includes/file.php' );
|
||||
WP_Filesystem();
|
||||
}
|
||||
|
||||
// Attempt to write the file.
|
||||
if ( ! $wp_filesystem->put_contents( $file_path, $body, FS_CHMOD_FILE ) ) {
|
||||
// If the attempt to write to the file failed, then fallback to fwrite.
|
||||
@unlink( $file_path );
|
||||
$fp = fopen( $file_path, 'w' );
|
||||
$written = fwrite( $fp, $body );
|
||||
fclose( $fp );
|
||||
if ( false === $written ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If all went well, then return the headers of the request.
|
||||
if ( isset( $response['headers'] ) ) {
|
||||
$response['headers']['response'] = $response['response']['code'];
|
||||
return $response['headers'];
|
||||
}
|
||||
|
||||
// If all else fails, then return false.
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,691 @@
|
||||
<?php
|
||||
/**
|
||||
* WordPress eXtended RSS file parser implementations
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Importer
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress Importer class for managing parsing of WXR files.
|
||||
*/
|
||||
class WXR_Parser {
|
||||
function parse( $file ) {
|
||||
// Attempt to use proper XML parsers first
|
||||
if ( extension_loaded( 'simplexml' ) ) {
|
||||
$parser = new WXR_Parser_SimpleXML;
|
||||
$result = $parser->parse( $file );
|
||||
|
||||
// If SimpleXML succeeds or this is an invalid WXR file then return the results
|
||||
if ( ! is_wp_error( $result ) || 'SimpleXML_parse_error' != $result->get_error_code() )
|
||||
return $result;
|
||||
} else if ( extension_loaded( 'xml' ) ) {
|
||||
$parser = new WXR_Parser_XML;
|
||||
$result = $parser->parse( $file );
|
||||
|
||||
// If XMLParser succeeds or this is an invalid WXR file then return the results
|
||||
if ( ! is_wp_error( $result ) || 'XML_parse_error' != $result->get_error_code() )
|
||||
return $result;
|
||||
}
|
||||
|
||||
// We have a malformed XML file, so display the error and fallthrough to regex
|
||||
if ( isset($result) && defined('IMPORT_DEBUG') && IMPORT_DEBUG ) {
|
||||
echo '<pre>';
|
||||
if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
|
||||
foreach ( $result->get_error_data() as $error )
|
||||
echo $error->line . ':' . $error->column . ' ' . esc_html( $error->message ) . "\n";
|
||||
} else if ( 'XML_parse_error' == $result->get_error_code() ) {
|
||||
$error = $result->get_error_data();
|
||||
echo $error[0] . ':' . $error[1] . ' ' . esc_html( $error[2] );
|
||||
}
|
||||
echo '</pre>';
|
||||
echo '<p><strong>' . __( 'There was an error when reading this WXR file', 'wordpress-importer' ) . '</strong><br />';
|
||||
echo __( 'Details are shown above. The importer will now try again with a different parser...', 'wordpress-importer' ) . '</p>';
|
||||
}
|
||||
|
||||
// use regular expressions if nothing else available or this is bad XML
|
||||
$parser = new WXR_Parser_Regex;
|
||||
return $parser->parse( $file );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WXR Parser that makes use of the SimpleXML PHP extension.
|
||||
*/
|
||||
class WXR_Parser_SimpleXML {
|
||||
function parse( $file ) {
|
||||
$authors = $posts = $categories = $tags = $terms = array();
|
||||
|
||||
$internal_errors = libxml_use_internal_errors(true);
|
||||
|
||||
$dom = new DOMDocument;
|
||||
$old_value = null;
|
||||
if ( function_exists( 'libxml_disable_entity_loader' ) ) {
|
||||
$old_value = libxml_disable_entity_loader( true );
|
||||
}
|
||||
$success = $dom->loadXML( file_get_contents( $file ) );
|
||||
if ( ! is_null( $old_value ) ) {
|
||||
libxml_disable_entity_loader( $old_value );
|
||||
}
|
||||
|
||||
if ( ! $success || isset( $dom->doctype ) ) {
|
||||
return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
|
||||
}
|
||||
|
||||
$xml = simplexml_import_dom( $dom );
|
||||
unset( $dom );
|
||||
|
||||
// halt if loading produces an error
|
||||
if ( ! $xml )
|
||||
return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
|
||||
|
||||
$wxr_version = $xml->xpath('/rss/channel/wp:wxr_version');
|
||||
if ( ! $wxr_version )
|
||||
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
|
||||
|
||||
$wxr_version = (string) trim( $wxr_version[0] );
|
||||
// confirm that we are dealing with the correct file format
|
||||
if ( ! preg_match( '/^\d+\.\d+$/', $wxr_version ) )
|
||||
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
|
||||
|
||||
$base_url = $xml->xpath('/rss/channel/wp:base_site_url');
|
||||
$base_url = (string) trim( $base_url[0] );
|
||||
|
||||
$namespaces = $xml->getDocNamespaces();
|
||||
if ( ! isset( $namespaces['wp'] ) )
|
||||
$namespaces['wp'] = 'http://wordpress.org/export/1.1/';
|
||||
if ( ! isset( $namespaces['excerpt'] ) )
|
||||
$namespaces['excerpt'] = 'http://wordpress.org/export/1.1/excerpt/';
|
||||
|
||||
// grab authors
|
||||
foreach ( $xml->xpath('/rss/channel/wp:author') as $author_arr ) {
|
||||
$a = $author_arr->children( $namespaces['wp'] );
|
||||
$login = (string) $a->author_login;
|
||||
$authors[$login] = array(
|
||||
'author_id' => (int) $a->author_id,
|
||||
'author_login' => $login,
|
||||
'author_email' => (string) $a->author_email,
|
||||
'author_display_name' => (string) $a->author_display_name,
|
||||
'author_first_name' => (string) $a->author_first_name,
|
||||
'author_last_name' => (string) $a->author_last_name
|
||||
);
|
||||
}
|
||||
|
||||
// grab cats, tags and terms
|
||||
foreach ( $xml->xpath('/rss/channel/wp:category') as $term_arr ) {
|
||||
$t = $term_arr->children( $namespaces['wp'] );
|
||||
$category = array(
|
||||
'term_id' => (int) $t->term_id,
|
||||
'category_nicename' => (string) $t->category_nicename,
|
||||
'category_parent' => (string) $t->category_parent,
|
||||
'cat_name' => (string) $t->cat_name,
|
||||
'category_description' => (string) $t->category_description
|
||||
);
|
||||
|
||||
foreach ( $t->termmeta as $meta ) {
|
||||
$category['termmeta'][] = array(
|
||||
'key' => (string) $meta->meta_key,
|
||||
'value' => (string) $meta->meta_value
|
||||
);
|
||||
}
|
||||
|
||||
$categories[] = $category;
|
||||
}
|
||||
|
||||
foreach ( $xml->xpath('/rss/channel/wp:tag') as $term_arr ) {
|
||||
$t = $term_arr->children( $namespaces['wp'] );
|
||||
$tag = array(
|
||||
'term_id' => (int) $t->term_id,
|
||||
'tag_slug' => (string) $t->tag_slug,
|
||||
'tag_name' => (string) $t->tag_name,
|
||||
'tag_description' => (string) $t->tag_description
|
||||
);
|
||||
|
||||
foreach ( $t->termmeta as $meta ) {
|
||||
$tag['termmeta'][] = array(
|
||||
'key' => (string) $meta->meta_key,
|
||||
'value' => (string) $meta->meta_value
|
||||
);
|
||||
}
|
||||
|
||||
$tags[] = $tag;
|
||||
}
|
||||
|
||||
foreach ( $xml->xpath('/rss/channel/wp:term') as $term_arr ) {
|
||||
$t = $term_arr->children( $namespaces['wp'] );
|
||||
$term = array(
|
||||
'term_id' => (int) $t->term_id,
|
||||
'term_taxonomy' => (string) $t->term_taxonomy,
|
||||
'slug' => (string) $t->term_slug,
|
||||
'term_parent' => (string) $t->term_parent,
|
||||
'term_name' => (string) $t->term_name,
|
||||
'term_description' => (string) $t->term_description
|
||||
);
|
||||
|
||||
foreach ( $t->termmeta as $meta ) {
|
||||
$term['termmeta'][] = array(
|
||||
'key' => (string) $meta->meta_key,
|
||||
'value' => (string) $meta->meta_value
|
||||
);
|
||||
}
|
||||
|
||||
$terms[] = $term;
|
||||
}
|
||||
|
||||
// grab posts
|
||||
foreach ( $xml->channel->item as $item ) {
|
||||
$post = array(
|
||||
'post_title' => (string) $item->title,
|
||||
'guid' => (string) $item->guid,
|
||||
);
|
||||
|
||||
$dc = $item->children( 'http://purl.org/dc/elements/1.1/' );
|
||||
$post['post_author'] = (string) $dc->creator;
|
||||
|
||||
$content = $item->children( 'http://purl.org/rss/1.0/modules/content/' );
|
||||
$excerpt = $item->children( $namespaces['excerpt'] );
|
||||
$post['post_content'] = (string) $content->encoded;
|
||||
$post['post_excerpt'] = (string) $excerpt->encoded;
|
||||
|
||||
$wp = $item->children( $namespaces['wp'] );
|
||||
$post['post_id'] = (int) $wp->post_id;
|
||||
$post['post_date'] = (string) $wp->post_date;
|
||||
$post['post_date_gmt'] = (string) $wp->post_date_gmt;
|
||||
$post['comment_status'] = (string) $wp->comment_status;
|
||||
$post['ping_status'] = (string) $wp->ping_status;
|
||||
$post['post_name'] = (string) $wp->post_name;
|
||||
$post['status'] = (string) $wp->status;
|
||||
$post['post_parent'] = (int) $wp->post_parent;
|
||||
$post['menu_order'] = (int) $wp->menu_order;
|
||||
$post['post_type'] = (string) $wp->post_type;
|
||||
$post['post_password'] = (string) $wp->post_password;
|
||||
$post['is_sticky'] = (int) $wp->is_sticky;
|
||||
|
||||
if ( isset($wp->attachment_url) )
|
||||
$post['attachment_url'] = (string) $wp->attachment_url;
|
||||
|
||||
foreach ( $item->category as $c ) {
|
||||
$att = $c->attributes();
|
||||
if ( isset( $att['nicename'] ) )
|
||||
$post['terms'][] = array(
|
||||
'name' => (string) $c,
|
||||
'slug' => (string) $att['nicename'],
|
||||
'domain' => (string) $att['domain']
|
||||
);
|
||||
}
|
||||
|
||||
foreach ( $wp->postmeta as $meta ) {
|
||||
$post['postmeta'][] = array(
|
||||
'key' => (string) $meta->meta_key,
|
||||
'value' => (string) $meta->meta_value
|
||||
);
|
||||
}
|
||||
|
||||
foreach ( $wp->comment as $comment ) {
|
||||
$meta = array();
|
||||
if ( isset( $comment->commentmeta ) ) {
|
||||
foreach ( $comment->commentmeta as $m ) {
|
||||
$meta[] = array(
|
||||
'key' => (string) $m->meta_key,
|
||||
'value' => (string) $m->meta_value
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$post['comments'][] = array(
|
||||
'comment_id' => (int) $comment->comment_id,
|
||||
'comment_author' => (string) $comment->comment_author,
|
||||
'comment_author_email' => (string) $comment->comment_author_email,
|
||||
'comment_author_IP' => (string) $comment->comment_author_IP,
|
||||
'comment_author_url' => (string) $comment->comment_author_url,
|
||||
'comment_date' => (string) $comment->comment_date,
|
||||
'comment_date_gmt' => (string) $comment->comment_date_gmt,
|
||||
'comment_content' => (string) $comment->comment_content,
|
||||
'comment_approved' => (string) $comment->comment_approved,
|
||||
'comment_type' => (string) $comment->comment_type,
|
||||
'comment_parent' => (string) $comment->comment_parent,
|
||||
'comment_user_id' => (int) $comment->comment_user_id,
|
||||
'commentmeta' => $meta,
|
||||
);
|
||||
}
|
||||
|
||||
$posts[] = $post;
|
||||
}
|
||||
|
||||
return array(
|
||||
'authors' => $authors,
|
||||
'posts' => $posts,
|
||||
'categories' => $categories,
|
||||
'tags' => $tags,
|
||||
'terms' => $terms,
|
||||
'base_url' => $base_url,
|
||||
'version' => $wxr_version
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WXR Parser that makes use of the XML Parser PHP extension.
|
||||
*/
|
||||
class WXR_Parser_XML {
|
||||
var $wp_tags = array(
|
||||
'wp:post_id', 'wp:post_date', 'wp:post_date_gmt', 'wp:comment_status', 'wp:ping_status', 'wp:attachment_url',
|
||||
'wp:status', 'wp:post_name', 'wp:post_parent', 'wp:menu_order', 'wp:post_type', 'wp:post_password',
|
||||
'wp:is_sticky', 'wp:term_id', 'wp:category_nicename', 'wp:category_parent', 'wp:cat_name', 'wp:category_description',
|
||||
'wp:tag_slug', 'wp:tag_name', 'wp:tag_description', 'wp:term_taxonomy', 'wp:term_parent',
|
||||
'wp:term_name', 'wp:term_description', 'wp:author_id', 'wp:author_login', 'wp:author_email', 'wp:author_display_name',
|
||||
'wp:author_first_name', 'wp:author_last_name',
|
||||
);
|
||||
var $wp_sub_tags = array(
|
||||
'wp:comment_id', 'wp:comment_author', 'wp:comment_author_email', 'wp:comment_author_url',
|
||||
'wp:comment_author_IP', 'wp:comment_date', 'wp:comment_date_gmt', 'wp:comment_content',
|
||||
'wp:comment_approved', 'wp:comment_type', 'wp:comment_parent', 'wp:comment_user_id',
|
||||
);
|
||||
|
||||
function parse( $file ) {
|
||||
$this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
|
||||
$this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
|
||||
|
||||
$xml = xml_parser_create( 'UTF-8' );
|
||||
xml_parser_set_option( $xml, XML_OPTION_SKIP_WHITE, 1 );
|
||||
xml_parser_set_option( $xml, XML_OPTION_CASE_FOLDING, 0 );
|
||||
xml_set_object( $xml, $this );
|
||||
xml_set_character_data_handler( $xml, 'cdata' );
|
||||
xml_set_element_handler( $xml, 'tag_open', 'tag_close' );
|
||||
|
||||
if ( ! xml_parse( $xml, file_get_contents( $file ), true ) ) {
|
||||
$current_line = xml_get_current_line_number( $xml );
|
||||
$current_column = xml_get_current_column_number( $xml );
|
||||
$error_code = xml_get_error_code( $xml );
|
||||
$error_string = xml_error_string( $error_code );
|
||||
return new WP_Error( 'XML_parse_error', 'There was an error when reading this WXR file', array( $current_line, $current_column, $error_string ) );
|
||||
}
|
||||
xml_parser_free( $xml );
|
||||
|
||||
if ( ! preg_match( '/^\d+\.\d+$/', $this->wxr_version ) )
|
||||
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
|
||||
|
||||
return array(
|
||||
'authors' => $this->authors,
|
||||
'posts' => $this->posts,
|
||||
'categories' => $this->category,
|
||||
'tags' => $this->tag,
|
||||
'terms' => $this->term,
|
||||
'base_url' => $this->base_url,
|
||||
'version' => $this->wxr_version
|
||||
);
|
||||
}
|
||||
|
||||
function tag_open( $parse, $tag, $attr ) {
|
||||
if ( in_array( $tag, $this->wp_tags ) ) {
|
||||
$this->in_tag = substr( $tag, 3 );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( in_array( $tag, $this->wp_sub_tags ) ) {
|
||||
$this->in_sub_tag = substr( $tag, 3 );
|
||||
return;
|
||||
}
|
||||
|
||||
switch ( $tag ) {
|
||||
case 'category':
|
||||
if ( isset($attr['domain'], $attr['nicename']) ) {
|
||||
$this->sub_data['domain'] = $attr['domain'];
|
||||
$this->sub_data['slug'] = $attr['nicename'];
|
||||
}
|
||||
break;
|
||||
case 'item': $this->in_post = true;
|
||||
case 'title': if ( $this->in_post ) $this->in_tag = 'post_title'; break;
|
||||
case 'guid': $this->in_tag = 'guid'; break;
|
||||
case 'dc:creator': $this->in_tag = 'post_author'; break;
|
||||
case 'content:encoded': $this->in_tag = 'post_content'; break;
|
||||
case 'excerpt:encoded': $this->in_tag = 'post_excerpt'; break;
|
||||
|
||||
case 'wp:term_slug': $this->in_tag = 'slug'; break;
|
||||
case 'wp:meta_key': $this->in_sub_tag = 'key'; break;
|
||||
case 'wp:meta_value': $this->in_sub_tag = 'value'; break;
|
||||
}
|
||||
}
|
||||
|
||||
function cdata( $parser, $cdata ) {
|
||||
if ( ! trim( $cdata ) )
|
||||
return;
|
||||
|
||||
if ( false !== $this->in_tag || false !== $this->in_sub_tag ) {
|
||||
$this->cdata .= $cdata;
|
||||
} else {
|
||||
$this->cdata .= trim( $cdata );
|
||||
}
|
||||
}
|
||||
|
||||
function tag_close( $parser, $tag ) {
|
||||
switch ( $tag ) {
|
||||
case 'wp:comment':
|
||||
unset( $this->sub_data['key'], $this->sub_data['value'] ); // remove meta sub_data
|
||||
if ( ! empty( $this->sub_data ) )
|
||||
$this->data['comments'][] = $this->sub_data;
|
||||
$this->sub_data = false;
|
||||
break;
|
||||
case 'wp:commentmeta':
|
||||
$this->sub_data['commentmeta'][] = array(
|
||||
'key' => $this->sub_data['key'],
|
||||
'value' => $this->sub_data['value']
|
||||
);
|
||||
break;
|
||||
case 'category':
|
||||
if ( ! empty( $this->sub_data ) ) {
|
||||
$this->sub_data['name'] = $this->cdata;
|
||||
$this->data['terms'][] = $this->sub_data;
|
||||
}
|
||||
$this->sub_data = false;
|
||||
break;
|
||||
case 'wp:postmeta':
|
||||
if ( ! empty( $this->sub_data ) )
|
||||
$this->data['postmeta'][] = $this->sub_data;
|
||||
$this->sub_data = false;
|
||||
break;
|
||||
case 'item':
|
||||
$this->posts[] = $this->data;
|
||||
$this->data = false;
|
||||
break;
|
||||
case 'wp:category':
|
||||
case 'wp:tag':
|
||||
case 'wp:term':
|
||||
$n = substr( $tag, 3 );
|
||||
array_push( $this->$n, $this->data );
|
||||
$this->data = false;
|
||||
break;
|
||||
case 'wp:author':
|
||||
if ( ! empty($this->data['author_login']) )
|
||||
$this->authors[$this->data['author_login']] = $this->data;
|
||||
$this->data = false;
|
||||
break;
|
||||
case 'wp:base_site_url':
|
||||
$this->base_url = $this->cdata;
|
||||
break;
|
||||
case 'wp:wxr_version':
|
||||
$this->wxr_version = $this->cdata;
|
||||
break;
|
||||
|
||||
default:
|
||||
if ( $this->in_sub_tag ) {
|
||||
$this->sub_data[$this->in_sub_tag] = ! empty( $this->cdata ) ? $this->cdata : '';
|
||||
$this->in_sub_tag = false;
|
||||
} else if ( $this->in_tag ) {
|
||||
$this->data[$this->in_tag] = ! empty( $this->cdata ) ? $this->cdata : '';
|
||||
$this->in_tag = false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->cdata = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WXR Parser that uses regular expressions. Fallback for installs without an XML parser.
|
||||
*/
|
||||
class WXR_Parser_Regex {
|
||||
var $authors = array();
|
||||
var $posts = array();
|
||||
var $categories = array();
|
||||
var $tags = array();
|
||||
var $terms = array();
|
||||
var $base_url = '';
|
||||
|
||||
function __construct() {
|
||||
$this->has_gzip = is_callable( 'gzopen' );
|
||||
}
|
||||
|
||||
function parse( $file ) {
|
||||
$wxr_version = $in_post = false;
|
||||
|
||||
$fp = $this->fopen( $file, 'r' );
|
||||
if ( $fp ) {
|
||||
while ( ! $this->feof( $fp ) ) {
|
||||
$importline = rtrim( $this->fgets( $fp ) );
|
||||
|
||||
if ( ! $wxr_version && preg_match( '|<wp:wxr_version>(\d+\.\d+)</wp:wxr_version>|', $importline, $version ) )
|
||||
$wxr_version = $version[1];
|
||||
|
||||
if ( false !== strpos( $importline, '<wp:base_site_url>' ) ) {
|
||||
preg_match( '|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url );
|
||||
$this->base_url = $url[1];
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos( $importline, '<wp:category>' ) ) {
|
||||
preg_match( '|<wp:category>(.*?)</wp:category>|is', $importline, $category );
|
||||
$this->categories[] = $this->process_category( $category[1] );
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos( $importline, '<wp:tag>' ) ) {
|
||||
preg_match( '|<wp:tag>(.*?)</wp:tag>|is', $importline, $tag );
|
||||
$this->tags[] = $this->process_tag( $tag[1] );
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos( $importline, '<wp:term>' ) ) {
|
||||
preg_match( '|<wp:term>(.*?)</wp:term>|is', $importline, $term );
|
||||
$this->terms[] = $this->process_term( $term[1] );
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos( $importline, '<wp:author>' ) ) {
|
||||
preg_match( '|<wp:author>(.*?)</wp:author>|is', $importline, $author );
|
||||
$a = $this->process_author( $author[1] );
|
||||
$this->authors[$a['author_login']] = $a;
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos( $importline, '<item>' ) ) {
|
||||
$post = '';
|
||||
$in_post = true;
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos( $importline, '</item>' ) ) {
|
||||
$in_post = false;
|
||||
$this->posts[] = $this->process_post( $post );
|
||||
continue;
|
||||
}
|
||||
if ( $in_post ) {
|
||||
$post .= $importline . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$this->fclose($fp);
|
||||
}
|
||||
|
||||
if ( ! $wxr_version )
|
||||
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
|
||||
|
||||
return array(
|
||||
'authors' => $this->authors,
|
||||
'posts' => $this->posts,
|
||||
'categories' => $this->categories,
|
||||
'tags' => $this->tags,
|
||||
'terms' => $this->terms,
|
||||
'base_url' => $this->base_url,
|
||||
'version' => $wxr_version
|
||||
);
|
||||
}
|
||||
|
||||
function get_tag( $string, $tag ) {
|
||||
preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return );
|
||||
if ( isset( $return[1] ) ) {
|
||||
if ( substr( $return[1], 0, 9 ) == '<![CDATA[' ) {
|
||||
if ( strpos( $return[1], ']]]]><![CDATA[>' ) !== false ) {
|
||||
preg_match_all( '|<!\[CDATA\[(.*?)\]\]>|s', $return[1], $matches );
|
||||
$return = '';
|
||||
foreach( $matches[1] as $match )
|
||||
$return .= $match;
|
||||
} else {
|
||||
$return = preg_replace( '|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1] );
|
||||
}
|
||||
} else {
|
||||
$return = $return[1];
|
||||
}
|
||||
} else {
|
||||
$return = '';
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function process_category( $c ) {
|
||||
return array(
|
||||
'term_id' => $this->get_tag( $c, 'wp:term_id' ),
|
||||
'cat_name' => $this->get_tag( $c, 'wp:cat_name' ),
|
||||
'category_nicename' => $this->get_tag( $c, 'wp:category_nicename' ),
|
||||
'category_parent' => $this->get_tag( $c, 'wp:category_parent' ),
|
||||
'category_description' => $this->get_tag( $c, 'wp:category_description' ),
|
||||
);
|
||||
}
|
||||
|
||||
function process_tag( $t ) {
|
||||
return array(
|
||||
'term_id' => $this->get_tag( $t, 'wp:term_id' ),
|
||||
'tag_name' => $this->get_tag( $t, 'wp:tag_name' ),
|
||||
'tag_slug' => $this->get_tag( $t, 'wp:tag_slug' ),
|
||||
'tag_description' => $this->get_tag( $t, 'wp:tag_description' ),
|
||||
);
|
||||
}
|
||||
|
||||
function process_term( $t ) {
|
||||
return array(
|
||||
'term_id' => $this->get_tag( $t, 'wp:term_id' ),
|
||||
'term_taxonomy' => $this->get_tag( $t, 'wp:term_taxonomy' ),
|
||||
'slug' => $this->get_tag( $t, 'wp:term_slug' ),
|
||||
'term_parent' => $this->get_tag( $t, 'wp:term_parent' ),
|
||||
'term_name' => $this->get_tag( $t, 'wp:term_name' ),
|
||||
'term_description' => $this->get_tag( $t, 'wp:term_description' ),
|
||||
);
|
||||
}
|
||||
|
||||
function process_author( $a ) {
|
||||
return array(
|
||||
'author_id' => $this->get_tag( $a, 'wp:author_id' ),
|
||||
'author_login' => $this->get_tag( $a, 'wp:author_login' ),
|
||||
'author_email' => $this->get_tag( $a, 'wp:author_email' ),
|
||||
'author_display_name' => $this->get_tag( $a, 'wp:author_display_name' ),
|
||||
'author_first_name' => $this->get_tag( $a, 'wp:author_first_name' ),
|
||||
'author_last_name' => $this->get_tag( $a, 'wp:author_last_name' ),
|
||||
);
|
||||
}
|
||||
|
||||
function process_post( $post ) {
|
||||
$post_id = $this->get_tag( $post, 'wp:post_id' );
|
||||
$post_title = $this->get_tag( $post, 'title' );
|
||||
$post_date = $this->get_tag( $post, 'wp:post_date' );
|
||||
$post_date_gmt = $this->get_tag( $post, 'wp:post_date_gmt' );
|
||||
$comment_status = $this->get_tag( $post, 'wp:comment_status' );
|
||||
$ping_status = $this->get_tag( $post, 'wp:ping_status' );
|
||||
$status = $this->get_tag( $post, 'wp:status' );
|
||||
$post_name = $this->get_tag( $post, 'wp:post_name' );
|
||||
$post_parent = $this->get_tag( $post, 'wp:post_parent' );
|
||||
$menu_order = $this->get_tag( $post, 'wp:menu_order' );
|
||||
$post_type = $this->get_tag( $post, 'wp:post_type' );
|
||||
$post_password = $this->get_tag( $post, 'wp:post_password' );
|
||||
$is_sticky = $this->get_tag( $post, 'wp:is_sticky' );
|
||||
$guid = $this->get_tag( $post, 'guid' );
|
||||
$post_author = $this->get_tag( $post, 'dc:creator' );
|
||||
|
||||
$post_excerpt = $this->get_tag( $post, 'excerpt:encoded' );
|
||||
$post_excerpt = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_excerpt );
|
||||
$post_excerpt = str_replace( '<br>', '<br />', $post_excerpt );
|
||||
$post_excerpt = str_replace( '<hr>', '<hr />', $post_excerpt );
|
||||
|
||||
$post_content = $this->get_tag( $post, 'content:encoded' );
|
||||
$post_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content );
|
||||
$post_content = str_replace( '<br>', '<br />', $post_content );
|
||||
$post_content = str_replace( '<hr>', '<hr />', $post_content );
|
||||
|
||||
$postdata = compact( 'post_id', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt',
|
||||
'post_title', 'status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent',
|
||||
'menu_order', 'post_type', 'post_password', 'is_sticky'
|
||||
);
|
||||
|
||||
$attachment_url = $this->get_tag( $post, 'wp:attachment_url' );
|
||||
if ( $attachment_url )
|
||||
$postdata['attachment_url'] = $attachment_url;
|
||||
|
||||
preg_match_all( '|<category domain="([^"]+?)" nicename="([^"]+?)">(.+?)</category>|is', $post, $terms, PREG_SET_ORDER );
|
||||
foreach ( $terms as $t ) {
|
||||
$post_terms[] = array(
|
||||
'slug' => $t[2],
|
||||
'domain' => $t[1],
|
||||
'name' => str_replace( array( '<![CDATA[', ']]>' ), '', $t[3] ),
|
||||
);
|
||||
}
|
||||
if ( ! empty( $post_terms ) ) $postdata['terms'] = $post_terms;
|
||||
|
||||
preg_match_all( '|<wp:comment>(.+?)</wp:comment>|is', $post, $comments );
|
||||
$comments = $comments[1];
|
||||
if ( $comments ) {
|
||||
foreach ( $comments as $comment ) {
|
||||
preg_match_all( '|<wp:commentmeta>(.+?)</wp:commentmeta>|is', $comment, $commentmeta );
|
||||
$commentmeta = $commentmeta[1];
|
||||
$c_meta = array();
|
||||
foreach ( $commentmeta as $m ) {
|
||||
$c_meta[] = array(
|
||||
'key' => $this->get_tag( $m, 'wp:meta_key' ),
|
||||
'value' => $this->get_tag( $m, 'wp:meta_value' ),
|
||||
);
|
||||
}
|
||||
|
||||
$post_comments[] = array(
|
||||
'comment_id' => $this->get_tag( $comment, 'wp:comment_id' ),
|
||||
'comment_author' => $this->get_tag( $comment, 'wp:comment_author' ),
|
||||
'comment_author_email' => $this->get_tag( $comment, 'wp:comment_author_email' ),
|
||||
'comment_author_IP' => $this->get_tag( $comment, 'wp:comment_author_IP' ),
|
||||
'comment_author_url' => $this->get_tag( $comment, 'wp:comment_author_url' ),
|
||||
'comment_date' => $this->get_tag( $comment, 'wp:comment_date' ),
|
||||
'comment_date_gmt' => $this->get_tag( $comment, 'wp:comment_date_gmt' ),
|
||||
'comment_content' => $this->get_tag( $comment, 'wp:comment_content' ),
|
||||
'comment_approved' => $this->get_tag( $comment, 'wp:comment_approved' ),
|
||||
'comment_type' => $this->get_tag( $comment, 'wp:comment_type' ),
|
||||
'comment_parent' => $this->get_tag( $comment, 'wp:comment_parent' ),
|
||||
'comment_user_id' => $this->get_tag( $comment, 'wp:comment_user_id' ),
|
||||
'commentmeta' => $c_meta,
|
||||
);
|
||||
}
|
||||
}
|
||||
if ( ! empty( $post_comments ) ) $postdata['comments'] = $post_comments;
|
||||
|
||||
preg_match_all( '|<wp:postmeta>(.+?)</wp:postmeta>|is', $post, $postmeta );
|
||||
$postmeta = $postmeta[1];
|
||||
if ( $postmeta ) {
|
||||
foreach ( $postmeta as $p ) {
|
||||
$post_postmeta[] = array(
|
||||
'key' => $this->get_tag( $p, 'wp:meta_key' ),
|
||||
'value' => $this->get_tag( $p, 'wp:meta_value' ),
|
||||
);
|
||||
}
|
||||
}
|
||||
if ( ! empty( $post_postmeta ) ) $postdata['postmeta'] = $post_postmeta;
|
||||
|
||||
return $postdata;
|
||||
}
|
||||
|
||||
function _normalize_tag( $matches ) {
|
||||
return '<' . strtolower( $matches[1] );
|
||||
}
|
||||
|
||||
function fopen( $filename, $mode = 'r' ) {
|
||||
if ( $this->has_gzip )
|
||||
return gzopen( $filename, $mode );
|
||||
return fopen( $filename, $mode );
|
||||
}
|
||||
|
||||
function feof( $fp ) {
|
||||
if ( $this->has_gzip )
|
||||
return gzeof( $fp );
|
||||
return feof( $fp );
|
||||
}
|
||||
|
||||
function fgets( $fp, $len = 8192 ) {
|
||||
if ( $this->has_gzip )
|
||||
return gzgets( $fp, $len );
|
||||
return fgets( $fp, $len );
|
||||
}
|
||||
|
||||
function fclose( $fp ) {
|
||||
if ( $this->has_gzip )
|
||||
return gzclose( $fp );
|
||||
return fclose( $fp );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Class for the settings importer.
|
||||
*/
|
||||
|
||||
class OWP_Settings_Importer {
|
||||
|
||||
/**
|
||||
* Process import file - this parses the settings data and returns it.
|
||||
*
|
||||
* @param string $file path to json file.
|
||||
*/
|
||||
public function process_import_file( $file ) {
|
||||
|
||||
// Get file contents.
|
||||
$data = OWP_Demos_Helpers::get_remote( $file );
|
||||
|
||||
// Return from this function if there was an error.
|
||||
if ( is_wp_error( $data ) ) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
// Get file contents and decode
|
||||
$raw = file_get_contents( $file );
|
||||
$data = @unserialize( $raw );
|
||||
|
||||
// Delete import file
|
||||
unlink( $file );
|
||||
|
||||
// If wp_css is set then import it.
|
||||
if ( function_exists( 'wp_update_custom_css_post' ) && isset( $data['wp_css'] ) && '' !== $data['wp_css'] ) {
|
||||
wp_update_custom_css_post( $data['wp_css'] );
|
||||
}
|
||||
|
||||
// Import the data
|
||||
return $this->import_data( $data['mods'] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitization callback
|
||||
*
|
||||
* @since 1.0.5
|
||||
*/
|
||||
private function import_data( $file ) {
|
||||
|
||||
// Import the file
|
||||
if ( ! empty( $file ) ) {
|
||||
|
||||
if ( '0' == json_last_error() ) {
|
||||
|
||||
// Loop through mods and add them
|
||||
foreach ( $file as $mod => $value ) {
|
||||
set_theme_mod( $mod, $value );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Return file
|
||||
return $file;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
/**
|
||||
* Class for the widget importer.
|
||||
*
|
||||
* Code is mostly from the Widget Importer & Exporter plugin.
|
||||
*
|
||||
* @see https://wordpress.org/plugins/widget-importer-exporter/
|
||||
*/
|
||||
|
||||
class OWP_Widget_Importer {
|
||||
|
||||
/**
|
||||
* Process import file - this parses the widget data and returns it.
|
||||
*
|
||||
* @param string $file path to json file.
|
||||
* @global string $widget_import_results
|
||||
*/
|
||||
public function process_import_file( $file ) {
|
||||
|
||||
// Get file contents.
|
||||
$data = OWP_Demos_Helpers::get_remote( $file );
|
||||
|
||||
// Return from this function if there was an error.
|
||||
if ( is_wp_error( $data ) ) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
// Decode file contents.
|
||||
$data = json_decode( $data );
|
||||
|
||||
// Import the widget data
|
||||
return $this->import_data( $data );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Import widget JSON data
|
||||
*
|
||||
* @global array $wp_registered_sidebars
|
||||
* @param object $data JSON widget data.
|
||||
* @return array $results
|
||||
*/
|
||||
private function import_data( $data ) {
|
||||
|
||||
global $wp_registered_sidebars;
|
||||
|
||||
// Have valid data? If no data or could not decode.
|
||||
if ( empty( $data ) || ! is_object( $data ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get all available widgets site supports.
|
||||
$available_widgets = $this->available_widgets();
|
||||
|
||||
// Get all existing widget instances.
|
||||
$widget_instances = array();
|
||||
|
||||
foreach ( $available_widgets as $widget_data ) {
|
||||
$widget_instances[ $widget_data['id_base'] ] = get_option( 'widget_' . $widget_data['id_base'] );
|
||||
}
|
||||
|
||||
// Begin results.
|
||||
$results = array();
|
||||
|
||||
// Loop import data's sidebars.
|
||||
foreach ( $data as $sidebar_id => $widgets ) {
|
||||
|
||||
// Skip inactive widgets (should not be in export file).
|
||||
if ( 'wp_inactive_widgets' == $sidebar_id ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if sidebar is available on this site. Otherwise add widgets to inactive, and say so.
|
||||
if ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ) {
|
||||
$sidebar_available = true;
|
||||
$use_sidebar_id = $sidebar_id;
|
||||
$sidebar_message_type = 'success';
|
||||
$sidebar_message = '';
|
||||
}
|
||||
else {
|
||||
$sidebar_available = false;
|
||||
$use_sidebar_id = 'wp_inactive_widgets'; // Add to inactive if sidebar does not exist in theme.
|
||||
$sidebar_message_type = 'error';
|
||||
$sidebar_message = esc_html__( 'Sidebar does not exist in theme (moving widget to Inactive)', 'ocean-demo-import' );
|
||||
}
|
||||
|
||||
// Result for sidebar.
|
||||
$results[ $sidebar_id ]['name'] = ! empty( $wp_registered_sidebars[ $sidebar_id ]['name'] ) ? $wp_registered_sidebars[ $sidebar_id ]['name'] : $sidebar_id; // Sidebar name if theme supports it; otherwise ID.
|
||||
$results[ $sidebar_id ]['message_type'] = $sidebar_message_type;
|
||||
$results[ $sidebar_id ]['message'] = $sidebar_message;
|
||||
$results[ $sidebar_id ]['widgets'] = array();
|
||||
|
||||
// Loop widgets.
|
||||
foreach ( $widgets as $widget_instance_id => $widget ) {
|
||||
|
||||
$fail = false;
|
||||
|
||||
// Get id_base (remove -# from end) and instance ID number.
|
||||
$id_base = preg_replace( '/-[0-9]+$/', '', $widget_instance_id );
|
||||
$instance_id_number = str_replace( $id_base . '-', '', $widget_instance_id );
|
||||
|
||||
// Does site support this widget?
|
||||
if ( ! $fail && ! isset( $available_widgets[ $id_base ] ) ) {
|
||||
$fail = true;
|
||||
$widget_message_type = 'error';
|
||||
$widget_message = esc_html__( 'Site does not support widget', 'ocean-demo-import' ); // Explain why widget not imported.
|
||||
}
|
||||
|
||||
// Convert multidimensional objects to multidimensional arrays.
|
||||
$widget = json_decode( json_encode( $widget ), true );
|
||||
|
||||
// Does widget with identical settings already exist in same sidebar?
|
||||
if ( ! $fail && isset( $widget_instances[ $id_base ] ) ) {
|
||||
|
||||
// Get existing widgets in this sidebar.
|
||||
$sidebars_widgets = get_option( 'sidebars_widgets' );
|
||||
$sidebar_widgets = isset( $sidebars_widgets[ $use_sidebar_id ] ) ? $sidebars_widgets[ $use_sidebar_id ] : array(); // Check Inactive if that's where will go.
|
||||
|
||||
// Loop widgets with ID base.
|
||||
$single_widget_instances = ! empty( $widget_instances[ $id_base ] ) ? $widget_instances[ $id_base ] : array();
|
||||
foreach ( $single_widget_instances as $check_id => $check_widget ) {
|
||||
|
||||
// Is widget in same sidebar and has identical settings?
|
||||
if ( in_array( "$id_base-$check_id", $sidebar_widgets ) && (array) $widget == $check_widget ) {
|
||||
$fail = true;
|
||||
$widget_message_type = 'warning';
|
||||
$widget_message = esc_html__( 'Widget already exists', 'ocean-demo-import' ); // Explain why widget not imported.
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No failure.
|
||||
if ( ! $fail ) {
|
||||
|
||||
// Add widget instance.
|
||||
$single_widget_instances = get_option( 'widget_' . $id_base ); // All instances for that widget ID base, get fresh every time.
|
||||
$single_widget_instances = ! empty( $single_widget_instances ) ? $single_widget_instances : array( '_multiwidget' => 1 ); // Start fresh if have to.
|
||||
$single_widget_instances[] = $widget; // Add it.
|
||||
|
||||
// Get the key it was given.
|
||||
end( $single_widget_instances );
|
||||
$new_instance_id_number = key( $single_widget_instances );
|
||||
|
||||
// If key is 0, make it 1.
|
||||
// When 0, an issue can occur where adding a widget causes data from other widget to load, and the widget doesn't stick (reload wipes it).
|
||||
if ( '0' === strval( $new_instance_id_number ) ) {
|
||||
$new_instance_id_number = 1;
|
||||
$single_widget_instances[ $new_instance_id_number ] = $single_widget_instances[0];
|
||||
unset( $single_widget_instances[0] );
|
||||
}
|
||||
|
||||
// Move _multiwidget to end of array for uniformity.
|
||||
if ( isset( $single_widget_instances['_multiwidget'] ) ) {
|
||||
$multiwidget = $single_widget_instances['_multiwidget'];
|
||||
unset( $single_widget_instances['_multiwidget'] );
|
||||
$single_widget_instances['_multiwidget'] = $multiwidget;
|
||||
}
|
||||
|
||||
// Update option with new widget.
|
||||
update_option( 'widget_' . $id_base, $single_widget_instances );
|
||||
|
||||
// Assign widget instance to sidebar.
|
||||
$sidebars_widgets = get_option( 'sidebars_widgets' ); // Which sidebars have which widgets, get fresh every time.
|
||||
$new_instance_id = $id_base . '-' . $new_instance_id_number; // Use ID number from new widget instance.
|
||||
$sidebars_widgets[ $use_sidebar_id ][] = $new_instance_id; // Add new instance to sidebar.
|
||||
update_option( 'sidebars_widgets', $sidebars_widgets ); // Save the amended data.
|
||||
|
||||
// After widget import action.
|
||||
$after_widget_import = array(
|
||||
'sidebar' => $use_sidebar_id,
|
||||
'sidebar_old' => $sidebar_id,
|
||||
'widget' => $widget,
|
||||
'widget_type' => $id_base,
|
||||
'widget_id' => $new_instance_id,
|
||||
'widget_id_old' => $widget_instance_id,
|
||||
'widget_id_num' => $new_instance_id_number,
|
||||
'widget_id_num_old' => $instance_id_number,
|
||||
);
|
||||
|
||||
// Success message.
|
||||
if ( $sidebar_available ) {
|
||||
$widget_message_type = 'success';
|
||||
$widget_message = esc_html__( 'Imported', 'ocean-demo-import' );
|
||||
}
|
||||
else {
|
||||
$widget_message_type = 'warning';
|
||||
$widget_message = esc_html__( 'Imported to Inactive', 'ocean-demo-import' );
|
||||
}
|
||||
}
|
||||
|
||||
// Result for widget instance.
|
||||
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base; // Widget name or ID if name not available (not supported by site).
|
||||
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['title'] = ! empty( $widget['title'] ) ? $widget['title'] : esc_html__( 'No Title', 'ocean-demo-import' ); // Show "No Title" if widget instance is untitled.
|
||||
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message_type'] = $widget_message_type;
|
||||
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message'] = $widget_message;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Return results.
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Available widgets.
|
||||
*
|
||||
* Gather site's widgets into array with ID base, name, etc.
|
||||
*
|
||||
* @global array $wp_registered_widget_controls
|
||||
* @return array $available_widgets, Widget information
|
||||
*/
|
||||
private function available_widgets() {
|
||||
|
||||
global $wp_registered_widget_controls;
|
||||
|
||||
$widget_controls = $wp_registered_widget_controls;
|
||||
|
||||
$available_widgets = array();
|
||||
|
||||
foreach ( $widget_controls as $widget ) {
|
||||
|
||||
if ( ! empty( $widget['id_base'] ) && ! isset( $available_widgets[$widget['id_base']] ) ) { // no dupes
|
||||
|
||||
$available_widgets[$widget['id_base']]['id_base'] = $widget['id_base'];
|
||||
$available_widgets[$widget['id_base']]['name'] = $widget['name'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $available_widgets;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Class for the WPForms importer.
|
||||
*
|
||||
* Thank you very much to SiteGround for the code.
|
||||
*/
|
||||
|
||||
class OWP_WPForms_Importer {
|
||||
|
||||
/**
|
||||
* Process import file - this parses the widget data and returns it.
|
||||
*
|
||||
* @param string $file path to json file.
|
||||
* @global string $widget_import_results
|
||||
*/
|
||||
public function process_import_file( $file ) {
|
||||
|
||||
// Get file contents.
|
||||
$data = OWP_Demos_Helpers::get_remote( $file );
|
||||
|
||||
// Return from this function if there was an error.
|
||||
if ( is_wp_error( $data ) ) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
// Decode file contents.
|
||||
$data = json_decode( $data, true );
|
||||
|
||||
// Import the widget data
|
||||
return $this->import_json( $data );
|
||||
|
||||
}
|
||||
|
||||
public function import_json( $forms ) {
|
||||
|
||||
foreach ( $forms as $form ) {
|
||||
|
||||
// Create empty form so we have an ID to work with.
|
||||
$form_id = wp_insert_post(
|
||||
array(
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'wpforms',
|
||||
)
|
||||
);
|
||||
|
||||
// Bail if post creation has failed.
|
||||
if ( empty( $form_id )
|
||||
|| is_wp_error( $form_id ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$form['id'] = $form_id;
|
||||
|
||||
// Update the form with all our compiled data.
|
||||
wpforms()->form->update( $form['id'], $form );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 17 KiB |