| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/core.tar |
class-hestia-public.php 0000666 00000037232 15113041770 0011123 0 ustar 00 <?php
/**
* Handles front end setup.
*
* @package Hestia
*/
/**
* Class Hestia_Public
*/
class Hestia_Public {
/**
* Generic strings.
*
* @var array
*/
var $generic_strings;
/**
* Enqueue theme scripts.
*/
public function enqueue_scripts() {
// Bootstrap
if ( ! class_exists( 'Elementor\Frontend' ) ) {
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css', array(), HESTIA_VENDOR_VERSION );
wp_style_add_data( 'bootstrap', 'rtl', 'replace' );
wp_style_add_data( 'bootstrap', 'suffix', '.min' );
wp_enqueue_style( 'hestia-font-sizes', get_template_directory_uri() . '/assets/css/font-sizes.css', array(), HESTIA_VERSION );
}
// FontAwesome
wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/font-awesome/css/font-awesome.min.css', array(), HESTIA_VENDOR_VERSION );
// Main Stylesheet
wp_enqueue_style( 'hestia_style', get_stylesheet_uri(), array(), apply_filters( 'hestia_version_filter', HESTIA_VERSION ) );
wp_style_add_data( 'hestia_style', 'rtl', 'replace' );
$this->enqueue_woocommerce();
$this->enqueue_custom_fonts();
// Customizer Style
if ( is_customize_preview() ) {
wp_enqueue_style( 'hestia-customizer-preview-style', get_template_directory_uri() . '/assets/css/customizer-preview.css', array(), HESTIA_VERSION );
}
if ( is_singular() ) {
wp_enqueue_script( 'comment-reply' );
}
wp_enqueue_script( 'jquery-bootstrap', get_template_directory_uri() . '/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), HESTIA_VENDOR_VERSION, true );
wp_enqueue_script( 'jquery-hestia-material', get_template_directory_uri() . '/assets/js/material.js', array( 'jquery' ), HESTIA_VENDOR_VERSION, true );
wp_enqueue_script(
'hestia_scripts', get_template_directory_uri() . '/assets/js/scripts.js',
array(
'jquery-hestia-material',
'jquery-ui-core',
),
HESTIA_VERSION, true
);
wp_localize_script(
'hestia_scripts', 'requestpost', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'disable_autoslide' => get_theme_mod( 'hestia_slider_disable_autoplay' ),
)
);
$this->maybe_enqueue_parallax();
}
/**
* Filter the front page template so it's bypassed entirely if the user selects
* to display blog posts on their homepage instead of a static page.
*/
public function filter_front_page_template( $template ) {
return is_home() ? '' : $template;
}
/**
* Maybe enqueue Parallax Script
*/
private function maybe_enqueue_parallax() {
if ( ! Hestia_First_Front_Page_Section::should_display_parallax() ) {
return;
}
wp_enqueue_script( 'hestia-parallax', get_template_directory_uri() . '/assets/js/parallax.min.js', array(), HESTIA_VENDOR_VERSION );
wp_enqueue_script(
'hestia-init-parallax', get_template_directory_uri() . '/assets/js/init-parallax.js', array(
'hestia-parallax',
'jquery',
), HESTIA_VENDOR_VERSION
);
}
/**
* Enqueue font sizes before elementor.
*/
public function enqueue_before_elementor() {
if ( class_exists( 'Elementor\Frontend' ) ) {
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css', array(), HESTIA_VENDOR_VERSION );
wp_style_add_data( 'bootstrap', 'rtl', 'replace' );
wp_style_add_data( 'bootstrap', 'suffix', '.min' );
wp_enqueue_style( 'hestia-font-sizes', get_template_directory_uri() . '/assets/css/font-sizes.css', array(), HESTIA_VERSION );
}
}
/**
* Executed after theme has been activated.
*/
public function theme_activated() {
update_option( 'hestia_time_activated', time() );
$this->import_flagship_content();
$this->import_child_themes_content();
}
/**
* Register widgets for the theme.
*
* @since Hestia 1.0
* @modified 1.1.40
*/
public function initialize_widgets() {
/**
* Array of all the main sidebars registered in the theme
*/
$sidebars_array = array(
'sidebar-1' => esc_html__( 'Sidebar', 'hestia' ),
'subscribe-widgets' => esc_html__( 'Subscribe', 'hestia' ),
'sidebar-woocommerce' => esc_html__( 'WooCommerce Sidebar', 'hestia' ),
'sidebar-top-bar' => esc_html__( 'Very Top Bar', 'hestia' ),
'header-sidebar' => esc_html__( 'Navigation', 'hestia' ),
'sidebar-big-title' => apply_filters( 'hestia_big_title_fs_label', esc_html__( 'Big Title Section', 'hestia' ) ),
);
/**
* Array of sidebars registered in the footer area.
* The hestia_footer_widget_areas_array filter is used in the PRO version to add the extra forth sidebar.
*/
$footer_sidebars_array = apply_filters(
'hestia_footer_widget_areas_array', array(
'footer-one-widgets' => esc_html__( 'Footer One', 'hestia' ),
'footer-two-widgets' => esc_html__( 'Footer Two', 'hestia' ),
'footer-three-widgets' => esc_html__( 'Footer Three', 'hestia' ),
'footer-four-widgets' => esc_html__( 'Footer Four', 'hestia' ),
)
);
/**
* Number of footer sidebars that need to be registered.
* This option is available only in the PRO version. In Hestia, the value is always 3.
*/
$hestia_nr_footer_widgets = is_customize_preview() ? '4' : get_theme_mod( 'hestia_nr_footer_widgets', '3' );
/**
* If the Number of widgets areas option is selected, add the specific number of footer sidebars in the main sidebars array to be registered.
*/
if ( ! empty( $hestia_nr_footer_widgets ) ) {
$footer_sidebars_array = array_slice( $footer_sidebars_array, 0, $hestia_nr_footer_widgets );
}
if ( ! empty( $footer_sidebars_array ) ) {
$sidebars_array = array_merge( $sidebars_array, $footer_sidebars_array );
}
/**
* Register the sidebars
*/
foreach ( $sidebars_array as $sidebar_id => $sidebar_name ) {
$sidebar_settings = array(
'name' => $sidebar_name,
'id' => $sidebar_id,
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h5>',
'after_title' => '</h5>',
);
if ( $sidebar_id === 'subscribe-widgets' || $sidebar_id === 'blog-subscribe-widgets' ) {
$sidebar_settings['before_widget'] = '';
$sidebar_settings['after_widget'] = '';
}
register_sidebar( $sidebar_settings );
}
}
/**
* Setup the theme.
*
* @since Hestia 1.0
*/
public function setup_theme() {
// Maximum allowed width for any content in the theme, like oEmbeds and images added to posts. https://codex.wordpress.org/Content_Width
global $content_width;
if ( ! isset( $content_width ) ) {
$content_width = 750;
}
load_theme_textdomain( 'hestia-pro', get_template_directory() . '/languages' );
$header_settings = apply_filters(
'hestia_custom_header_settings', array(
'width' => 2000,
'flex-height' => true,
'height' => 1150,
'flex-width' => true,
'header-text' => false,
)
);
$logo_settings = array(
'flex-width' => true,
'flex-height' => true,
'height' => 100,
);
$custom_background_settings = array(
'default-color' => apply_filters( 'hestia_default_background_color', 'E5E5E5' ),
);
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'custom-logo', $logo_settings );
add_theme_support( 'html5', array( 'search-form' ) );
add_theme_support( 'custom-header', $header_settings );
add_theme_support( 'customize-selective-refresh-widgets' );
add_theme_support( 'custom-background', $custom_background_settings );
add_theme_support( 'starter-content', $this->get_starter_content() );
register_nav_menus(
array(
'primary' => esc_html__( 'Primary Menu', 'hestia' ),
'footer' => esc_html__( 'Footer Menu', 'hestia' ),
'top-bar-menu' => esc_html__( 'Very Top Bar', 'hestia' ) . ' ' . esc_html__( 'Menu', 'hestia' ),
)
);
add_image_size( 'hestia-blog', 360, 240, true );
add_editor_style();
$this->setup_woocommerce();
$this->setup_jetpack();
$this->maybe_register_front_page_strings();
}
/**
* Maybe register front page strings.
*/
private function maybe_register_front_page_strings() {
if ( function_exists( 'hestia_features_register_strings' ) ) {
add_action( 'after_setup_theme', 'hestia_features_register_strings', 11 );
}
}
/**
* Handle WooCommerce Enqueue.
*/
private function enqueue_woocommerce() {
if ( ! class_exists( 'WooCommerce' ) ) {
return;
}
if ( $this->should_enqueue_woo_styles() ) {
wp_enqueue_style( 'hestia_woocommerce_style', get_template_directory_uri() . '/assets/css/woocommerce.css', array(), HESTIA_VERSION );
wp_style_add_data( 'hestia_woocommerce_style', 'rtl', 'replace' );
}
$hestia_cart_url = '';
if ( function_exists( 'wc_get_cart_url' ) ) {
$hestia_cart_url = wc_get_cart_url();
}
wp_localize_script(
'hestia_scripts', 'hestiaViewcart', array(
'view_cart_label' => esc_html__( 'View cart', 'hestia' ), // label of View cart button,
'view_cart_link' => esc_url( $hestia_cart_url ), // link of View cart button
)
);
}
/**
* Enqueue Custom fonts.
*/
private function enqueue_custom_fonts() {
$hestia_headings_font = get_theme_mod( 'hestia_headings_font' );
$hestia_body_font = get_theme_mod( 'hestia_body_font' );
if ( empty( $hestia_headings_font ) || empty( $hestia_body_font ) ) {
wp_enqueue_style( 'hestia_fonts', $this->get_fonts_url(), array(), HESTIA_VERSION );
}
}
/**
* Utility to check if WooCommerce styles should be enqueued.
*
* @return bool
*/
private function should_enqueue_woo_styles() {
$disabled_products = get_theme_mod( 'hestia_shop_hide', false );
if ( is_woocommerce() ) {
return true;
}
if ( is_checkout() ) {
return true;
}
if ( is_cart() ) {
return true;
}
if ( is_account_page() ) {
return true;
}
if ( is_front_page() && (bool) $disabled_products === false ) {
return true;
}
return false;
}
/**
* Setup Jetpack Support
*/
private function setup_jetpack() {
if ( ! class_exists( 'Jetpack' ) ) {
return;
}
add_theme_support( 'jetpack-portfolio' );
if ( Jetpack::is_module_active( 'custom-content-types' ) ) {
add_image_size( 'hestia-portfolio', 360, 300, true );
}
}
/**
* Setup Woocommerce Support
*/
private function setup_woocommerce() {
if ( ! class_exists( 'WooCommerce' ) ) {
$woocommerce_notice = HESTIA_PHP_INCLUDE . 'customizer/utils/customizer-info/class/class-hestia-customizer-info-singleton.php';
if ( file_exists( $woocommerce_notice ) ) {
require_once( $woocommerce_notice );
}
return;
}
$woocommerce_settings = apply_filters(
'hestia_woocommerce_args', array(
'single_image_width' => 600,
'thumbnail_image_width' => 230,
'gallery_thumbnail_image_width' => 160,
'product_grid' => array(
'default_columns' => 3,
'default_rows' => 4,
'min_columns' => 1,
'max_columns' => 6,
'min_rows' => 1,
),
)
);
add_theme_support( 'woocommerce', $woocommerce_settings );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
if ( function_exists( 'wc_get_image_size' ) ) {
$thumbnail = wc_get_image_size( 'thumbnail' );
if ( ! empty( $thumbnail['width'] ) && ! empty( $thumbnail['height'] ) && ! empty( $thumbnail['crop'] ) ) {
add_image_size( 'woocommerce_thumbnail_2x', $thumbnail['width'] * 2, $thumbnail['height'] * 2, $thumbnail['crop'] );
}
}
}
/**
* Get the starter content.
*
* @return array starter content.
*/
private function get_starter_content() {
$default_home_content = '<div class="col-md-5"><h3>' . esc_html__( 'About Hestia', 'hestia' ) . '</h3>' . esc_html__( 'Need more details? Please check our full documentation for detailed information on how to use Hestia.', 'hestia' ) . '</div><div class="col-md-6 col-md-offset-1"><img class="size-medium alignright" src="' . esc_url( get_template_directory_uri() . '/assets/img/about-content.png' ) . '"/></div>';
$default_home_featured_image = get_template_directory_uri() . '/assets/img/contact.jpg';
/*
* Starter Content Support
*/
$starter_content = array(
'attachments' => array(
'featured-image-home' => array(
'post_title' => 'Featured Image Homepage',
'post_content' => 'The featured image for the front page.',
'file' => 'assets/img/contact.jpg',
),
),
'posts' => array(
'home' => array(
'post_content' => $default_home_content,
'thumbnail' => '{{featured-image-home}}',
),
'blog',
),
'nav_menus' => array(
'primary' => array(
'name' => esc_html__( 'Primary Menu', 'hestia' ),
'items' => array(
'page_home',
'page_blog',
),
),
),
'options' => array(
'show_on_front' => 'page',
'page_on_front' => '{{home}}',
'page_for_posts' => '{{blog}}',
'hestia_page_editor' => $default_home_content,
'hestia_feature_thumbnail' => $default_home_featured_image,
),
);
return $starter_content;
}
/**
* Instantiates Classes that handle the content migration from other TI themes.
*/
private function import_flagship_content() {
if ( class_exists( 'Hestia_Content_Import' ) ) {
$importer = new Hestia_Content_Import();
$importer->import();
}
if ( class_exists( 'Hestia_Import_Zerif' ) ) {
$zerif_importer = new Hestia_Import_Zerif();
$zerif_importer->import();
}
}
/**
* Set generic strings.
*/
public function set_i18n() {
$this->generic_strings = array(
'header_title_defaut' => esc_html__( 'Lorem Ipsum', 'hestia' ),
'header_content_defaut' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'hestia' ),
'theme_info_title' => esc_html__( 'Hestia', 'hestia' ),
'blog_subscribe_widgets' => esc_html__( 'Blog Subscribe Section', 'hestia' ),
);
}
/**
* Import theme mods when switching from a Themeisle Hestia child theme to Hestia
*/
private function import_child_themes_content() {
// Get the name of the previously active theme.
$previous_theme = strtolower( get_option( 'theme_switched' ) );
$allowed_themes = array(
'christmas-hestia',
'tiny-hestia',
'orfeo',
'hestia-child',
'hestia-child-theme',
'hestia-pro-child',
'hestia-pro-child-theme',
);
if ( ! in_array( $previous_theme, $allowed_themes ) ) {
return;
}
// Get the theme mods from the previous theme.
$previous_theme_content = get_option( 'theme_mods_' . $previous_theme );
if ( ! empty( $previous_theme_content ) ) {
foreach ( $previous_theme_content as $previous_theme_mod_k => $previous_theme_mod_v ) {
set_theme_mod( $previous_theme_mod_k, $previous_theme_mod_v );
}
}
}
/**
* Get fonts url.
*
* @return string fonts that need to be enqueued.
*/
private function get_fonts_url() {
$fonts_url = '';
/**
* Translators: If there are characters in your language that are not
* supported by Roboto or Roboto Slab, translate this to 'off'. Do not translate
* into your own language.
*/
$roboto = _x( 'on', 'Roboto font: on or off', 'hestia' );
$roboto_slab = _x( 'on', 'Roboto Slab font: on or off', 'hestia' );
if ( 'off' !== $roboto || 'off' !== $roboto_slab ) {
$font_families = array();
if ( 'off' !== $roboto ) {
$font_families[] = 'Roboto:300,400,500,700';
}
if ( 'off' !== $roboto_slab ) {
$font_families[] = 'Roboto Slab:400,700';
}
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
}
return $fonts_url;
}
}
class-hestia-recursive-filter.php 0000666 00000002263 15113041770 0013133 0 ustar 00 <?php
/**
* Used for filtering autoloader files. Compatible with PHP 5.3 and 5.2
*
* Author: Andrei Baicus <andrei@themeisle.com>
* Created on: 18/07/2018
*
* @soundtrack D.O.A. (Death of Auto-Tune) - JAY-Z
* @package Hestia
*/
/**
* Class Hestia_Recursive_Filter
*/
class Hestia_Recursive_Filter extends RecursiveFilterIterator {
/**
* Callback function.
*
* @var string
*/
public $callback;
/**
* Hestia_Recursive_Filter constructor.
*
* @param RecursiveIterator $iterator file iterator.
* @param callable $callback callback function.
*/
public function __construct( RecursiveIterator $iterator, $callback ) {
$this->callback = $callback;
parent::__construct( $iterator );
}
/**
* Run the filter.
*
* @return bool
*/
public function accept() {
$callback = $this->callback;
return call_user_func_array( $callback, array( parent::current(), parent::key(), parent::getInnerIterator() ) );
}
/**
* Get the children from iterator.
*
* @return Hestia_Recursive_Filter|RecursiveFilterIterator
*/
public function getChildren() {
return new self( $this->getInnerIterator()->getChildren(), $this->callback );
}
}
abstract/class-hestia-register-customizer-controls.php 0000666 00000015433 15113041770 0017336 0 ustar 00 <?php
/**
* Customizer control registering abstract class.
*
* @package Hestia
*/
/**
* Class Hestia_Register_Customizer_Controls
*/
abstract class Hestia_Register_Customizer_Controls extends Hestia_Abstract_Main {
/**
* WP_Customize object
*
* @var $wp_customize object
*/
private $wpc;
/**
* Selective refresh.
*
* @var string transport or postMessage
*/
protected $selective_refresh;
/**
* Controls to register.
*
* @var array Controls that will be registered.
*/
private $controls_to_register = array();
/**
* Sections to register
*
* @var array Controls that will be registered.
*/
private $sections_to_register = array();
/**
* Panels to register
*
* @var array Panels that will be registered.
*/
private $panels_to_register = array();
/**
* Partials to register.
*
* @var array Partials that will be registered.
*/
private $partials_to_register = array();
/**
* Control types to regiister.
*
* @var array Control types that will be registered for use with the content_template Underscores template.
*/
private $types_to_register = array();
/**
* Initialize the control. Add all the hooks necessary.
*/
public function init() {
add_action( 'customize_register', array( $this, 'register_controls_callback' ) );
}
/**
* The function tied to customize_register.
*
* @param object $wp_customize the customizer manager.
*/
public function register_controls_callback( $wp_customize ) {
$this->wpc = $wp_customize;
$this->set_selective_refresh();
$this->add_controls();
$this->after_add_controls();
$this->register_controls();
$this->register_panels();
$this->register_sections();
$this->register_types();
$this->change_controls();
$this->register_partials();
}
/**
* Function that should be extended to add customizer controls.
*
* @return void
*/
abstract public function add_controls();
/**
* Hook after controls are defined.
*
* @return void
*/
public function after_add_controls() {
}
/**
* Change controls function.
*
* @return void
*/
public function change_controls() {
return;
}
/**
* Check selective refresh.
*/
private function set_selective_refresh() {
$this->selective_refresh = isset( $this->wpc->selective_refresh ) ? 'postMessage' : 'refresh';
}
/**
* Register all the defined sections.
*/
private function register_panels() {
$panels = $this->panels_to_register;
foreach ( $panels as $index => $panel ) {
$this->wpc->add_panel( $panel->id, $panel->args );
}
}
/**
* Register all the defined sections.
*/
private function register_sections() {
$sections = $this->sections_to_register;
foreach ( $sections as $index => $section ) {
if ( $section->custom_section !== null && class_exists( $section->custom_section ) ) {
$this->wpc->add_section( new $section->custom_section( $this->wpc, $section->id, $section->args ) );
} else {
$this->wpc->add_section( $section->id, $section->args );
}
}
}
/**
* Register all the defined controls.
*/
private function register_controls() {
$controls = $this->controls_to_register;
foreach ( $controls as $index => $control ) {
$this->wpc->add_setting( $control->id, $control->setting_args );
if ( $control->custom_control !== null && class_exists( $control->custom_control ) ) {
$this->wpc->add_control( new $control->custom_control( $this->wpc, $control->id, $control->control_args ) );
} else {
$this->wpc->add_control( $control->id, $control->control_args );
}
if ( $control->partial !== null ) {
$this->add_partial( new Hestia_Customizer_Partial( $control->id, $control->partial ) );
}
}
}
/**
* Register control types defined to work with Underscores template.
*/
private function register_types() {
$types = $this->types_to_register;
foreach ( $types as $object => $type ) {
call_user_func_array( array( $this->wpc, 'register_' . $type . '_type' ), array( $object ) );
}
}
/**
* Register all the defined controls.
*/
private function register_partials() {
$partials = $this->partials_to_register;
foreach ( $partials as $index => $partial ) {
$this->wpc->selective_refresh->add_partial( $partial->id, $partial->args );
}
}
/**
* Add the controls to load.
*
* @param Hestia_Customizer_Control $control Hestia_Customizer_Control $control control to add.
*/
public function add_control( Hestia_Customizer_Control $control ) {
array_push( $this->controls_to_register, $control );
}
/**
* Add the sections to load.
*
* @param Hestia_Customizer_Section $section section to add.
*/
public function add_section( Hestia_Customizer_Section $section ) {
array_push( $this->sections_to_register, $section );
}
/**
* Add the panels to load.
*
* @param Hestia_Customizer_Panel $panel panel to add.
*/
public function add_panel( Hestia_Customizer_Panel $panel ) {
array_push( $this->panels_to_register, $panel );
}
/**
* Add types that will be registered for .
*
* @param string $object_name the object name that will be registered.
* @param string $type the type of object to register [panel, section, control].
*/
public function register_type( $object_name, $type ) {
$accepted_types = array( 'panel', 'section', 'control' );
if ( ! in_array( $type, $accepted_types ) ) {
return;
}
$this->types_to_register[ $object_name ] = $type;
}
/**
* Add the partials to load.
*
* @param Hestia_Customizer_Partial $partial partial to add.
*/
public function add_partial( Hestia_Customizer_Partial $partial ) {
array_push( $this->partials_to_register, $partial );
}
/**
* Get customizer object.
*
* @param string $type object type [ section, control, setting, panel ].
* @param string $id the id of the customizer object.
*
* @return mixed|null
*/
public function get_customizer_object( $type, $id ) {
$accepted_types = array( 'setting', 'control', 'section', 'panel' );
if ( ! in_array( $type, $accepted_types ) ) {
return null;
}
$object = call_user_func_array( array( $this->wpc, 'get_' . $type ), array( $id ) );
if ( empty( $object ) ) {
return null;
}
return $object;
}
/**
* Change a customizer object.
*
* @param string $type object type [ section, control, setting, panel ].
* @param string $id id of object.
* @param string $property property to change.
* @param string|integer|array $value the value.
*/
public function change_customizer_object( $type, $id, $property, $value ) {
$accepted_types = array( 'setting', 'control', 'section', 'panel' );
if ( ! in_array( $type, $accepted_types ) ) {
return;
}
$object = call_user_func_array( array( $this->wpc, 'get_' . $type ), array( $id ) );
if ( empty( $object ) ) {
return;
}
$object->$property = $value;
}
}
abstract/class-hestia-front-page-section-controls-abstract.php 0000666 00000007120 15113041770 0020607 0 ustar 00 <?php
/**
* Hestia_Front_Page_Section_Controls_Abstract
*
* @package Hestia
*/
/**
* Class Hestia_Front_Page_Section_Controls_Abstract
*/
abstract class Hestia_Front_Page_Section_Controls_Abstract extends Hestia_Register_Customizer_Controls {
/**
* Main section data.
*
* @var array Section data.
*/
private $section_data;
/**
* Set variable fields when creating a section.
*
* @return array
*/
abstract protected function set_section_data();
/**
* Initialize the section and common controls.
*/
public function init() {
parent::init();
$this->section_data = $this->set_section_data();
}
/**
* Hook to add things between controls.
*/
public function after_add_controls() {
if ( $this->section_data === null ) {
return;
}
$this->register_frontpage_section();
$this->register_common_controls();
}
/**
* Register a front page section.
*/
private function register_frontpage_section() {
$title = $this->section_data['title'];
$priority = $this->section_data['priority'];
$slug = $this->section_data['slug'];
$this->add_section(
new Hestia_Customizer_Section(
'hestia_' . $slug,
array(
'title' => $title,
'panel' => 'hestia_frontpage_sections',
'priority' => apply_filters( 'hestia_section_priority', $priority, 'hestia_' . $slug ),
'hiding_control' => 'hestia_' . $slug . '_hide',
),
'Hestia_Hiding_Section'
)
);
}
/**
* Register controls that are in each section: Title, Subtitle and Show.
*/
private function register_common_controls() {
$slug = $this->section_data['slug'];
$initially_hidden = $this->get_initial_section_status();
$control_section = $this->get_control_section();
$controls = array(
'hestia_' . $slug . '_hide' => array(
'setting' => array(
'sanitize_callback' => 'hestia_sanitize_checkbox',
'default' => $initially_hidden,
'transport' => $this->selective_refresh,
),
'control' => array(
'type' => 'checkbox',
'label' => esc_html__( 'Disable section', 'hestia' ),
'section' => $control_section,
'priority' => 1,
),
),
'hestia_' . $slug . '_title' => array(
'setting' => array(
'sanitize_callback' => 'wp_kses_post',
'transport' => $this->selective_refresh,
),
'control' => array(
'label' => esc_html__( 'Section Title', 'hestia' ),
'section' => $control_section,
'priority' => 5,
),
),
'hestia_' . $slug . '_subtitle' => array(
'setting' => array(
'sanitize_callback' => 'wp_kses_post',
'transport' => $this->selective_refresh,
),
'control' => array(
'label' => esc_html__( 'Section Subtitle', 'hestia' ),
'section' => $control_section,
'priority' => 10,
),
),
);
foreach ( $controls as $control_name => $control_data ) {
$this->add_control(
new Hestia_Customizer_Control(
$control_name,
$control_data['setting'],
$control_data['control']
)
);
}
}
/**
* Get initial section status.
*
* @return bool
*/
private function get_initial_section_status() {
if ( ! isset( $this->section_data['initially_hidden'] ) ) {
return false;
}
if ( $this->section_data['initially_hidden'] === true ) {
return true;
}
return false;
}
/**
* Get section for control if it's set.
*
* @return string
*/
private function get_control_section() {
if ( isset( $this->section_data['section'] ) ) {
return $this->section_data['section'];
}
return 'hestia_' . $this->section_data['slug'];
}
}
abstract/class-hestia-abstract-main.php 0000666 00000000363 15113041770 0014170 0 ustar 00 <?php
/**
* Main abstract function.
*
* @package Hestia
*/
/**
* Class Hestia_Abstract_Main
*/
abstract class Hestia_Abstract_Main {
/**
* Initialize the control. Add all the hooks necessary.
*/
abstract public function init();
}
class-hestia-feature-factory.php 0000666 00000001523 15113041770 0012737 0 ustar 00 <?php
/**
* The factory logic for creating features.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Hestia
*/
/**
* The class responsible for instantiating new Hestia classes.
*
* @package Hestia
* @author Themeisle <friends@themeisle.com>
*/
class Hestia_Feature_Factory {
/**
* The build method for creating a new Hestia class.
*
* @since 1.0.0
* @access public
* @param string $feature_name The name of the feature to instantiate.
* @return mixed
*/
public static function build( $feature_name ) {
$feature_words = explode( '-', $feature_name );
$feature_words = array_map( 'ucfirst', $feature_words );
$feature_name = implode( '_', $feature_words );
$class = 'Hestia_' . $feature_name;
if ( class_exists( $class ) ) {
return new $class;
}
return null;
}
}
class-hestia-admin.php 0000666 00000037265 15113041770 0010743 0 ustar 00 <?php
/**
* The admin class that handles all the dashboard integration.
*
* @package Hestia
*/
/**
* Class Hestia_Admin
*/
class Hestia_Admin {
/**
* Register the stylesheets for the admin area.
*
* @since 1.0.0
*/
public function enqueue_styles() {
}
/**
* Add the about page.
*/
public function do_about_page() {
/*
* About page instance
*/
$config = array(
// Menu name under Appearance.
'menu_name' => apply_filters( 'hestia_about_page_filter', __( 'About Hestia', 'hestia' ), 'menu_name' ),
// Page title.
'page_name' => apply_filters( 'hestia_about_page_filter', __( 'About Hestia', 'hestia' ), 'page_name' ),
// Main welcome title
/* translators: s - theme name */
'welcome_title' => apply_filters( 'hestia_about_page_filter', sprintf( __( 'Welcome to %s! - Version ', 'hestia' ), 'Hestia' ), 'welcome_title' ),
// Main welcome content
'welcome_content' => apply_filters( 'hestia_about_page_filter', esc_html__( 'Hestia is a modern WordPress theme for professionals. It fits creative business, small businesses (restaurants, wedding planners, sport/medical shops), startups, corporate businesses, online agencies and firms, portfolios, ecommerce (WooCommerce), and freelancers. It has a multipurpose one-page design, widgetized footer, blog/news page and a clean look, is compatible with: Flat Parallax Slider, Photo Gallery, Travel Map and Elementor Page Builder . The theme is responsive, WPML, Retina ready, SEO friendly, and uses Material Kit for design.', 'hestia' ), 'welcome_content' ),
/**
* Tabs array.
*
* The key needs to be ONLY consisted from letters and underscores. If we want to define outside the class a function to render the tab,
* the will be the name of the function which will be used to render the tab content.
*/
'tabs' => array(
'getting_started' => __( 'Getting Started', 'hestia' ),
'recommended_actions' => __( 'Recommended Actions', 'hestia' ),
'recommended_plugins' => __( 'Useful Plugins', 'hestia' ),
'support' => __( 'Support', 'hestia' ),
'changelog' => __( 'Changelog', 'hestia' ),
'free_pro' => __( 'Free vs PRO', 'hestia' ),
),
// Support content tab.
'support_content' => array(
'first' => array(
'title' => esc_html__( 'Contact Support', 'hestia' ),
'icon' => 'dashicons dashicons-sos',
'text' => esc_html__( 'We want to make sure you have the best experience using Hestia, and that is why we have gathered all the necessary information here for you. We hope you will enjoy using Hestia as much as we enjoy creating great products.', 'hestia' ),
'button_label' => esc_html__( 'Contact Support', 'hestia' ),
'button_link' => esc_url( 'https://themeisle.com/contact/' ),
'is_button' => true,
'is_new_tab' => true,
),
'second' => array(
'title' => esc_html__( 'Documentation', 'hestia' ),
'icon' => 'dashicons dashicons-book-alt',
'text' => esc_html__( 'Need more details? Please check our full documentation for detailed information on how to use Hestia.', 'hestia' ),
'button_label' => esc_html__( 'Read full documentation', 'hestia' ),
'button_link' => 'http://docs.themeisle.com/article/569-hestia-documentation',
'is_button' => false,
'is_new_tab' => true,
),
'third' => array(
'title' => esc_html__( 'Changelog', 'hestia' ),
'icon' => 'dashicons dashicons-portfolio',
'text' => esc_html__( 'Want to get the gist on the latest theme changes? Just consult our changelog below to get a taste of the recent fixes and features implemented.', 'hestia' ),
'button_label' => esc_html__( 'Changelog', 'hestia' ),
'button_link' => esc_url( '#changelog' ),
'is_button' => false,
'is_new_tab' => false,
),
'fourth' => array(
'title' => esc_html__( 'Create a child theme', 'hestia' ),
'icon' => 'dashicons dashicons-admin-customizer',
'text' => esc_html__( "If you want to make changes to the theme's files, those changes are likely to be overwritten when you next update the theme. In order to prevent that from happening, you need to create a child theme. For this, please follow the documentation below.", 'hestia' ),
'button_label' => esc_html__( 'View how to do this', 'hestia' ),
'button_link' => 'http://docs.themeisle.com/article/14-how-to-create-a-child-theme',
'is_button' => false,
'is_new_tab' => true,
),
'fifth' => array(
'title' => esc_html__( 'Speed up your site', 'hestia' ),
'icon' => 'dashicons dashicons-controls-skipforward',
'text' => esc_html__( 'If you find yourself in a situation where everything on your site is running very slowly, you might consider having a look at the documentation below where you will find the most common issues causing this and possible solutions for each of the issues.', 'hestia' ),
'button_label' => esc_html__( 'View how to do this', 'hestia' ),
'button_link' => 'http://docs.themeisle.com/article/63-speed-up-your-wordpress-site',
'is_button' => false,
'is_new_tab' => true,
),
'sixth' => array(
'title' => esc_html__( 'Build a landing page with a drag-and-drop content builder', 'hestia' ),
'icon' => 'dashicons dashicons-images-alt2',
'text' => esc_html__( 'In the documentation below you will find an easy way to build a great looking landing page using a drag-and-drop content builder plugin.', 'hestia' ),
'button_label' => esc_html__( 'View how to do this', 'hestia' ),
'button_link' => 'http://docs.themeisle.com/article/219-how-to-build-a-landing-page-with-a-drag-and-drop-content-builder',
'is_button' => false,
'is_new_tab' => true,
),
),
// Getting started tab
'getting_started' => array(
'first' => array(
'title' => esc_html__( 'Recommended actions', 'hestia' ),
'text' => esc_html__( 'We have compiled a list of steps for you to take so we can ensure that the experience you have using one of our products is very easy to follow.', 'hestia' ),
'button_label' => esc_html__( 'Recommended actions', 'hestia' ),
'button_link' => esc_url( '#recommended_actions' ),
'is_button' => false,
'recommended_actions' => true,
'is_new_tab' => false,
),
'second' => array(
'title' => esc_html__( 'Read full documentation', 'hestia' ),
'text' => esc_html__( 'Need more details? Please check our full documentation for detailed information on how to use Hestia.', 'hestia' ),
'button_label' => esc_html__( 'Documentation', 'hestia' ),
'button_link' => 'http://docs.themeisle.com/article/569-hestia-documentation',
'is_button' => false,
'recommended_actions' => false,
'is_new_tab' => true,
),
'third' => array(
'title' => esc_html__( 'Go to the Customizer', 'hestia' ),
'text' => esc_html__( 'Using the WordPress Customizer you can easily customize every aspect of the theme.', 'hestia' ),
'button_label' => esc_html__( 'Go to the Customizer', 'hestia' ),
'button_link' => esc_url( admin_url( 'customize.php' ) ),
'is_button' => true,
'recommended_actions' => false,
'is_new_tab' => true,
),
),
// Free vs PRO array.
'free_pro' => array(
'free_theme_name' => 'Hestia',
'pro_theme_name' => 'Hestia Pro',
'pro_theme_link' => apply_filters( 'hestia_upgrade_link_from_child_theme_filter', 'https://themeisle.com/themes/hestia-pro/upgrade/' ),
/* translators: s - theme name */
'get_pro_theme_label' => sprintf( __( 'Get %s now!', 'hestia' ), 'Hestia Pro' ),
'banner_link' => 'http://docs.themeisle.com/article/647-what-is-the-difference-between-hestia-and-hestia-pro',
'banner_src' => get_template_directory_uri() . '/assets/img/free_vs_pro_banner.png',
'features' => array(
array(
'title' => __( 'Mobile friendly', 'hestia' ),
'description' => __( 'Responsive layout. Works on every device.', 'hestia' ),
'is_in_lite' => 'true',
'is_in_pro' => 'true',
),
array(
'title' => __( 'WooCommerce Compatible', 'hestia' ),
'description' => __( 'Ready for e-commerce. You can build an online store here.', 'hestia' ),
'is_in_lite' => 'true',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Frontpage Sections', 'hestia' ),
'description' => __( 'Big title, Features, About, Team, Testimonials, Subscribe, Blog, Contact', 'hestia' ),
'is_in_lite' => 'true',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Background image', 'hestia' ),
'description' => __( 'You can use any background image you want.', 'hestia' ),
'is_in_lite' => 'true',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Section Reordering', 'hestia' ),
'description' => __( 'The ability to reorganize your Frontpage Sections more easily and quickly.', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Shortcodes for each section', 'hestia' ),
'description' => __( 'Display a frontpage section wherever you like by adding its shortcode in page or post content.', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Header Slider', 'hestia' ),
'description' => __( 'You will be able to add more content to your site header with an awesome slider.', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Fully Customizable Colors', 'hestia' ),
'description' => __( 'Change colors for the header overlay, header text and navbar.', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Jetpack Portfolio', 'hestia' ),
'description' => __( 'Portfolio section with two possible layouts.', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Pricing Plans Section', 'hestia' ),
'description' => __( 'A fully customizable pricing plans section.', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
array(
'title' => __( 'Quality Support', 'hestia' ),
'description' => __( '24/7 HelpDesk Professional Support', 'hestia' ),
'is_in_lite' => 'false',
'is_in_pro' => 'true',
),
),
),
// Plugins array.
'recommended_plugins' => array(
'already_activated_message' => esc_html__( 'Already activated', 'hestia' ),
'version_label' => esc_html__( 'Version: ', 'hestia' ),
'install_label' => esc_html__( 'Install and Activate', 'hestia' ),
'activate_label' => esc_html__( 'Activate', 'hestia' ),
'deactivate_label' => esc_html__( 'Deactivate', 'hestia' ),
'content' => array(
array(
'slug' => 'elementor',
),
array(
'slug' => 'translatepress-multilingual',
),
array(
'slug' => 'beaver-builder-lite-version',
),
array(
'slug' => 'wp-product-review',
),
array(
'slug' => 'intergeo-maps',
),
array(
'slug' => 'visualizer',
),
array(
'slug' => 'adblock-notify-by-bweb',
),
array(
'slug' => 'nivo-slider-lite',
),
),
),
// Required actions array.
'recommended_actions' => array(
'install_label' => esc_html__( 'Install and Activate', 'hestia' ),
'activate_label' => esc_html__( 'Activate', 'hestia' ),
'deactivate_label' => esc_html__( 'Deactivate', 'hestia' ),
'content' => array(
'themeisle-companion' => array(
'title' => 'Orbit Fox Companion',
'description' => __( 'It is highly recommended that you install the companion plugin to have access to the Frontpage features, Team and Testimonials sections.', 'hestia' ),
'check' => defined( 'THEMEISLE_COMPANION_VERSION' ),
'plugin_slug' => 'themeisle-companion',
'id' => 'themeisle-companion',
),
'pirate-forms' => array(
'title' => 'Pirate Forms',
'description' => __( 'Makes your Contact section more engaging by creating a good-looking contact form. Interaction with your visitors has never been easier.', 'hestia' ),
'check' => defined( 'PIRATE_FORMS_VERSION' ),
'plugin_slug' => 'pirate-forms',
'id' => 'pirate-forms',
),
'elementor' => array(
'title' => 'Elementor',
'check' => ( defined( 'ELEMENTOR_VERSION' ) || ! hestia_check_passed_time( 12 * MONTH_IN_SECONDS ) ),
'plugin_slug' => 'elementor',
'id' => 'elementor',
),
),
),
);
Hestia_About_Page::init( apply_filters( 'hestia_about_page_array', $config ) );
}
/**
* Enqueue Customizer Script.
*/
public function enqueue_customizer_script() {
wp_enqueue_script(
'hestia-customizer-preview', get_template_directory_uri() . '/assets/js/admin/customizer.js',
array(
'jquery',
'customize-preview',
), HESTIA_VERSION, true
);
}
/**
* Enqueue customizer controls script.
*/
public function enqueue_customizer_controls() {
wp_enqueue_style( 'hestia-customizer-style', get_template_directory_uri() . '/assets/css/customizer-style.css', array(), HESTIA_VERSION );
wp_enqueue_script(
'hestia_customize_controls', get_template_directory_uri() . '/assets/js/admin/customizer-controls.js',
array(
'jquery',
'customize-preview',
), HESTIA_VERSION, true
);
}
/**
* Add inline style for editor.
*
* @param string $init Setup TinyMCE.
*
* @return mixed
*/
function editor_inline_style( $init ) {
$accent_color = get_theme_mod( 'accent_color', apply_filters( 'hestia_accent_color_default', '#e91e63' ) );
$headings_font = get_theme_mod( 'hestia_headings_font' );
$body_font = get_theme_mod( 'hestia_body_font' );
$custom_css = '';
// Check if accent color is exists.
if ( ! empty( $accent_color ) ) {
$custom_css .= 'body.mce-content-body a { color: ' . esc_attr( $accent_color ) . '; }';
}
// Check if font family for body exists.
if ( ! empty( $body_font ) ) {
$custom_css .= 'body, p { font-family: ' . esc_attr( $body_font ) . ' !important; }';
}
// Check if font family for headings exists.
if ( ! empty( $headings_font ) ) {
$custom_css .= 'h1, h2, h3, h4, h5, h6 { font-family: ' . esc_attr( $headings_font ) . ' !important; }';
}
?>
<script type="text/javascript">
function hestiaEditorInlineStyle( ed ) {
ed.onInit.add( function () {
<?php
// Added font family for body in editor.
if ( ! empty( $body_font ) ) {
?>
tinymce.activeEditor.dom.loadCSS( 'https://fonts.googleapis.com/css?family=<?php echo esc_attr( $body_font ); ?>' );
<?php
}
// Added font family for headings in editor.
if ( ! empty( $headings_font ) ) {
?>
tinymce.activeEditor.dom.loadCSS( 'https://fonts.googleapis.com/css?family=<?php echo esc_attr( $headings_font ); ?>' );
<?php } ?>
// Added custom CSS in editor.
tinyMCE.activeEditor.dom.addStyle(<?php echo json_encode( $custom_css ); ?>);
} );
};
</script>
<?php
if ( wp_default_editor() == 'tinymce' ) {
$init['setup'] = 'hestiaEditorInlineStyle';
}
return $init;
}
}
class-hestia-autoloader.php 0000666 00000013457 15113041770 0012007 0 ustar 00 <?php
/**
* The file that defines autoload class
*
* A simple autoloader that loads class files recursively starting in the directory
* where this class resides. Additional options can be provided to control the naming
* convention of the class files.
*
* @link https://themeisle.com
* @copyright Copyright (c) 2017, Bogdan Preda
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
* @since 1.1.40
* @package hestia
*/
/**
* The Autoloader class.
*
* @since 1.1.40
* @package hestia
* @author Themeisle <friends@themeisle.com>
*/
class Hestia_Autoloader {
/**
* File extension as a string. Defaults to ".php".
*
* @since 1.1.40
* @access protected
* @var string $file_ext The file extension to look for.
*/
protected static $file_ext = '.php';
/**
* The top level directory where recursion will begin. Defaults to the current
* directory.
*
* @since 1.1.40
* @access protected
* @var string $path_top The root directory.
*/
protected static $path_top = __DIR__;
/**
* The plugin directory where recursion will begin. Defaults to empty ( No module will be loaded ).
*
* @since 1.1.40
* @access protected
* @var string $plugins_path The installation plugins directory.
*/
protected static $plugins_path = '';
/**
* Holds an array of namespaces to filter in autoloading if set.
*
* @since 1.1.40
* @access protected
* @var array $namespaces The namespace array, used if not empty on autoloading.
*/
protected static $namespaces = array();
/**
* An array of files to exclude when looking to autoload.
*
* @since 1.1.40
* @access protected
* @var array $excluded_files The excluded files list.
*/
protected static $excluded_files = array();
/**
* A placeholder to hold the file iterator so that directory traversal is only
* performed once.
*
* @since 1.1.40
* @access protected
* @var RecursiveIteratorIterator $file_iterator Holds an instance of the iterator class.
*/
protected static $file_iterator = null;
/**
* Method to check in allowed namespaces.
*
* @since 1.1.40
* @access protected
*
* @param string $class_name the class name to check with the namespaces.
*
* @return bool
*/
protected static function check_namespaces( $class_name ) {
$found = false;
foreach ( static::$namespaces as $namespace ) {
if ( substr( $class_name, 0, strlen( $namespace ) ) == $namespace ) {
$found = true;
}
}
return $found;
}
/**
* Autoload function for registration with spl_autoload_register
*
* Looks recursively through project directory and loads class files based on
* filename match.
*
* @since 1.1.40
* @access public
*
* @param string $class_name The class name requested.
*
* @return mixed
*/
public static function loader( $class_name ) {
if ( ! empty( static::$namespaces ) ) {
$found = static::check_namespaces( $class_name );
if ( ! $found ) {
return $found;
}
}
$directory = new RecursiveDirectoryIterator( static::$path_top . DIRECTORY_SEPARATOR, RecursiveDirectoryIterator::SKIP_DOTS );
require_once 'class-hestia-recursive-filter.php';
if ( is_null( static::$file_iterator ) ) {
$iterator = new RecursiveIteratorIterator(
new Hestia_Recursive_Filter(
$directory, array(
'Hestia_Autoloader',
'filter_excluded_files',
)
)
);
$regex = new RegexIterator( $iterator, '/^.+\.php$/i', RecursiveRegexIterator::MATCH );
static::$file_iterator = iterator_to_array( $regex, false );
}
$filename = 'class-' . str_replace( '_', '-', strtolower( $class_name ) ) . static::$file_ext;
foreach ( static::$file_iterator as $file ) {
if ( strtolower( $file->getFileName() ) === strtolower( $filename ) && is_readable( $file->getPathName() ) ) {
require( $file->getPathName() );
return true;
}
}
}
/**
* Sets the $file_ext property
*
* @since 1.1.40
* @access public
*
* @param string $file_ext The file extension used for class files. Default is "php".
*/
public static function set_file_ext( $file_ext ) {
static::$file_ext = $file_ext;
}
/**
* Sets the $path property
*
* @since 1.1.40
* @access public
*
* @param string $path The path representing the top level where recursion should
* begin. Defaults to the current directory.
*/
public static function set_path( $path ) {
static::$path_top = $path;
}
/**
* Adds a new file to the exclusion list.
*
* @since 1.1.40
* @access public
*
* @param string $file_name The file name to exclude from autoload.
*/
public static function exclude_file( $file_name ) {
static::$excluded_files[] = $file_name;
}
/**
* Define files the autoloader is going to recursively ignore.
*
* @param array $files_array the excluded files array.
*/
public static function define_excluded_files( $files_array ) {
static::$excluded_files = array_merge( static::$excluded_files, $files_array );
}
/**
* Sets the namespaces used in autoloading if any.
*
* @since 1.1.40
* @access public
*
* @param array $namespaces The namespaces to use.
*/
public static function define_namespaces( $namespaces = array() ) {
static::$namespaces = $namespaces;
}
/**
* Utility to filter out the excluded directories.
*
* @param \SplFileInfo $file The file info array.
* @param string $key File key.
* @param \RecursiveDirectoryIterator $iterator The recursive directory iterator.
*
* @return bool
*/
public static function filter_excluded_files( \SplFileInfo $file, $key, \RecursiveDirectoryIterator $iterator ) {
if ( ! in_array( $file->getFilename(), static::$excluded_files ) ) {
return true;
}
return false;
}
}
types/customizer/class-hestia-customizer-panel.php 0000666 00000001067 15113041770 0016513 0 ustar 00 <?php
/**
* Customizer panel type enforcement
*
* @package Hestia
*/
/**
* Class Hestia_Customizer_Panel
*/
class Hestia_Customizer_Panel {
/**
* ID of panel
*
* @var string the control ID.
*/
public $id;
/**
* Args for panel instance.
*
* @var array args passed into panel instance.
*/
public $args = array();
/**
* Hestia_Customizer_Panel constructor.
*
* @param string $id the control id.
* @param array $args the panel args.
*/
public function __construct( $id, $args ) {
$this->id = $id;
$this->args = $args;
}
}
types/customizer/class-hestia-customizer-control.php 0000666 00000002515 15113041770 0017073 0 ustar 00 <?php
/**
* Customizer control type enforcement.
*
* @package Hestia
*/
/**
* Class Hestia_Customizer_Control
*/
class Hestia_Customizer_Control {
/**
* Control ID
*
* @var string the control ID.
*/
public $id;
/**
* Setting arguments.
*
* @var array args passed into settings.
*/
public $setting_args = array();
/**
* Control arguments.
*
* @var array args passed into controls.
*/
public $control_args = array();
/**
* Custom control if applies.
*
* @var null|string
*/
public $custom_control = null;
/**
* The Partials array
*
* @var null|array
*/
public $partial = null;
/**
* Hestia_Customizer_Control constructor.
*
* @param string $id the control id.
* @param array $setting_args the add_setting array.
* @param array $control_args the add_control array.
* @param string $custom_control [optional] this should be added if the control is a custom control.
* @param array $partial [optional] this should be added if the control is a selective refresh control..
*/
public function __construct( $id, $setting_args, $control_args, $custom_control = null, $partial = null ) {
$this->id = $id;
$this->setting_args = $setting_args;
$this->control_args = $control_args;
$this->custom_control = $custom_control;
$this->partial = $partial;
}
}
types/customizer/class-hestia-customizer-partial.php 0000666 00000001221 15113041770 0017040 0 ustar 00 <?php
/**
* Customizer partial type enforcing.
*
* @package Hestia
*/
/**
* Class Hestia_Customizer_Partial
*/
class Hestia_Customizer_Partial {
/**
* ID of control that will be attached to. Also ID of the partial itself.
*
* @var string the control ID.
*/
public $control_id;
/**
* Args for the partial.
*
* @var array args passed into partial.
*/
public $args = array();
/**
* Hestia_Customizer_Partial constructor.
*
* @param string $control_id the control id.
* @param array $args the partial args.
*/
public function __construct( $control_id, $args ) {
$this->id = $control_id;
$this->args = $args;
}
}
types/customizer/class-hestia-customizer-section.php 0000666 00000001565 15113041770 0017063 0 ustar 00 <?php
/**
* Customizer Section type Enforcing.
*
* @package Hestia
*/
/**
* Class Hestia_Customizer_Section
*/
class Hestia_Customizer_Section {
/**
* ID of section
*
* @var string the control ID.
*/
public $id;
/**
* Args for section instance.
*
* @var array args passed into section.
*/
public $args = array();
/**
* Custom section ( string of class name | null)
*
* @var null|string
*/
public $custom_section = null;
/**
* Hestia_Customizer_Section constructor.
*
* @param string $id the control id.
* @param array $args the add_section array.
* @param string $custom_section [optional] this should be added if the section is a custom section.
*/
public function __construct( $id, $args, $custom_section = null ) {
$this->id = $id;
$this->args = $args;
$this->custom_section = $custom_section;
}
}
class-hestia-core.php 0000666 00000007775 15113041770 0010606 0 ustar 00 <?php
/**
* The file that defines the core theme class
*
* A class definition that includes attributes and functions used across both the
* public-facing side of the site and the admin area.
*
* @link https://themeisle.com
* @package Hestia
* @subpackage Hestia/core
*/
/**
* The core theme class.
*
* This is used to define admin-specific hooks, and
* public-facing site hooks.
*
* @package Hestia
* @author Themeisle <friends@themeisle.com>
*/
class Hestia_Core {
/**
* Features that will be loaded.
*
* @access protected
* @var array $features_to_load Features that will be loaded.
*/
protected $features_to_load;
/**
* Define the core functionality of the theme.
*
* Set the plugin name and the plugin version that can be used throughout the plugin.
* Load the dependencies, addons, and set the hooks for the admin area and
* the public-facing side of the site.
*
* @access public
*/
public function __construct() {
$this->maybe_load_addons();
$this->define_hooks();
$this->define_features();
$this->prepare_features();
}
/**
* Define the features that will be loaded.
*/
private function define_features() {
$this->features_to_load = apply_filters(
'hestia_filter_main_features', array(
'appearance-controls',
'tweaks',
'customizer-page-editor-helper',
'customizer-main',
'customizer-notices',
'header-controls',
'header',
'footer',
'colors',
'color-controls',
'general-controls',
'big-title-section',
'big-title-controls',
'about-section',
'about-controls',
'shop-section',
'shop-controls',
'blog-section',
'blog-section-controls',
'contact-section',
'contact-controls',
'subscribe-section',
'subscribe-controls',
'typography-manager',
'typography-controls',
'inline-style-manager',
'public-typography',
'blog-settings-controls',
'customizer-scroll-ui',
'upsell-manager',
'featured-posts',
'authors-section',
'individual-single-layout',
'additional-views',
'sidebar-layout-manager',
'header-layout-manager',
'elementor-compatibility',
'beaver-builder-compatibility',
'admin-notices-manager',
'child-compat',
'child-compat-customizer',
)
);
}
/**
* Check if addons are available and load them if necessary.
*
* @access private
*/
private function maybe_load_addons() {
if ( ! class_exists( 'Hestia_Addon_Manager' ) ) {
return;
}
$addon_manager = new Hestia_Addon_Manager();
$addon_manager->init();
}
/**
* Check Features and register them.
*
* @access private
*/
private function prepare_features() {
$factory = new Hestia_Feature_Factory();
foreach ( $this->features_to_load as $feature_name ) {
$feature = $factory::build( $feature_name );
if ( $feature !== null ) {
$feature->init();
}
}
}
/**
* Register all of the hooks related to the functionality
* of the theme setup.
*
* @access private
*/
private function define_hooks() {
$plugin_admin = new Hestia_Admin();
add_action( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_styles' ) );
add_action( 'customize_preview_init', array( $plugin_admin, 'enqueue_customizer_script' ) );
add_action( 'customize_controls_enqueue_scripts', array( $plugin_admin, 'enqueue_customizer_controls' ) );
add_filter( 'tiny_mce_before_init', array( $plugin_admin, 'editor_inline_style' ) );
add_filter( 'init', array( $plugin_admin, 'do_about_page' ) );
$front_end = new Hestia_Public();
add_filter( 'frontpage_template', array( $front_end, 'filter_front_page_template' ) );
add_action( 'after_switch_theme', array( $front_end, 'theme_activated' ), 0 );
add_action( 'after_setup_theme', array( $front_end, 'setup_theme' ) );
add_action( 'widgets_init', array( $front_end, 'initialize_widgets' ) );
add_action( 'wp_enqueue_scripts', array( $front_end, 'enqueue_scripts' ) );
add_action( 'elementor/frontend/before_register_styles', array( $front_end, 'enqueue_before_elementor' ) );
}
}
app/class-orbit-fox-module-factory.php 0000666 00000001742 15113067355 0014017 0 ustar 00 <?php
/**
* The factory logic for creating modules for plugin.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
*/
/**
* The class responsible for instantiating new OBFX_Module classes.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Module_Factory {
/**
* The build method for creating a new OBFX_Module class.
*
* @since 1.0.0
* @access public
* @param string $module_name The name of the module to instantiate.
* @return mixed
* @throws Exception Thrown if no module class exists for provided $module_name.
*/
public static function build( $module_name ) {
$module = str_replace( '-', '_', ucwords( $module_name ) ) . '_OBFX_Module';
if ( class_exists( $module ) ) {
return new $module;
}
// @codeCoverageIgnoreStart
throw new Exception( 'Invalid module name given.' );
// @codeCoverageIgnoreEnd
}
}
app/index.php 0000666 00000000033 15113067355 0007152 0 ustar 00 <?php // Silence is golden
app/views/partials/module-tile-tpl.php 0000666 00000005120 15113067355 0014036 0 ustar 00 <?php
/**
* Tile modules template.
* Imported via the Orbit_Fox_Render_Helper.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/views/partials
*/
if ( ! isset( $name ) ) {
$name = __( 'Module Name', 'themeisle-companion' );
}
if ( ! isset( $description ) ) {
$description = __( 'Module Description ...', 'themeisle-companion' );
}
if ( ! isset( $checked ) ) {
$checked = '';
}
if ( ! isset( $beta ) ) {
$beta = false;
}
$toggle_class = 'obfx-mod-switch';
if ( ! empty( $confirm_intent ) ) {
$toggle_class .= ' obfx-mod-confirm-intent';
$modal = '
<div id="' . esc_attr( $slug ) . '" class="modal">
<a href="#close" class="close-confirm-intent modal-overlay" aria-label="Close"></a>
<div class="modal-container">
<div class="modal-header">
<a href="#" class="btn btn-clear float-right close-confirm-intent" aria-label="Close"></a>
</div>
<div class="modal-body">' . wp_kses_post( $confirm_intent ) . '</div>
<div class="modal-footer">
<button class="btn btn-primary accept-confirm-intent">' . __( 'Got it!', 'themeisle-companion' ) . '</button>
</div>
</div>
</div>';
}
$noance = wp_create_nonce( 'obfx_activate_mod_' . $slug );
?>
<div class="tile <?php echo 'obfx-tile-' . esc_attr( $slug ); ?>" >
<div class="tile-icon">
<div class="example-tile-icon">
<i class="dashicons dashicons-admin-plugins centered"></i>
</div>
</div>
<div class="tile-content">
<p class="tile-title"><?php echo $name; ?></p>
<p class="tile-subtitle"><?php echo $description; ?></p>
</div>
<div class="tile-action">
<div class="form-group">
<label class="form-switch <?php echo empty( $checked ) ? '' : 'activated'; ?>">
<input class="<?php echo esc_attr( $toggle_class ); ?>" type="checkbox" name="<?php echo $slug; ?>"
value="<?php echo $noance; ?>" <?php echo $checked; ?> >
<i class="form-icon"></i>
<span class="inactive"><?php echo __( 'Activate', 'themeisle-companion' ); ?></span>
<i class="dashicons dashicons-yes"></i>
</label>
<?php if ( $beta ) { ?>
<p class="obfx-beta-module"><?php echo __( 'Beta module', 'themeisle-companion' ); ?></p>
<?php } ?>
<?php
if ( ! empty( $modal ) ) {
echo wp_kses_post( $modal );
}
?>
<?php do_action( 'obfx_activate_btn_before', $slug, $checked === 'checked' ); ?>
</div>
</div>
<?php do_action( 'obfx_module_tile_after', $slug, $checked === 'checked' ); ?>
</div>
app/views/partials/empty-tpl.php 0000666 00000001653 15113067355 0012763 0 ustar 00 <?php
/**
* Empty modules template.
* Imported via the Orbit_Fox_Render_Helper.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/views/partials
*/
if ( ! isset( $title ) ) {
$title = __( 'There are no modules for the Fox!', 'themeisle-companion' );
}
if ( ! isset( $btn_text ) ) {
$btn_text = __( 'Contact support', 'themeisle-companion' );
}
if ( ! isset( $show_btn ) ) {
$show_btn = true;
}
?>
<div class="empty">
<div class="empty-icon">
<i class="dashicons dashicons-warning" style="width: 48px; height: 48px; font-size: 48px; "></i>
</div>
<h4 class="empty-title"><?php echo $title; ?></h4>
<?php echo ( isset( $sub_title ) ) ? '<p class="empty-subtitle">' . $sub_title . '</p>' : ''; ?>
<?php
if ( $show_btn ) {
?>
<div class="empty-action">
<button class="btn btn-primary"><?php echo $btn_text; ?></button>
</div>
<?php
}
?>
</div>
app/views/partials/module-toast-tpl.php 0000666 00000000723 15113067355 0014237 0 ustar 00 <?php
/**
* Toast modules template.
* Imported via the Orbit_Fox_Render_Helper.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/views/partials
*/
?>
<div class="obfx-mod-toast toast toast-<?php echo $notice['type']; ?>">
<button class="obfx-toast-dismiss btn btn-clear float-right"></button>
<b><?php echo $notice['title']; ?></b><br/>
<span><?php echo $notice['message']; ?></span>
</div>
app/views/partials/module-panel-tpl.php 0000666 00000004476 15113067355 0014215 0 ustar 00 <?php
/**
* Panel modules template.
* Imported via the Orbit_Fox_Render_Helper.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/views/partials
*/
if ( ! isset( $slug ) ) {
$slug = '';
}
$noance = wp_create_nonce( 'obfx_update_module_options_' . $slug );
if ( ! isset( $active ) ) {
$active = false;
}
if ( ! isset( $name ) ) {
$name = __( 'The Module Name', 'themeisle-companion' );
}
if ( ! isset( $description ) ) {
$description = __( 'The Module Description ...', 'themeisle-companion' );
}
if ( ! isset( $options_fields ) ) {
$options_fields = __( 'No options provided.', 'themeisle-companion' );
}
$styles = array();
$disabled_fields = '';
if ( ! $active ) {
$styles [] = 'display: none';
$disabled_fields = 'disabled';
}
$btn_class = '';
if ( isset( $show ) && $show ) {
$btn_class = 'active';
}
$styles = sprintf( 'style="%s"', implode( ':', $styles ) );
?>
<div id="obfx-mod-<?php echo $slug; ?>" class="panel options <?php echo esc_attr( $btn_class ); ?>" <?php echo $styles; ?>>
<div class="panel-header">
<button class="btn btn-action circle btn-expand <?php echo esc_attr( $btn_class ); ?>"
style="float: right; margin-right: 10px;">
<i class="dashicons dashicons-arrow-down-alt2"></i>
</button>
<div class="panel-title"><?php echo $name; ?></div>
<div class="panel-subtitle"><?php echo $description; ?></div>
<div class="obfx-mod-toast toast" style="display: none;">
<button class="obfx-toast-dismiss btn btn-clear float-right"></button>
<span>Mock text for Toast Element</span>
</div>
</div>
<form id="obfx-module-form-<?php echo $slug; ?>" class="obfx-module-form <?php echo esc_attr( $btn_class ); ?> ">
<fieldset <?php echo $disabled_fields; ?> >
<input type="hidden" name="module-slug" value="<?php echo $slug; ?>">
<input type="hidden" name="noance" value="<?php echo $noance; ?>">
<div class="panel-body">
<?php echo $options_fields; ?>
<div class="divider"></div>
</div>
<?php if ( isset( $no_save ) && $no_save === false ) : ?>
<div class="panel-footer text-right">
<button class="btn obfx-mod-btn-cancel" disabled>Cancel</button>
<button type="submit" class="btn btn-primary obfx-mod-btn-save" disabled>Save</button>
</div>
<?php endif; ?>
</fieldset>
</form>
</div>
app/views/modules-page.php 0000666 00000005470 15113067355 0011574 0 ustar 00 <?php
/**
* The View Page for Orbit Fox Modules.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/views
* @codeCoverageIgnore
*/
if ( ! isset( $no_modules ) ) {
$no_modules = true;
}
if ( ! isset( $empty_tpl ) ) {
$empty_tpl = '';
}
if ( ! isset( $count_modules ) ) {
$count_modules = 0;
}
if ( ! isset( $tiles ) ) {
$tiles = '';
}
if ( ! isset( $toasts ) ) {
$toasts = '';
}
if ( ! isset( $panels ) ) {
$panels = '';
}
$current_tab = 'modules';
if ( isset( $_GET['show_plugins'] ) && $_GET['show_plugins'] === 'yes' ) {
$current_tab = 'plugins';
}
?>
<div class="obfx-wrapper obfx-header">
<div class="obfx-header-content">
<img src="<?php echo OBFX_URL; ?>/images/orbit-fox.png" title="Orbit Fox" class="obfx-logo"/>
<h1><?php echo __( 'Orbit Fox', 'themeisle-companion' ); ?></h1><span class="powered"> by <a
href="https://themeisle.com" target="_blank"><b>ThemeIsle</b></a></span>
</div>
</div>
<div id="obfx-wrapper" style="padding: 0; margin-top: 10px; margin-bottom: 5px;">
<?php
echo $toasts;
?>
</div>
<div class="obfx-full-page-container">
<div class="obfx-wrapper" id="obfx-modules-wrapper">
<?php
if ( $no_modules ) {
echo $empty_tpl;
} else {
?>
<div class="panel">
<div class="panel-header text-center">
<div class="panel-title mt-10">
<ul class="obfx-menu-tabs">
<li class="<?php echo $current_tab === 'modules' ? 'obfx-tab-active' : ''; ?>"><a
href="
<?php
echo esc_url( admin_url( 'admin.php?page=obfx_companion' ) );
?>
"><?php echo __( 'Available Modules', 'themeisle-companion' ); ?></a></li>
<li class="<?php echo $current_tab === 'plugins' ? 'obfx-tab-active' : ''; ?>">
<a href="<?php echo esc_url( admin_url( 'admin.php?page=obfx_companion&show_plugins=yes' ) ); ?>"><?php echo __( 'Recommended Plugins', 'themeisle-companion' ); ?></a>
</li>
</ul>
</div>
</div>
<div class="panel-body">
<?php if ( $current_tab === 'modules' ) { ?>
<?php echo $tiles; ?>
<?php } ?>
<?php if ( $current_tab === 'plugins' ) { ?>
<?php do_action( 'obfx_recommended_plugins' ); ?>
<?php } ?>
</div>
<div class="panel-footer" <?php echo $current_tab === 'plugins' ? 'style="display:none"' : ''; ?>>
<!-- buttons or inputs -->
</div>
</div>
<div class="panel" <?php echo $current_tab === 'plugins' ? 'style="display:none"' : ''; ?>>
<div class="panel-header text-center">
<div class="panel-title mt-10"><?php echo __( 'Activated Modules Options', 'themeisle-companion' ); ?></div>
</div>
<?php echo ( $panels === '' ) ? '<p class="text-center">' . __( 'No modules activated.', 'themeisle-companion' ) . '</p>' : $panels; ?>
</div>
<?php
}
?>
</div>
</div>
app/helpers/class-orbit-fox-render-helper.php 0000666 00000030227 15113067355 0015263 0 ustar 00 <?php
/**
* The Helper Class for content rendering.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/helpers
*/
/**
* The class that contains utility methods to render partials, views or elements.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/helpers
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Render_Helper {
/**
* Get a partial template and return the output.
*
* @since 1.0.0
* @access public
*
* @param string $name The name of the partial w/o '-tpl.php'.
* @param array $args Optional. An associative array with name and value to be
* passed to the partial.
*
* @return string
*/
public function get_partial( $name = '', $args = array() ) {
ob_start();
$file = OBX_PATH . '/core/app/views/partials/' . $name . '-tpl.php';
if ( ! empty( $args ) ) {
foreach ( $args as $obfx_rh_name => $obfx_rh_value ) {
$$obfx_rh_name = $obfx_rh_value;
}
}
if ( file_exists( $file ) ) {
include $file;
}
return ob_get_clean();
}
/**
* Get a view template and return the output.
*
* @since 1.0.0
* @access public
*
* @param string $name The name of the partial w/o '-page.php'.
* @param array $args Optional. An associative array with name and value to be
* passed to the view.
*
* @return string
*/
public function get_view( $name = '', $args = array() ) {
ob_start();
$file = OBX_PATH . '/core/app/views/' . $name . '-page.php';
if ( ! empty( $args ) ) {
foreach ( $args as $obfx_rh_name => $obfx_rh_value ) {
$$obfx_rh_name = $obfx_rh_value;
}
}
if ( file_exists( $file ) ) {
include $file;
}
return ob_get_clean();
}
/**
* Method to render option to a field.
*
* @since 1.0.0
* @access public
*
* @param array $option The option from the module..
*
* @return mixed
*/
public function render_option( $option = array() ) {
$option = $this->sanitize_option( $option );
switch ( $option['type'] ) {
case 'text':
return $this->field_text( $option );
break;
case 'email':
return $this->field_text( $option, true );
break;
case 'textarea':
return $this->field_textarea( $option );
break;
case 'select':
return $this->field_select( $option );
break;
case 'radio':
return $this->field_radio( $option );
break;
case 'checkbox':
return $this->field_checkbox( $option );
break;
case 'toggle':
return $this->field_toggle( $option );
break;
case 'title':
return $this->field_title( $option );
break;
case 'custom':
return apply_filters( 'obfx_custom_control_' . $option['id'], '' );
break;
case 'link':
return $this->field_link( $option );
break;
case 'password':
return $this->field_password( $option );
break;
default:
return __( 'No option found for provided type', 'themeisle-companion' );
break;
}
}
/**
* Merges specific defaults with general ones.
*
* @since 1.0.0
* @access private
*
* @param array $option The specific defaults array.
*
* @return array
*/
private function sanitize_option( $option ) {
$general_defaults = array(
'id' => null,
'class' => null,
'name' => null,
'label' => 'Module Text Label',
'title' => false,
'description' => false,
'type' => null,
'value' => '',
'default' => '',
'placeholder' => 'Add some text',
'disabled' => false,
'options' => array(),
);
return wp_parse_args( $option, $general_defaults );
}
/**
* Render an input text field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
* @param bool $is_email Render an email input instead of text.
*
* @return mixed
*/
private function field_text( $option = array(), $is_email = false ) {
$input_type = 'text';
if ( $is_email === true ) {
$input_type = 'email';
}
$field_value = $this->set_field_value( $option );
$field = '<input class="form-input ' . $option['class'] . '" type="' . esc_attr( $input_type ) . '" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" value="' . $field_value . '">';
$field = $this->wrap_element( $option, $field );
return $field;
}
/**
* Method to set field value.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function set_field_value( $option = array() ) {
$field_value = $option['default'];
if ( isset( $option['value'] ) && $option['value'] !== '' ) {
$field_value = $option['value'];
}
return $field_value;
}
/**
* Utility method to wrap an element with proper blocks.
*
* @since 1.0.0
* @access private
*
* @param array $option The option array.
* @param string $element The element we want to wrap.
*
* @return string
*/
private function wrap_element( $option, $element ) {
$title = $this->get_title( $option['id'], $option['title'] );
$description = $this->get_description( $option['description'] );
$before_wrap = '';
if ( isset( $option['before_wrap'] ) ) {
$before_wrap = wp_kses_post( $option['before_wrap'] ); // @codeCoverageIgnore
}
$after_wrap = '';
if ( isset( $option['after_wrap'] ) ) {
$after_wrap = wp_kses_post( $option['after_wrap'] ); // @codeCoverageIgnore
}
return '
' . $before_wrap . '
<div class="form-group ' . $option['class'] . '">
' . $title . '
' . $element . '
' . $description . '
</div>
' . $after_wrap . '
';
}
/**
* Method to return a title for element if needed.
*
* @since 1.0.0
* @access private
*
* @param string $element_id The option id field.
* @param string $title The option title field.
*
* @return string
*/
private function get_title( $element_id, $title ) {
$display_title = '';
if ( $title ) {
$display_title = '<label class="form-label" for="' . $element_id . '">' . $title . '</label>';
}
return $display_title;
}
/**
* Method to return a description for element if needed.
*
* @since 1.0.0
* @access private
*
* @param string $description The option description field.
*
* @return string
*/
private function get_description( $description ) {
$display_description = '';
if ( $description ) {
$display_description = '<p><small>' . $description . '</small></p>';
}
return $display_description;
}
/**
* Render a textarea field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_textarea( $option = array() ) {
$field_value = $this->set_field_value( $option );
$field = '<textarea class="form-input ' . $option['class'] . '" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" rows="3">' . $field_value . '</textarea>';
$field = $this->wrap_element( $option, $field );
return $field;
}
/**
* Render a select field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_select( $option = array() ) {
$field_value = $this->set_field_value( $option );
$select_options = '';
foreach ( $option['options'] as $value => $label ) {
$is_selected = '';
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( $field_value == $value ) {
$is_selected = 'selected';
}
$select_options .= '<option value="' . $value . '" ' . $is_selected . '>' . $label . '</option>';
}
$field = '
<select class="form-select ' . $option['class'] . '" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '">
' . $select_options . '
</select>';
$field = $this->wrap_element( $option, $field );
return $field;
}
/**
* Render a radio field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_radio( $option = array() ) {
$field_value = $this->set_field_value( $option );
$select_options = '';
foreach ( $option['options'] as $value => $label ) {
$checked = '';
if ( $value === $field_value ) {
$checked = 'checked';
}
$select_options .= $this->generate_check_type( 'radio', $value, $checked, $label, $option );
}
$field = $this->wrap_element( $option, $select_options );
return $field;
}
/**
* DRY method to generate checkbox or radio field types
*
* @since 1.0.0
* @access private
*
* @param string $type The field type ( checkbox | radio ).
* @param string $field_value The field value.
* @param string $checked The checked flag.
* @param string $label The option label.
* @param array $option The option from the module.
*
* @return string
*/
private function generate_check_type( $type = 'radio', $field_value, $checked, $label, $option = array() ) {
return '
<label class="form-' . $type . ' ' . $option['class'] . '">
<input type="' . $type . '" name="' . $option['name'] . '" value="' . $field_value . '" ' . $checked . ' />
<i class="form-icon"></i> ' . $label . '
</label>
';
}
/**
* Render a checkbox field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_checkbox( $option = array() ) {
$field_value = $this->set_field_value( $option );
$checked = '';
if ( $field_value ) {
$checked = 'checked';
}
$select_options = $this->generate_check_type( 'checkbox', 1, $checked, $option['label'], $option );
$field = $this->wrap_element( $option, $select_options );
return $field;
}
/**
* Render a toggle field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_toggle( $option = array() ) {
$field_value = $this->set_field_value( $option );
$checked = '';
if ( $field_value ) {
$checked = 'checked';
}
$field = '
<label class="form-switch ' . $option['class'] . '">
<input type="checkbox" name="' . $option['name'] . '" value="1" ' . $checked . ' />
<i class="form-icon"></i> ' . $option['label'] . '
</label>';
$field = $this->wrap_element( $option, $field );
return $field;
}
/**
* Render a title field.
*
* @since 2.5.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_title( $option = array() ) {
$field = $this->wrap_element( $option, '' );
return $field;
}
/**
* Render a toggle field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
*
* @return mixed
*/
private function field_link( $option = array() ) {
if ( ! isset( $option['link-id'] ) ) {
$option['link-id'] = $option['id'];
}
if ( ! isset( $option['target'] ) ) {
$option['target'] = '';
}
$field = '
<a id="' . esc_attr( $option['link-id'] ) . '" target="' . esc_attr( $option['target'] ) . '" class="' . esc_attr( isset( $option['link-class'] ) ? $option['link-class'] : '' ) . '" href="' . esc_url( $option['url'] ) . '">' .
wp_kses_post( $option['text'] )
. '</a>';
$field = $this->wrap_element( $option, $field );
return $field;
}
/**
* Render an input password field.
*
* @since 1.0.0
* @access private
*
* @param array $option The option from the module.
* @param bool $is_email Render an email input instead of text.
*
* @return mixed
*/
private function field_password( $option = array(), $is_email = false ) {
$input_type = 'password';
$field_value = $this->set_field_value( $option );
$field = '<input class="form-input ' . $option['class'] . '" type="' . esc_attr( $input_type ) . '" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" value="' . $field_value . '">';
$field = $this->wrap_element( $option, $field );
return $field;
}
}
app/class-orbit-fox-admin.php 0000666 00000051305 15113067355 0012155 0 ustar 00 <?php
/**
* The admin-specific functionality of the plugin.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
*/
/**
* The admin-specific functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the admin-specific stylesheet and JavaScript.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Admin {
/**
* The ID of this plugin.
*
* @since 1.0.0
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* The version of this plugin.
*
* @since 1.0.0
* @access private
* @var string $version The current version of this plugin.
*/
private $version;
/**
* Initialize the class and set its properties.
*
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
*
* @since 1.0.0
*/
public function __construct( $plugin_name, $version ) {
$this->plugin_name = $plugin_name;
$this->version = $version;
}
/**
* Register the stylesheets for the admin area.
*
* @since 1.0.0
*/
public function enqueue_styles() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Orbit_Fox_Loader as all of the hooks are defined
* in that particular class.
*
* The Orbit_Fox_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
$screen = get_current_screen();
if ( empty( $screen ) ) {
return;
}
if ( in_array( $screen->id, array( 'toplevel_page_obfx_companion' ), true ) ) {
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/css/orbit-fox-admin.css', array(), $this->version, 'all' );
}
do_action( 'obfx_admin_enqueue_styles' );
}
/**
* Register the JavaScript for the admin area.
*
* @since 1.0.0
*/
public function enqueue_scripts() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Orbit_Fox_Loader as all of the hooks are defined
* in that particular class.
*
* The Orbit_Fox_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
$screen = get_current_screen();
if ( empty( $screen ) ) {
return;
}
if ( in_array( $screen->id, array( 'toplevel_page_obfx_companion' ), true ) ) {
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/js/orbit-fox-admin.js', array( 'jquery' ), $this->version, false );
}
do_action( 'obfx_admin_enqueue_scripts' );
}
/**
* Add admin menu items for orbit-fox.
*
* @since 1.0.0
* @access public
*/
public function menu_pages() {
add_menu_page(
__( 'Orbit Fox', 'themeisle-companion' ),
__( 'Orbit Fox', 'themeisle-companion' ),
'manage_options',
'obfx_companion',
array(
$this,
'page_modules_render',
),
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MzQuNjIiIGhlaWdodD0iMzkxLjMzIiB2aWV3Qm94PSIwIDAgNDM0LjYyIDM5MS4zMyI+PGRlZnM+PHN0eWxlPi5he2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmxvZ28tb3JiaXQtZm94LTI8L3RpdGxlPjxwYXRoIGNsYXNzPSJhIiBkPSJNNzA4LjE1LDM5NS4yM2gwYy0xLjQ5LTEzLjc2LTcuNjEtMjkuMjEtMTUuOTQtNDQuNzZsLTE0LjQ2LDguMzVhNzYsNzYsMCwxLDEtMTQ1LDQyLjd2MUg0OTEuMWE3Niw3NiwwLDEsMS0xNDQuODYtNDMuNjVsLTE0LjQyLTguMzNjLTguMTcsMTUuMjgtMTQuMjIsMzAuNDctMTUuODMsNDQtLjA2LjM3LS4xMS43NS0uMTQsMS4xMnMtLjA2LjQ2LS4wOC42OGguMDVBMTUuNTcsMTUuNTcsMCwwLDAsMzIwLjM1LDQwOEw1MDEsNTU1LjExYTE1LjU0LDE1LjU0LDAsMCwwLDExLDQuNTVoMGExNS41NCwxNS41NCwwLDAsMCwxMS00LjU1TDcwMy42OSw0MDhBMTUuNjMsMTUuNjMsMCwwLDAsNzA4LjE1LDM5NS4yM1pNNDc5LjU5LDQ0MC41MWwyMi4wNSw1LjkxLTIuMDcsNy43My0yMi4wNS01LjkxWm0zLDE4Ljc1LDIyLjA1LDUuOTEtMi4wNyw3LjczTDQ4MC41Miw0NjdabTEsMTguNzUsMjIuMDUsNS45MS0yLjA3LDcuNzMtMjIuMDUtNS45MVptMzEsNjMuMzhhMTIuMzgsMTIuMzgsMCwwLDAtMSwuOTEsMi4yMSwyLjIxLDAsMCwxLTEuNTguNjNoMGEyLjIxLDIuMjEsMCwwLDEtMS41OC0uNjMsMTIuMzgsMTIuMzgsMCwwLDAtMS0uOTFMNDg2Ljg5LDUyM2M4LjItLjUzLDE2LjYzLS44MSwyNS4xMS0uODFzMTYuOTMuMjgsMjUuMTUuODFabTUuODktNDkuNzQtMi4wNy03LjczTDU0MC40OSw0NzhsMi4wNyw3LjczWm0xLTE4Ljc1LTIuMDctNy43MywyMi4wNi01LjkxLDIuMDcsNy43M1ptMy0xOC43NS0yLjA3LTcuNzMsMjIuMDYtNS45MSwyLjA3LDcuNzNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjk0LjY5IC0xNjguMzQpIi8+PHBhdGggY2xhc3M9ImEiIGQ9Ik03MjkuMjYsMjA5YTEyMC4xOCwxMjAuMTgsMCwwLDAtMS4xOC0xNC43OGMtLjEzLS44OC0uMjctMS43Mi0uNDItMi41Ni0uMjItMS4yLS40Ni0yLjM1LS43Mi0zLjQ3LS4xOC0uNzktLjM4LTEuNTctLjU4LTIuMzItLjM2LTEuMjgtLjc0LTIuNDgtMS4xNi0zLjYyLS4zNi0uOTUtLjc0LTEuODUtMS4xNS0yLjctLjItLjQzLS40MS0uODQtLjYzLTEuMjRzLS40My0uNzktLjY1LTEuMTVhMTkuNzYsMTkuNzYsMCwwLDAtMS4xNS0xLjY4LDE0LjE5LDE0LjE5LDAsMCwwLTEuMTUtMS4zNiwxMS44NywxMS44NywwLDAsMC0xLS45MWMtLjExLS4xLS4yNS0uMTgtLjM3LS4yN2ExNS4yMSwxNS4yMSwwLDAsMC0yLjU0LTEuNTlsLTEuMDYtLjQ5YTI1LjU3LDI1LjU3LDAsMCwwLTMuODUtMS4yNWMtLjc0LS4xOC0xLjUyLS4zNS0yLjMzLS40OS0xLjExLS4xOS0yLjI4LS4zNS0zLjUtLjQ3cy0yLjY5LS4yMS00LjExLS4yNWMtMi4xNC0uMDctNC4zOSwwLTYuNzMuMDktMS41Ny4wOC0zLjE4LjItNC44Mi4zNmwtMi44MS4zYTE3MSwxNzEsMCwwLDAtMTgsMy4xN2wtMy4xMi43NHEtNC44NywxLjItOS43OSwyLjY0Yy0zLjI3LDEtNi41NCwyLTkuNzcsMy4xMXEtNS4yNCwxLjc4LTEwLjMsNGMtLjg1LjM3LTEuNjkuNzUtMi41MywxLjE0cS0zLjc4LDEuNzYtNy40OCwzLjc4YTE0Mi4zNywxNDIuMzcsMCwwLDAtMTIuOCw3Ljg4Yy0xLjQsMS0yLjgxLDItNC4yLDNhMjAxLjUzLDIwMS41MywwLDAsMC0yMy43LDIwLjc3Yy0yMC4zNy0xNC00Mi4zLTIwLTczLjctMjAuNDZ2MS43N2gwdi0xLjc3Yy0zMS40MS41LTUzLjM1LDYuNDQtNzMuNzIsMjAuNDctMTkuODQtMjAuMS0zOS4yNi0zMy4xNi02MS00MC42LTI5LjU2LTEwLjExLTYyLTE0LjU5LTcyLjc2LTUuNnMtMTEuOTUsNDEuNzYtNy4xMyw3Mi42M2M0LjU1LDI5LjEsMTguODMsNTYsNDQuNzgsODdsMCwuMDYsMTQuNDgsOC4zNkE3Niw3NiwwLDAsMSw0OTIuMjIsMzgyaDM5LjU2QTc2LDc2LDAsMCwxLDY2Ny40LDM0MS4xOWwxNC41Mi04LjM5LDAtLjA3cTMuNTctNC4yNiw2Ljg0LTguNDNjMS41LTEuODksMi45NC0zLjc3LDQuMzQtNS42NHMyLjc2LTMuNzMsNC4wNy01LjU3Yy42Ni0uOTIsMS4zLTEuODQsMS45NC0yLjc2cTEuOS0yLjc2LDMuNjctNS40OCwyLjY3LTQuMSw1LTguMTN0NC40NS04LjA1Yy45Mi0xLjc4LDEuODEtMy41NiwyLjY1LTUuMzRxMS44OS00LDMuNTEtOGMuNzItMS43OCwxLjM5LTMuNTUsMi01LjMzLjMyLS44OC42My0xLjc3LjkzLTIuNjYuNi0xLjc4LDEuMTUtMy41NiwxLjY3LTUuMzRhMTMxLjU0LDEzMS41NCwwLDAsMCwzLjYxLTE2LjIxLDIyMS4yNCwyMjEuMjQsMCwwLDAsMi42OC0zMS40NkM3MjkuMzIsMjEyLjUyLDcyOS4zMSwyMTAuNzMsNzI5LjI2LDIwOVpNMzg5LjMxLDI2OC43OWMtOS4yOSwxMS41OC0yMi4zNywyNy43Ni0zNC45NCw0NS42Ni0xMS42NC0xNi45Mi0yNC43Ni0zOC42MS0yNy40OS01Ny42NS0zLjEzLTIxLjg2LTEuOTQtMzcuNTktLjA3LTQzLjQ4YTMyLjY1LDMyLjY1LDAsMCwxLDQuMjktLjI1YzkuODYsMCwyNC4yOCwyLjkyLDM4LjU5LDcuODEsMTMuNTMsNC42MywyNi4xNSwxMi41NiwzOS4yNiwyNC44NUM0MDIuNjgsMjUyLjU0LDM5Ni4yMSwyNjAuMTksMzg5LjMxLDI2OC43OVptMzA3LjgxLTEyYy0yLjczLDE5LTE1LjgzLDQwLjctMjcuNDYsNTcuNjEtMTIuNTctMTcuODgtMjUuNjQtMzQuMDUtMzQuOTMtNDUuNjItNi45MS04LjYxLTEzLjM4LTE2LjI2LTE5LjY2LTIzLjA4LDEzLjExLTEyLjI4LDI1LjcyLTIwLjIsMzkuMjQtMjQuODMsMTQuMzEtNC44OSwyOC43My03LjgxLDM4LjU5LTcuODFhMzIuNjUsMzIuNjUsMCwwLDEsNC4yOS4yNUM2OTkuMDYsMjE5LjIxLDcwMC4yNSwyMzQuOTQsNjk3LjEyLDI1Ni44WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI5NC42OSAtMTY4LjM0KSIvPjxwYXRoIGNsYXNzPSJhIiBkPSJNNDE2LjQ0LDMzMS41N0E1Ni41MSw1Ni41MSwwLDEsMCw0NzMsMzg4LjA4LDU2LjU3LDU2LjU3LDAsMCwwLDQxNi40NCwzMzEuNTdabTMxLjYyLDg2LjM2YTIzLjQ0LDIzLjQ0LDAsMSwxLDUtNy4zOCw5LjI1LDkuMjUsMCwwLDEtMS43OSwzLjM5QTIyLjcxLDIyLjcxLDAsMCwxLDQ0OC4wNiw0MTcuOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjk0LjY5IC0xNjguMzQpIi8+PHBhdGggY2xhc3M9ImEiIGQ9Ik02MDcuNTYsMzMxLjU3YTU2LjUxLDU2LjUxLDAsMSwwLDU2LjUxLDU2LjUxQTU2LjU3LDU2LjU3LDAsMCwwLDYwNy41NiwzMzEuNTdabTEuNTMsODYuMzZhMjMuNDIsMjMuNDIsMCwwLDEtMzMuMTMsMCwyMy4xOCwyMy4xOCwwLDAsMS0zLjE5LTQsOS4wOCw5LjA4LDAsMCwxLTEuNzgtMy4zOSwyMy40MiwyMy40MiwwLDEsMSwzOC4xLDcuMzhaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjk0LjY5IC0xNjguMzQpIi8+PC9zdmc+',
'75'
);
add_submenu_page( 'obfx_companion', __( 'Orbit Fox General Options', 'themeisle-companion' ), __( 'General Settings', 'themeisle-companion' ), 'manage_options', 'obfx_companion' );
}
/**
* Add the initial dashboard notice to guide the user to the OrbitFox admin page.
*
* @since 2.3.4
* @access public
*/
public function visit_dashboard_notice() {
global $current_user;
$user_id = $current_user->ID;
if ( ! get_user_meta( $user_id, 'obfx_ignore_visit_dashboard_notice' ) ) { ?>
<div class="notice notice-info" style="position:relative;">
<p><?php echo sprintf( __( 'You have activated Orbit Fox plugin! Go to the %s to get started with the extra features.', 'themeisle-companion' ), sprintf( '<a href="%s">%s</a>', add_query_arg( 'obfx_ignore_visit_dashboard_notice', '0', admin_url( 'admin.php?page=obfx_companion' ) ), __( 'Dashboard Page', 'themeisle-companion' ) ) ); ?></p>
<a href="<?php echo add_query_arg( 'obfx_ignore_visit_dashboard_notice', '0', admin_url( 'admin.php?page=obfx_companion' ) ); ?>"
class="notice-dismiss" style="text-decoration: none;">
<span class="screen-reader-text">Dismiss this notice.</span>
</a>
</div>
<?php
}
}
/**
* Dismiss the initial dashboard notice.
*
* @since 2.3.4
* @access public
*/
function visit_dashboard_notice_dismiss() {
global $current_user;
$user_id = $current_user->ID;
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( isset( $_GET['obfx_ignore_visit_dashboard_notice'] ) && '0' == $_GET['obfx_ignore_visit_dashboard_notice'] ) {
add_user_meta( $user_id, 'obfx_ignore_visit_dashboard_notice', 'true', true );
wp_safe_redirect( admin_url( 'admin.php?page=obfx_companion' ) );
}
}
/**
* Define partners data.
*/
public function load_recommended_partners() {
add_filter(
'wpforms_upgrade_link',
function ( $url ) {
return 'http://www.shareasale.com/r.cfm?B=837827&U=848264&M=64312&urllink=' . rawurlencode( $url );
}
);
if ( get_option( 'translatepress_avg_affiliate_id', false ) === false ) {
update_option( 'translatepress_avg_affiliate_id', '91096' );
}
}
/**
* Calls the orbit_fox_modules hook.
*
* @since 1.0.0
* @access public
*/
public function load_modules() {
do_action( 'orbit_fox_modules' );
}
/**
* This method is called via AJAX and processes the
* request for updating module options.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function obfx_update_module_options() {
$json = stripslashes( str_replace( '"', '"', $_POST['data'] ) );
$data = json_decode( $json, true );
$response['type'] = 'error';
$response['message'] = __( 'Could not process the request!', 'themeisle-companion' );
if ( isset( $data['noance'] ) && wp_verify_nonce( $data['noance'], 'obfx_update_module_options_' . $data['module-slug'] ) ) {
$response = $this->try_module_save( $data );
}
echo json_encode( $response );
wp_die();
}
/**
* A method used for saving module options data
* and returning a well formatted response as an array.
*
* @codeCoverageIgnore
*
* @param array $data The options data to try and save via the module model.
*
* @return array
* @since 1.0.0
* @access public
*/
public function try_module_save( $data ) {
$response = array();
$global_settings = new Orbit_Fox_Global_Settings();
$modules = $global_settings::$instance->module_objects;
$response['type'] = 'error';
$response['message'] = __( 'No module found! No data was updated.', 'themeisle-companion' );
if ( isset( $modules[ $data['module-slug'] ] ) ) {
$module = $modules[ $data['module-slug'] ];
unset( $data['noance'] );
unset( $data['module-slug'] );
$response['type'] = 'warning';
$response['message'] = __( 'Something went wrong, data might not be saved!', 'themeisle-companion' );
$result = $module->set_options( $data );
if ( $result ) {
$response['type'] = 'success';
$response['message'] = __( 'Options updated, successfully!', 'themeisle-companion' );
}
}
return $response;
}
/**
* Define render function for recommended tab.
*/
public function load_recommended_plugins() {
$plugins = [
'optimole-wp',
'feedzy-rss-feeds',
'wpforms-lite',
'translatepress-multilingual',
'autoptimize',
'wordpress-seo',
];
shuffle( $plugins );
add_thickbox();
echo sprintf( '<div class="obfx-recommended-title-wrapper"><span class="obfx-recommended-title"><span class="dashicons dashicons-megaphone"></span> %s</span><span class="obfx-recommended-disclosure"><i> <span class="dashicons dashicons-editor-help obfx-show-disclosure"></span>Some of these plugins are developed by us and from some others if you use them and upgrade to pro, we might earn a comission.</i></span><div class="clearfix"></div> </div>', 'Orbit Fox recommends' );
foreach ( $plugins as $plugin ) {
$current_plugin = $this->call_plugin_api( $plugin );
if ( ! isset( $current_plugin->name ) ) {
continue;
}
$image = $current_plugin->icons['1x'];
$name = $current_plugin->name;
$desc = $current_plugin->short_description;
$url = add_query_arg(
array(
'tab' => 'plugin-information',
'plugin' => $plugin,
'TB_iframe' => true,
'width' => 800,
'height' => 800,
),
network_admin_url( 'plugin-install.php' )
);
echo sprintf(
'<div class="tile obfx-recommended ">
<div class="tile-icon">
<div class="obfx-icon-recommended">
<img width="100" src="%s"/>
</div>
</div>
<div class="tile-content">
<p class="tile-title">%s</p>
<p class="tile-subtitle">%s</p>
</div>
<div class="tile-action">
<div class="form-group">
<label class="form-switch activated">
<a class="button button-primary thickbox " href="%s"><span class="dashicons dashicons-download"></span>%s</a>
</label>
</div>
</div>
</div>',
esc_url( $image ),
esc_attr( $name ),
esc_attr( $desc ),
esc_url( $url ),
__( 'Install', 'themeisle-companion' )
);
}
}
/**
* Get info from wporg api.
*
* @param string $slug Plugin slug.
*
* @return array|mixed|object|WP_Error
*/
public function call_plugin_api( $slug ) {
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
$call_api = get_transient( 'ti_plugin_info_' . $slug );
if ( false === $call_api ) {
$call_api = plugins_api(
'plugin_information',
array(
'slug' => $slug,
'fields' => array(
'downloaded' => false,
'rating' => false,
'description' => false,
'short_description' => true,
'donate_link' => false,
'tags' => false,
'sections' => true,
'homepage' => true,
'added' => false,
'last_updated' => false,
'compatibility' => false,
'tested' => false,
'requires' => false,
'downloadlink' => false,
'icons' => true,
'banners' => true,
),
)
);
set_transient( 'ti_plugin_info_' . $slug, $call_api, 1 * DAY_IN_SECONDS );
}
return $call_api;
}
/**
* This method is called via AJAX and processes the
* request for updating module options.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function obfx_update_module_active_status() {
$json = stripslashes( str_replace( '"', '"', $_POST['data'] ) );
$data = json_decode( $json, true );
$response['type'] = 'error';
$response['message'] = __( 'Could not process the request!', 'themeisle-companion' );
if ( isset( $data['noance'] ) && wp_verify_nonce( $data['noance'], 'obfx_activate_mod_' . $data['name'] ) ) {
$response = $this->try_module_activate( $data );
}
echo json_encode( $response );
wp_die();
}
/**
* A method used for saving module status data
* and returning a well formatted response as an array.
*
* @codeCoverageIgnore
*
* @param array $data The data to try and update status via the module model.
*
* @return array
* @since 1.0.0
* @access public
*/
public function try_module_activate( $data ) {
$response = array();
$global_settings = new Orbit_Fox_Global_Settings();
$modules = $global_settings::$instance->module_objects;
$response['type'] = 'error';
$response['message'] = __( 'No module found!', 'themeisle-companion' );
if ( isset( $modules[ $data['name'] ] ) ) {
$module = $modules[ $data['name'] ];
$response['type'] = 'warning';
$response['message'] = __( 'Something went wrong, can not change module status!', 'themeisle-companion' );
$result = $module->set_status( 'active', $data['checked'] );
$this->trigger_activate_deactivate( $data['checked'], $module );
if ( $result ) {
$response['type'] = 'success';
$response['message'] = __( 'Module status changed!', 'themeisle-companion' );
}
}
return $response;
}
/**
* A method to trigger module activation or deavtivation hook
* based in active status.
*
* @codeCoverageIgnore
*
* @param boolean $active_status The active status.
* @param Orbit_Fox_Module_Abstract $module The module referenced.
*
* @since 2.3.3
* @access public
*/
public function trigger_activate_deactivate( $active_status, Orbit_Fox_Module_Abstract $module ) {
if ( $active_status === true ) {
do_action( $module->get_slug() . '_activate' );
} else {
do_action( $module->get_slug() . '_deactivate' );
}
}
/**
* Method to display modules page.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function page_modules_render() {
$global_settings = new Orbit_Fox_Global_Settings();
$modules = $global_settings::$instance->module_objects;
$rdh = new Orbit_Fox_Render_Helper();
$tiles = '';
$panels = '';
$toasts = '';
$count_modules = 0;
foreach ( $modules as $slug => $module ) {
if ( $module->enable_module() ) {
$notices = $module->get_notices();
$showed_notices = $module->get_status( 'showed_notices' );
if ( ! is_array( $showed_notices ) ) {
$showed_notices = array();
}
if ( isset( $showed_notices ) && is_array( $showed_notices ) ) {
foreach ( $notices as $notice ) {
$hash = md5( serialize( $notice ) );
$data = array(
'notice' => $notice,
);
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( $notice['display_always'] == false && ! in_array( $hash, $showed_notices, true ) ) {
$toasts .= $rdh->get_partial( 'module-toast', $data );
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
} elseif ( $notice['display_always'] == true ) {
$toasts .= $rdh->get_partial( 'module-toast', $data );
}
}
}
$module->update_showed_notices();
if ( $module->auto === false ) {
$count_modules ++;
$checked = '';
if ( $module->get_is_active() ) {
$checked = 'checked';
}
$data = array(
'slug' => $slug,
'name' => $module->name,
'description' => $module->description,
'checked' => $checked,
'beta' => $module->beta,
'confirm_intent' => $module->confirm_intent,
);
$tiles .= $rdh->get_partial( 'module-tile', $data );
$tiles .= '<div class="divider"></div>';
}
$module_options = $module->get_options();
$options_fields = '';
if ( ! empty( $module_options ) ) {
foreach ( $module_options as $option ) {
$options_fields .= $rdh->render_option( $option, $module );
}
$panels .= $rdh->get_partial(
'module-panel',
array(
'slug' => $slug,
'name' => $module->name,
'active' => $module->get_is_active(),
'description' => $module->description,
'show' => $module->show,
'no_save' => $module->no_save,
'options_fields' => $options_fields,
)
);
}
}// End if().
}// End foreach().
$no_modules = false;
$empty_tpl = '';
if ( $count_modules === 0 ) {
$no_modules = true;
$empty_tpl = $rdh->get_partial(
'empty',
array(
'title' => __( 'No modules found.', 'themeisle-companion' ),
'sub_title' => __( 'Please contact support for more help.', 'themeisle-companion' ),
'show_btn' => true,
)
);
$panels = $rdh->get_partial(
'empty',
array(
'title' => __( 'No active modules.', 'themeisle-companion' ),
'sub_title' => __( 'Activate a module using the toggles above.', 'themeisle-companion' ),
'show_btn' => false,
)
);
}
$data = array(
'no_modules' => $no_modules,
'empty_tpl' => $empty_tpl,
'count_modules' => $count_modules,
'tiles' => $tiles,
'toasts' => $toasts,
'panels' => $panels,
);
$output = $rdh->get_view( 'modules', $data );
echo $output;
}
}
app/abstract/class-orbit-fox-module-abstract.php 0000666 00000042142 15113067355 0015755 0 ustar 00 <?php
/**
* The abstract class for Orbit Fox Modules.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/abstract
*/
/**
* The class that defines the required methods and variables needed by a OBFX_Module.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/abstract
* @author Themeisle <friends@themeisle.com>
*/
abstract class Orbit_Fox_Module_Abstract {
/**
* Holds the name of the module
*
* @since 1.0.0
* @access public
* @var string $name The name of the module.
*/
public $name;
/**
* Holds the description of the module
*
* @since 1.0.0
* @access public
* @var string $description The description of the module.
*/
public $description;
/**
* Confirm intent array. It should contain a title and a subtitle for the confirm intent modal.
*
* @since 2.4.1
* @access public
* @var array $confirm_intent Stores an array of the modal with 'title' and 'subtitle' keys.
*/
public $confirm_intent = array();
/**
* Flags if module should autoload.
*
* @since 1.0.0
* @access public
* @var bool $auto The flag for automatic activation.
*/
public $auto = false;
/**
* Flags module should have the section open.
*
* @since 2.5.0
* @access public
* @var bool $show The flag for section opened.
*/
public $show = false;
/**
* Holds the module slug.
*
* @since 1.0.0
* @access protected
* @var string $slug The module slug.
*/
protected $slug;
/**
* Holds the default setting activation state of the module.
*
* @since 2.1.0
* @access protected
* @var boolean $active_default The default active state of the module.
*/
protected $active_default = false;
/**
* Stores an array of notices
*
* @since 1.0.0
* @access public
* @var array $notices Stores an array of notices to be displayed on the admin panel.
*/
protected $notices = array();
/**
* Has an instance of the Orbit_Fox_Loader class used for adding actions and filters.
*
* @since 1.0.0
* @access protected
* @var Orbit_Fox_Loader $loader A instance of Orbit_Fox_Loader.
*/
protected $loader;
/**
* Has an instance of the Orbit_Fox_Model class used for interacting with DB data.
*
* @since 1.0.0
* @access protected
* @var Orbit_Fox_Model $model A instance of Orbit_Fox_Model.
*/
protected $model;
/**
* Stores the curent version of Orbit fox for use during the enqueue.
*
* @since 1.0.0
* @access protected
* @var string $version The current version of Orbit Fox.
*/
protected $version;
/**
* Enable module in beta mode..
*
* @since 1.0.0
* @access protected
* @var boolean $beta Is module in beta.
*/
public $beta;
/**
* Module needs save buttons.
*
* @since 1.0.0
* @access protected
* @var boolean $no_save Should we show the save buttons.
*/
public $no_save = false;
/**
* Stores the localized arrays for both public and admin JS files that need to be loaded.
*
* @access protected
* @var array $localized The localized arrays for both public and admin JS files that need to be loaded.
*/
protected $localized = array();
/**
* Orbit_Fox_Module_Abstract constructor.
*
* @since 1.0.0
* @access public
*/
public function __construct() {
$this->slug = str_replace( '_', '-', strtolower( str_replace( '_OBFX_Module', '', get_class( $this ) ) ) );
}
/**
* Registers the loader.
* And setup activate and deactivate hooks. Added in v2.3.3.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @updated 2.3.3
* @access public
*
* @param Orbit_Fox_Loader $loader The loader class used to register action hooks and filters.
*/
public function register_loader( Orbit_Fox_Loader $loader ) {
$this->loader = $loader;
$this->loader->add_action( $this->get_slug() . '_activate', $this, 'activate' );
$this->loader->add_action( $this->get_slug() . '_deactivate', $this, 'deactivate' );
}
/**
* Getter method for slug.
*
* @since 2.3.3
* @access public
* @return mixed|string
*/
public function get_slug() {
return $this->slug;
}
/**
* Registers the loader.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*
* @param Orbit_Fox_Model $model The loader class used to register action hooks and filters.
*/
public function register_model( Orbit_Fox_Model $model ) {
$this->model = $model;
}
/**
* Method to return the notices array
*
* @since 1.0.0
* @access public
* @return array
*/
public function get_notices() {
return $this->notices;
}
/**
* Utility method to updated showed notices array.
*
* @since 1.0.0
* @access public
*/
public function update_showed_notices() {
$showed_notices = $this->get_status( 'showed_notices' );
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( $showed_notices == false ) {
$showed_notices = array();
}
foreach ( $this->notices as $notice ) {
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( $notice['display_always'] == false ) {
$hash = md5( serialize( $notice ) );
if ( ! in_array( $hash, $showed_notices, true ) ) {
$showed_notices[] = $hash;
}
}
}
$this->set_status( 'showed_notices', $showed_notices );
}
/**
* Method to retrieve from model the module status for
* the provided key.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*
* @param string $key Key to look for.
*
* @return bool
*/
final public function get_status( $key ) {
return $this->model->get_module_status( $this->slug, $key );
}
/**
* Method to update in model the module status for
* the provided key value pair.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*
* @param string $key Key to update.
* @param string $value The new value.
*
* @return mixed
*/
final public function set_status( $key, $value ) {
return $this->model->set_module_status( $this->slug, $key, $value );
}
/**
* Method to determine if the module is enabled or not.
*
* @since 1.0.0
* @access public
* @return bool
*/
public abstract function enable_module();
/**
* The method for the module load logic.
*
* @since 1.0.0
* @access public
* @return mixed
*/
public abstract function load();
/**
* Method to define actions and filters needed for the module.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public abstract function hooks();
/**
* Method to check if module status is active.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
* @return bool
*/
final public function get_is_active() {
if ( $this->auto === true ) {
return true;
}
if ( ! isset( $this->model ) ) {
return false;
}
return $this->model->get_is_module_active( $this->slug, $this->active_default );
}
/**
* Method to update an option key value pair.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*
* @param string $key The key name.
* @param string $value The new value.
*
* @return mixed
*/
final public function set_option( $key, $value ) {
if ( ! isset( $this->model ) ) {
return false;
}
return $this->model->set_module_option( $this->slug, $key, $value );
}
/**
* Stub for activate hook.
*
* @since 2.3.3
* @access public
*/
public function activate() {
}
/**
* Stub for deactivate hook.
*
* @since 2.3.3
* @access public
*/
public function deactivate() {
}
/**
* Method to update a set of options.
* Added in v2.3.3 actions for before and after options save.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @updated 2.3.3
* @access public
*
* @param array $options An associative array of options to be
* updated. Eg. ( 'key' => 'new_value' ).
*
* @return mixed
*/
final public function set_options( $options ) {
do_action( $this->get_slug() . '_before_options_save', $options );
$result = $this->model->set_module_options( $this->slug, $options );
do_action( $this->get_slug() . '_after_options_save' );
return $result;
}
/**
* Method to retrieve the options for the module.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
* @return array
*/
final public function get_options() {
$model_options = $this->options();
$options = array();
$index = 0;
foreach ( $model_options as $opt ) {
$options[ $index ] = $opt;
$options[ $index ]['value'] = $this->get_option( $opt['name'] );
$index ++;
}
return $options;
}
/**
* Method to define the options fields for the module
*
* @since 1.0.0
* @access public
* @return array
*/
public abstract function options();
/**
* Method to retrieve an option value from model.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*
* @param string $key The option key to retrieve.
*
* @return bool
*/
final public function get_option( $key ) {
$default_options = $this->get_options_defaults();
$db_option = $this->model->get_module_option( $this->slug, $key );
$value = $db_option;
if ( $db_option === false ) {
$value = isset( $default_options[ $key ] ) ? $default_options[ $key ] : '';
}
return $value;
}
/**
* Method to define the default model value for options, based on
* the options array if not set DB.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
* @return array
*/
final public function get_options_defaults() {
$options = $this->options();
$defaults = array();
foreach ( $options as $opt ) {
if ( ! isset( $opt['default'] ) ) {
$opt['default'] = '';
}
$defaults[ $opt['name'] ] = $opt['default'];
}
return $defaults;
}
/**
* Adds the hooks for amdin and public enqueue.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*
* @param string $version The version for the files.
*/
final public function set_enqueue( $version ) {
$this->version = $version;
$this->loader->add_action( 'obfx_admin_enqueue_styles', $this, 'set_admin_styles' );
$this->loader->add_action( 'obfx_admin_enqueue_scripts', $this, 'set_admin_scripts' );
$this->loader->add_action( 'obfx_public_enqueue_styles', $this, 'set_public_styles' );
$this->loader->add_action( 'obfx_public_enqueue_scripts', $this, 'set_public_scripts' );
}
/**
* Sets the styles for admin from the module array.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function set_admin_styles() {
$this->set_styles( $this->admin_enqueue(), 'adm' );
}
/**
* Actually sets the styles.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access private
*
* @param array $enqueue The array of files to enqueue.
* @param string $prefix The string to prefix in the enqueued name.
*/
private function set_styles( $enqueue, $prefix ) {
$module_dir = $this->slug;
if ( ! empty( $enqueue ) ) {
if ( isset( $enqueue['css'] ) && ! empty( $enqueue['css'] ) ) {
$order = 0;
$map = array();
foreach ( $enqueue['css'] as $file_name => $dependencies ) {
if ( $dependencies === false ) {
$dependencies = array();
} else {
// check if any dependency has been loaded by us. If yes, then use that id as the dependency.
foreach ( $dependencies as $index => $dep ) {
if ( array_key_exists( $dep, $map ) ) {
unset( $dependencies[ $index ] );
$dependencies[ $index ] = $map[ $dep ];
}
}
}
$url = filter_var( $file_name, FILTER_SANITIZE_URL );
$resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/css/' . $file_name . '.css';
if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
$resource = $url;
}
$id = 'obfx-module-' . $prefix . '-css-' . str_replace( ' ', '-', strtolower( $this->name ) ) . '-' . $order;
$map[ $file_name ] = $id;
wp_enqueue_style(
$id,
$resource,
$dependencies,
$this->version,
'all'
);
$order ++;
}
}
}
}
/**
* Method that returns an array of scripts and styles to be loaded
* for the admin part.
*
* @since 1.0.0
* @access public
* @return array
*/
public abstract function admin_enqueue();
/**
* Sets the scripts for admin from the module array.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function set_admin_scripts() {
$this->set_scripts( $this->admin_enqueue(), 'adm' );
}
/**
* Actually sets the scripts.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access private
*
* @param array $enqueue The array of files to enqueue.
* @param string $prefix The string to prefix in the enqueued name.
*/
private function set_scripts( $enqueue, $prefix ) {
$sanitized = str_replace( ' ', '-', strtolower( $this->name ) );
$module_dir = $this->slug;
if ( ! empty( $enqueue ) ) {
if ( isset( $enqueue['js'] ) && ! empty( $enqueue['js'] ) ) {
$order = 0;
$map = array();
foreach ( $enqueue['js'] as $file_name => $dependencies ) {
if ( $dependencies === false ) {
$dependencies = array();
} else {
// check if any dependency has been loaded by us. If yes, then use that id as the dependency.
foreach ( $dependencies as $index => $dep ) {
if ( array_key_exists( $dep, $map ) ) {
unset( $dependencies[ $index ] );
$dependencies[ $index ] = $map[ $dep ];
}
}
}
$url = filter_var( $file_name, FILTER_SANITIZE_URL );
$resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/js/' . $file_name . '.js';
if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
$resource = $url;
}
$id = 'obfx-module-' . $prefix . '-js-' . $sanitized . '-' . $order;
$map[ $file_name ] = $id;
wp_enqueue_script(
$id,
$resource,
$dependencies,
$this->version,
false
);
// check if we need to enqueue or localize.
if ( array_key_exists( $file_name, $this->localized ) ) {
wp_localize_script(
$id,
str_replace( '-', '_', $sanitized ),
$this->localized[ $file_name ]
);
}
$order ++;
}// End foreach().
}// End if().
}// End if().
}
/**
* Sets the styles for public from the module array.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function set_public_styles() {
$this->set_styles( $this->public_enqueue(), 'pub' );
}
/**
* Method that returns an array of scripts and styles to be loaded
* for the front end part.
*
* @since 1.0.0
* @access public
* @return array
*/
public abstract function public_enqueue();
/**
* Sets the scripts for public from the module array.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access public
*/
public function set_public_scripts() {
$this->set_scripts( $this->public_enqueue(), 'pub' );
}
/**
* Method to return URL to child class in a Reflective Way.
*
* @codeCoverageIgnore
*
* @access protected
* @return string
*/
protected function get_url() {
return plugin_dir_url( $this->get_dir() ) . $this->slug;
}
/**
* Method to return path to child class in a Reflective Way.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access protected
* @return string
*/
protected function get_dir() {
$reflector = new ReflectionClass( get_class( $this ) );
return dirname( $reflector->getFileName() );
}
/**
* Utility method to return active theme dir name.
*
* @since 1.0.0
* @access protected
*
* @param boolean $is_child Flag for child themes.
*
* @return string
*/
protected function get_active_theme_dir( $is_child = false ) {
if ( $is_child ) {
return basename( get_stylesheet_directory() );
}
return basename( get_template_directory() );
}
/**
* Utility method to render a view from module.
*
* @codeCoverageIgnore
*
* @since 1.0.0
* @access protected
*
* @param string $view_name The view name w/o the `-tpl.php` part.
* @param array $args An array of arguments to be passed to the view.
*
* @return string
*/
protected function render_view( $view_name, $args = array() ) {
ob_start();
$file = $this->get_dir() . '/views/' . $view_name . '-tpl.php';
if ( ! empty( $args ) ) {
foreach ( $args as $obfx_rh_name => $obfx_rh_value ) {
$$obfx_rh_name = $obfx_rh_value;
}
}
if ( file_exists( $file ) ) {
include $file;
}
return ob_get_clean();
}
/**
* Check if the users is choosen to show this in beta.
*
* @param int $percent Amount of users to show.
*
* @return bool Random result.
*/
protected function is_lucky_user( $percent = 10 ) {
$force_beta = isset( $_GET['force_beta'] ) && $_GET['force_beta'] === 'yes';
if ( $force_beta ) {
update_option( 'obfx_beta_show_' . $this->get_slug(), 'yes' );
return true;
}
$luck = get_option( 'obfx_beta_show_' . $this->get_slug() );
if ( ! empty( $luck ) ) {
return $luck === 'yes';
}
$luck = rand( 1, 100 );
$luck = $luck <= $percent;
update_option( 'obfx_beta_show_' . $this->get_slug(), $luck ? 'yes' : 'no' );
return $luck;
}
}
app/class-orbit-fox-global-settings.php 0000666 00000005020 15113067355 0014154 0 ustar 00 <?php
/**
* The global settings of the plugin.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
*/
/**
* The global settings of the plugin.
*
* Defines the plugin global settings instance and modules.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Global_Settings {
/**
* The main instance var.
*
* @since 1.0.0
* @access public
* @var Orbit_Fox_Global_Settings $instance The instance of this class.
*/
public static $instance;
/**
* Stores the default modules data.
*
* @since 1.0.0
* @access public
* @var array $modules Modules List.
*/
public $modules = array();
/**
* Stores an array of module objects.
*
* @since 1.0.0
* @access public
* @var array $module_objects Stores references to modules Objects.
*/
public $module_objects = array();
/**
* The instance method for the static class.
* Defines and returns the instance of the static class.
*
* @since 1.0.0
* @access public
* @return Orbit_Fox_Global_Settings
*/
public static function instance() {
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Orbit_Fox_Global_Settings ) ) {
self::$instance = new Orbit_Fox_Global_Settings;
self::$instance->modules = apply_filters(
'obfx_modules',
array(
'social-sharing',
'gutenberg-blocks',
'uptime-monitor',
'google-analytics',
'companion-legacy',
'elementor-widgets',
'template-directory',
'menu-icons',
'mystock-import',
'policy-notice',
'beaver-widgets',
'safe-updates',
'image-cdn',
)
);
}// End if().
return self::$instance;
}
/**
* Registers a module object reference in the $module_objects array.
*
* @since 1.0.0
* @access public
*
* @param string $name The name of the module from $modules array.
* @param Orbit_Fox_Module_Abstract $module The module object.
*/
public function register_module_reference( $name, Orbit_Fox_Module_Abstract $module ) {
self::$instance->module_objects[ $name ] = $module;
}
/**
* Method to retrieve instance of modules.
*
* @since 1.0.0
* @access public
* @return array
*/
public function get_modules() {
return self::instance()->modules;
}
/**
* Method to destroy singleton.
*
* @since 1.0.0
* @access public
*/
public static function destroy_instance() {
static::$instance = null;
}
}
app/class-orbit-fox-public.php 0000666 00000004377 15113067355 0012352 0 ustar 00 <?php
/**
* The public-specific functionality of the plugin.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
*/
/**
* The public-specific functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the public-specific stylesheet and JavaScript.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Public {
/**
* The ID of this plugin.
*
* @since 1.0.0
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* The version of this plugin.
*
* @since 1.0.0
* @access private
* @var string $version The current version of this plugin.
*/
private $version;
/**
* Initialize the class and set its properties.
*
* @since 1.0.0
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
*/
public function __construct( $plugin_name, $version ) {
$this->plugin_name = $plugin_name;
$this->version = $version;
}
/**
* Register the stylesheets for the admin area.
*
* @since 1.0.0
*/
public function enqueue_styles() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Orbit_Fox_Loader as all of the hooks are defined
* in that particular class.
*
* The Orbit_Fox_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
do_action( 'obfx_public_enqueue_styles' );
}
/**
* Register the JavaScript for the public area.
*
* @since 1.0.0
*/
public function enqueue_scripts() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Orbit_Fox_Loader as all of the hooks are defined
* in that particular class.
*
* The Orbit_Fox_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
do_action( 'obfx_public_enqueue_scripts' );
}
}
app/models/class-orbit-fox-model.php 0000666 00000013352 15113067355 0013450 0 ustar 00 <?php
/**
* The core model class for Orbit Fox.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/models
*/
/**
* The class that defines a model for interacting with data.
* Provides utility methods for saving and retrieving data.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/app/models
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Model {
/**
* The model namespace.
*
* @since 1.0.0
* @access private
* @var string $namespace The model namespace.
*/
private $namespace = 'obfx_data';
/**
* Holds the core settings.
*
* @since 1.0.0
* @access private
* @var array $core_settings Stores the core settings.
*/
private $core_settings;
/**
* Holds all enabled modules statuses.
*
* @since 1.0.0
* @access private
* @var array $module_status Stores the modules statuses.
*/
private $module_status;
/**
* Holds all enabled modules options.
*
* @since 1.0.0
* @access private
* @var array $module_settings Stores the modules options.
*/
private $module_settings;
/**
* Orbit_Fox_Model constructor.
*
* @since 1.0.0
* @access public
*/
public function __construct() {
$this->core_settings = array();
}
/**
* Defines the modules data.
*
* @since 1.0.0
* @access public
* @param array $modules The modules array passed by Orbit_Fox.
*/
public function register_modules_data( $modules = array() ) {
$module_status = array();
$module_settings = array();
if ( ! empty( $modules ) ) {
foreach ( $modules as $slug => $module ) {
$is_enabled = $module->enable_module();
$is_auto = $module->auto;
$active = false;
$showed_notices = array();
$module_status[ $slug ] = array(
'enabled' => $is_enabled,
'autoload' => $is_auto,
'showed_notices' => $showed_notices,
'active' => $active,
);
$module_settings[ $slug ] = $module->get_options_defaults();
}
}
$this->module_status = $module_status;
$this->module_settings = $module_settings;
}
/**
* Defines a default data array.
*
* @since 1.0.0
* @access public
* @return array
*/
public function default_data() {
$data = array(
'core_settings' => $this->core_settings,
'module_status' => $this->module_status,
'module_settings' => $this->module_settings,
);
return $data;
}
/**
* Utility method to return the active status of a module.
*
* @since 1.0.0
* @access public
* @param string $slug The module slug.
* @param boolean $default The default active state.
* @return bool
*/
public function get_is_module_active( $slug, $default ) {
$data = $this->get();
if ( isset( $data['module_status'][ $slug ]['active'] ) ) {
return $data['module_status'][ $slug ]['active'];
}
return $default; // @codeCoverageIgnore
}
/**
* Utility method to retrieve a module option.
*
* @since 1.0.0
* @access public
* @param string $slug The module slug.
* @param string $key Key to lookup.
* @return bool
*/
public function get_module_option( $slug, $key ) {
$data = $this->get();
if ( isset( $data['module_settings'][ $slug ][ $key ] ) ) {
return $data['module_settings'][ $slug ][ $key ];
}
return false; // @codeCoverageIgnore
}
/**
* Utility method to set a module option.
*
* @since 1.0.0
* @access public
* @param string $slug The module slug.
* @param string $key Key to lookup.
* @param mixed $value The new value.
* @return mixed
*/
public function set_module_option( $slug, $key, $value ) {
$new = array();
$new['module_settings'][ $slug ][ $key ] = $value;
return $this->save( $new );
}
/**
* Utility method to set batch module options.
*
* @since 1.0.0
* @access public
* @param string $slug The module slug.
* @param array $options The associative options array.
* @return mixed
*/
public function set_module_options( $slug, $options = array() ) {
$new['module_settings'][ $slug ] = $options;
return $this->save( $new );
}
/**
* Utility method to get a module status value.
*
* @since 1.0.0
* @access public
* @param string $slug The module slug.
* @param string $key Key to lookup.
* @return bool
*/
public function get_module_status( $slug, $key ) {
$data = $this->get();
if ( isset( $data['module_status'][ $slug ][ $key ] ) ) {
return $data['module_status'][ $slug ][ $key ];
}
return false; // @codeCoverageIgnore
}
/**
* Utility method to set a module status.
*
* @since 1.0.0
* @access public
* @param string $slug The module slug.
* @param string $key Key to lookup.
* @param mixed $value The new value.
* @return mixed
*/
public function set_module_status( $slug, $key, $value ) {
$new = array();
$new['module_status'][ $slug ][ $key ] = $value;
return $this->save( $new );
}
/**
* Base model method to save data to DB.
*
* @since 1.0.0
* @access public
* @param array $new The new data array to be saved.
* @return mixed
*/
public function save( $new = array() ) {
$old_data = $this->get();
$new_data = array_replace_recursive( $old_data, $new );
return update_option( $this->namespace, $new_data );
}
/**
* Base model method to retrieve data from DB.
*
* @since 1.0.0
* @access public
* @return mixed
*/
public function get() {
return get_option( $this->namespace, $this->default_data() );
}
/**
* Method used for resetting model and clearing the DB.
*
* @since 1.0.0
* @access public
* @return mixed
*/
public function destroy_model() {
return delete_option( $this->namespace );
}
}
includes/index.php 0000666 00000000033 15113067355 0010200 0 ustar 00 <?php // Silence is golden
includes/class-orbit-fox-loader.php 0000666 00000011024 15113067355 0013353 0 ustar 00 <?php
/**
* Register all actions and filters for the plugin
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
*/
/**
* Register all actions and filters for the plugin.
*
* Maintain a list of all hooks that are registered throughout
* the plugin, and register them with the WordPress API. Call the
* run function to execute the list of actions and filters.
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Loader {
/**
* The array of actions registered with WordPress.
*
* @since 1.0.0
* @access protected
* @var array $actions The actions registered with WordPress to fire when the plugin loads.
*/
protected $actions;
/**
* The array of filters registered with WordPress.
*
* @since 1.0.0
* @access protected
* @var array $filters The filters registered with WordPress to fire when the plugin loads.
*/
protected $filters;
/**
* Initialize the collections used to maintain the actions and filters.
*
* @since 1.0.0
*/
public function __construct() {
$this->actions = array();
$this->filters = array();
}
/**
* Add a new action to the collection to be registered with WordPress.
*
* @since 1.0.0
* @param string $hook The name of the WordPress action that is being registered.
* @param object $component A reference to the instance of the object on which the action is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority Optional. he priority at which the function should be fired. Default is 10.
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
*/
public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
}
/**
* Add a new filter to the collection to be registered with WordPress.
*
* @since 1.0.0
* @param string $hook The name of the WordPress filter that is being registered.
* @param object $component A reference to the instance of the object on which the filter is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority Optional. he priority at which the function should be fired. Default is 10.
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
*/
public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
}
/**
* A utility function that is used to register the actions and hooks into a single
* collection.
*
* @since 1.0.0
* @access private
* @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
* @param string $hook The name of the WordPress filter that is being registered.
* @param object $component A reference to the instance of the object on which the filter is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority The priority at which the function should be fired.
* @param int $accepted_args The number of arguments that should be passed to the $callback.
* @return array The collection of actions and filters registered with WordPress.
*/
private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
$hooks[] = array(
'hook' => $hook,
'component' => $component,
'callback' => $callback,
'priority' => $priority,
'accepted_args' => $accepted_args,
);
return $hooks;
}
/**
* Register the filters and actions with WordPress.
*
* @since 1.0.0
*/
public function run() {
foreach ( $this->filters as $hook ) {
add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
}
foreach ( $this->actions as $hook ) {
add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
}
}
}
includes/class-orbit-fox-i18n.php 0000666 00000001530 15113067355 0012665 0 ustar 00 <?php
/**
* Define the internationalization functionality
*
* Loads and defines the internationalization files for this plugin
* so that it is ready for translation.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
*/
/**
* Define the internationalization functionality.
*
* Loads and defines the internationalization files for this plugin
* so that it is ready for translation.
*
* @since 1.0.0
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_I18n {
/**
* Load the plugin text domain for translation.
*
* @since 1.0.0
*/
public function load_plugin_textdomain() {
load_plugin_textdomain(
'themeisle-companion',
false,
OBX_PATH . '/languages/'
);
}
}
includes/class-orbit-fox-activator.php 0000666 00000001127 15113067355 0014104 0 ustar 00 <?php
/**
* Fired during plugin activation
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
*/
/**
* Fired during plugin activation.
*
* This class defines all code necessary to run during the plugin's activation.
*
* @since 1.0.0
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Activator {
/**
* Short Description. (use period)
*
* Long Description.
*
* @since 1.0.0
*/
public static function activate() {
}
}
includes/class-orbit-fox.php 0000666 00000015576 15113067355 0012127 0 ustar 00 <?php
/**
* The file that defines the core plugin class
*
* A class definition that includes attributes and functions used across both the
* public-facing side of the site and the admin area.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
*/
/**
* The core plugin class.
*
* This is used to define internationalization, admin-specific hooks, and
* public-facing site hooks.
*
* Also maintains the unique identifier of this plugin as well as the current
* version of the plugin.
*
* @since 1.0.0
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox {
/**
* The loader that's responsible for maintaining and registering all hooks that power
* the plugin.
*
* @since 1.0.0
* @access protected
* @var Orbit_Fox_Loader $loader Maintains and registers all hooks for the plugin.
*/
protected $loader;
/**
* The unique identifier of this plugin.
*
* @since 1.0.0
* @access protected
* @var string $plugin_name The string used to uniquely identify this plugin.
*/
protected $plugin_name;
/**
* The current version of the plugin.
*
* @since 1.0.0
* @access protected
* @var string $version The current version of the plugin.
*/
protected $version;
/**
* Define the core functionality of the plugin.
*
* Set the plugin name and the plugin version that can be used throughout the plugin.
* Load the dependencies, define the locale, and set the hooks for the admin area and
* the public-facing side of the site.
*
* @since 1.0.0
*/
public function __construct() {
$this->plugin_name = 'orbit-fox';
$this->version = '2.8.5';
$this->load_dependencies();
$this->set_locale();
$this->prepare_modules();
$this->define_hooks();
}
/**
* Load the required dependencies for this plugin.
*
* Include the following files that make up the plugin:
*
* - Orbit_Fox_Loader. Orchestrates the hooks of the plugin.
* - Orbit_Fox_i18n. Defines internationalization functionality.
* - Orbit_Fox_Admin. Defines all hooks for the admin area.
* - Orbit_Fox_Public. Defines all hooks for the public side of the site.
*
* Create an instance of the loader which will be used to register the hooks
* with WordPress.
*
* @since 1.0.0
* @access private
*/
private function load_dependencies() {
$this->loader = new Orbit_Fox_Loader();
}
/**
* Define the locale for this plugin for internationalization.
*
* Uses the Orbit_Fox_i18n class in order to set the domain and to register the hook
* with WordPress.
*
* @since 1.0.0
* @access private
*/
private function set_locale() {
$plugin_i18n = new Orbit_Fox_I18n();
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
}
/**
* Check Modules and register them.
*
* @since 1.0.0
* @access private
*/
private function prepare_modules() {
$global_settings = new Orbit_Fox_Global_Settings();
$modules_to_load = $global_settings->instance()->get_modules();
$obfx_model = new Orbit_Fox_Model();
$module_factory = new Orbit_Fox_Module_Factory();
foreach ( $modules_to_load as $module_name ) {
$module = $module_factory::build( $module_name );
$global_settings->register_module_reference( $module_name, $module );
if ( $module->enable_module() ) {
$module->register_loader( $this->get_loader() );
$module->register_model( $obfx_model );
if ( $module->get_is_active() ) {
$module->set_enqueue( $this->get_version() ); // @codeCoverageIgnore
$module->hooks(); // @codeCoverageIgnore
}
$this->loader->add_action( 'orbit_fox_modules', $module, 'load' );
}
}
}
/**
* The reference to the class that orchestrates the hooks with the plugin.
*
* @since 1.0.0
* @return Orbit_Fox_Loader Orchestrates the hooks of the plugin.
*/
public function get_loader() {
return $this->loader;
}
/**
* Retrieve the version number of the plugin.
*
* @since 1.0.0
* @return string The version number of the plugin.
*/
public function get_version() {
return $this->version;
}
/**
* Register all of the hooks related to the functionality
* of the plugin.
*
* @since 1.0.0
* @access private
*/
private function define_hooks() {
$plugin_admin = new Orbit_Fox_Admin( $this->get_plugin_name(), $this->get_version() );
$this->loader->add_action( 'admin_init', $plugin_admin, 'load_modules' );
$this->loader->add_action( 'admin_init', $plugin_admin, 'visit_dashboard_notice_dismiss' );
$this->loader->add_action( 'admin_menu', $plugin_admin, 'menu_pages' );
$this->loader->add_action( 'admin_notices', $plugin_admin, 'visit_dashboard_notice' );
$this->loader->add_action( 'obfx_recommended_plugins', $plugin_admin, 'load_recommended_plugins' );
$this->loader->add_action( 'admin_init', $plugin_admin, 'load_recommended_partners' );
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
$this->loader->add_action( 'wp_ajax_obfx_update_module_options', $plugin_admin, 'obfx_update_module_options' );
$this->loader->add_action( 'wp_ajax_obfx_update_module_active_status', $plugin_admin, 'obfx_update_module_active_status' );
$plugin_public = new Orbit_Fox_Public( $this->get_plugin_name(), $this->get_version() );
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
$this->loader->add_action( 'init', Orbit_Fox_Neve_Dropin::instance(), 'init' );
// Fix update checks on themeisle.com for non-premium themes
add_filter( 'neve_enable_licenser', '__return_false' );
add_filter( 'hestia_enable_licenser', '__return_false' );
add_filter( 'orfeo_enable_licenser', '__return_false' );
add_filter( 'fagri_enable_licenser', '__return_false' );
add_filter( 'capri_lite_enable_licenser', '__return_false' );
add_filter( 'belise_lite_enable_licenser', '__return_false' );
add_filter( 'themotion_lite_enable_licenser', '__return_false' );
add_filter( 'capri_lite_enable_licenser', '__return_false' );
add_filter( 'visualizer_enable_licenser', '__return_false' );
add_filter( 'wp_product_review_enable_licenser', '__return_false' );
add_filter( 'feedzy_rss_feeds_licenser', '__return_false' );
}
/**
* The name of the plugin used to uniquely identify it within the context of
* WordPress and to define internationalization functionality.
*
* @since 1.0.0
* @return string The name of the plugin.
*/
public function get_plugin_name() {
return $this->plugin_name;
}
/**
* Run the loader to execute all of the hooks with WordPress.
*
* @since 1.0.0
*/
public function run() {
$this->loader->run();
}
}
includes/class-orbit-fox-deactivator.php 0000666 00000001141 15113067355 0014411 0 ustar 00 <?php
/**
* Fired during plugin deactivation
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
*/
/**
* Fired during plugin deactivation.
*
* This class defines all code necessary to run during the plugin's deactivation.
*
* @since 1.0.0
* @package Orbit_Fox
* @subpackage Orbit_Fox/includes
* @author Themeisle <friends@themeisle.com>
*/
class Orbit_Fox_Deactivator {
/**
* Short Description. (use period)
*
* Long Description.
*
* @since 1.0.0
*/
public static function deactivate() {
}
}
assets/js/orbit-fox-admin.js 0000666 00000015362 15113067355 0012040 0 ustar 00 /**
* The admin-specific functionality of the plugin.
*
* @link https://themeisle.com
* @since 1.0.0
*
* @package Orbit_Fox
* @subpackage Orbit_Fox/admin/js
*/
var obfx_admin = function ( $ ) {
'use strict';
/**
* All of the code for your admin-facing JavaScript source
* should reside in this file.
*
* Note: It has been assumed you will write jQuery code here, so the
* $ function reference has been prepared for usage within the scope
* of this function.
*
* This enables you to define handlers, for when the DOM is ready:
*
* $(function() {
*
* });
*
* When the window is loaded:
*
* $( window ).load(function() {
*
* });
*
* ...and/or other possibilities.
*
* Ideally, it is not considered best practise to attach more than a
* single DOM-ready or window-load handler for a particular page.
* Although scripts in the WordPress core, Plugins and Themes may be
* practising this, we should strive to set a better example in our own work.
*/
$(
function () {
// if ( $( '#toplevel_page_jetpack' ).length ) {
// var obfx_menu = $( '#toplevel_page_obfx_menu' ).clone().wrap( '<p/>' ).parent().html();
// $( '#toplevel_page_obfx_menu' ).remove();
// $( '#toplevel_page_jetpack' ).before( obfx_menu );
// }
}
);
$(
function () {
// Scroll to module if url hash.
$( document ).ready(
function() {
var hash = $( '#' + window.location.hash.substr( 1 ) );
hash.find( '.btn-expand' ).click();
scrollToAnchor( hash );
}
);
$( '.obfx-mod-switch' ).on(
'click', function () {
var switch_ref = $( this );
var checked = switch_ref.is( ':checked' );
var name = switch_ref.attr( 'name' );
var noance = switch_ref.val();
var formSwitch = $( switch_ref ).parent();
$( formSwitch ).addClass( 'loading' ).removeClass( 'activated' );
if ( $( this ).hasClass( 'obfx-mod-confirm-intent' ) ) {
var modal = $( '.modal#' + name );
}
var post_data = {
noance: noance,
name: name,
checked: checked
};
var json_data = JSON.stringify( post_data );
var ajax_data = {
'action': 'obfx_update_module_active_status',
'data': json_data
};
$.post(
'admin-ajax.php', ajax_data, function ( response ) {
formSwitch.removeClass( 'loading' );
if ( response.type === 'success' ) {
var modulePanel = $( '#obfx-mod-' + name );
if ( checked ) {
formSwitch.addClass( 'activated' );
$( modulePanel ).find( 'fieldset' ).removeAttr( 'disabled' );
$( modulePanel ).show();
if ( modal ) {
modal.addClass( 'active' );
} else {
$( modulePanel ).find( '.btn-expand' ).click();
scrollToAnchor( modulePanel );
}
} else {
$( modulePanel ).hide();
$( modulePanel ).find( 'fieldset' ).attr( 'disabled', true );
}
} else {
switch_ref.attr( 'checked', ! switch_ref.attr( 'checked' ) );
}
}, 'json'
);
}
);
function scrollToAnchor(anchor_id){
if ( anchor_id.length ) {
$( 'html,body' ).animate( { scrollTop: anchor_id.offset().top }, 'slow' );
}
}
$( '.accept-confirm-intent, .close-confirm-intent' ).on(
'click', function () {
var modal = $( this ).closest( '.modal' );
modal.removeClass( 'active' );
var switch_ref = modal.prev().find( 'input' );
var name = switch_ref.attr( 'name' );
var optionsPanel = $( '#obfx-mod-' + name );
optionsPanel.find( '.btn-expand' ).click();
scrollToAnchor( optionsPanel );
optionsPanel.find( '.form-input:first-of-type' ).focus();
}
);
$( '.close-confirm-intent' ).on(
'click', function () {
var modal = $( this ).closest( '.modal' );
modal.removeClass( 'active' );
}
);
$( '.obfx-toast-dismiss' ).on(
'click', function () {
$( this ).closest( '.obfx-mod-toast' ).slideUp(
400, function () {
$( this ).removeClass( 'toast-success' );
$( this ).removeClass( 'toast-error' );
$( this ).removeClass( 'toast-warning' );
}
);
}
);
$( '.btn-expand' ).on(
'click', function () {
if ( $( this ).hasClass( 'active' ) ) {
$( this ).removeClass( 'active' );
$( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).removeClass( 'active' ).parent().removeClass('active');
} else {
$( this ).addClass( 'active' );
$( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).addClass( 'active' ).parent().addClass( 'active' );
}
}
);
$( '.obfx-module-form' ).on(
'submit reset', function ( e ) {
e.preventDefault();
return false;
}
);
$( '.obfx-module-form' ).on(
'keyup change', 'input, select, textarea', function () {
$( this ).closest( 'form' ).find( '[class*="obfx-mod-btn"]:disabled' ).removeAttr( 'disabled' );
}
);
$( '.obfx-mod-btn-cancel' ).on(
'click', function () {
$( this ).closest( 'form' ).trigger( 'reset' );
$( this ).closest( 'form' ).find( '[class*="obfx-mod-btn"]' ).attr( 'disabled', true );
}
);
$( '.obfx-mod-btn-save' ).on(
'click', function () {
var module_form = $( this ).closest( 'form' );
module_form.find( '[class*="obfx-mod-btn"]' ).attr( 'disabled', true );
module_form.find( '.obfx-mod-btn-save' ).addClass( 'loading' );
module_form.find( $( 'input:checkbox:not(:checked)' ) ).each(
function () {
var input = $( '<input />' );
input.attr( 'type', 'hidden' );
input.attr( 'name', $( this ).attr( 'name' ) );
input.attr( 'value', '0' );
var form = $( this )[ 0 ].form;
$( form ).append( input );
}
);
var form_data = module_form.serializeArray();
var maped_array = {};
$.each(
form_data, function ( i, elem ) {
maped_array[ elem.name ] = elem.value;
}
);
form_data = JSON.stringify( maped_array );
var ajax_data = {
'action': 'obfx_update_module_options',
'data': form_data
};
$.post(
'admin-ajax.php', ajax_data, function ( response ) {
module_form.find( '.obfx-mod-btn-save' ).removeClass( 'loading' );
if ( response.type ) {
module_form.closest( '.panel' ).find( '.obfx-mod-toast' ).addClass( 'toast-' + response.type );
module_form.closest( '.panel' ).find( '.obfx-mod-toast span' ).html( response.message );
module_form.closest( '.panel' ).find( '.obfx-mod-toast' ).show();
setTimeout(
function () {
module_form.closest( '.panel' ).find( '.obfx-toast-dismiss' ).trigger( 'click' );
}, 2000
);
}
}, 'json'
);
}
);
}
);
};
obfx_admin( jQuery );
assets/css/orbit-fox-admin.css 0000666 00000220253 15113067355 0012365 0 ustar 00 /**
* Orbit Fox Admin Style
*
* @since 1.0.0
* @package Orbit_Fox/assets
*
* @author ThemeIsle
* Extends Spectre.css Library
*/
/*
Version: 2.8.5
*/
/* Document
========================================================================== */
html {
font-size: 62.5%;
}
.obfx-wrapper {
font-family: sans-serif;
/* 1 */
line-height: 1.15;
/* 3 */
-webkit-text-size-adjust: 100%;
/* 2 */
-ms-text-size-adjust: 100%;
/* 3 */
}
/* Sections
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
.obfx-wrapper article,
.obfx-wrapper aside,
.obfx-wrapper footer,
.obfx-wrapper header,
.obfx-wrapper nav,
.obfx-wrapper section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
.obfx-wrapper h1 {
margin: 0.67em 0;
font-size: 2em;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
.obfx-wrapper figcaption,
.obfx-wrapper figure,
.obfx-wrapper main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8 (removed).
*/
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
.obfx-wrapper hr {
/* 1 */
overflow: visible;
box-sizing: content-box;
/* 1 */
height: 0;
/* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers. (removed)
* 2. Correct the odd `em` font sizing in all browsers.
*/
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
.obfx-wrapper a {
background-color: transparent;
/* 1 */
-webkit-text-decoration-skip: objects;
/* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
.obfx-wrapper a:active,
.obfx-wrapper a:hover {
outline-width: 0;
}
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. (removed)
*/
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
.obfx-wrapper b,
.obfx-wrapper strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
.obfx-wrapper b,
.obfx-wrapper strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
.obfx-wrapper code,
.obfx-wrapper kbd,
.obfx-wrapper pre,
.obfx-wrapper samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
.obfx-wrapper dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-. (Removed)
*/
/**
* Add the correct font size in all browsers.
*/
.obfx-wrapper small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
.obfx-wrapper sub,
.obfx-wrapper sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
.obfx-wrapper sub {
bottom: -0.25em;
}
.obfx-wrapper sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
.obfx-wrapper audio,
.obfx-wrapper video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
.obfx-wrapper audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
.obfx-wrapper img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
.obfx-wrapper svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
.obfx-wrapper button,
.obfx-wrapper input,
.obfx-wrapper optgroup,
.obfx-wrapper select,
.obfx-wrapper textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
.obfx-wrapper button,
.obfx-wrapper input {
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
.obfx-wrapper button,
.obfx-wrapper select {
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
.obfx-wrapper button,
.obfx-wrapper [type="button"],
.obfx-wrapper [type="reset"],
.obfx-wrapper [type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
.obfx-wrapper button::-moz-focus-inner,
.obfx-wrapper [type="button"]::-moz-focus-inner,
.obfx-wrapper [type="reset"]::-moz-focus-inner,
.obfx-wrapper [type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
/**
* Restore the focus styles unset by the previous rule (removed).
*/
/**
* Change the border, margin, and padding in all browsers (opinionated) (changed).
*/
.obfx-wrapper fieldset {
margin: 0;
padding: 0;
border: 0;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
.obfx-wrapper legend {
display: table;
box-sizing: border-box;
max-width: 100%;
padding: 0;
color: inherit;
white-space: normal;
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
.obfx-wrapper progress {
display: inline-block;
/* 1 */
vertical-align: baseline;
/* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
.obfx-wrapper textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
.obfx-wrapper [type="checkbox"],
.obfx-wrapper [type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
.obfx-wrapper [type="number"]::-webkit-inner-spin-button,
.obfx-wrapper [type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
.obfx-wrapper [type="search"] {
/* 1 */
outline-offset: -2px;
-webkit-appearance: textfield;
/* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
.obfx-wrapper [type="search"]::-webkit-search-cancel-button,
.obfx-wrapper [type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
.obfx-wrapper ::-webkit-file-upload-button {
/* 1 */
font: inherit;
-webkit-appearance: button;
/* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
.obfx-wrapper details,
.obfx-wrapper menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
.obfx-wrapper summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
.obfx-wrapper canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
.obfx-wrapper template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
.obfx-wrapper [hidden] {
display: none;
}
.obfx-wrapper *,
.obfx-wrapper *::before,
.obfx-wrapper *::after {
box-sizing: inherit;
}
.obfx-wrapper {
box-sizing: border-box;
font-size: 10px;
line-height: 1.42857143;
-webkit-tap-highlight-color: transparent;
}
.obfx-wrapper {
overflow-x: hidden;
margin-top: 40px;
margin-right: 20px;
padding: 16px;
color: #50596c;
background: #fff;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
font-size: 1.4rem;
text-rendering: optimizeLegibility;
}
.obfx-wrapper a {
outline: none;
color: #5764c6;
text-decoration: none;
}
.obfx-wrapper a:focus {
box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
}
.obfx-wrapper a:focus,
.obfx-wrapper a:hover,
.obfx-wrapper a:active,
.obfx-wrapper a.active {
color: #3b49af;
text-decoration: underline;
}
.obfx-wrapper h1,
.obfx-wrapper h2,
.obfx-wrapper h3,
.obfx-wrapper h4,
.obfx-wrapper h5,
.obfx-wrapper h6 {
margin-top: 0;
margin-bottom: 1.5rem;
color: inherit;
font-weight: 300;
line-height: 1.2;
}
.obfx-wrapper h1 {
display: inline-block;
font-size: 5rem;
vertical-align: top;
}
.obfx-wrapper h2 {
font-size: 4rem;
}
.obfx-wrapper h3 {
font-size: 3rem;
}
.obfx-wrapper h4 {
font-size: 2.4rem;
}
.obfx-wrapper h5 {
font-size: 2rem;
}
.obfx-wrapper h6 {
font-size: 1.6rem;
}
.obfx-wrapper .powered {
display: inline-block;
margin-bottom: 10px;
margin-left: 10px;
font-style: italic;
vertical-align: bottom;
}
.obfx-wrapper p {
margin: 0 0 1rem;
line-height: 2.4rem;
}
.obfx-wrapper a,
.obfx-wrapper ins,
.obfx-wrapper u {
-webkit-text-decoration-skip: ink edges;
text-decoration-skip: ink edges;
}
.obfx-wrapper blockquote {
margin-left: 0;
padding: 1rem 2rem;
border-left: 0.2rem solid #f0f1f4;
}
.obfx-wrapper blockquote p:last-child {
margin-bottom: 0;
}
.obfx-wrapper blockquote cite {
color: #acb3c2;
}
.obfx-wrapper ul,
.obfx-wrapper ol {
margin: 2rem 0 2rem 2rem;
padding: 0;
}
.obfx-wrapper ul ul,
.obfx-wrapper ol ul,
.obfx-wrapper ul ol,
.obfx-wrapper ol ol {
margin: 1.5rem 0 1.5rem 2rem;
}
.obfx-wrapper ul li,
.obfx-wrapper ol li {
margin-top: 1rem;
}
.obfx-wrapper ul {
list-style: disc inside;
}
.obfx-wrapper ul ul {
list-style-type: circle;
}
.obfx-wrapper ol {
list-style: decimal inside;
}
.obfx-wrapper ol ol {
list-style-type: lower-alpha;
}
.obfx-wrapper dl dt {
font-weight: bold;
}
.obfx-wrapper dl dd {
margin: 0.5rem 0 1.5rem 0;
}
.obfx-wrapper mark {
display: inline-block;
padding: 0.3rem 0.4rem;
border-radius: 0.2rem;
color: #50596c;
background: #ffe9b3;
line-height: 1;
vertical-align: baseline;
}
.obfx-wrapper kbd {
display: inline-block;
padding: 0.3rem 0.4rem;
border-radius: 0.2rem;
color: #fff;
background: #454d5d;
line-height: 1;
vertical-align: baseline;
}
.obfx-wrapper abbr[title] {
border-bottom: 0.1rem dotted;
text-decoration: none;
cursor: help;
}
.obfx-wrapper .table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
text-align: left;
}
.obfx-wrapper .table.table-striped tbody tr:nth-of-type(odd) {
background: #f8f9fa;
}
.obfx-wrapper .table.table-hover tbody tr:hover {
background: #f0f1f4;
}
.obfx-wrapper .table tbody tr.active,
.obfx-wrapper .table.table-striped tbody tr.active {
background: #f0f1f4;
}
.obfx-wrapper .table td {
padding: 1.5rem 1rem;
border-bottom: 0.1rem solid #f0f1f4;
}
.obfx-wrapper .table th {
padding: 1.5rem 1rem;
border-bottom: 0.1rem solid #727e96;
}
.obfx-wrapper .btn {
display: inline-block;
height: 3.2rem;
padding: 0.5rem 0.8rem;
border: 0.1rem solid #5764c6;
border-radius: 0.2rem;
outline: none;
color: #5764c6;
background: #fff;
font-size: 1.4rem;
line-height: 2rem;
text-align: center;
vertical-align: middle;
white-space: nowrap;
text-decoration: none;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: all 0.1s ease;
transition: all 0.1s ease;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.obfx-wrapper .btn:focus {
background: #fbfbfe;
box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
text-decoration: none;
}
.obfx-wrapper .btn:hover {
border-color: #4c59c2;
color: #fff;
background: #5764c6;
text-decoration: none;
}
.obfx-wrapper .btn:active,
.obfx-wrapper .btn.active {
border-color: #3e4cb6;
color: #fff;
background: #4c59c2;
text-decoration: none;
}
.obfx-wrapper .btn[disabled],
.obfx-wrapper .btn:disabled,
.obfx-wrapper .btn.disabled {
opacity: 0.5;
cursor: default;
pointer-events: none;
}
.obfx-wrapper .btn.btn-primary {
border-color: #4c59c2;
color: #fff;
background: #5764c6;
}
.obfx-wrapper .btn.btn-primary:focus,
.obfx-wrapper .btn.btn-primary:hover {
border-color: #3e4cb6;
color: #fff;
background: #4452c0;
}
.obfx-wrapper .btn.btn-primary:active,
.obfx-wrapper .btn.btn-primary.active {
border-color: #3b49af;
color: #fff;
background: #3f4eba;
}
.obfx-wrapper .btn.btn-primary.loading::after {
border-bottom-color: #fff;
border-left-color: #fff;
}
.obfx-wrapper .btn.btn-success {
border-color: #2faa3f;
color: #fff;
background: #32b643;
}
.obfx-wrapper .btn.btn-success:focus {
box-shadow: 0 0 0 0.1rem rgba(50, 182, 67, 0.2);
}
.obfx-wrapper .btn.btn-success:focus,
.obfx-wrapper .btn.btn-success:hover {
border-color: #2da23c;
color: #fff;
background: #30ae40;
}
.obfx-wrapper .btn.btn-success.active,
.obfx-wrapper .btn.btn-success:active {
border-color: #278e34;
color: #fff;
background: #2a9a39;
}
.obfx-wrapper .btn.btn-success.loading::after {
border-bottom-color: #fff;
border-left-color: #fff;
}
.obfx-wrapper .btn.btn-error {
border-color: #d95000;
color: #fff;
background: #e85600;
}
.obfx-wrapper .btn.btn-error:focus {
box-shadow: 0 0 0 0.1rem rgba(232, 86, 0, 0.2);
}
.obfx-wrapper .btn.btn-error:focus,
.obfx-wrapper .btn.btn-error:hover {
border-color: #cf4d00;
color: #fff;
background: #de5200;
}
.obfx-wrapper .btn.btn-error.active,
.obfx-wrapper .btn.btn-error:active {
border-color: #b54300;
color: #fff;
background: #c44900;
}
.obfx-wrapper .btn.btn-error.loading::after {
border-bottom-color: #fff;
border-left-color: #fff;
}
.obfx-wrapper .btn.btn-link {
border-color: transparent;
color: #5764c6;
background: transparent;
}
.obfx-wrapper .btn.btn-link:focus,
.obfx-wrapper .btn.btn-link:hover,
.obfx-wrapper .btn.btn-link:active,
.obfx-wrapper .btn.btn-link.active {
color: #3b49af;
}
.obfx-wrapper .btn.btn-sm {
height: 2.4rem;
padding: 0.1rem 0.8rem;
font-size: 1.2rem;
}
.obfx-wrapper .btn.btn-lg {
height: 4rem;
padding: 0.9rem 0.8rem;
font-size: 1.6rem;
}
.obfx-wrapper .btn.btn-block {
display: block;
width: 100%;
}
.obfx-wrapper .btn.btn-action {
width: 3.2rem;
padding-right: 0;
padding-left: 0;
}
.obfx-wrapper .btn.btn-action.btn-sm {
width: 2.4rem;
}
.obfx-wrapper .btn.btn-action.btn-lg {
width: 4rem;
}
.obfx-wrapper .btn.btn-clear {
width: 1.6rem;
height: 1.6rem;
margin-right: -0.2rem;
margin-left: 0.4rem;
padding: 0 0.2rem;
border: 0;
opacity: 0.45;
color: currentColor;
background: transparent;
line-height: 1.6rem;
text-decoration: none;
}
.obfx-wrapper .btn.btn-clear:hover {
opacity: 0.85;
}
.obfx-wrapper .btn.btn-clear::before {
content: "\2715";
}
.obfx-wrapper .btn-group {
display: -webkit-inline-box;
display: inline-flex;
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.obfx-wrapper .btn-group .btn {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
.obfx-wrapper .btn-group .btn:first-child:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.obfx-wrapper .btn-group .btn:not(:first-child):not(:last-child) {
margin-left: -0.1rem;
border-radius: 0;
}
.obfx-wrapper .btn-group .btn:last-child:not(:first-child) {
margin-left: -0.1rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.obfx-wrapper .btn-group .btn:focus,
.obfx-wrapper .btn-group .btn:hover,
.obfx-wrapper .btn-group .btn:active,
.obfx-wrapper .btn-group .btn.active {
z-index: 1;
}
.obfx-wrapper .btn-group.btn-group-block {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
}
.obfx-wrapper .btn-group.btn-group-block .btn {
-webkit-box-flex: 1;
-webkit-flex: 1 0 0;
-ms-flex: 1 0 0;
flex: 1 0 0;
}
.obfx-wrapper .form-group:not(:last-child) {
margin-bottom: 1rem;
}
.obfx-wrapper .form-label {
display: block;
padding: 0.6rem 0;
}
.obfx-wrapper .form-label.label-sm {
padding: 0.2rem 0;
}
.obfx-wrapper .form-label.label-lg {
padding: 1rem 0;
}
.obfx-wrapper .form-input {
display: block;
position: relative;
width: 100%;
max-width: 100%;
height: 3.2rem;
padding: 0.5rem 0.8rem;
border: 0.1rem solid #c4c9d3;
border-radius: 0.2rem;
outline: none;
color: #50596c;
background: #fff;
background-image: none;
font-size: 1.4rem;
line-height: 2rem;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.obfx-wrapper .form-input:focus {
border-color: #5764c6;
box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
}
.obfx-wrapper .form-input::-webkit-input-placeholder {
color: #acb3c2;
}
.obfx-wrapper .form-input:-ms-input-placeholder {
color: #acb3c2;
}
.obfx-wrapper .form-input::placeholder {
color: #acb3c2;
}
.obfx-wrapper .form-input.input-sm {
height: 2.4rem;
padding: 0.1rem 0.8rem;
font-size: 1.2rem;
}
.obfx-wrapper .form-input.input-lg {
height: 4rem;
padding: 0.9rem 0.8rem;
font-size: 1.6rem;
}
.obfx-wrapper .form-input.input-inline {
display: inline-block;
width: auto;
vertical-align: middle;
}
.obfx-wrapper textarea.form-input {
height: auto;
}
.obfx-wrapper .form-input[type="file"] {
height: auto;
}
.obfx-wrapper .form-input-hint {
margin-top: 0.4rem;
color: #acb3c2;
}
.obfx-wrapper .has-success .form-input-hint,
.obfx-wrapper .is-success + .form-input-hint {
color: #32b643;
}
.obfx-wrapper .has-error .form-input-hint,
.obfx-wrapper .is-error + .form-input-hint {
color: #e85600;
}
.obfx-wrapper .form-select {
width: 100%;
padding: 0.5rem 0.8rem;
border: 0.1rem solid #c4c9d3;
border-radius: 0.2rem;
outline: none;
color: inherit;
font-size: 1.4rem;
line-height: 2rem;
vertical-align: middle;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.obfx-wrapper .form-select[multiple] option {
padding: 0.2rem 0.4rem;
}
.obfx-wrapper .form-select:not([multiple]) {
height: 3.2rem;
padding-right: 2.4rem;
background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23667189' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 0.8rem 1rem;
}
.obfx-wrapper .form-select:focus {
border-color: #5764c6;
box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
}
.obfx-wrapper .form-select::-ms-expand {
display: none;
}
.obfx-wrapper .form-select.select-sm {
height: 2.4rem;
padding: 0.1rem 2rem 0.1rem 0.6rem;
font-size: 1.2rem;
}
.obfx-wrapper .form-select.select-lg {
height: 4rem;
padding: 0.9rem 2.4rem 0.9rem 0.8rem;
font-size: 1.6rem;
}
.obfx-wrapper .has-success .form-input,
.obfx-wrapper .has-success .form-select,
.obfx-wrapper .form-input.is-success,
.obfx-wrapper .form-select.is-success {
border-color: #32b643;
}
.obfx-wrapper .has-success .form-input:focus,
.obfx-wrapper .has-success .form-select:focus,
.obfx-wrapper .form-input.is-success:focus,
.obfx-wrapper .form-select.is-success:focus {
box-shadow: 0 0 0 0.2rem rgba(50, 182, 67, 0.15);
}
.obfx-wrapper .has-error .form-input,
.obfx-wrapper .has-error .form-select,
.obfx-wrapper .form-input.is-error,
.obfx-wrapper .form-select.is-error {
border-color: #e85600;
}
.obfx-wrapper .has-error .form-input:focus,
.obfx-wrapper .has-error .form-select:focus,
.obfx-wrapper .form-input.is-error:focus,
.obfx-wrapper .form-select.is-error:focus {
box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
}
.obfx-wrapper .form-input:not(:placeholder-shown):invalid {
border-color: #e85600;
}
.obfx-wrapper .form-input:not(:placeholder-shown):invalid:focus {
box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
}
.obfx-wrapper .form-input:not(:placeholder-shown):invalid + .form-input-hint {
color: #e85600;
}
.obfx-wrapper .has-icon-left,
.obfx-wrapper .has-icon-right {
position: relative;
}
.obfx-wrapper .has-icon-left .form-icon,
.obfx-wrapper .has-icon-right .form-icon {
position: absolute;
top: 50%;
min-width: 1.4rem;
margin: 0 0.8rem;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.obfx-wrapper .has-icon-left .form-icon {
left: 0;
}
.obfx-wrapper .has-icon-left .form-input {
padding-left: 3rem;
}
.obfx-wrapper .has-icon-right .form-icon {
right: 0;
}
.obfx-wrapper .has-icon-right .form-input {
padding-right: 3rem;
}
.obfx-wrapper .form-checkbox,
.obfx-wrapper .form-radio,
.obfx-wrapper .form-switch {
display: inline-block;
position: relative;
line-height: 2rem;
}
.obfx-wrapper .form-checkbox input,
.obfx-wrapper .form-radio input,
.obfx-wrapper .form-switch input {
overflow: hidden;
clip: rect(0, 0, 0, 0);
position: absolute;
width: 0.1rem;
height: 0.1rem;
margin: -0.1rem;
}
.obfx-wrapper .form-checkbox input:focus + .form-icon,
.obfx-wrapper .form-radio input:focus + .form-icon,
.obfx-wrapper .form-switch input:focus + .form-icon {
border-color: #5764c6;
box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
}
.obfx-wrapper .form-checkbox input:checked + .form-icon,
.obfx-wrapper .form-radio input:checked + .form-icon,
.obfx-wrapper .form-switch input:checked + .form-icon {
border-color: #5764c6;
background: #5764c6;
}
.obfx-wrapper .form-checkbox .form-icon,
.obfx-wrapper .form-radio .form-icon,
.obfx-wrapper .form-switch .form-icon {
display: inline-block;
position: absolute;
border: 0.1rem solid #c4c9d3;
cursor: pointer;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.obfx-wrapper .form-checkbox,
.obfx-wrapper .form-radio {
padding: 0.2rem 2rem;
}
.obfx-wrapper .form-checkbox .form-icon,
.obfx-wrapper .form-radio .form-icon {
top: 0.5rem;
left: 0;
width: 1.4rem;
height: 1.4rem;
background: #fff;
}
.obfx-wrapper .form-checkbox input:active + .form-icon,
.obfx-wrapper .form-radio input:active + .form-icon {
background: #f0f1f4;
}
.obfx-wrapper .form-checkbox .form-icon {
border-radius: 0.2rem;
}
.obfx-wrapper .form-checkbox input:checked + .form-icon::before {
position: absolute;
top: 50%;
left: 50%;
width: 0.6rem;
height: 1rem;
margin-top: -0.6rem;
margin-left: -0.3rem;
border: 0.2rem solid #fff;
border-top-width: 0;
border-left-width: 0;
background-clip: padding-box;
content: "";
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.obfx-wrapper .form-checkbox input:indeterminate + .form-icon {
border-color: #5764c6;
background: #5764c6;
}
.obfx-wrapper .form-checkbox input:indeterminate + .form-icon::before {
position: absolute;
top: 50%;
left: 50%;
width: 1rem;
height: 0.2rem;
margin-top: -0.1rem;
margin-left: -0.5rem;
background: #fff;
content: "";
}
.obfx-wrapper .form-radio .form-icon {
border-radius: 0.7rem;
}
.obfx-wrapper .form-radio input:checked + .form-icon::before {
position: absolute;
top: 50%;
left: 50%;
width: 0.4rem;
height: 0.4rem;
margin-top: -0.2rem;
margin-left: -0.2rem;
border-radius: 0.2rem;
background: #fff;
content: "";
}
.obfx-wrapper .form-switch {
padding: 0.2rem 2rem 0.2rem 3.6rem;
}
.obfx-wrapper .form-switch .form-icon {
top: 0.3rem;
left: 0;
width: 3rem;
height: 1.8rem;
border-radius: 0.9rem;
background: #e7e9ed;
background-clip: padding-box;
}
.obfx-wrapper .form-switch .form-icon::before {
display: block;
position: absolute;
top: 0;
left: 0;
width: 1.6rem;
height: 1.6rem;
border-radius: 0.8rem;
background: #fff;
content: "";
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.obfx-wrapper .form-switch input:checked + .form-icon::before {
left: 1.2rem;
}
.obfx-wrapper .form-switch input:active + .form-icon::before {
background: #f8f9fa;
}
.obfx-wrapper .input-group {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
}
.obfx-wrapper .input-group .input-group-addon {
padding: 0.5rem 0.8rem;
border: 0.1rem solid #c4c9d3;
border-radius: 0.2rem;
background: #f8f9fa;
line-height: 2rem;
}
.obfx-wrapper .input-group .input-group-addon.addon-sm {
padding: 0.1rem 0.8rem;
font-size: 1.2rem;
}
.obfx-wrapper .input-group .input-group-addon.addon-lg {
padding: 0.9rem 0.8rem;
font-size: 1.6rem;
}
.obfx-wrapper .input-group .input-group-addon,
.obfx-wrapper .input-group .input-group-btn {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
.obfx-wrapper .input-group .form-input:first-child:not(:last-child),
.obfx-wrapper .input-group .form-select:first-child:not(:last-child),
.obfx-wrapper .input-group .input-group-addon:first-child:not(:last-child),
.obfx-wrapper .input-group .input-group-btn:first-child:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.obfx-wrapper .input-group .form-input:not(:first-child):not(:last-child),
.obfx-wrapper .input-group .form-select:not(:first-child):not(:last-child),
.obfx-wrapper .input-group .input-group-addon:not(:first-child):not(:last-child),
.obfx-wrapper .input-group .input-group-btn:not(:first-child):not(:last-child) {
margin-left: -0.1rem;
border-radius: 0;
}
.obfx-wrapper .input-group .form-input:last-child:not(:first-child),
.obfx-wrapper .input-group .form-select:last-child:not(:first-child),
.obfx-wrapper .input-group .input-group-addon:last-child:not(:first-child),
.obfx-wrapper .input-group .input-group-btn:last-child:not(:first-child) {
margin-left: -0.1rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.obfx-wrapper .input-group .form-input:focus,
.obfx-wrapper .input-group .form-select:focus,
.obfx-wrapper .input-group .input-group-addon:focus,
.obfx-wrapper .input-group .input-group-btn:focus {
z-index: 1;
}
.obfx-wrapper .input-group .form-select {
width: auto;
}
.obfx-wrapper .input-group.input-inline {
display: -webkit-inline-box;
display: inline-flex;
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
}
.obfx-wrapper .form-input:disabled,
.obfx-wrapper .form-select:disabled,
.obfx-wrapper .form-input.disabled,
.obfx-wrapper .form-select.disabled {
opacity: 0.5;
background-color: #f0f1f4;
cursor: not-allowed;
}
.obfx-wrapper .form-input[readonly] {
background-color: #f8f9fa;
}
.obfx-wrapper input:disabled + .form-icon,
.obfx-wrapper input.disabled + .form-icon {
opacity: 0.5;
background: #f0f1f4;
cursor: not-allowed;
}
.obfx-wrapper .form-switch input:disabled + .form-icon::before,
.obfx-wrapper .form-switch input.disabled + .form-icon::before {
background: #fff;
}
.obfx-wrapper .form-horizontal {
padding: 1rem;
}
.obfx-wrapper .form-horizontal .form-group {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
}
.obfx-wrapper .form-horizontal .form-checkbox,
.obfx-wrapper .form-horizontal .form-radio,
.obfx-wrapper .form-horizontal .form-switch {
margin: 0.4rem 0;
}
.obfx-wrapper .label {
display: inline-block;
padding: 0.3rem 0.4rem;
border-radius: 0.2rem;
color: #5b657a;
background: #f8f9fa;
line-height: 1;
vertical-align: baseline;
}
.obfx-wrapper .label.label-primary {
color: #fff;
background: #5764c6;
}
.obfx-wrapper .label.label-success {
color: #fff;
background: #32b643;
}
.obfx-wrapper .label.label-warning {
color: #fff;
background: #ffb700;
}
.obfx-wrapper .label.label-error {
color: #fff;
background: #e85600;
}
.obfx-wrapper code {
display: inline-block;
padding: 0.3rem 0.4rem;
border-radius: 0.2rem;
color: #e06870;
background: #fdf4f4;
line-height: 1;
vertical-align: baseline;
}
.obfx-wrapper .code {
position: relative;
border-radius: 0.2rem;
color: #50596c;
line-height: 2rem;
}
.obfx-wrapper .code::before {
position: absolute;
top: 0.2rem;
right: 1rem;
color: #acb3c2;
font-size: 1.2rem;
content: attr(data-lang);
}
.obfx-wrapper .code code {
display: block;
overflow-x: auto;
width: 100%;
padding: 2rem;
color: inherit;
background: #f8f9fa;
line-height: inherit;
}
.obfx-wrapper .img-responsive {
display: block;
max-width: 100%;
height: auto;
}
.obfx-wrapper .img-fit-cover {
object-fit: cover;
}
.obfx-wrapper .img-fit-contain {
object-fit: contain;
}
.obfx-wrapper .video-responsive {
display: block;
overflow: hidden;
position: relative;
width: 100%;
padding: 0;
}
.obfx-wrapper .video-responsive::before {
display: block;
padding-bottom: 56.25%;
content: "";
}
.obfx-wrapper .video-responsive iframe,
.obfx-wrapper .video-responsive object,
.obfx-wrapper .video-responsive embed {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
}
.obfx-wrapper .video-responsive video {
width: 100%;
max-width: 100%;
height: auto;
}
.obfx-wrapper .video-responsive-4-3::before {
padding-bottom: 75%;
}
.obfx-wrapper .video-responsive-1-1::before {
padding-bottom: 100%;
}
.obfx-wrapper .figure {
margin: 0 0 1rem 0;
}
.obfx-wrapper .figure .figure-caption {
margin-top: 1rem;
color: #727e96;
}
.obfx-wrapper .container {
width: 100%;
margin-right: auto;
margin-left: auto;
padding-right: 1rem;
padding-left: 1rem;
}
.obfx-wrapper .container.grid-1280 {
max-width: 130rem;
}
.obfx-wrapper .container.grid-960 {
max-width: 98rem;
}
.obfx-wrapper .container.grid-480 {
max-width: 50rem;
}
.obfx-wrapper .columns {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
margin-right: -1rem;
margin-left: -1rem;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.obfx-wrapper .columns.col-gapless {
margin-right: 0;
margin-left: 0;
}
.obfx-wrapper .columns.col-gapless .column {
padding-right: 0;
padding-left: 0;
}
.obfx-wrapper .columns.col-oneline {
overflow-x: auto;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.obfx-wrapper .column {
max-width: 100%;
padding: 1rem;
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.obfx-wrapper .column.col-12,
.obfx-wrapper .column.col-11,
.obfx-wrapper .column.col-10,
.obfx-wrapper .column.col-9,
.obfx-wrapper .column.col-8,
.obfx-wrapper .column.col-7,
.obfx-wrapper .column.col-6,
.obfx-wrapper .column.col-5,
.obfx-wrapper .column.col-4,
.obfx-wrapper .column.col-3,
.obfx-wrapper .column.col-2,
.obfx-wrapper .column.col-1 {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.obfx-wrapper .col-12 {
width: 100%;
}
.obfx-wrapper .col-11 {
width: 91.66666667%;
}
.obfx-wrapper .col-10 {
width: 83.33333333%;
}
.obfx-wrapper .col-9 {
width: 75%;
}
.obfx-wrapper .col-8 {
width: 66.66666667%;
}
.obfx-wrapper .col-7 {
width: 58.33333333%;
}
.obfx-wrapper .col-6 {
width: 50%;
}
.obfx-wrapper .col-5 {
width: 41.66666667%;
}
.obfx-wrapper .col-4 {
width: 33.33333333%;
}
.obfx-wrapper .col-3 {
width: 25%;
}
.obfx-wrapper .col-2 {
width: 16.66666667%;
}
.obfx-wrapper .col-1 {
width: 8.33333333%;
}
.obfx-header {
border-top: 4px solid #5764c6;
}
.obfx-logo {
margin-right: 10px;
}
.obfx-header h1 {
margin-bottom: 0 !important;
letter-spacing: -0.025em;
}
@media screen and (max-width: 1280px) {
.obfx-wrapper .col-xl-12,
.obfx-wrapper .col-xl-11,
.obfx-wrapper .col-xl-10,
.obfx-wrapper .col-xl-9,
.obfx-wrapper .col-xl-8,
.obfx-wrapper .col-xl-7,
.obfx-wrapper .col-xl-6,
.obfx-wrapper .col-xl-5,
.obfx-wrapper .col-xl-4,
.obfx-wrapper .col-xl-3,
.obfx-wrapper .col-xl-2,
.obfx-wrapper .col-xl-1 {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.obfx-wrapper .col-xl-12 {
width: 100%;
}
.obfx-wrapper .col-xl-11 {
width: 91.66666667%;
}
.obfx-wrapper .col-xl-10 {
width: 83.33333333%;
}
.obfx-wrapper .col-xl-9 {
width: 75%;
}
.obfx-wrapper .col-xl-8 {
width: 66.66666667%;
}
.obfx-wrapper .col-xl-7 {
width: 58.33333333%;
}
.obfx-wrapper .col-xl-6 {
width: 50%;
}
.obfx-wrapper .col-xl-5 {
width: 41.66666667%;
}
.obfx-wrapper .col-xl-4 {
width: 33.33333333%;
}
.obfx-wrapper .col-xl-3 {
width: 25%;
}
.obfx-wrapper .col-xl-2 {
width: 16.66666667%;
}
.obfx-wrapper .col-xl-1 {
width: 8.33333333%;
}
}
@media screen and (max-width: 960px) {
.obfx-wrapper .col-lg-12,
.obfx-wrapper .col-lg-11,
.obfx-wrapper .col-lg-10,
.obfx-wrapper .col-lg-9,
.obfx-wrapper .col-lg-8,
.obfx-wrapper .col-lg-7,
.obfx-wrapper .col-lg-6,
.obfx-wrapper .col-lg-5,
.obfx-wrapper .col-lg-4,
.obfx-wrapper .col-lg-3,
.obfx-wrapper .col-lg-2,
.obfx-wrapper .col-lg-1 {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.obfx-wrapper .col-lg-12 {
width: 100%;
}
.obfx-wrapper .col-lg-11 {
width: 91.66666667%;
}
.obfx-wrapper .col-lg-10 {
width: 83.33333333%;
}
.obfx-wrapper .col-lg-9 {
width: 75%;
}
.obfx-wrapper .col-lg-8 {
width: 66.66666667%;
}
.obfx-wrapper .col-lg-7 {
width: 58.33333333%;
}
.obfx-wrapper .col-lg-6 {
width: 50%;
}
.obfx-wrapper .col-lg-5 {
width: 41.66666667%;
}
.obfx-wrapper .col-lg-4 {
width: 33.33333333%;
}
.obfx-wrapper .col-lg-3 {
width: 25%;
}
.obfx-wrapper .col-lg-2 {
width: 16.66666667%;
}
.obfx-wrapper .col-lg-1 {
width: 8.33333333%;
}
}
@media screen and (max-width: 840px) {
.obfx-wrapper .col-md-12,
.obfx-wrapper .col-md-11,
.obfx-wrapper .col-md-10,
.obfx-wrapper .col-md-9,
.obfx-wrapper .col-md-8,
.obfx-wrapper .col-md-7,
.obfx-wrapper .col-md-6,
.obfx-wrapper .col-md-5,
.obfx-wrapper .col-md-4,
.obfx-wrapper .col-md-3,
.obfx-wrapper .col-md-2,
.obfx-wrapper .col-md-1 {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.obfx-wrapper .col-md-12 {
width: 100%;
}
.obfx-wrapper .col-md-11 {
width: 91.66666667%;
}
.obfx-wrapper .col-md-10 {
width: 83.33333333%;
}
.obfx-wrapper .col-md-9 {
width: 75%;
}
.obfx-wrapper .col-md-8 {
width: 66.66666667%;
}
.obfx-wrapper .col-md-7 {
width: 58.33333333%;
}
.obfx-wrapper .col-md-6 {
width: 50%;
}
.obfx-wrapper .col-md-5 {
width: 41.66666667%;
}
.obfx-wrapper .col-md-4 {
width: 33.33333333%;
}
.obfx-wrapper .col-md-3 {
width: 25%;
}
.obfx-wrapper .col-md-2 {
width: 16.66666667%;
}
.obfx-wrapper .col-md-1 {
width: 8.33333333%;
}
}
@media screen and (max-width: 600px) {
.obfx-wrapper .col-sm-12,
.obfx-wrapper .col-sm-11,
.obfx-wrapper .col-sm-10,
.obfx-wrapper .col-sm-9,
.obfx-wrapper .col-sm-8,
.obfx-wrapper .col-sm-7,
.obfx-wrapper .col-sm-6,
.obfx-wrapper .col-sm-5,
.obfx-wrapper .col-sm-4,
.obfx-wrapper .col-sm-3,
.obfx-wrapper .col-sm-2,
.obfx-wrapper .col-sm-1 {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.obfx-wrapper .col-sm-12 {
width: 100%;
}
.obfx-wrapper .col-sm-11 {
width: 91.66666667%;
}
.obfx-wrapper .col-sm-10 {
width: 83.33333333%;
}
.obfx-wrapper .col-sm-9 {
width: 75%;
}
.obfx-wrapper .col-sm-8 {
width: 66.66666667%;
}
.obfx-wrapper .col-sm-7 {
width: 58.33333333%;
}
.obfx-wrapper .col-sm-6 {
width: 50%;
}
.obfx-wrapper .col-sm-5 {
width: 41.66666667%;
}
.obfx-wrapper .col-sm-4 {
width: 33.33333333%;
}
.obfx-wrapper .col-sm-3 {
width: 25%;
}
.obfx-wrapper .col-sm-2 {
width: 16.66666667%;
}
.obfx-wrapper .col-sm-1 {
width: 8.33333333%;
}
}
@media screen and (max-width: 480px) {
.obfx-wrapper .col-xs-12,
.obfx-wrapper .col-xs-11,
.obfx-wrapper .col-xs-10,
.obfx-wrapper .col-xs-9,
.obfx-wrapper .col-xs-8,
.obfx-wrapper .col-xs-7,
.obfx-wrapper .col-xs-6,
.obfx-wrapper .col-xs-5,
.obfx-wrapper .col-xs-4,
.obfx-wrapper .col-xs-3,
.obfx-wrapper .col-xs-2,
.obfx-wrapper .col-xs-1 {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.obfx-wrapper .col-xs-12 {
width: 100%;
}
.obfx-wrapper .col-xs-11 {
width: 91.66666667%;
}
.obfx-wrapper .col-xs-10 {
width: 83.33333333%;
}
.obfx-wrapper .col-xs-9 {
width: 75%;
}
.obfx-wrapper .col-xs-8 {
width: 66.66666667%;
}
.obfx-wrapper .col-xs-7 {
width: 58.33333333%;
}
.obfx-wrapper .col-xs-6 {
width: 50%;
}
.obfx-wrapper .col-xs-5 {
width: 41.66666667%;
}
.obfx-wrapper .col-xs-4 {
width: 33.33333333%;
}
.obfx-wrapper .col-xs-3 {
width: 25%;
}
.obfx-wrapper .col-xs-2 {
width: 16.66666667%;
}
.obfx-wrapper .col-xs-1 {
width: 8.33333333%;
}
}
.obfx-wrapper .show-xs,
.obfx-wrapper .show-sm,
.obfx-wrapper .show-md,
.obfx-wrapper .show-lg,
.obfx-wrapper .show-xl {
display: none !important;
}
@media screen and (max-width: 480px) {
.obfx-wrapper .hide-xs {
display: none !important;
}
.obfx-wrapper .show-xs {
display: block !important;
}
}
@media screen and (max-width: 600px) {
.obfx-wrapper .hide-sm {
display: none !important;
}
.obfx-wrapper .show-sm {
display: block !important;
}
}
@media screen and (max-width: 840px) {
.obfx-wrapper .hide-md {
display: none !important;
}
.obfx-wrapper .show-md {
display: block !important;
}
}
@media screen and (max-width: 960px) {
.obfx-wrapper .hide-lg {
display: none !important;
}
.obfx-wrapper .show-lg {
display: block !important;
}
}
@media screen and (max-width: 1280px) {
.obfx-wrapper .hide-xl {
display: none !important;
}
.obfx-wrapper .show-xl {
display: block !important;
}
}
.obfx-wrapper .navbar {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
-webkit-align-items: stretch;
align-items: stretch;
-webkit-box-align: stretch;
-webkit-box-pack: justify;
-ms-flex-align: stretch;
-ms-flex-pack: justify;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.obfx-wrapper .navbar .navbar-section {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
-webkit-align-items: center;
align-items: center;
-webkit-box-align: center;
-webkit-box-flex: 1;
-webkit-flex: 1 0 0;
-ms-flex: 1 0 0;
flex: 1 0 0;
-ms-flex-align: center;
}
.obfx-wrapper .navbar .navbar-section:last-child {
-webkit-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.obfx-wrapper .navbar .navbar-center {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
-webkit-align-items: center;
align-items: center;
-webkit-box-align: center;
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
-ms-flex-align: center;
}
.obfx-wrapper .navbar .navbar-brand {
font-size: 1.6rem;
font-weight: 500;
text-decoration: none;
}
.obfx-wrapper .panel {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
flex-direction: column;
border: 0.1rem solid #f0f1f4;
border-radius: 0.2rem;
-webkit-box-direction: normal;
-webkit-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
}
.obfx-wrapper .panel .panel-header,
.obfx-wrapper .panel .panel-footer {
padding: 1.5rem;
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
}
.obfx-wrapper .panel .panel-nav {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
}
.obfx-wrapper .panel .panel-body {
overflow-y: auto;
padding: 0 1.5rem;
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.obfx-wrapper .panel .panel-title {
font-size: 2rem;
}
.obfx-wrapper .panel .panel-subtitle {
color: #50595E;
}
.obfx-wrapper .empty {
padding: 4rem;
border-radius: 0.2rem;
color: #727e96;
background: #f8f9fa;
text-align: center;
}
.obfx-wrapper .empty .empty-title,
.obfx-wrapper .empty .empty-subtitle {
margin: 1rem auto;
}
.obfx-wrapper .empty .empty-subtitle {
color: #bbc1cd;
}
.obfx-wrapper .empty .empty-action {
margin-top: 1.5rem;
}
.obfx-wrapper .form-autocomplete {
position: relative;
}
.obfx-wrapper .form-autocomplete .form-autocomplete-input {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
height: auto;
min-height: 3.2rem;
padding: 0.1rem 0 0 0.1rem;
-webkit-align-content: flex-start;
align-content: flex-start;
-ms-flex-line-pack: start;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.obfx-wrapper .form-autocomplete .form-autocomplete-input.is-focused {
border-color: #5764c6;
box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
}
.obfx-wrapper .form-autocomplete .form-autocomplete-input .form-input {
display: inline-block;
width: auto;
height: 2.8rem;
padding: 0.3rem 0.8rem;
border-color: transparent;
box-shadow: none;
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
.obfx-wrapper .form-autocomplete mark {
padding: 0.1em 0;
font-size: 1em;
}
.obfx-wrapper .form-autocomplete .menu {
position: absolute;
top: 100%;
left: 0;
width: 100%;
}
.obfx-wrapper .avatar {
display: inline-block;
position: relative;
width: 3.2rem;
height: 3.2rem;
margin: 0;
border-radius: 50%;
color: rgba(255, 255, 255, 0.85);
background: #5764c6;
font-size: 1.4rem;
font-weight: 300;
line-height: 1;
vertical-align: middle;
}
.obfx-wrapper .avatar.avatar-xs {
width: 1.6rem;
height: 1.6rem;
font-size: 0.8rem;
}
.obfx-wrapper .avatar.avatar-sm {
width: 2.4rem;
height: 2.4rem;
font-size: 1rem;
}
.obfx-wrapper .avatar.avatar-lg {
width: 4.8rem;
height: 4.8rem;
font-size: 2rem;
}
.obfx-wrapper .avatar.avatar-xl {
width: 6.4rem;
height: 6.4rem;
font-size: 2.6rem;
}
.obfx-wrapper .avatar img {
position: relative;
z-index: 100;
width: 100%;
height: 100%;
border-radius: 50%;
}
.obfx-wrapper .avatar .avatar-icon {
position: absolute;
right: 14.64%;
bottom: 14.64%;
width: 50%;
height: 50%;
padding: 0.2rem;
background: #fff;
-webkit-transform: translate(50%, 50%);
-ms-transform: translate(50%, 50%);
transform: translate(50%, 50%);
}
.obfx-wrapper .avatar[data-initial]::before {
position: absolute;
z-index: 1;
top: 50%;
left: 50%;
color: currentColor;
content: attr(data-initial);
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.obfx-wrapper .badge {
position: relative;
white-space: nowrap;
}
.obfx-wrapper .badge[data-badge]::after,
.obfx-wrapper .badge:not([data-badge])::after {
display: inline-block;
border-radius: 1rem;
color: #fff;
background: #5764c6;
background-clip: padding-box;
box-shadow: 0 0 0 0.2rem #fff;
content: attr(data-badge);
-webkit-transform: translate(-0.2rem, -1rem);
-ms-transform: translate(-0.2rem, -1rem);
transform: translate(-0.2rem, -1rem);
}
.obfx-wrapper .badge[data-badge]::after {
min-width: 1.8rem;
height: 1.8rem;
padding: 0.3rem 0.5rem;
font-size: 1.2rem;
line-height: 1;
text-align: center;
white-space: nowrap;
}
.obfx-wrapper .badge:not([data-badge])::after,
.obfx-wrapper .badge[data-badge=""]::after {
width: 0.6rem;
min-width: 0.6rem;
height: 0.6rem;
padding: 0;
}
.obfx-wrapper .badge.btn::after {
position: absolute;
top: 0;
right: 0;
-webkit-transform: translate(50%, -50%);
-ms-transform: translate(50%, -50%);
transform: translate(50%, -50%);
}
.obfx-wrapper .badge.avatar::after {
position: absolute;
z-index: 100;
top: 14.64%;
right: 14.64%;
-webkit-transform: translate(50%, -50%);
-ms-transform: translate(50%, -50%);
transform: translate(50%, -50%);
}
.obfx-wrapper .badge.avatar-xs::after {
width: 0.8rem;
min-width: 0.8rem;
height: 0.8rem;
padding: 0;
content: "";
}
.obfx-wrapper .bar {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
width: 100%;
height: 1.6rem;
border-radius: 0.2rem;
background: #f0f1f4;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.obfx-wrapper .bar.bar-sm {
height: 0.4rem;
}
.obfx-wrapper .bar .bar-item {
display: block;
position: relative;
width: 0;
height: 100%;
padding: 0.2rem 0;
color: #fff;
background: #5764c6;
font-size: 1.2rem;
line-height: 1;
text-align: center;
-ms-flex-negative: 0;
-webkit-flex-shrink: 0;
flex-shrink: 0;
}
.obfx-wrapper .bar .bar-item:first-child {
border-top-left-radius: 0.2rem;
border-bottom-left-radius: 0.2rem;
}
.obfx-wrapper .bar .bar-item:last-child {
border-top-right-radius: 0.2rem;
border-bottom-right-radius: 0.2rem;
-ms-flex-negative: 1;
-webkit-flex-shrink: 1;
flex-shrink: 1;
}
.obfx-wrapper .bar-slider {
position: relative;
height: 0.2rem;
margin: 1rem 0;
}
.obfx-wrapper .bar-slider .bar-item {
position: absolute;
left: 0;
padding: 0;
}
.obfx-wrapper .bar-slider .bar-item:not(:last-child):first-child {
z-index: 1;
background: #f0f1f4;
}
.obfx-wrapper .bar-slider .bar-slider-btn {
position: absolute;
top: 50%;
right: 0;
width: 1.2rem;
height: 1.2rem;
padding: 0;
border: 0;
border-radius: 50%;
background: #5764c6;
-webkit-transform: translate(50%, -50%);
-ms-transform: translate(50%, -50%);
transform: translate(50%, -50%);
}
.obfx-wrapper .bar-slider .bar-slider-btn:active {
box-shadow: 0 0 0 0.2rem #5764c6;
}
.obfx-wrapper .card {
display: block;
border: 0.1rem solid #f0f1f4;
border-radius: 0.2rem;
background: #fff;
}
.obfx-wrapper .card .card-header,
.obfx-wrapper .card .card-body,
.obfx-wrapper .card .card-footer {
padding: 1.5rem;
padding-bottom: 0;
}
.obfx-wrapper .card .card-header:last-child,
.obfx-wrapper .card .card-body:last-child,
.obfx-wrapper .card .card-footer:last-child {
padding-bottom: 1.5rem;
}
.obfx-wrapper .card .card-image {
padding-top: 1.5rem;
}
.obfx-wrapper .card .card-image:first-child {
padding-top: 0;
}
.obfx-wrapper .card .card-image:first-child img {
border-top-left-radius: 0.2rem;
border-top-right-radius: 0.2rem;
}
.obfx-wrapper .card .card-image:last-child img {
border-bottom-right-radius: 0.2rem;
border-bottom-left-radius: 0.2rem;
}
.obfx-wrapper .card .card-title {
font-size: 2rem;
}
.obfx-wrapper .card .card-subtitle {
color: #bbc1cd;
font-size: 1.2rem;
}
.obfx-wrapper .chip {
display: -ms-inline-flexbox;
display: -webkit-inline-box;
display: inline-flex;
display: -webkit-inline-flex;
max-width: 100%;
height: 2.8rem;
margin: 0 0.1rem 0.1rem 0;
padding: 0.1rem 0.8rem;
border-radius: 0.2rem;
color: #727e96;
background: #f0f1f4;
vertical-align: middle;
text-decoration: none;
-webkit-align-items: center;
align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
}
.obfx-wrapper .chip.active {
color: #fff;
background: #5764c6;
}
.obfx-wrapper .chip .avatar {
margin-right: 0.4rem;
margin-left: -0.4rem;
}
.obfx-wrapper .dropdown {
display: inline-block;
position: relative;
}
.obfx-wrapper .dropdown .menu {
display: none;
position: absolute;
top: 100%;
left: 0;
-webkit-animation: slide-down 0.2s ease 1;
animation: slide-down 0.2s ease 1;
}
.obfx-wrapper .dropdown.dropdown-right .menu {
right: 0;
left: auto;
}
.obfx-wrapper .dropdown.active .menu,
.obfx-wrapper .dropdown .dropdown-toggle:focus + .menu,
.obfx-wrapper .dropdown .menu:hover {
display: block;
}
.obfx-wrapper .dropdown .btn-group .dropdown-toggle:nth-last-child(2) {
border-top-right-radius: 0.2rem;
border-bottom-right-radius: 0.2rem;
}
.obfx-wrapper .menu {
z-index: 100;
min-width: 18rem;
margin: 0;
padding: 1rem;
border-radius: 0.2rem;
background: #fff;
box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
list-style: none;
-webkit-transform: translateY(0.5rem);
-ms-transform: translateY(0.5rem);
transform: translateY(0.5rem);
}
.obfx-wrapper .menu .menu-item {
margin-top: 0;
padding: 0 0.8rem;
text-decoration: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.obfx-wrapper .menu .menu-item > a {
display: block;
margin: 0 -0.8rem;
padding: 0.6rem 0.8rem;
border-radius: 0.2rem;
color: inherit;
text-decoration: none;
}
.obfx-wrapper .menu .menu-item > a:focus,
.obfx-wrapper .menu .menu-item > a:hover {
color: #5764c6;
}
.obfx-wrapper .menu .menu-item > a:active,
.obfx-wrapper .menu .menu-item > a.active {
color: #5764c6;
background: #fbfbfe;
}
.obfx-wrapper .menu .menu-badge {
float: right;
padding: 0.6rem 0;
}
.obfx-wrapper .menu .menu-badge .btn {
margin-top: -0.2rem;
}
.obfx-wrapper .modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
opacity: 0;
-webkit-align-items: center;
align-items: center;
-webkit-box-align: center;
-webkit-box-pack: center;
-ms-flex-align: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.obfx-wrapper .modal:target,
.obfx-wrapper .modal.active {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
z-index: 400;
opacity: 1;
}
.obfx-wrapper .modal:target .modal-overlay,
.obfx-wrapper .modal.active .modal-overlay {
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(69, 77, 93, 0.5);
cursor: default;
}
.obfx-wrapper .modal:target .modal-container,
.obfx-wrapper .modal.active .modal-container {
z-index: 1;
max-width: 64rem;
-webkit-animation: slide-down 0.2s ease 1;
animation: slide-down 0.2s ease 1;
}
.obfx-wrapper .modal.modal-sm .modal-container {
max-width: 32rem;
}
.obfx-wrapper .modal-container {
display: block;
padding: 1rem 0.8rem;
border-radius: 0.2rem;
background: #fff;
box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
text-align: left;
}
.obfx-wrapper .modal-container .modal-header {
padding: 1.5rem;
}
.obfx-wrapper .modal-container .modal-header .modal-title {
margin: 0;
font-size: 1.6rem;
}
.obfx-wrapper .modal-container .modal-body {
overflow-y: auto;
position: relative;
max-height: 50vh;
padding: 1.5rem;
}
.obfx-wrapper .modal-container .modal-footer {
padding: 1.5rem;
text-align: right;
}
.obfx-wrapper .breadcrumb,
.obfx-wrapper .tab,
.obfx-wrapper .pagination,
.obfx-wrapper .nav {
margin: 0.5rem 0;
list-style: none;
}
.obfx-wrapper .breadcrumb {
padding: 1.2rem;
}
.obfx-wrapper .breadcrumb .breadcrumb-item {
display: inline-block;
margin: 0;
}
.obfx-wrapper .breadcrumb .breadcrumb-item:last-child {
color: #acb3c2;
}
.obfx-wrapper .breadcrumb .breadcrumb-item:not(:first-child)::before {
padding: 0 0.4rem;
color: #e7e9ed;
content: "/";
}
.obfx-wrapper .tab {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
-webkit-align-items: center;
align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.obfx-wrapper .tab .tab-item {
margin-top: 0;
}
.obfx-wrapper .tab .tab-item.tab-action {
text-align: right;
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
.obfx-wrapper .tab .tab-item a {
display: block;
margin-top: 0;
padding: 0.6rem 1.2rem 0.4rem 1.2rem;
border-bottom: 0.2rem solid transparent;
color: inherit;
text-decoration: none;
}
.obfx-wrapper .tab .tab-item a:focus,
.obfx-wrapper .tab .tab-item a:hover {
color: #5764c6;
}
.obfx-wrapper .tab .tab-item.active a,
.obfx-wrapper .tab .tab-item a.active {
border-bottom-color: #5764c6;
color: #5764c6;
}
.obfx-wrapper .tab.tab-block .tab-item {
text-align: center;
-webkit-box-flex: 1;
-webkit-flex: 1 0 0;
-ms-flex: 1 0 0;
flex: 1 0 0;
}
.obfx-wrapper .tab.tab-block .tab-item .badge[data-badge]::after {
position: absolute;
top: -0.4rem;
right: -0.4rem;
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
transform: translate(0, 0);
}
.obfx-wrapper .tab:not(.tab-block) .badge {
padding-right: 0.2rem;
}
.obfx-wrapper .pagination {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
}
.obfx-wrapper .pagination .page-item {
margin: 1rem 0.1rem;
}
.obfx-wrapper .pagination .page-item span {
display: inline-block;
padding: 0.6rem 0.4rem;
}
.obfx-wrapper .pagination .page-item a {
display: inline-block;
padding: 0.6rem 0.8rem;
border-radius: 0.2rem;
color: #727e96;
text-decoration: none;
}
.obfx-wrapper .pagination .page-item a:focus,
.obfx-wrapper .pagination .page-item a:hover {
color: #5764c6;
}
.obfx-wrapper .pagination .page-item a[disabled],
.obfx-wrapper .pagination .page-item a.disabled {
opacity: 0.5;
cursor: default;
pointer-events: none;
}
.obfx-wrapper .pagination .page-item.active a {
color: #fff;
background: #5764c6;
}
.obfx-wrapper .pagination .page-item.page-prev,
.obfx-wrapper .pagination .page-item.page-next {
-webkit-box-flex: 1;
-webkit-flex: 1 0 50%;
-ms-flex: 1 0 50%;
flex: 1 0 50%;
}
.obfx-wrapper .pagination .page-item.page-next {
text-align: right;
}
.obfx-wrapper .pagination .page-item .page-item-title {
margin: 0;
}
.obfx-wrapper .pagination .page-item .page-item-subtitle {
margin: 0;
opacity: 0.5;
}
.obfx-wrapper .nav {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
flex-direction: column;
-webkit-box-direction: normal;
-webkit-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
}
.obfx-wrapper .nav .nav-item a {
padding: 0.6rem 0.8rem;
color: #727e96;
text-decoration: none;
}
.obfx-wrapper .nav .nav-item a:focus,
.obfx-wrapper .nav .nav-item a:hover {
color: #5764c6;
}
.obfx-wrapper .nav .nav-item.active > a {
font-weight: bold;
}
.obfx-wrapper .nav .nav-item.active > a:focus,
.obfx-wrapper .nav .nav-item.active > a:hover {
color: #5764c6;
}
.obfx-wrapper .nav .nav {
margin-bottom: 1rem;
margin-left: 2rem;
}
.obfx-wrapper .nav .nav a {
color: #acb3c2;
}
.obfx-wrapper .popover {
display: inline-block;
position: relative;
}
.obfx-wrapper .popover .popover-container {
position: absolute;
z-index: 400;
top: 0;
left: 50%;
width: 32rem;
padding: 1rem;
opacity: 0;
content: attr(data-tooltip);
-webkit-transition: -webkit-transform 0.2s ease;
transition: transform 0.2s ease, -webkit-transform 0.2s ease;
transition: transform 0.2s ease;
transition: -webkit-transform 0.2s ease;
-webkit-transform: translate(-50%, -50%) scale(0);
-ms-transform: translate(-50%, -50%) scale(0);
transform: translate(-50%, -50%) scale(0);
}
.obfx-wrapper .popover :focus + .popover-container,
.obfx-wrapper .popover:hover .popover-container,
.obfx-wrapper .popover .popover-container:hover {
display: block;
opacity: 1;
-webkit-transform: translate(-50%, -100%) scale(1);
-ms-transform: translate(-50%, -100%) scale(1);
transform: translate(-50%, -100%) scale(1);
}
.obfx-wrapper .popover.popover-right .popover-container {
top: 50%;
left: 100%;
}
.obfx-wrapper .popover.popover-right :focus + .popover-container,
.obfx-wrapper .popover.popover-right:hover .popover-container,
.obfx-wrapper .popover.popover-right .popover-container:hover {
-webkit-transform: translate(0, -50%) scale(1);
-ms-transform: translate(0, -50%) scale(1);
transform: translate(0, -50%) scale(1);
}
.obfx-wrapper .popover.popover-bottom .popover-container {
top: 100%;
left: 50%;
}
.obfx-wrapper .popover.popover-bottom :focus + .popover-container,
.obfx-wrapper .popover.popover-bottom:hover .popover-container,
.obfx-wrapper .popover.popover-bottom .popover-container:hover {
-webkit-transform: translate(-50%, 0) scale(1);
-ms-transform: translate(-50%, 0) scale(1);
transform: translate(-50%, 0) scale(1);
}
.obfx-wrapper .popover.popover-left .popover-container {
top: 50%;
left: 0;
}
.obfx-wrapper .popover.popover-left :focus + .popover-container,
.obfx-wrapper .popover.popover-left:hover .popover-container,
.obfx-wrapper .popover.popover-left .popover-container:hover {
-webkit-transform: translate(-100%, -50%) scale(1);
-ms-transform: translate(-100%, -50%) scale(1);
transform: translate(-100%, -50%) scale(1);
}
.obfx-wrapper .popover .card {
border: 0;
box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
}
.obfx-wrapper .step {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
width: 100%;
margin: 0.5rem 0;
list-style: none;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.obfx-wrapper .step .step-item {
position: relative;
min-height: 2rem;
margin-top: 0;
text-align: center;
-webkit-box-flex: 1;
-webkit-flex: 1 1 0;
-ms-flex: 1 1 0;
flex: 1 1 0;
}
.obfx-wrapper .step .step-item:not(:first-child)::before {
position: absolute;
top: 0.9rem;
left: -50%;
width: 100%;
height: 0.2rem;
background: #5764c6;
content: "";
}
.obfx-wrapper .step .step-item a {
display: inline-block;
padding: 2rem 1rem 0;
color: #acb3c2;
text-decoration: none;
}
.obfx-wrapper .step .step-item a::before {
display: block;
position: absolute;
z-index: 1;
top: 0.4rem;
left: 50%;
width: 1.2rem;
height: 1.2rem;
border: 0.2rem solid #fff;
border-radius: 50%;
background: #5764c6;
content: "";
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.obfx-wrapper .step .step-item.active a::before {
border: 0.2rem solid #5764c6;
background: #fff;
}
.obfx-wrapper .step .step-item.active ~ .step-item::before {
background: #f0f1f4;
}
.obfx-wrapper .step .step-item.active ~ .step-item a::before {
background: #e7e9ed;
}
.obfx-wrapper .tile {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
position: relative;
-webkit-align-content: space-between;
align-content: space-between;
-webkit-align-items: flex-start;
align-items: flex-start;
-webkit-box-align: start;
-ms-flex-align: start;
-ms-flex-line-pack: justify;
}
.obfx-wrapper .tile .tile-icon .dashicons{
line-height: 20px;
}
.obfx-wrapper .tile .tile-icon,
.obfx-wrapper .tile .tile-action {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
}
.obfx-wrapper .tile .dashicons {
transition: none;
line-height: 0.5;
}
.obfx-wrapper .tile .tile-content {
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.obfx-wrapper .tile .tile-content:not(:first-child) {
padding-left: 1rem;
}
.obfx-wrapper .tile .tile-content:not(:last-child) {
padding-right: 1rem;
}
.obfx-wrapper .tile .tile-title {
line-height: 2rem;
color: #3B49AF;
font-size: 1.3em;
font-weight: 600;
}
.obfx-wrapper .tile .tile-subtitle {
color: #bbc1cd;
line-height: 2rem;
color: #50595E;
font-size: 14px;
}
.obfx-wrapper .tile.tile-centered {
-webkit-align-items: center;
align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
}
.obfx-wrapper .tile.tile-centered .tile-content {
overflow: hidden;
}
.obfx-wrapper .tile.tile-centered .tile-title,
.obfx-wrapper .tile.tile-centered .tile-subtitle {
overflow: hidden;
margin-bottom: 0;
white-space: nowrap;
text-overflow: ellipsis;
}
.obfx-wrapper .toast {
display: block;
width: 100%;
padding: 1rem;
border: 0.1rem solid #454d5d;
border-color: #454d5d;
border-radius: 0.2rem;
color: #fff;
background: rgba(69, 77, 93, 0.9);
}
.obfx-wrapper .toast.toast-primary {
border-color: #5764c6;
background: rgba(87, 100, 198, 0.9);
}
.obfx-wrapper .toast.toast-success {
border-color: #32b643;
background: rgba(50, 182, 67, 0.9);
}
.obfx-wrapper .toast.toast-warning {
border-color: #ffb700;
background: rgba(255, 183, 0, 0.9);
}
.obfx-wrapper .toast.toast-error {
border-color: #e85600;
background: rgba(232, 86, 0, 0.9);
}
.obfx-wrapper .toast a {
color: #fff;
text-decoration: underline;
}
.obfx-wrapper .toast a:focus,
.obfx-wrapper .toast a:hover,
.obfx-wrapper .toast a:active,
.obfx-wrapper .toast a.active {
opacity: 0.75;
}
.obfx-wrapper .tooltip {
position: relative;
}
.obfx-wrapper .tooltip::after {
display: block;
overflow: hidden;
position: absolute;
z-index: 200;
bottom: 100%;
left: 50%;
max-width: 32rem;
padding: 0.4rem 0.8rem;
border-radius: 0.2rem;
opacity: 0;
color: #fff;
background: rgba(69, 77, 93, 0.9);
font-size: 1.2rem;
white-space: nowrap;
text-overflow: ellipsis;
content: attr(data-tooltip);
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
-webkit-transform: translate(-50%, 1rem);
-ms-transform: translate(-50%, 1rem);
transform: translate(-50%, 1rem);
pointer-events: none;
}
.obfx-wrapper .tooltip:focus::after,
.obfx-wrapper .tooltip:hover::after {
opacity: 1;
-webkit-transform: translate(-50%, -0.5rem);
-ms-transform: translate(-50%, -0.5rem);
transform: translate(-50%, -0.5rem);
}
.obfx-wrapper .tooltip[disabled],
.obfx-wrapper .tooltip.disabled {
pointer-events: auto;
}
.obfx-wrapper .tooltip.tooltip-right::after {
bottom: 50%;
left: 100%;
-webkit-transform: translate(-1rem, 50%);
-ms-transform: translate(-1rem, 50%);
transform: translate(-1rem, 50%);
}
.obfx-wrapper .tooltip.tooltip-right:focus::after,
.obfx-wrapper .tooltip.tooltip-right:hover::after {
-webkit-transform: translate(0.5rem, 50%);
-ms-transform: translate(0.5rem, 50%);
transform: translate(0.5rem, 50%);
}
.obfx-wrapper .tooltip.tooltip-bottom::after {
top: 100%;
bottom: auto;
-webkit-transform: translate(-50%, -1rem);
-ms-transform: translate(-50%, -1rem);
transform: translate(-50%, -1rem);
}
.obfx-wrapper .tooltip.tooltip-bottom:focus::after,
.obfx-wrapper .tooltip.tooltip-bottom:hover::after {
-webkit-transform: translate(-50%, 0.5rem);
-ms-transform: translate(-50%, 0.5rem);
transform: translate(-50%, 0.5rem);
}
.obfx-wrapper .tooltip.tooltip-left::after {
right: 100%;
bottom: 50%;
left: auto;
-webkit-transform: translate(1rem, 50%);
-ms-transform: translate(1rem, 50%);
transform: translate(1rem, 50%);
}
.obfx-wrapper .tooltip.tooltip-left:focus::after,
.obfx-wrapper .tooltip.tooltip-left:hover::after {
-webkit-transform: translate(-0.5rem, 50%);
-ms-transform: translate(-0.5rem, 50%);
transform: translate(-0.5rem, 50%);
}
@-webkit-keyframes loading {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loading {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes slide-down {
0% {
opacity: 0;
-webkit-transform: translateY(-3rem);
transform: translateY(-3rem);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes slide-down {
0% {
opacity: 0;
-webkit-transform: translateY(-3rem);
transform: translateY(-3rem);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
.obfx-wrapper .divider,
.obfx-wrapper .divider-vert {
display: block;
position: relative;
}
.obfx-wrapper .divider[data-content]::after,
.obfx-wrapper .divider-vert[data-content]::after {
display: inline-block;
padding: 0 0.8rem;
color: #e7e9ed;
background: #fff;
font-size: 1.2rem;
content: attr(data-content);
-webkit-transform: translateY(-1.1rem);
-ms-transform: translateY(-1.1rem);
transform: translateY(-1.1rem);
}
.obfx-wrapper .divider {
height: 0.1rem;
margin: 1rem 0;
border-top: 0.1rem solid #f0f1f4;
}
.obfx-wrapper .divider-vert {
display: block;
padding: 1rem;
}
.obfx-wrapper .divider-vert::before {
display: block;
position: absolute;
top: 1rem;
bottom: 1rem;
left: 50%;
border-left: 0.1rem solid #f0f1f4;
content: "";
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.obfx-wrapper .divider-vert[data-content]::after {
position: absolute;
top: 50%;
left: 50%;
padding: 0.4rem 0;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.obfx-wrapper .loading {
position: relative;
min-height: 1.6rem;
color: transparent !important;
pointer-events: none;
}
.obfx-wrapper .loading::after {
display: block;
position: absolute;
z-index: 1;
top: 50%;
left: 50%;
width: 1.6rem;
height: 1.6rem;
margin-top: -0.8rem;
margin-left: -0.8rem;
border: 0.2rem solid #5764c6;
border-top-color: transparent;
border-right-color: transparent;
border-radius: 0.8rem;
content: "";
-webkit-animation: loading 500ms infinite linear;
animation: loading 500ms infinite linear;
}
.obfx-wrapper .form-switch.activated span.inactive,
.obfx-wrapper .form-switch i.dashicons.dashicons-yes {
display: none;
}
.obfx-wrapper .form-switch.activated i.dashicons.dashicons-yes {
display: block;
color: #2faa3f;
}
.obfx-wrapper .clearfix::after,
.obfx-wrapper .container::after {
display: table;
clear: both;
content: "";
}
.obfx-wrapper .float-left {
float: left !important;
}
.obfx-wrapper .float-right {
float: right !important;
}
.obfx-wrapper .rel {
position: relative;
}
.obfx-wrapper .abs {
position: absolute;
}
.obfx-wrapper .fixed {
position: fixed;
}
.obfx-wrapper .centered {
display: block;
float: none;
margin-right: auto;
margin-left: auto;
}
.obfx-wrapper .mt-10 {
margin-top: 1rem;
}
.obfx-wrapper .mr-10 {
margin-right: 1rem;
}
.obfx-wrapper .mb-10 {
margin-bottom: 1rem;
}
.obfx-wrapper .ml-10 {
margin-left: 1rem;
}
.obfx-wrapper .mt-5 {
margin-top: 0.5rem;
}
.obfx-wrapper .mr-5 {
margin-right: 0.5rem;
}
.obfx-wrapper .mb-5 {
margin-bottom: 0.5rem;
}
.obfx-wrapper .ml-5 {
margin-left: 0.5rem;
}
.obfx-wrapper .pt-10 {
padding-top: 1rem;
}
.obfx-wrapper .pr-10 {
padding-right: 1rem;
}
.obfx-wrapper .pb-10 {
padding-bottom: 1rem;
}
.obfx-wrapper .pl-10 {
padding-left: 1rem;
}
.obfx-wrapper .pt-5 {
padding-top: 0.5rem;
}
.obfx-wrapper .pr-5 {
padding-right: 0.5rem;
}
.obfx-wrapper .pb-5 {
padding-bottom: 0.5rem;
}
.obfx-wrapper .pl-5 {
padding-left: 0.5rem;
}
.obfx-wrapper .block {
display: block;
}
.obfx-wrapper .inline {
display: inline;
}
.obfx-wrapper .inline-block {
display: inline-block;
}
.obfx-wrapper .flex {
display: -webkit-box;
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
}
.obfx-wrapper .inline-flex {
display: -webkit-inline-box;
display: inline-flex;
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
}
.obfx-wrapper .hide {
display: none !important;
}
.obfx-wrapper .visible {
visibility: visible;
}
.obfx-wrapper .invisible {
visibility: hidden;
}
.obfx-wrapper .text-hide {
border: 0;
color: transparent;
background: transparent;
text-shadow: none;
font-size: 0;
line-height: 0;
}
.obfx-wrapper .text-assistive {
overflow: hidden;
clip: rect(0, 0, 0, 0);
position: absolute;
width: 0.1rem;
height: 0.1rem;
margin: -0.1rem;
padding: 0;
border: 0;
}
.obfx-wrapper .text-left {
text-align: left;
}
.obfx-wrapper .text-right {
text-align: right;
}
.obfx-wrapper .text-center {
text-align: center;
}
.obfx-wrapper .text-justify {
text-align: justify;
}
.obfx-wrapper .text-lowercase {
text-transform: lowercase;
}
.obfx-wrapper .text-uppercase {
text-transform: uppercase;
}
.obfx-wrapper .text-capitalize {
text-transform: capitalize;
}
.obfx-wrapper .text-normal {
font-weight: normal;
}
.obfx-wrapper .text-bold {
font-weight: bold;
}
.obfx-wrapper .text-italic {
font-style: italic;
}
.obfx-wrapper .text-large {
font-size: 1.2em;
}
.obfx-wrapper .text-ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.obfx-wrapper .text-clip {
overflow: hidden;
white-space: nowrap;
text-overflow: clip;
}
.obfx-wrapper .text-break {
word-wrap: break-word;
word-break: break-word;
-webkit-hyphens: auto;
hyphens: auto;
-ms-hyphens: auto;
}
.obfx-wrapper .hand {
cursor: pointer;
}
.obfx-wrapper .shadow-0 {
box-shadow: 0 0 0.2rem rgba(69, 77, 93, 0.3);
}
.obfx-wrapper .shadow-1 {
box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
}
.obfx-wrapper .shadow-2 {
box-shadow: 0 0.2rem 0.6rem rgba(69, 77, 93, 0.3);
}
.obfx-wrapper .shadow-3 {
box-shadow: 0 0.3rem 0.8rem rgba(69, 77, 93, 0.3);
}
.obfx-wrapper .shadow-4 {
box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
}
.obfx-wrapper .rounded {
border-radius: 0.2rem;
}
.obfx-wrapper .circle {
border-radius: 50%;
}
.obfx-wrapper .panel .btn-expand.active {
-webkit-transition: transform 0.5s ease;
-webkit-transition: -webkit-transform 0.5s ease;
transition: -webkit-transform 0.5s ease;
transition: transform 0.5s ease;
transition: transform 0.5s ease, -webkit-transform 0.5s ease;
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.obfx-wrapper .panel.options .obfx-module-form.active {
display: block;
}
.obfx-wrapper .panel.options .obfx-module-form {
display: none;
}
.obfx-wrapper .panel.options.active {
max-height: 3000px;
}
.obfx-wrapper .panel.options {
overflow: hidden;
max-height: 90px;
-webkit-transition: max-height 0.3s ease-out;
transition: max-height 0.3s ease-out;
}
/** TEMPORARY FIX FOR SOCIAL SHARING STYLE **/
#obfx-mod-social-sharing .form-group.inline-setting {
display: inline-block;
}
#obfx-mod-social-sharing .form-group.inline-setting.network-toggle {
min-width: 300px;
}
#obfx-mod-social-sharing .form-group.inline-setting.last .form-label {
display: none;
}
#obfx-mod-social-sharing .show {
opacity: 1;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#obfx-mod-social-sharing .show.obfxHiddenOption {
opacity: 0;
cursor: default;
}
.obfx-row {
margin-bottom: 10px;
border-bottom: 1px solid #eee;
}
.obfx-google {
overflow: hidden;
position: relative;
top: -2px;
width: 16px;
max-width: 20px;
margin-right: 5px;
font-size: 25px;
}
@media ( max-width: 600px ) {
#obfx-mod-social-sharing .obfx-row .form-label {
margin-bottom: 20px;
font-weight: 600;
}
#obfx-mod-social-sharing .obfx-row .show .form-label {
display: none;
}
#obfx-mod-social-sharing .form-group.inline-setting.network-toggle {
display: block;
}
.obfx-row {
padding: 10px 0;
}
}
.obfx-wrapper p.obfx-beta-module {
color: #ca4a1f;
font-size: 80%;
line-height: 1.8rem;
text-align: center;
}
a.obfx-no-link:hover,
a.obfx-no-link{
color:#bbc1cd;
}
.obfx-tryout-message{
right: -15px;
font-size: 90%;
top: -9px;
position: absolute;
background: #5764c6;
padding: 5px;
border-bottom-left-radius: 10px;
}
.obfx-tile-image-cdn .tile-action{
margin-top: 35px;
}
.obfx-tryout-message a:hover,
.obfx-tryout-message a{
color: #fff;
text-decoration: none;
}
.obfx-title-new{
color:#2faa3f;
font-weight: bold;
}
.obfx-title-deprecated{
color:#ca4a1f;
font-weight: bold;
}
#obfx-mod-image-cdn sup.obfx-title-deprecated{
font-size:50%;
}
.obfx-img-logout {
position: relative;
top: -15px;
}
#obfx-register-service {
position: absolute;
left: 270px;
}
.obfx-loggedin-show {
display: none;
}
.obfx-img-logged-in.obfx-loggedin-hide {
display: none;
}
.obfx-img-logged-in.obfx-loggedin-show {
display: block;
}
.obfx-img-cdn-replacer-switch {
width: 70%;
}
.obfx-sf-feedback-notice {
width: 100%;
margin-bottom: 10px;
text-align: center;
}
.obfx-full-page-container{
display: flex;
width: 100%;
}
#obfx-modules-wrapper{
flex:1;
}
.obfx-sidebar.obfx-wrapper .panel .panel-header{
padding:3px;
}
.obfx-sidebar{
padding:7px;
width: 250px;
}
.obfx-wrapper .panel .panel-title{
text-align: left;
}
ul.obfx-menu-tabs{
border-bottom: 1px solid #f0f1f4;
padding-left: 0;
margin-left: 0;
}
.obfx-menu-tabs li:hover a,
.obfx-menu-tabs li.obfx-tab-active a{
color: #f0f1f4;
text-decoration: none;
transition: all 0.2 ease;
}
.obfx-menu-tabs li:hover,
.obfx-menu-tabs li.obfx-tab-active {
background: #5764c6;
color: #f0f1f4;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.obfx-menu-tabs li:last-child{
border:none;
}
.obfx-menu-tabs li a {
font-size: 1.75rem;
font-weight: 500;
}
.obfx-menu-tabs li{
border-top-left-radius: 5px;
border-top-right-radius: 5px;
margin-bottom: 0;
height: 38px;
padding: 4px 32px;
padding-bottom: 0;
width: auto;
display: inline-block;
list-style: none;
}
.obfx-recommended .button-primary{
background: #5764c6;
text-decoration: none;
padding: 10px 40px;
line-height: 7px;
box-shadow: none;
text-shadow: none;
}
.obfx-recommended .button-primary:hover {
background: #fff;
border-color: #5764c6;
color: #5764c6;
font-weight: 500;
text-decoration: none;
transition: 0.3s;
}
.wp-core-ui .button-primary:hover {
text-shadow: none;
}
.obfx-recommended .tile-title{
padding-top:15px;
margin-bottom: 0px;
}
.obfx-recommended .obfx-icon-recommended{
padding:10px;
}
.obfx-recommended img{
width:50px;
border-radius: 10px;
}
.obfx-recommended-title .dashicons.dashicons-editor-help{
float:right;
cursor: pointer;
}
.obfx-recommended-title{
font-size: 1.5rem;
text-align: left;
padding: 14px;
color: #3b49af;
}
p.obfx-recommended-disclosure{
text-align: right;
}
.obfx-recommended-title-wrapper .obfx-recommended-disclosure{
float:right;
padding:14px;
padding-top:0px;
}
.obfx-recommended-title-wrapper .obfx-recommended-title{
float:left;
padding-top:0px;
min-width: 250px;
}
.obfx-recommended-title-wrapper{
padding-bottom: 20px;
margin-left:16px;
}
includes/class-orbit-fox-neve-dropin.php 0000666 00000007407 15113270475 0014344 0 ustar 00 <?php
/**
*
* Drop-in file for neve recommendation.
*/
/**
* Class Droping for Neve recommandation.
*/
class Orbit_Fox_Neve_Dropin {
/**
* How long the notice will show since the user sees it.
*
* @var string Dismiss option key.
*/
const EXPIRATION = WEEK_IN_SECONDS;
/**
* Singleton object.
*
* @var null Instance object.
*/
protected static $instance = null;
/**
* Dismiss option key.
*
* @var string Dismiss option key.
*/
protected static $dismiss_key = 'neve_upsell_off';
/**
* Init the OrbitFox instance.
*
* @return Orbit_Fox_Neve_Dropin|null
*/
public static function instance() {
if ( is_null( self::$instance ) ) {
self::$instance = new self();
self::$instance->init();
}
return self::$instance;
}
/**
* Drop-in actions
*/
public function init() {
add_action( 'admin_notices', array( $this, 'admin_notice' ), defined( 'PHP_INT_MIN' ) ? PHP_INT_MIN : 99999 );
add_action( 'admin_init', array( $this, 'remove_notice' ), defined( 'PHP_INT_MIN' ) ? PHP_INT_MIN : 99999 );
}
/**
* Remove notice;
*/
public function remove_notice() {
if ( ! isset( $_GET[ self::$dismiss_key ] ) ) {
return;
}
if ( $_GET[ self::$dismiss_key ] !== 'yes' ) {
return;
}
if ( ! isset( $_GET['remove_upsell'] ) ) {
return;
}
if ( ! wp_verify_nonce( $_GET['remove_upsell'], 'remove_upsell_confirmation' ) ) {
return;
}
update_option( self::$dismiss_key, 'yes' );
}
/**
* Add notice.
*/
public function admin_notice() {
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}
if ( is_network_admin() ) {
return;
}
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
if ( get_option( self::$dismiss_key, 'no' ) === 'yes' ) {
return;
}
$theme = wp_get_theme();
if ( $theme->get( 'Name' ) === 'Neve' ) {
return;
}
// Dont show the notice if the plugin is recently installed.
$plugin_installed = get_option( 'themeisle_companion_install', '' );
if ( empty( $plugin_installed ) || ( time() - intval( $plugin_installed ) < DAY_IN_SECONDS ) ) {
return;
}
if ( ( $expiration = get_option( self::$dismiss_key . '_exp', '' ) ) === '' ) {
update_option( self::$dismiss_key . '_exp', time() );
}
// Let's dismiss the notice if the user sees it for more than 1 week.
if ( ! empty( $expiration ) && ( time() - intval( $expiration ) ) > self::EXPIRATION ) {
update_option( self::$dismiss_key, 'yes' );
return;
}
?>
<style type="text/css">
.neve-notice-upsell a {
text-decoration: none;
}
.neve-notice-upsell {
position: relative;
}
.theme-install-php #wpbody-content .wrap > .notice:not(.neve-notice-upsell),
.themes-php #wpbody-content .wrap > .notice:not(.neve-notice-upsell) {
display: none;
}
</style>
<div class="notice notice-success neve-notice-upsell">
<p>
<strong> Check the newest theme recommended by Orbit Fox</strong></p>
<p class="neve-upsell-text">
Fully AMP optimized and responsive, <strong>Neve</strong> will load in mere seconds and adapt
perfectly on any viewing device. Neve works perfectly with Gutenberg and the most popular page builders.
You will love it!
</p>
<p>
<a href="<?php echo esc_url( admin_url( 'theme-install.php?theme=neve' ) ); ?>" target="_blank"
class="button neve-upsell-try button-primary"><span class="dashicons dashicons-external"></span>Get
started</a></p>
<a href="<?php echo wp_nonce_url( add_query_arg( array( self::$dismiss_key => 'yes' ) ), 'remove_upsell_confirmation', 'remove_upsell' ); ?>"
class=" notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></a>
</div>
<?php
}
/**
* Deny clone.
*/
public function __clone() {
}
/**
* Deny un-serialize.
*/
public function __wakeup() {
}
}
.htaccess 0000666 00000000424 15113365434 0006353 0 ustar 00 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>