Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1,110 @@
<?php
if(isset($_GET['author']))
$author = true;
else
$author = false;
$author_extend = '';
if($author)
$author_extend = '&author';
?>
<div class="wrap about-wrap bsf-page-wrapper ultimate-about bend">
<div class="wrap-container">
<div class="bend-heading-section ultimate-header">
<h1><?php _e( "Ultimate Addons for WPBakery Page Builder", "ultimate_vc" ); ?></h1>
<h3><?php _e( "Welcome! You are about to begin with the most powerful addon for WPBakery Page Builder that add in many advanced features developed with love at Brainstorm Force.", "ultimate_vc" ); ?></h3>
<div class="bend-head-logo">
<div class="bend-product-ver">
<?php _e( "Version", "ultimate_vc" ); echo ' '.ULTIMATE_VERSION; ?>
</div>
</div>
</div><!-- bend-heading section -->
<div class="bend-content-wrap">
<div class="smile-settings-wrapper">
<h2 class="nav-tab-wrapper">
<a href="<?php echo admin_url('admin.php?page=about-ultimate'.$author_extend); ?>" data-tab="about-ultimate" class="nav-tab nav-tab-active"> <?php echo __('About','ultimate_vc'); ?> </a>
<a href="<?php echo admin_url('admin.php?page=ultimate-dashboard'.$author_extend); ?>" data-tab="ultimate-modules" class="nav-tab"> <?php echo __('Modules','ultimate_vc'); ?> </a>
<a href="<?php echo admin_url('admin.php?page=ultimate-smoothscroll'.$author_extend); ?>" data-tab="css-settings" class="nav-tab"> <?php echo __('Smooth Scroll','ultimate_vc'); ?> </a>
<a href="<?php echo admin_url('admin.php?page=ultimate-scripts-and-styles'.$author_extend); ?>" data-tab="css-settings" class="nav-tab"> <?php echo __('Scripts and Styles','ultimate_vc'); ?> </a>
<?php if($author) : ?>
<a href="<?php echo admin_url('admin.php?page=ultimate-debug-settings'); ?>" data-tab="ultimate-debug" class="nav-tab"> Debug </a>
<?php endif; ?>
</h2>
</div><!-- smile-settings-wrapper -->
</hr>
<div class="container ultimate-content">
<div class="row">
<div class="container bsf-grid-row" style="margin-top: 50px;">
<div class="col-sm-6 col-lg-6">
<div class="bsf-wrap-content">
<div class="bsf-wrap-left-icon">
<i class="dashicons dashicons-info abt-icon-style"></i>
</div><!--bsf-wrap-lefticon-->
<div class="bsf-wrap-right-content">
<h4 class="ult-addon-heading"><?php echo __('What is the Ultimate Addons for WPBakery Page Builder?','ultimate_vc'); ?></h4>
<p class="ult-addon-discription"><?php echo __('The Ultimate Addons for WPBakery Page Builder is developed to extend WPBakery Page Builder to save your time in building websites. This plugin adds a number of elements to the basic set of elements that come with the page builder. All these elements are added to your WPBakery Page Builder editor and can be used just like any other built-in features.','ultimate_vc'); ?></p>
<p class="ult-addon-discription"><?php echo __('Info Box, Fancy Text, Interactive Banner, Flip Box, Info Circle are just some popular elements you can try now.','ultimate_vc'); ?></p>
</div><!--bsf-wrap-right-content-->
</div><!--bsf wrap content-->
<div class="bsf-wrap-content">
<div class="bsf-wrap-left-icon">
<i class="dashicons dashicons-universal-access-alt abt-icon-style"></i>
</div><!--bsf-wrap-lefticon-->
<div class="bsf-wrap-right-content">
<h4 class="ult-addon-heading"><?php echo __('We stand by you!','ultimate_vc'); ?></h4>
<p class="ult-addon-discription"><?php echo __('With','ultimate_vc'); ?> <a target="_blank" href="https://www.youtube.com/playlist?list=PL1kzJGWGPrW9CDWwdAWrd_9YQsh1z7u6O"><?php echo __('several video tutorials','ultimate_vc'); ?></a> <?php echo __('and a','ultimate_vc'); ?> <a target="_blank" href="https://ultimate.brainstormforce.com/support/"><?php echo __('dedicated support team','ultimate_vc'); ?></a>,<?php echo __(' we assure complete help and support whenever you need us.','ultimate_vc'); ?></p>
<p class="ult-addon-discription"><?php echo __('Go ahead and explore the Ultimate elements of the Ultimate Addons for WPBakery Page Builder!','ultimate_vc'); ?></p>
</div><!--bsf-wrap-right-content-->
</div><!--bsf wrap content-->
</div><!--vc_col-sm-6-->
<div class="col-sm-6 col-lg-6">
<div class="bsf-wrap-content">
<div class="bsf-wrap-left-icon">
<i class="dashicons dashicons-layout abt-icon-style"></i>
</div><!--bsf-wrap-lefticon-->
<div class="bsf-wrap-right-content">
<h4 class="ult-addon-heading"><?php echo __('Advanced Elements','ultimate_vc'); ?></h4>
<p class="ult-addon-discription"><?php echo __('With the Ultimate Addons, you are free to use the basic elements of WPBakery Page Builder with','ultimate_vc'); ?> <a target="_blank" href="https://cloudup.com/ce1eKqH_PDp"><?php echo __('several advanced elements','ultimate_vc'); ?></a> <?php echo __('that it adds in the editor.','ultimate_vc'); ?></p>
</div><!--bsf-wrap-right-content-->
</div><!--bsf wrap content-->
<div class="bsf-wrap-content">
<div class="bsf-wrap-left-icon">
<i class="dashicons dashicons-playlist-video abt-icon-style"></i>
</div><!--bsf-wrap-lefticon-->
<div class="bsf-wrap-right-content">
<h4 class="ult-addon-heading"><?php echo __('Row Features (Parallax / Video Background)','ultimate_vc'); ?></h4>
<p class="ult-addon-discription"><?php echo __('Tired of the plain old rows that the page builder offers? You can now add','ultimate_vc'); ?> <a target="_blank" href="https://ultimate.brainstormforce.com/backgrounds/"><?php echo __('amazing parallax effects','ultimate_vc'); ?></a> <?php echo __('on your website. Now','ultimate_vc'); ?> <a target="_blank" href="https://cloudup.com/cwZLz6UYl9r"><?php echo __('edit your row','ultimate_vc'); ?></a> <?php echo __('and see what you\'ve got! Almost all kinds of parallax effects, video background, row separator and much more…','ultimate_vc'); ?></p>
</div><!--bsf-wrap-right-content-->
</div><!--bsf wrap content-->
<div class="bsf-wrap-content">
<div class="bsf-wrap-left-icon">
<i class="dashicons dashicons-thumbs-up abt-icon-style"></i>
</div><!--bsf-wrap-lefticon-->
<div class="bsf-wrap-right-content">
<h4 class="ult-addon-heading"><?php echo __('Google Fonts / Icons Font','ultimate_vc'); ?></h4>
<p class="ult-addon-discription"><?php echo __('We\'ve shipped about 360 useful icons that you can use in most of the Ultimate elements. That\'s not it! The Icon Font Manager within the plugin introduces several font icons that can be easily used with WPBakery Page Builder. We also have a built-in Google Fonts manager to help you shortlist the text fonts of your choice and use them with any of Ultimate Addon elements.','ultimate_vc'); ?></p>
</div><!--bsf-wrap-right-content-->
</div><!--bsf wrap content-->
</div><!--vc_col-sm-6-->
</div><!--container end-->
</div><!--col-md-12-->
</div><!-- .ultimate-content -->
</div><!-- bend-content-wrap -->
</div><!-- .wrap-container -->
</div><!-- .bend -->
@@ -0,0 +1,803 @@
<?php
// BSF CORE commom functions
if(!function_exists('bsf_get_option')) {
function bsf_get_option($request = false) {
$bsf_options = get_option('bsf_options');
if(!$request)
return $bsf_options;
else
return (isset($bsf_options[$request])) ? $bsf_options[$request] : false;
}
}
if(!function_exists('bsf_update_option')) {
function bsf_update_option($request, $value) {
$bsf_options = get_option('bsf_options');
$bsf_options[$request] = $value;
return update_option('bsf_options', $bsf_options);
}
}
add_action( 'wp_ajax_bsf_dismiss_notice', 'bsf_dismiss_notice');
if(!function_exists('bsf_dismiss_notice')) {
function bsf_dismiss_notice() {
check_ajax_referer( 'bsf-dismiss-notice-nonce', 'security' );
$notice = $_POST['notice'];
$x = bsf_update_option($notice, true);
echo ($x) ? true : false;
die();
}
}
add_action('admin_init', 'bsf_core_check',10);
if(!function_exists('bsf_core_check')) {
function bsf_core_check() {
if(!defined('BSF_CORE')) {
if(!bsf_get_option('hide-bsf-core-notice'))
add_action( 'admin_notices', 'bsf_core_admin_notice' );
}
}
}
if(!function_exists('bsf_core_admin_notice')) {
function bsf_core_admin_notice() {
?>
<script type="text/javascript">
(function($){
$(document).ready(function(){
$(document).on( "click", ".bsf-notice", function() {
var bsf_notice_name = $(this).attr("data-bsf-notice");
$.ajax({
url: ajaxurl,
method: 'POST',
data: {
action: "bsf_dismiss_notice",
security: "<?php echo wp_create_nonce( 'bsf-dismiss-notice-nonce' ); ?>",
notice: bsf_notice_name
},
success: function(response) {
console.log(response);
}
})
})
});
})(jQuery);
</script>
<div class="bsf-notice update-nag notice is-dismissible" data-bsf-notice="hide-bsf-core-notice">
<p><?php _e( 'License registration and extensions are not part of plugin/theme anymore. Kindly download and install "BSF CORE" plugin to manage your licenses and extensins.', 'bsf' ); ?></p>
</div>
<?php
}
}
if(isset($_GET['hide-bsf-core-notice']) && $_GET['hide-bsf-core-notice'] === 're-enable') {
$x = bsf_update_option('hide-bsf-core-notice', false);
}
// end of common functions
if(!class_exists('Ultimate_Admin_Area')){
class Ultimate_Admin_Area{
function __construct(){
/* add admin menu */
add_action( 'admin_menu', array($this,'register_brainstorm_menu'),99);
add_action( 'admin_enqueue_scripts', array($this, 'bsf_admin_scripts_updater'), 1);
add_action( 'wp_ajax_update_ultimate_options', array($this,'update_settings'));
add_action( 'wp_ajax_update_ultimate_debug_options', array($this,'update_debug_settings'));
add_action( 'wp_ajax_update_ultimate_modules', array($this,'update_modules'));
add_action( 'wp_ajax_update_css_options', array($this,'update_css_options'));
add_action( 'wp_ajax_update_dev_notes', array($this,'update_dev_notes'));
add_filter( 'update_footer', array($this, 'debug_link'),999);
}
function debug_link($text) {
$screen = get_current_screen();
$array = array(
'ultimate_page_ultimate-scripts-and-styles',
'ultimate_page_ultimate-smoothscroll',
'ultimate_page_ultimate-dashboard',
'toplevel_page_about-ultimate',
'ultimate_page_ultimate-product-license',
'settings_page_ultimate-product-license',
'admin_page_ultimate-debug-settings',
'settings_page_ultimate-product-license-network'
);
if( ! in_array( $screen->id, $array ) ) {
return $text;
}
$author_extend = '';
$link = '';
$debug_url = admin_url( 'admin.php?page=ultimate-debug-settings' );
$license_link = bsf_registration_page_url( "&activation_method=license-key$author_extend", '6892199' );
if( isset( $_GET['author'] ) ){
$author_extend = '&author';
$license_link = add_query_arg( 'author', '', $license_link );
}
$link .= '<a href="' . $debug_url . ' ">Ultimate Addons debug settings</a>';
//$link .= ' | <a href="' . $license_link . ' ">Activate license using purchase key</a>';
return $link;
}
function bsf_admin_scripts_updater($hook){
if(defined('OPN_VERSION')) {
echo "<style>
@font-face {
font-family: 'opn';
src:url('".plugins_url( 'fonts/opn.eot', __FILE__ )."');
src:url('".plugins_url( 'fonts/opn.eot', __FILE__ )."') format('embedded-opentype'),
url('".plugins_url( 'fonts/opn.woff', __FILE__ )."') format('woff'),
url('".plugins_url( 'fonts/opn.ttf', __FILE__ )."') format('truetype'),
url('".plugins_url( 'fonts/opn.svg', __FILE__ )."') format('svg');
font-weight: normal;
font-style: normal;
}
.toplevel_page_opn-settings > div.wp-menu-image:before {
content: \"\\e600\" !important;
font-family: 'opn' !important;
}
</style>";
}
echo "
<style>
@font-face {
font-family: 'ultimate';
src:url('".plugins_url( 'fonts/ultimate.eot', __FILE__ )."');
src:url('".plugins_url( 'fonts/ultimate.eot', __FILE__ )."') format('embedded-opentype'),
url('".plugins_url( 'fonts/ultimate.woff', __FILE__ )."') format('woff'),
url('".plugins_url( 'fonts/ultimate.ttf', __FILE__ )."') format('truetype'),
url('".plugins_url( 'fonts/ultimate.svg', __FILE__ )."') format('svg');
font-weight: normal;
font-style: normal;
}
.toplevel_page_about-ultimate > div.wp-menu-image:before {
content: \"\\e600\" !important;
font-family: 'ultimate' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size:24px;
}
.toplevel_page_about-ultimate a[href=\"admin.php?page=font-icon-Manager\"] {
display: none !important;
}
.toplevel_page_about-ultimate a[href=\"admin.php?page=ultimate-font-manager\"] {
display: none !important;
}
</style>
";
if($hook == "post.php" ||
$hook == "post-new.php" ||
$hook == 'ultimate_page_about-ultimate' ||
$hook == 'visual-composer_page_vc-roles' ||
$hook == 'toplevel_page_about-ultimate' ||
$hook == 'ultimate_page_ultimate-dashboard' ||
$hook == 'ultimate_page_ultimate-smoothscroll' ||
$hook == 'ultimate_page_ultimate-scripts-and-styles' ||
$hook == 'ultimate_page_ultimate-product-license' ||
$hook == 'admin_page_ultimate-debug-settings' ||
$hook == 'ultimate_page_bsf-google-maps' ||
$hook == 'settings_page_ultimate-product-license' ){
$css_ext = '.min.css';
if ( is_rtl() ) {
$css_ext = '.min-rtl.css';
}
$bsf_dev_mode = bsf_get_option('dev_mode');
wp_register_style("ultimate-admin-style", UAVC_URL."admin/css/style.css");
wp_register_style("ultimate-chosen-style", UAVC_URL.'admin/vc_extend/css/chosen.css');
wp_register_script("ultimate-chosen-script", UAVC_URL."admin/vc_extend/js/chosen.js");
wp_register_script("ultimate-vc-backend-script", UAVC_URL."admin/js/ultimate-vc-backend.min.js",array('jquery'),ULTIMATE_VERSION,true);
wp_register_style("ultimate-vc-backend-style", UAVC_URL.'admin/css/ultimate-vc-backend' . $css_ext);
if($bsf_dev_mode === 'enable') {
wp_enqueue_style('ultimate-admin-style');
}
else {
wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_script('ultimate-vc-backend-script');
wp_enqueue_style('ultimate-vc-backend-style');
}
}
wp_localize_script( 'jquery', 'uavc', array(
'add_zipped_font' => wp_create_nonce( 'smile-add-zipped-fonts-nonce' ),
'remove_zipped_font' => wp_create_nonce( 'smile-remove-zipped-fonts-nonce' ),
'get_font_variants' => wp_create_nonce( 'uavc-get-font-variants-nonce' ),
'ult_get_attachment_url' => wp_create_nonce( 'uavc-get-attachment-url-nonce' ),
) );
}/* end admin_scripts */
function register_brainstorm_menu(){
if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) {
return;
} else {
$role = 'manage_network_options';
}
if ( ! current_user_can( 'manage_options' ) ) {
return;
} else {
$role = 'manage_options';
}
global $submenu;
if(defined('BSF_MENU_POS'))
$required_place = BSF_MENU_POS;
else
$required_place = 200;
if(function_exists('bsf_get_free_menu_position'))
$place = bsf_get_free_menu_position($required_place,1);
else
$place = null;
$page = add_menu_page(
'Ultimate',
'Ultimate',
$role,
'about-ultimate',
array($this,'load_about'),
'', $place );
add_submenu_page(
"about-ultimate",
__("Modules","ultimate_vc"),
__("Modules","ultimate_vc"),
$role,
"ultimate-dashboard",
array($this,'load_modules')
);
add_submenu_page(
"about-ultimate",
__("Smooth Scroll","ultimate_vc"),
__("Smooth Scroll","ultimate_vc"),
$role,
"ultimate-smoothscroll",
array($this,'load_smoothscroll')
);
add_submenu_page(
"about-ultimate",
__("Scripts & Styles","ultimate_vc"),
__("Scripts & Styles","ultimate_vc"),
$role,
"ultimate-scripts-and-styles",
array($this,'load_scripts_styles')
);
if ( ! is_multisite() ) {
add_submenu_page(
"about-ultimate",
__("Product License","ultimate_vc"),
__("Product License","ultimate_vc"),
$role,
"ultimate-product-license",
array($this,'product_license')
);
}
add_submenu_page(
"NOATTACH",
__("Debug","ultimate_vc"),
__("Debug","ultimate_vc"),
$role,
"ultimate-debug-settings",
array($this,'load_debug_settings')
);
// Add sub-menu for OPN if OPN in installed - {One Page Navigator}.
if( defined('OPN_VERSION') ){
if(defined('BSF_MENU_POS'))
$required_place = BSF_MENU_POS;
else
$required_place = 200;
if(function_exists('bsf_get_free_menu_position'))
$place = bsf_get_free_menu_position($required_place,1);
else
$place = null;
$page = add_menu_page(
'OPN',
'OPN',
'administrator',
'opn-settings',
array($this,'load_opn'),
'dashicons-admin-generic',
$place );
}
// section wise menu
global $bsf_section_menu;
$section_menu = array(
'menu' => 'ultimate-resources',
'is_down_arrow' => true
);
$bsf_section_menu[] = $section_menu;
$icon_manager_page = add_submenu_page(
"about-ultimate",
__("Icon Manager","ultimate_vc"),
__("Icon Manager","ultimate_vc"),
$role,
"bsf-font-icon-manager",
array($this, 'ultimate_icon_manager_menu')
);
$AIO_Icon_Manager = new AIO_Icon_Manager;
add_action( 'admin_print_scripts-' . $icon_manager_page, array($AIO_Icon_Manager,'admin_scripts'));
$Ultimate_Google_Font_Manager = new Ultimate_Google_Font_Manager;
$google_font_manager_page = add_submenu_page(
"about-ultimate",
__("Google Font Manager","ultimate_vc"),
__("Google Fonts","ultimate_vc"),
$role,
"bsf-google-font-manager",
array($Ultimate_Google_Font_Manager,'ultimate_font_manager_dashboard')
);
add_action( 'admin_print_scripts-' . $google_font_manager_page, array($Ultimate_Google_Font_Manager,'admin_google_font_scripts'));
$google_font_manager_page = add_submenu_page(
"about-ultimate",
__("Google Maps","ultimate_vc"),
__("Google Maps","ultimate_vc"),
$role,
"bsf-google-maps",
array($this,'ultimate_google_maps_dashboard')
);
// must be at end of all sub menu
$submenu['about-ultimate'][0][0] = __("About","ultimate_vc");
}
function load_opn(){
if(class_exists('OPN_Navigator')) {
$OPN_Navigator = new OPN_Navigator;
$OPN_Navigator->opn_settings();
}
}
function ultimate_icon_manager_menu(){
$AIO_Icon_Manager = new AIO_Icon_Manager;
$AIO_Icon_Manager->icon_manager_dashboard();
}
function load_modules(){
require_once(plugin_dir_path(__FILE__).'/modules.php');
}
function load_dashboard(){
require_once(plugin_dir_path(__FILE__).'/dashboard.php');
}
function load_about() {
require_once(plugin_dir_path(__FILE__).'/about.php');
}
function load_smoothscroll() {
require_once(plugin_dir_path(__FILE__).'/smooth-scroll-setting.php');
}
function load_scripts_styles() {
require_once(plugin_dir_path(__FILE__).'/script-styles.php');
}
function product_license() {
require_once(plugin_dir_path(__FILE__).'/product-license.php');
}
function load_debug_settings() {
require_once(plugin_dir_path(__FILE__).'/debug.php');
}
function ultimate_resources() {
$connects = false;
require_once(plugin_dir_path(__FILE__).'/resources.php');
}
function ultimate_google_maps_dashboard() {
require_once(plugin_dir_path(__FILE__).'/map-settings.php');
}
function update_modules(){
check_ajax_referer( 'ultimate-modules-setting', 'security' );
if(isset($_POST['ultimate_row'])){
$ultimate_row = sanitize_text_field( $_POST['ultimate_row'] );
} else {
$ultimate_row = 'disable';
}
$result1 = update_option( 'ultimate_row', $ultimate_row );
$ultimate_modules = array();
if(isset($_POST['ultimate_modules'])){
$ultimate_modules = array_map( 'sanitize_text_field', $_POST['ultimate_modules'] );
}
$result2 = update_option( 'ultimate_modules', $ultimate_modules );
if($result1 || $result2 ){
echo 'success';
} else {
echo 'failed';
}
die();
}
function can_access_admin() {
$bsf_ultimate_roles = bsf_get_option('ultimate_roles');
if($bsf_ultimate_roles == false || empty($bsf_ultimate_roles)) {
$bsf_ultimate_roles = array( 'administrator' );
}
if(!in_array('administrator', $bsf_ultimate_roles))
array_push($bsf_ultimate_roles, 'administrator');
$user = wp_get_current_user();
$user_role = $user->roles[0];
if(in_array($user_role, $bsf_ultimate_roles)) {
return $user_role;
}
return false;
}
function update_debug_settings() {
check_ajax_referer( 'ultimate-debug-settings', 'security' );
if( isset( $_POST['ultimate_video_fixer'] ) ){
$ultimate_video_fixer = sanitize_text_field( $_POST['ultimate_video_fixer'] );
} else {
$ultimate_video_fixer = 'disable';
}
$result1 = update_option('ultimate_video_fixer',$ultimate_video_fixer);
if(isset($_POST['ultimate_ajax_theme'])){
$ultimate_ajax_theme = sanitize_text_field( $_POST['ultimate_ajax_theme'] );
} else {
$ultimate_ajax_theme = 'disable';
}
$result2 = update_option('ultimate_ajax_theme',$ultimate_ajax_theme);
if(isset($_POST['ultimate_custom_vc_row'])){
$ultimate_custom_vc_row = sanitize_text_field( $_POST['ultimate_custom_vc_row'] );
} else {
$ultimate_custom_vc_row = '';
}
$result3 = update_option('ultimate_custom_vc_row',$ultimate_custom_vc_row);
if(isset($_POST['ultimate_theme_support'])){
$ultimate_theme_support = sanitize_text_field( $_POST['ultimate_theme_support'] );
} else {
$ultimate_theme_support = 'disable';
}
$result4 = update_option('ultimate_theme_support',$ultimate_theme_support);
if(isset($_POST['ultimate_rtl_support'])){
$ultimate_rtl_support = sanitize_text_field( $_POST['ultimate_rtl_support'] );
} else {
$ultimate_rtl_support = 'disable';
}
$result5 = update_option('ultimate_rtl_support',$ultimate_rtl_support);
if(isset($_POST['ultimate_modal_fixer'])){
$ultimate_modal_fixer = sanitize_text_field( $_POST['ultimate_modal_fixer'] );
} else {
$ultimate_modal_fixer = 'disable';
}
$result6 = update_option( 'ultimate_modal_fixer', $ultimate_modal_fixer );
$result7 = $result8 = false;
$bsf_options_array = array( 'dev_mode', 'ultimate_global_scripts', 'ultimate_roles', 'ultimate_modal_menu' );
$check_update_option_7 = $check_update_option_8 = false;
if(isset($_POST['bsf_options'])){
$bsf_options_keys = array_keys($_POST['bsf_options']);
$bsf_options_array = array_diff($bsf_options_array, $bsf_options_keys);
foreach ( $_POST['bsf_options'] as $key => $value ) {
$key = sanitize_text_field( $key );
if( is_array($value) ) {
$value = array_map( 'sanitize_text_field', $value );
} else {
$value = sanitize_text_field( $value );
}
$result7 = bsf_update_option( $key, $value );
if( $result7 )
$check_update_option_7 = true;
}
}
foreach ( $bsf_options_array as $key => $key_value ) {
$key_value = sanitize_text_field( $key_value );
$result8 = bsf_update_option( $key_value, '' );
if( $result8 )
$check_update_option_8 = true;
$result8 = true;
}
if(isset($_POST['ultimate_smooth_scroll_compatible'])){
$ultimate_smooth_scroll_compatible = sanitize_text_field( $_POST['ultimate_smooth_scroll_compatible'] );
} else {
$ultimate_smooth_scroll_compatible = 'disable';
}
$result9 = update_option('ultimate_smooth_scroll_compatible',$ultimate_smooth_scroll_compatible);
if(isset($_POST['ultimate_animation'])){
$ultimate_animation = sanitize_text_field( $_POST['ultimate_animation'] );
} else {
$ultimate_animation = 'disable';
}
$result10 = update_option('ultimate_animation',$ultimate_animation);
if($result1 || $result2 || $result3 || $result4 || $result5 || $result6 || $result7 || $result8 || $result9 || $result10){
echo 'success';
} else {
echo 'failed';
}
die();
}
function update_settings(){
check_ajax_referer( 'smooth-scroll-setting', 'security' );
if( isset( $_POST['ultimate_smooth_scroll'] ) ) {
$ultimate_smooth_scroll = sanitize_text_field( $_POST['ultimate_smooth_scroll'] );
} else {
$ultimate_smooth_scroll = 'disable';
}
$result1 = update_option('ultimate_smooth_scroll',$ultimate_smooth_scroll);
if(isset($_POST['ultimate_smooth_scroll_options'])){
$ultimate_smooth_scroll_options['step'] = ( '' != $_POST['ultimate_smooth_scroll_options']['step'] ) ? ( int ) $_POST['ultimate_smooth_scroll_options']['step'] : '';
$ultimate_smooth_scroll_options['speed'] = ( '' != $_POST['ultimate_smooth_scroll_options']['speed'] ) ? ( int ) $_POST['ultimate_smooth_scroll_options']['speed'] : '';
} else {
$ultimate_smooth_scroll_options = '';
}
$result2 = update_option('ultimate_smooth_scroll_options',$ultimate_smooth_scroll_options);
if($result1 || $result2){
echo 'success';
} else {
echo 'failed';
}
die();
}
function update_css_options(){
check_ajax_referer( 'css-settings-setting', 'security' );
if(isset($_POST['ultimate_css'])){
$ultimate_css = sanitize_text_field( $_POST['ultimate_css'] );
} else {
$ultimate_css = 'disable';
}
$result1 = update_option('ultimate_css',$ultimate_css);
if(isset($_POST['ultimate_js'])){
$ultimate_js = sanitize_text_field( $_POST['ultimate_js'] );
} else {
$ultimate_js = 'disable';
}
$result2 = update_option('ultimate_js',$ultimate_js);
if($result1 || $result2){
echo 'success';
} else {
echo 'failed';
}
die();
}
/*
* Display admin notices for plugin activation
*/
function display_notice(){
global $hook_suffix;
$status = "not-activated";
$ultimate_keys = get_option('ultimate_keys');
$username = $ultimate_keys['envato_username'];
$api_key = $ultimate_keys['envato_api_key'];
$purchase_code = $ultimate_keys['ultimate_purchase_code'];
$user_email = (isset($ultimate_keys['ultimate_user_email'])) ? $ultimate_keys['ultimate_user_email'] : '';
$activation_check = get_option('ultimate_license_activation');
if(false === ( get_transient( 'ultimate_license_activation' ) )){
if(!empty($activation_check)){
$get_activation_data = check_license_activation($purchase_code, $username, $user_email);
$activation_check_temp = json_decode($get_activation_data);
$val = array(
'response' => $activation_check_temp->response,
'status' => $activation_check_temp->status,
'code' => $activation_check_temp->code
);
$val = array_map( 'sanitize_text_field', $val );
update_option('ultimate_license_activation', $val);
delete_transient( 'ultimate_license_activation' );
set_transient( "ultimate_license_activation", true, 60*60*12);
}
}
$activation_check = get_option('ultimate_license_activation');
$ultimate_constants = get_option('ultimate_constants');
$builtin = get_option('ultimate_updater');
if($activation_check !== ''){
$status = isset($activation_check['status']) ? $activation_check['status'] : "not-activated";
$code = $activation_check['code'];
}
if($status == "Deactivated" || $status == "not-activated" || $status == "not-verified"){
if ( $hook_suffix == 'plugins.php' ){
if( $builtin === 'disabled' || $ultimate_constants['ULTIMATE_NO_PLUGIN_PAGE_NOTICE'] === true || (is_multisite() == true && is_main_site() == false))
$hide_notice = true;
else
$hide_notice = false;
$reg_link = (is_multisite()) ? network_admin_url('index.php?page=bsf-dashboard') : admin_url('index.php?page=bsf-dashboard');
if(!$hide_notice) :
?>
<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
<style type="text/css">
.ult_activate{min-width:825px;background: #FFF;border:1px solid #0096A3;padding:5px;margin:15px 0;border-radius:3px;-webkit-border-radius:3px;position:relative;overflow:hidden}
.ult_activate .ult_a{position:absolute;top:5px;right:10px;font-size:48px;}
.ult_activate .ult_button{font-weight:bold;border:1px solid #029DD6;border-top:1px solid #06B9FD;font-size:15px;text-align:center;padding:9px 0 8px 0;color:#FFF;background:#029DD6;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px}
.ult_activate .ult_button:hover{text-decoration:none !important;border:1px solid #029DD6;border-bottom:1px solid #00A8EF;font-size:15px;text-align:center;padding:9px 0 8px 0;color:#F0F8FB;background:#0079B1;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px}
.ult_activate .ult_button_border{border:1px solid #0096A3;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px;background:#029DD6;}
.ult_activate .ult_button_container{cursor:pointer;display:inline-block; padding:5px;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px;width:215px}
.ult_activate .ult_description{position:absolute;top:8px;left:230px;margin-left:25px;color:#0096A3;font-size:15px;z-index:1000}
.ult_activate .ult_description strong{color:#0096A3;font-weight:normal}
</style>
<div class="ult_activate">
<div class="ult_a"><img style="width:1em;" src="<?php echo UAVC_URL."img/logo-icon.png"; ?>" alt=""></div>
<?php
?>
<div class="ult_button_container" onclick="document.location='<?php echo $reg_link; ?>'">
<div class="ult_button_border">
<div class="ult_button"><span class="dashicons-before dashicons-admin-network" style="padding-right: 6px;"></span><?php __('Activate your license', 'ultimate_vc');?></div>
</div>
</div>
<div class="ult_description"><h3 style="margin:0;padding: 2px 0px;"><strong><?php _e('Almost done!','ultimate_vc'); ?></strong></h3><p style="margin: 0;"><?php _e('Please activate your copy of the Ultimate Addons for WPBakery Page Builder to receive automatic updates & get premium support','ultimate_vc'); ?></p></div>
</div>
</div>
<?php
endif;
} else if($hook_suffix == 'post-new.php' || $hook_suffix == 'edit.php' || $hook_suffix == 'post.php'){
if( $builtin === 'disabled' || $ultimate_constants['ULTIMATE_NO_EDIT_PAGE_NOTICE'] === true || (is_multisite() == true && is_main_site() == false))
$hide_notice = true;
else
$hide_notice = false;
if(!$hide_notice) :
?>
<div class="updated fade">
<p><?php echo _e('Howdy! Please','ultimate_vc').' <a href="'.$reg_link.'">'.__('activate your copy','ultimate_vc').' </a> '.__('of the Ultimate Addons for WPBakery Page Builder to receive automatic updates & get premium support.','ultimate_vc');?>
<span style="float: right; padding: 0px 4px; cursor: pointer;" class="uavc-activation-notice">X</span>
</p>
</div>
<script type="text/javascript">
jQuery(".uavc-activation-notice").click(function(){
jQuery(this).parents(".updated").fadeOut(800);
});
</script>
<?php
endif;
}
}
}
}
new Ultimate_Admin_Area;
}
// Generate 32 characters
function ult_generate_rand_id(){
$validCharacters = 'abcdefghijklmnopqrstuvwxyz0123456789';
$myKeeper = '';
$length = 32;
for ($n = 1; $n < $length; $n++) {
$whichCharacter = rand(0, strlen($validCharacters)-1);
$myKeeper .= $validCharacters{$whichCharacter};
}
return $myKeeper;
}
// Alternative function for wp_remote_get
function ultimate_remote_get($path){
if(function_exists('curl_init')){
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, $path);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
if($output !== "")
return $output;
else
return false;
} else {
return false;
}
}
// hooks to add bsf-core stylesheet
add_filter('bsf_core_style_screens', 'ultimate_bsf_core_style_hooks');
function ultimate_bsf_core_style_hooks($hooks) {
$array = array(
'ultimate_page_ultimate-resources',
'ultimate_page_about-ultimate',
'toplevel_page_about-ultimate',
'ultimate_page_ultimate-dashboard',
'ultimate_page_ultimate-smoothscroll',
'ultimate_page_ultimate-scripts-and-styles',
'admin_page_ultimate-debug-settings',
'ultimate_page_bsf-google-maps',
'ultimate_page_ultimate-product-license',
'settings_page_ultimate-product-license'
);
foreach ($array as $hook) {
array_push($hooks, $hook);
}
return $hooks;
}
// hooks to add frosty script
add_filter('bsf_core_frosty_screens', 'ultimate_bsf_core_frosty_hooks');
function ultimate_bsf_core_frosty_hooks($hooks) {
$array = array(
'ultimate_page_ultimate-smoothscroll',
);
foreach ($array as $hook) {
array_push($hooks, $hook);
}
return $hooks;
}
function UAVC_product_license_redirect_to_modal_popup($url, $original_url, $_context){
if ($url == 'admin.php?page=ultimate-product-license'){
remove_filter('clean_url', 'UAVC_product_license_redirect_to_modal_popup', 10);
return bsf_registration_page_url( false, '6892199' );
}
return $url;
}
if (is_admin()){
add_filter('clean_url', 'UAVC_product_license_redirect_to_modal_popup', 10, 3);
}
@@ -0,0 +1,372 @@
<?php
/**
* BSF_Envato_Activate setup
*
* @since 1.0
*/
class BSF_Envato_Activate {
/**
* Instance
*
* @var BSF_Envato_Activate
*/
private static $instance;
/**
* Reference to the License manager class.
*
* @var BSF_License_Manager
*/
private $license_manager;
/**
* Stores temporary response messsages from the API validations.
*
* @var array()
*/
private $message_box;
/**
* Initiator.
*/
public static function instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new BSF_Envato_Activate();
}
return self::$instance;
}
public function __construct() {
$this->license_manager = new BSF_License_Manager();
$action = isset( $_GET['license_action'] ) ? esc_attr( $_GET['license_action'] ) : '';
if ( $action == 'activate_license' ) {
$this->process_envato_activation();
}
add_filter( 'update_footer', array( $this, 'alternate_method_link' ), 20 );
add_action( 'bsf_inlne_license_envato_after_form', array( $this, 'inline_alternate_method_link' ), 20, 2 );
}
public function envato_register( $args ) {
// Check if alternate method is to be used
$method = isset( $_GET['activation_method'] ) ? esc_attr( $_GET['activation_method'] ) : 'oauth';
$html = '';
$product_id = isset( $args['product_id'] ) ? $args['product_id'] : '';
$is_active = $this->license_manager->bsf_is_active_license( $product_id );
$product_name = $this->license_manager->bsf_get_product_info( $product_id, 'name' );
$purchase_url = $this->license_manager->bsf_get_product_info( $product_id, 'purchase_url' );
$bundled = BSF_Update_Manager::bsf_is_product_bundled( $product_id );
if ( ! empty( $bundled ) ) {
$parent_id = $bundled[0];
$is_active = $this->license_manager->bsf_is_active_license( $parent_id );
$parent_name = brainstrom_product_name( $parent_id );
$registration_page = bsf_registration_page_url( '', $parent_id );
$html .= '<div class="bundled-product-license-registration">';
$html .= '<span>';
if ( $is_active ) {
$html .= '<h3>License Active!</h3>';
$html .= '<p>' . sprintf(
'Your license is activated, you will receive updates for <i>%s</i> when they are available.',
$product_name
) . '</p>';
} else {
$html .= '<h3>Updates Unavailable!</h3>';
$html .= '<p>' . sprintf(
'This plugin is came bundled with the <i>%1$s</i>. For receiving updates, you need to activate license of <i>%2$s</i> <a href="%3$s">here</a>.',
$parent_name,
$parent_name,
$registration_page
) . '</p>';
}
$html .= '</span>';
$html .= '</div>';
return $html;
}
if ( $method == 'license-key' ) {
$html .= bsf_license_activation_form( $args );
return $html;
}
// Licence activation button.
$form_action = ( isset( $args['form_action'] ) && ! is_null( $args['form_action'] ) ) ? $args['form_action'] : '';
$form_class = ( isset( $args['form_class'] ) && ! is_null( $args['form_class'] ) ) ? $args['form_class'] : "bsf-license-form-{$product_id}";
$submit_button_class = ( isset( $args['submit_button_class'] ) && ! is_null( $args['submit_button_class'] ) ) ? $args['submit_button_class'] : '';
$license_form_heading_class = ( isset( $args['bsf_license_form_heading_class'] ) && ! is_null( $args['bsf_license_form_heading_class'] ) ) ? $args['bsf_license_form_heading_class'] : '';
$license_active_class = ( isset( $args['bsf_license_active_class'] ) && ! is_null( $args['bsf_license_active_class'] ) ) ? $args['bsf_license_active_class'] : '';
$license_not_activate_message = ( isset( $args['bsf_license_not_activate_message'] ) && ! is_null( $args['bsf_license_not_activate_message'] ) ) ? $args['bsf_license_not_activate_message'] : '';
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
$button_text_activate = ( isset( $args['button_text_activate'] ) && ! is_null( $args['button_text_activate'] ) ) ? 'Sign Up & Activate' : 'Sign Up & Activate';
$button_text_deactivate = ( isset( $args['button_text_deactivate'] ) && ! is_null( $args['button_text_deactivate'] ) ) ? $args['button_text_deactivate'] : 'Deactivate License';
$placeholder = ( isset( $args['placeholder'] ) && ! is_null( $args['placeholder'] ) ) ? $args['placeholder'] : 'Enter your license key..';
$popup_license_form = ( isset( $args['popup_license_form'] ) ) ? $args['popup_license_form'] : false;
$bsf_license_allow_email = ( isset( $args['bsf_license_allow_email'] ) && ! is_null( $args['bsf_license_allow_email'] ) ) ? $args['bsf_license_allow_email'] : true;
if ( $bsf_license_allow_email == true ) {
$form_class .= ' license-form-allow-email ';
if ( ! $is_active ) {
$submit_button_class .= ' button-primary button-hero bsf-envato-form-activation ';
}
}
if ( $is_active != true ) {
$form_action = get_api_site() . 'envato-validation-callback/?wp-envato-validate';
} else {
$form_action = bsf_registration_page_url( '', $product_id );
}
$html .= '<div class="envato-license-registration">';
$html .= '<form method="post" class="' . $form_class . '" action="' . $form_action . '">';
if ( $this->getMessage( 'message' ) !== '' ) {
$html .= '<span class="bsf-license-message license-' . $this->getMessage( 'status' ) . '">';
$html .= $this->getMessage( 'message' );
$html .= '</span>';
}
if ( $is_active ) {
$envato_active_oauth_title = apply_filters( "envato_active_oauth_title_{$product_id}", 'Updates & Support Registration - <span class="active">Active!</span>' );
$envato_active_oauth_subtitle = '<span class="active">' . sprintf(
'Your license is active.',
$product_name
) . '</span>';
$envato_active_oauth_subtitle = apply_filters( "envato_active_oauth_subtitle_{$product_id}", $envato_active_oauth_subtitle );
if ( $popup_license_form ) {
$html .= '<div class="bsf-wrap-title">';
$html .= '<h3 class="envato-oauth-heading">' . $product_name . '</h2>';
$html .= '<p class="envato-oauth-subheading">' . $envato_active_oauth_subtitle . '</p>';
$html .= '</div>';
} else {
$html .= '<div class="bsf-wrap-title">';
$html .= '<h3 class="envato-oauth-heading">' . $envato_active_oauth_title . '</h2>';
$html .= '<p class="envato-oauth-subheading">' . $envato_active_oauth_subtitle . '</p>';
$html .= '</div>';
}
$html .= '<input type="hidden" readonly class="' . $license_active_class . ' ' . $size . '-text" id="bsf_license_manager[license_key]" name="bsf_license_manager[license_key]" value="License Validated"/>';
$html .= '<input type="hidden" class="' . $size . '-text" id="bsf_license_manager[product_id]" name="bsf_license_manager[product_id]" value="' . esc_attr( stripslashes( $product_id ) ) . '"/>';
$html .= '<input type="submit" class="button ' . $submit_button_class . '" name="bsf_deactivate_license" value="' . esc_attr__( $button_text_deactivate, 'bsf' ) . '"/>';
} else {
$envato_not_active_oauth_title = apply_filters( "envato_not_active_oauth_title_{$product_id}", __( 'Updates & Support Registration - <span class="not-active">Not Active!</span>', 'bsf' ) );
$envato_not_active_oauth_subtitle = apply_filters( "envato_not_active_oauth_subtitle_{$product_id}", __( 'Click on the button below to activate your license and subscribe to our newsletter.', 'bsf' ) );
if ( $popup_license_form ) {
$html .= '<div class="bsf-wrap-title">';
$html .= '<h3 class="envato-oauth-heading">' . $product_name . '</h2>';
$html .= '<p class="envato-oauth-subheading">' . $envato_not_active_oauth_subtitle . '</p>';
$html .= '</div>';
} else {
$html .= '<div class="bsf-wrap-title">';
$html .= '<h3 class="envato-oauth-heading">' . $envato_not_active_oauth_title . '</h2>';
$html .= '<p class="envato-oauth-subheading">' . $envato_not_active_oauth_subtitle . '</p>';
$html .= '</div>';
}
$html .= '<input type="hidden" readonly class="' . $license_active_class . ' ' . $size . '-text" id="bsf_license_manager[license_key]" name="url" value="' . get_site_url() . '"/>';
$html .= '<input type="hidden" readonly class="' . $license_active_class . ' ' . $size . '-text" id="bsf_license_manager[license_key]" name="redirect" value="' . $this->get_redirect_url( $product_id ) . '"/>';
$html .= '<input type="hidden" readonly class="' . $license_active_class . ' ' . $size . '-text" id="bsf_license_manager[license_key]" name="product_id" value="' . $product_id . '"/>';
$html .= '<input id="bsf-license-privacy-consent" name="bsf_license_manager[privacy_consent]" type="hidden" value="true" />';
$html .= '<input id="bsf-license-terms-conditions-consent" name="bsf_license_manager[terms_conditions_consent]" type="hidden" value="true" />';
$html .= '<div class="submit-button-wrap">';
$html .= '<input type="button" class="button ' . $submit_button_class . '" name="bsf_activate_license" value="' . esc_attr__( $button_text_activate, 'bsf' ) . '"/>';
$html .= "<p class='purchase-license'><a target='_blank' href='$purchase_url'>Purchase License »</a></p>";
$html .= '</div>';
}
$html .= '</form>';
$html = apply_filters( 'bsf_inlne_license_envato_after_form', $html, $product_id );
$html .= '</div> <!-- envato-license-registration -->';
if ( isset( $_GET['debug'] ) ) {
$html .= get_bsf_systeminfo();
}
return $html;
}
public function envato_activation_url( $form_data ) {
$product_id = isset( $form_data['product_id'] ) ? esc_attr( $form_data['product_id'] ) : '';
$form_data['token'] = sha1( $this->create_token( $product_id ) );
$url = get_api_site() . 'envato-validation-callback/?wp-envato-validate';
$envato_activation_url = add_query_arg(
$form_data,
$url
);
return $envato_activation_url;
}
protected function get_redirect_url( $product_id = '' ) {
if ( is_ssl() ) {
$current_url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
} else {
$current_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
}
$current_url = esc_url( remove_query_arg( array( 'license_action', 'token', 'product_id', 'purchase_key', 'success', 'status', 'message' ), $current_url ) );
if ( '' != $product_id ) {
$current_url = add_query_arg(
array(
'bsf-inline-license-form' => $product_id,
), $current_url
);
}
return $current_url;
}
protected function create_token( $product_id ) {
$token = $product_id . '|' . current_time( 'timestamp' ) . '|' . bsf_generate_rand_token();
update_site_option( "bsf_envato_token_$product_id", $token );
return $token;
}
protected function validateToken( $token, $product_id ) {
$stored_token = get_site_option( "bsf_envato_token_$product_id", '' );
if ( $token == sha1( $stored_token ) ) {
$token_atts = explode( '|', $stored_token );
$stored_id = $token_atts[0];
if ( $stored_id != $product_id ) {
// Token is invalid
return false;
}
$timestamp = (int) $token_atts[1];
$validUltil = $timestamp + 900;
if ( current_time( 'timestamp' ) > $validUltil ) {
// Timestamp has expired.
return false;
}
// If above conditions did not meet, the token is valid.
return true;
}
return false;
}
protected function process_envato_activation() {
$token = isset( $_GET['token'] ) ? esc_attr( $_GET['token'] ) : '';
$product_id = isset( $_GET['product_id'] ) ? esc_attr( $_GET['product_id'] ) : '';
if ( $this->validateToken( $token, $product_id ) ) {
$args = array();
$args['purchase_key'] = isset( $_GET['purchase_key'] ) ? esc_attr( $_GET['purchase_key'] ) : '';
$args['status'] = isset( $_GET['status'] ) ? esc_attr( $_GET['status'] ) : '';
$this->license_manager->bsf_update_product_info( $product_id, $args );
$this->setMessage(
array(
'status' => 'success',
'message' => 'License successfully activated!',
)
);
} else {
$this->setMessage(
array(
'status' => 'error',
'message' => 'The token is invalid or is expired, please try again.',
)
);
}
}
protected function setMessage( $message = array() ) {
$this->message_box = $message;
}
protected function getMessage( $key ) {
$message = $this->message_box;
return isset( $message[ $key ] ) ? $message[ $key ] : '';
}
public function inline_alternate_method_link( $html, $bsf_product_id ) {
$is_active = $this->license_manager->bsf_is_active_license( $bsf_product_id );
$privacy_policy_link = $this->license_manager->bsf_get_product_info( $bsf_product_id, 'privacy_policy' );
$terms_conditions_link = $this->license_manager->bsf_get_product_info( $bsf_product_id, 'terms_conditions' );
if ( isset( $privacy_policy_link ) ) {
$html .= sprintf(
'<a class="license-form-external-links" target="_blank" href="%s">Privacy Policy</a> | ',
$privacy_policy_link
);
}
if ( isset( $terms_conditions_link ) ) {
$html .= sprintf(
'<a class="license-form-external-links" target="_blank" href="%s">Terms & Conditions</a>',
$terms_conditions_link
);
}
return $html;
}
public function alternate_method_link( $content ) {
$content = sprintf(
'<a href="%s">Activate license using purchase key</a>',
add_query_arg(
array(
'activation_method' => 'license-key',
)
)
);
return $content;
}
}
function bsf_envato_register( $args ) {
$BSF_Envato_Activate = BSF_Envato_Activate::instance();
return $BSF_Envato_Activate->envato_register( $args );
}
@@ -0,0 +1,659 @@
<?php
/**
*
*/
if ( ! class_exists( 'BSF_License_Manager' ) ) {
class BSF_License_Manager {
private static $_instance = null;
private static $inline_form_products = array();
public static function instance() {
if ( ! isset( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
public function __construct() {
add_action( 'admin_head', array( $this, 'admin_css' ), 100 );
add_action( 'admin_init', array( $this, 'bsf_activate_license' ) );
add_action( 'admin_init', array( $this, 'bsf_deactivate_license' ) );
add_action( 'bsf_product_update_registered', array( $this, 'refresh_products_on_license_activae' ) );
add_action( 'admin_footer', array( $this, 'render_popup_form_markup' ) );
$this->includes();
add_action( 'admin_enqueue_scripts', array( $this, 'load_scripts' ) );
}
public function refresh_products_on_license_activae() {
update_site_option( 'bsf_force_check_extensions', true );
}
public function includes() {
require_once BSF_UPDATER_PATH . '/BSF_Envato_Activate.php';
}
public function admin_css() {
?>
<style type="text/css">
.bsf-pre {
white-space: normal;
}
/* license consent */
.bsf-license-consent-container {
display: flex;
}
.bsf-license-consent-container label {
padding-top: 0;
}
.wp-admin p.bsf-license-consent-container input {
margin-top: 2px;
margin-right: 10px;
}
</style>
<?php
}
public function bsf_deactivate_license() {
if ( ! isset( $_POST['bsf_deactivate_license'] ) ) {
return;
}
if ( ! isset( $_POST['bsf_license_manager']['license_key'] ) || $_POST['bsf_license_manager']['license_key'] == '' ) {
return;
}
if ( ! isset( $_POST['bsf_license_manager']['product_id'] ) || $_POST['bsf_license_manager']['product_id'] == '' ) {
return;
}
$product_id = esc_attr( $_POST['bsf_license_manager']['product_id'] );
$license_key = $this->bsf_get_product_info( $product_id, 'purchase_key' );
// Check if the key is from EDD
$is_edd = $this->is_edd( $license_key );
$path = get_api_url() . '?referer=deactivate-' . $product_id;
// Using Brainstorm API v2
$data = array(
'action' => 'bsf_deactivate_license',
'purchase_key' => $license_key,
'product_id' => $product_id,
'site_url' => get_site_url(),
'is_edd' => $is_edd,
'referer' => 'customer',
);
$data = apply_filters( 'bsf_deactivate_license_args', $data );
$response = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
// Try to make a second request to unsecure URL.
if ( is_wp_error( $response ) && wp_remote_retrieve_response_code( $response ) !== 200 ) {
$path = get_api_url( true ) . '?referer=deactivate-' . $product_id;
$response = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
$result = json_decode( wp_remote_retrieve_body( $response ), true );
if ( isset( $result['success'] ) && $result['success'] == true ) {
// update license saus to the product
$_POST['bsf_license_deactivation']['success'] = $result['success'];
$_POST['bsf_license_deactivation']['message'] = $result['message'];
unset( $result['success'] );
unset( $result['message'] );
$this->bsf_update_product_info( $product_id, $result );
} else {
$_POST['bsf_license_deactivation']['success'] = $result['success'];
$_POST['bsf_license_deactivation']['message'] = $result['message'];
}
} else {
// If there is an error, the status will not be changed. hence it's true.
$_POST['bsf_license_activation']['success'] = true;
$_POST['bsf_license_activation']['message'] = 'There was an error when connecting to our license API - <pre class="bsf-pre">' . $response->get_error_message() . '</pre>';
}
}
public function bsf_activate_license() {
if ( ! isset( $_POST['bsf_activate_license'] ) ) {
return;
}
if ( ! isset( $_POST['bsf_license_manager']['license_key'] ) || $_POST['bsf_license_manager']['license_key'] == '' ) {
return;
}
if ( ! isset( $_POST['bsf_license_manager']['product_id'] ) || $_POST['bsf_license_manager']['product_id'] == '' ) {
return;
}
$license_key = esc_attr( $_POST['bsf_license_manager']['license_key'] );
$product_id = esc_attr( $_POST['bsf_license_manager']['product_id'] );
$user_name = isset( $_POST['bsf_license_manager']['user_name'] ) ? esc_attr( $_POST['bsf_license_manager']['user_name'] ) : '';
$user_email = isset( $_POST['bsf_license_manager']['user_email'] ) ? esc_attr( $_POST['bsf_license_manager']['user_email'] ) : '';
$privacy_consent = ( isset( $_POST['bsf_license_manager']['privacy_consent'] ) && 'true' === $_POST['bsf_license_manager']['privacy_consent'] ) ? true : false;
$terms_conditions_consent = ( isset( $_POST['bsf_license_manager']['terms_conditions_consent'] ) && 'true' === $_POST['bsf_license_manager']['terms_conditions_consent'] ) ? true : false;
// update product license key
$args = array(
'purchase_key' => $license_key,
);
$this->bsf_update_product_info( $product_id, $args );
// Check if the key is from EDD
$is_edd = $this->is_edd( $license_key );
// Server side check if the license key is valid
$path = get_api_url() . '?referer=activate-' . $product_id;
// Using Brainstorm API v2
$data = array(
'action' => 'bsf_activate_license',
'purchase_key' => $license_key,
'product_id' => $product_id,
'user_name' => $user_name,
'user_email' => $user_email,
'privacy_consent' => $privacy_consent,
'terms_conditions_consent' => $terms_conditions_consent,
'site_url' => get_site_url(),
'is_edd' => $is_edd,
'referer' => 'customer',
);
$data = apply_filters( 'bsf_activate_license_args', $data );
$response = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
// Try to make a second request to unsecure URL.
if ( is_wp_error( $response ) && wp_remote_retrieve_response_code( $response ) !== 200 ) {
$path = get_api_url( true ) . '?referer=activate-' . $product_id;
$response = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
$result = json_decode( wp_remote_retrieve_body( $response ), true );
if ( isset( $result['success'] ) && $result['success'] == true ) {
// update license saus to the product
$_POST['bsf_license_activation']['success'] = $result['success'];
$_POST['bsf_license_activation']['message'] = $result['message'];
unset( $result['success'] );
$this->bsf_update_product_info( $product_id, $result );
} else {
$_POST['bsf_license_activation']['success'] = $result['success'];
$_POST['bsf_license_activation']['message'] = $result['message'];
}
} else {
$_POST['bsf_license_activation']['success'] = false;
$_POST['bsf_license_activation']['message'] = 'There was an error when connecting to our license API - <pre class="bsf-pre">' . $response->get_error_message() . '</pre>';
}
}
public function is_edd( $license_key ) {
// Purchase key length for EDD is 32 characters
if ( strlen( $license_key ) === 32 ) {
return true;
}
return false;
}
public function bsf_update_product_info( $product_id, $args ) {
$brainstrom_products = get_option( 'brainstrom_products', array() );
foreach ( $brainstrom_products as $type => $products ) {
foreach ( $products as $id => $product ) {
if ( $id == $product_id ) {
foreach ( $args as $key => $value ) {
$brainstrom_products[ $type ][ $id ][ $key ] = $value;
do_action( "bsf_product_update_{$value}", $product_id, $value );
}
}
}
}
update_option( 'brainstrom_products', $brainstrom_products );
}
public static function bsf_is_active_license( $product_id ) {
$brainstrom_products = get_option( 'brainstrom_products', array() );
$brainstorm_plugins = isset( $brainstrom_products['plugins'] ) ? $brainstrom_products['plugins'] : array();
$brainstorm_themes = isset( $brainstrom_products['themes'] ) ? $brainstrom_products['themes'] : array();
$all_products = $brainstorm_plugins + $brainstorm_themes;
// If a product is marked as free, it is considered as active.
$is_free = self::is_product_free( $product_id );
if ( 'true' == $is_free ) {
return true;
}
$is_bundled = BSF_Update_Manager::bsf_is_product_bundled( $product_id );
// The product is not bundled
if ( isset( $all_products[ $product_id ] ) ) {
if ( isset( $all_products[ $product_id ]['status'] ) && $all_products[ $product_id ]['status'] == 'registered' ) {
return true;
}
}
if ( ! empty( $is_bundled ) ) {
// The product is bundled
foreach ( $is_bundled as $key => $value ) {
$product_id = $value;
if ( isset( $all_products[ $product_id ] ) ) {
if ( isset( $all_products[ $product_id ]['status'] ) && $all_products[ $product_id ]['status'] == 'registered' ) {
return true;
}
}
}
}
// Return false by default
return false;
}
public static function is_product_free( $product_id ) {
$license_manager = BSF_License_Manager::instance();
$is_free = $license_manager->bsf_get_product_info( $product_id, 'is_product_free' );
return $is_free;
}
public function bsf_get_product_info( $product_id, $key ) {
$brainstrom_products = get_option( 'brainstrom_products', array() );
$brainstorm_plugins = isset( $brainstrom_products['plugins'] ) ? $brainstrom_products['plugins'] : array();
$brainstorm_themes = isset( $brainstrom_products['themes'] ) ? $brainstrom_products['themes'] : array();
$all_products = $brainstorm_plugins + $brainstorm_themes;
if ( isset( $all_products[ $product_id ][ $key ] ) && $all_products[ $product_id ][ $key ] !== '' ) {
return $all_products[ $product_id ][ $key ];
}
}
/**
* For Popup License form check `popup_license_form` is `true`.
*/
public function license_activation_form( $args ) {
$html = '';
$product_id = ( isset( $args['product_id'] ) && ! is_null( $args['product_id'] ) ) ? $args['product_id'] : '';
// bail out if product id is missing.
if ( $product_id == '' ) {
_e( 'Product id is missing.', 'bsf' );
return;
}
$popup_license_form = ( isset( $args['popup_license_form'] ) ) ? $args['popup_license_form'] : false;
$form_action = ( isset( $args['form_action'] ) && ! is_null( $args['form_action'] ) ) ? $args['form_action'] : '';
$form_class = ( isset( $args['form_class'] ) && ! is_null( $args['form_class'] ) ) ? $args['form_class'] : "bsf-license-form-{$product_id}";
$submit_button_class = ( isset( $args['submit_button_class'] ) && ! is_null( $args['submit_button_class'] ) ) ? $args['submit_button_class'] : '';
$license_form_heading_class = ( isset( $args['bsf_license_form_heading_class'] ) && ! is_null( $args['bsf_license_form_heading_class'] ) ) ? $args['bsf_license_form_heading_class'] : '';
$license_active_class = ( isset( $args['bsf_license_active_class'] ) && ! is_null( $args['bsf_license_active_class'] ) ) ? $args['bsf_license_active_class'] : '';
$license_not_activate_message = ( isset( $args['bsf_license_not_activate_message'] ) && ! is_null( $args['bsf_license_not_activate_message'] ) ) ? $args['bsf_license_not_activate_message'] : '';
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
$button_text_activate = ( isset( $args['button_text_activate'] ) && ! is_null( $args['button_text_activate'] ) ) ? $args['button_text_activate'] : 'Activate License';
$button_text_deactivate = ( isset( $args['button_text_deactivate'] ) && ! is_null( $args['button_text_deactivate'] ) ) ? $args['button_text_deactivate'] : 'Deactivate License';
$placeholder = ( isset( $args['placeholder'] ) && ! is_null( $args['placeholder'] ) ) ? $args['placeholder'] : 'Enter your license key..';
$placeholder_name = ( isset( $args['placeholder_name'] ) && ! is_null( $args['placeholder_name'] ) ) ? $args['placeholder_name'] : 'Your Name..';
$placeholder_email = ( isset( $args['placeholder_email'] ) && ! is_null( $args['placeholder_email'] ) ) ? $args['placeholder_email'] : 'Your Email..';
$bsf_license_allow_email = ( isset( $args['bsf_license_allow_email'] ) && ! is_null( $args['bsf_license_allow_email'] ) ) ? $args['bsf_license_allow_email'] : true;
$license_form_title = ( isset( $args['license_form_title'] ) && ! is_null( $args['license_form_title'] ) ) ? $args['license_form_title'] : 'Updates & Support Registration - ';
$is_active = self::bsf_is_active_license( $product_id );
$license_key = $this->bsf_get_product_info( $product_id, 'purchase_key' );
if ( $bsf_license_allow_email == true ) {
$form_class .= ' license-form-allow-email ';
if ( ! $is_active ) {
$button_text_activate = 'Sign Up & Activate';
$submit_button_class .= ' button-primary button-hero ';
}
}
// Forcefully disable the subscribe options for uabb.
// This should be disabled from uabb and removed from graupi.
if ( 'uabb' == $product_id ) {
$bsf_license_allow_email = false;
}
$purchase_url = $this->bsf_get_product_info( $product_id, 'purchase_url' );
$product_name = apply_filters( "agency_updater_productname_{$product_id}", $this->bsf_get_product_info( $product_id, 'name' ) );
if ( empty( $product_name ) ) {
$product_name = apply_filters( "agency_updater_productname_{$product_id}", $this->bsf_get_product_info( $product_id, 'product_name' ) );
}
// License activation messages
$current_status = $current_message = '';
if ( isset( $_POST['bsf_license_activation']['success'] ) && isset( $_POST['bsf_license_manager']['product_id'] ) && $product_id == $_POST['bsf_license_manager']['product_id'] ) {
$current_status = esc_attr( $_POST['bsf_license_activation']['success'] );
if ( true == $current_status ) {
$current_status = 'bsf-current-license-success bsf-current-license-success-' . $product_id;
$is_active = true;
} else {
$current_status = 'bsf-current-license-error bsf-current-license-error-' . $product_id;
$is_active = false;
}
}
if ( isset( $_POST['bsf_license_activation']['message'] ) ) {
$current_message = wp_kses_post( $_POST['bsf_license_activation']['message'] );
}
$license_status = 'Active!';
$license_status_class = 'bsf-license-active-' . $product_id;
$html .= '<div class="bsf-license-key-registration">';
// License not active message
$form_heading_status = '';
if ( $is_active == false ) {
$license_status = 'Not Active!';
$license_status_class = 'bsf-license-not-active-' . $product_id;
$not_activate = '';
$html .= apply_filters( "bsf_license_not_activate_message_{$product_id}", $not_activate, $license_status_class, $license_not_activate_message );
if ( $bsf_license_allow_email == true ) {
$popup_license_subtitle = apply_filters( "bsf_license_key_form_inactive_subtitle_{$product_id}", __( '<p>Click on the button below to activate your license and subscribe to our newsletter.</p>', 'bsf' ) );
} else {
$popup_license_subtitle = apply_filters( "bsf_license_key_form_inactive_subtitle_{$product_id}", __( '<p>Enter your purchase key and activate automatic updates.</p>', 'bsf' ) );
}
} else {
$form_class .= " form-submited-{$product_id}";
$popup_license_subtitle = apply_filters( "bsf_license_key_form_active_subtitle_{$product_id}", '' );
}
do_action( "bsf_before_license_activation_form_{$product_id}" );
$html .= '<form method="post" class="' . $form_class . '" action="' . $form_action . '">';
if ( $popup_license_form ) {
$form_heading = '<h3 class="' . $license_status_class . ' ' . $license_form_heading_class . '">' . $product_name . '</h3>';
$form_heading .= $popup_license_subtitle;
} else {
$form_heading = '<h3 class="' . $license_status_class . ' ' . $license_form_heading_class . '">' . $license_form_title . '<span>' . $license_status . '</span></h3>';
}
$html .= apply_filters( "bsf_license_form_heading_{$product_id}", $form_heading, $license_status_class, $license_status );
if ( $current_status !== '' && $current_message !== '' ) {
$current_message = '<span class="' . $current_status . '">' . $current_message . '</span>';
$html .= apply_filters( "bsf_license_current_message_{$product_id}", $current_message );
}
if ( $is_active == true ) {
$licnse_active_message = __( 'Your license is active.', 'bsf' );
$licnse_active_message = apply_filters( 'bsf_license_active_message', $licnse_active_message );
$html .= '<span class="license-form-field">';
$html .= '<input type="text" readonly class="' . $license_active_class . ' ' . $size . '-text" id="bsf_license_manager[license_key]" name="bsf_license_manager[license_key]" value="' . esc_attr( $licnse_active_message ) . '"/>';
$html .= '</span>';
$html .= '<input type="hidden" class="' . $size . '-text" id="bsf_license_manager[product_id]" name="bsf_license_manager[product_id]" value="' . esc_attr( stripslashes( $product_id ) ) . '"/>';
do_action( "bsf_before_license_activation_submit_button_{$product_id}" );
$html .= '<input type="submit" class="button ' . $submit_button_class . '" name="bsf_deactivate_license" value="' . esc_attr__( $button_text_deactivate, 'bsf' ) . '"/>';
} else {
if ( $bsf_license_allow_email == true ) {
$html .= '<span class="license-form-field">';
$html .= '<h4>Your Name</h4>';
$html .= '<input type="text" class="' . $size . '-text" id="bsf_license_manager[user_name]" name="bsf_license_manager[user_name]" value=""/>';
$html .= '</span>';
$html .= '<span class="license-form-field">';
$html .= '<h4>Your Email Address</h4>';
$html .= '<input type="email" class="' . $size . '-text" id="bsf_license_manager[user_email]" name="bsf_license_manager[user_email]" value=""/>';
$html .= '</span>';
$html .= '<span class="license-form-field">';
$html .= '<h4>Your License Key</h4>';
$html .= '<input type="text" class="' . $size . '-text" id="bsf_license_manager[license_key]" name="bsf_license_manager[license_key]" value="" autocomplete="off" required/>';
$html .= '</span>';
$html .= '<span class="license-form-field">';
$html .= '</span>';
} else {
$html .= '<span class="license-form-field">';
$html .= '<input type="text" placeholder="' . esc_attr( $placeholder ) . '" class="' . $size . '-text" id="bsf_license_manager[license_key]" name="bsf_license_manager[license_key]" value="" autocomplete="off"/>';
$html .= '</span>';
}
$html .= '<input type="hidden" class="' . $size . '-text" id="bsf_license_manager[product_id]" name="bsf_license_manager[product_id]" value="' . esc_attr( stripslashes( $product_id ) ) . '"/>';
do_action( "bsf_before_license_activation_submit_button_{$product_id}" );
$html .= '<input id="bsf-license-privacy-consent" name="bsf_license_manager[privacy_consent]" type="hidden" value="true" />';
$html .= '<input id="bsf-license-terms-conditions-consent" name="bsf_license_manager[terms_conditions_consent]" type="hidden" value="true" />';
$html .= '<div class="submit-button-wrap">';
$html .= '<input type="submit" class="button ' . $submit_button_class . '" name="bsf_activate_license" value="' . esc_attr__( $button_text_activate, 'bsf' ) . '"/>';
if ( $bsf_license_allow_email == true ) {
$get_license_message = "<p class='purchase-license'><a target='_blank' href='$purchase_url'>Purchase License »</a></p>";
} else {
$get_license_message = "<p>If you don't have a license, you can <a target='_blank' href='$purchase_url'>get it here »</a></p>";
}
$html .= apply_filters( "bsf_get_license_message_{$product_id}", $get_license_message, $purchase_url );
$html .= '</div>';
}
$html .= '</form>';
do_action( "bsf_after_license_activation_form_{$product_id}" );
$html = apply_filters( 'bsf_inlne_license_envato_after_form', $html, $product_id );
$html .= '</div> <!-- envato-license-registration -->';
if ( isset( $_GET['debug'] ) ) {
$html .= get_bsf_systeminfo();
}
// Output the license activation/deactivation form
return apply_filters( "bsf_core_license_activation_form_{$product_id}", $html, $args );
}
/**
* Load Scripts
*
* @since 1.0.0
*
* @param string $hook Current Hook.
* @return void
*/
function load_scripts( $hook = '' ) {
if ( 'plugins.php' === $hook ) {
wp_register_script( 'bsf-core-jquery-history', plugins_url( 'assets/js/jquery-history.js', __FILE__ ), array( 'jquery' ), BSF_UPDATER_VERSION, true );
wp_enqueue_style( 'bsf-core-license-form', plugins_url( 'assets/css/license-form-popup.css', __FILE__ ), array(), BSF_UPDATER_VERSION, 'all' );
wp_enqueue_script( 'bsf-core-license-form', plugins_url( 'assets/js/license-form-popup.js', __FILE__ ), array( 'jquery', 'bsf-core-jquery-history' ), BSF_UPDATER_VERSION, true );
}
}
/**
* Render the link as well as inline license validation form for a plugin.
*/
public function get_bsf_inline_license_form( $links, $args, $license_from_type ) {
$product_id = $args['product_id'];
if ( ! isset( $product_id ) ) {
return $links;
}
if ( is_multisite() && ! is_network_admin() && false == apply_filters( "bsf_core_popup_license_form_per_network_site_{$product_id}", false ) ) {
return $links;
}
$status = 'inactive';
$license_string = __( 'Activate License', 'bsf-core' );
if ( BSF_License_Manager::bsf_is_active_license( $product_id ) ) {
$status = 'active';
$license_string = __( 'License', 'bsf-core' );
}
$product_id = $args['product_id'];
// Render the license form only once on a page.
if ( array_key_exists( $product_id, self::$inline_form_products ) ) {
return $links;
}
$form_args = array(
'product_id' => $product_id,
'button_text_activate' => esc_html__( 'Activate License', 'bsf-core' ),
'button_text_deactivate' => esc_html__( 'Deactivate License', 'bsf-core' ),
'license_form_title' => '',
'license_deactivate_status' => esc_html__( 'Your license is not active!', 'bsf-core' ),
'license_activate_status' => esc_html__( 'Your license is activated!', 'bsf-core' ),
'submit_button_class' => 'bsf-product-license button-default',
'form_class' => 'form-wrap bsf-license-register-' . esc_attr( $product_id ),
'bsf_license_form_heading_class' => 'bsf-license-heading',
'bsf_license_active_class' => 'success-message',
'bsf_license_not_activate_message' => 'license-error',
'size' => 'regular',
'bsf_license_allow_email' => false,
'popup_license_form' => ( isset( $args['popup_license_form'] ) ) ? $args['popup_license_form'] : false,
'license_from_type' => $license_from_type,
);
$form_args = wp_parse_args( $args, $form_args );
self::$inline_form_products[ $product_id ] = $form_args;
$action_links = array(
'license' => '<a plugin-slug="' . esc_attr( $product_id ) . '" class="bsf-core-plugin-link bsf-core-license-form-btn ' . esc_attr( $status ) . '" aria-label="' . esc_attr( $license_string ) . '">' . esc_html( $license_string ) . '</a>',
);
return array_merge( $links, $action_links );
}
/**
* Render the markup for popup form.
*/
public function render_popup_form_markup() {
$current_screen = get_current_screen();
// Bail if not on plugins.php screen.
if( ! is_object( $current_screen ) && null === $current_screen ) {
return;
}
if ( 'plugins' !== $current_screen->id && 'plugins-network' !== $current_screen->id ) {
return;
}
foreach ( self::$inline_form_products as $product_id => $product ) {
?>
<div plugin-slug="<?php echo esc_attr( $product_id ); ?>" class="bsf-core-license-form" style="display: none;">
<div class="bsf-core-license-form-overlay"></div>
<div class="bsf-core-license-form-inner">
<button type="button" class="bsf-core-license-form-close-btn">
<span class="screen-reader-text"><?php esc_html_e( 'Close', 'bsf-core' ); ?></span>
<span class="dashicons dashicons-no-alt"></span>
</button>
<?php
$licence_form_method = isset( $_GET[ 'license-form-method' ] ) ? sanitize_text_field( $_GET[ 'license-form-method' ] ) : '';
if ( 'edd' === $product['license_from_type'] || 'license-key' === $licence_form_method ) {
echo bsf_license_activation_form( $product );
} elseif ( 'envato' === $product['license_from_type'] || 'oauth' === $licence_form_method ) {
echo bsf_envato_register( $product );
}
do_action( "bsf_inlne_license_form_footer_{$product[ 'license_from_type' ]}", $product_id );
do_action( 'bsf_inlne_license_form_footer', $product_id );
// Avoid rendering the markup twice as admin_footer can be called multiple times.
unset( self::$inline_form_products[ $product_id ] );
?>
</div>
</div>
<?php
}
}
} // Class BSF_License_Manager
new BSF_License_Manager();
}
function bsf_license_activation_form( $args ) {
$license_manager = BSF_License_Manager::instance();
return $license_manager->license_activation_form( $args );
}
function get_bsf_inline_license_form( $links, $bsf_product_id, $license_from_type ) {
$license_manager = BSF_License_Manager::instance();
return $license_manager->get_bsf_inline_license_form( $links, $bsf_product_id, $license_from_type );
}
@@ -0,0 +1,683 @@
<?php
// delete these transients/options for debugging
// set_site_transient( 'update_plugins', null );
// set_site_transient( 'update_themes', null );
// delete_option( 'brainstrom_products' );
/**
*
*/
if ( ! class_exists( 'BSF_Update_Manager' ) ) {
class BSF_Update_Manager {
public function __construct() {
// update data to WordPress's transient
add_filter(
'pre_set_site_transient_update_plugins',
array(
$this,
'brainstorm_update_plugins_transient',
)
);
add_filter( 'pre_set_site_transient_update_themes', array( $this, 'brainstorm_update_themes_transient' ) );
// display changelog in update details
add_filter( 'plugins_api', array( $this, 'bsf_get_plugin_information' ), 10, 3 );
// display correct error messages
add_action( 'load-plugins.php', array( $this, 'bsf_update_display_license_link' ) );
add_filter( 'upgrader_pre_download', array( $this, 'bsf_change_no_package_message' ), 20, 3 );
}
public function brainstorm_update_plugins_transient( $_transient_data ) {
global $pagenow;
if ( ! is_object( $_transient_data ) ) {
$_transient_data = new stdClass();
}
$update_data = $this->bsf_update_transient_data( 'plugins' );
foreach ( $update_data as $key => $product ) {
if ( isset( $product['template'] ) && $product['template'] != '' ) {
$template = $product['template'];
} elseif ( isset( $product['init'] ) && $product['init'] != '' ) {
$template = $product['init'];
}
if ( isset( $_transient_data->response[ $template ] ) ) {
continue;
}
if ( false === $this->enable_auto_updates( $product['id'] ) ) {
continue;
}
$plugin = new stdClass();
$plugin->id = isset( $product['id'] ) ? $product['id'] : '';
$plugin->slug = $this->bsf_get_plugin_slug( $template );
$plugin->plugin = isset( $template ) ? $template : '';
$plugin->upgrade_notice = '';
if ( $this->use_beta_version( $plugin->id ) ) {
$plugin->new_version = isset( $product['version_beta'] ) ? $product['version_beta'] : '';
$plugin->upgrade_notice .= 'It is recommended to use the beta version on a staging enviornment only.';
} else {
$plugin->new_version = isset( $product['remote'] ) ? $product['remote'] : '';
}
$plugin->url = isset( $product['purchase_url'] ) ? $product['purchase_url'] : '';
if ( BSF_License_Manager::bsf_is_active_license( $product['id'] ) == 'registered' ) {
$plugin->package = $this->bsf_get_package_uri( $product['id'] );
} else {
$plugin->package = '';
$bundled = self::bsf_is_product_bundled( $plugin->id );
if ( ! empty( $bundled ) ) {
$parent_id = $bundled[0];
$parent_name = brainstrom_product_name( $parent_id );
$plugin->upgrade_notice = 'This plugin is came bundled with the ' . $parent_name . '. For receiving updates, you need to register license of ' . $parent_name . '.';
} else {
$plugin->upgrade_notice .= ' Please activate your license to receive automatic updates.';
}
}
$plugin->tested = isset( $product['tested'] ) ? $product['tested'] : '';
$plugin->icons = array(
'1x' => ( isset( $product['product_image'] ) ) ? $product['product_image'] : '',
'2x' => ( isset( $product['product_image'] ) ) ? $product['product_image'] : '',
'default' => ( isset( $product['product_image'] ) ) ? $product['product_image'] : '',
);
$_transient_data->last_checked = time();
$_transient_data->response[ $template ] = $plugin;
}
return $_transient_data;
}
public function brainstorm_update_themes_transient( $_transient_data ) {
global $pagenow;
if ( ! is_object( $_transient_data ) ) {
$_transient_data = new stdClass();
}
if ( 'themes.php' != $pagenow && 'update-core.php' !== $pagenow ) {
return $_transient_data;
}
$update_data = $this->bsf_update_transient_data( 'themes' );
foreach ( $update_data as $key => $product ) {
if ( false === $this->enable_auto_updates( $product['id'] ) ) {
continue;
}
if ( isset( $product['template'] ) && $product['template'] != '' ) {
$template = $product['template'];
}
$themes = array();
$themes['theme'] = isset( $template ) ? $template : '';
if ( $this->use_beta_version( $product['id'] ) ) {
$themes['new_version'] = isset( $product['version_beta'] ) ? $product['version_beta'] : '';
} else {
$themes['new_version'] = isset( $product['remote'] ) ? $product['remote'] : '';
}
$themes['url'] = isset( $product['purchase_url'] ) ? $product['purchase_url'] : '';
if ( BSF_License_Manager::bsf_is_active_license( $product['id'] ) == 'registered' ) {
$themes['package'] = $this->bsf_get_package_uri( $product['id'] );
} else {
$themes['package'] = '';
$themes['upgrade_notice'] = 'Please activate your license to receive automatic updates.';
}
$_transient_data->last_checked = time();
$_transient_data->response[ $template ] = $themes;
}
return $_transient_data;
}
/**
* Allow autoupdates to be enabled/disabled per product basis.
*
* @param String $product_id - Product ID.
* @return boolean True - IF updates are to be enabled. False if updates are to be disabled.
*/
private function enable_auto_updates( $product_id ) {
return apply_filters( "bsf_enable_product_autoupdates_{$product_id}", true );
}
/**
* Updates information on the "View version x.x details" page with custom data.
*
* @uses api_request()
*
* @param mixed $_data
* @param string $_action
* @param object $_args
*
* @return object $_data
*/
public function bsf_get_plugin_information( $_data, $_action = '', $_args = null ) {
if ( $_action != 'plugin_information' ) {
return $_data;
}
$brainstrom_products = apply_filters( 'bsf_get_plugin_information', get_option( 'brainstrom_products', array() ) );
$plugins = isset( $brainstrom_products['plugins'] ) ? $brainstrom_products['plugins'] : array();
$themes = isset( $brainstrom_products['themes'] ) ? $brainstrom_products['themes'] : array();
$all_products = $plugins + $themes;
foreach ( $all_products as $key => $product ) {
$product_slug = isset( $product['slug'] ) ? $product['slug'] : '';
if ( $product_slug == $_args->slug ) {
$id = isset( $product['id'] ) ? $product['id'] : '';
$info = new stdClass();
if ( $this->use_beta_version( $id ) ) {
$info->new_version = isset( $product['version_beta'] ) ? $product['version_beta'] : '';
} else {
$info->new_version = isset( $product['remote'] ) ? $product['remote'] : '';
}
$product_name = isset( $product['name'] ) ? $product['name'] : '';
$info->name = apply_filters( "bsf_product_name_{$id}", $product_name );
$info->slug = $product_slug;
$info->version = isset( $product['remote'] ) ? $product['remote'] : '';
$info->author = apply_filters( "bsf_product_author_{$id}", 'Brainstorm Force' );
$info->url = isset( $product['changelog_url'] ) ? apply_filters( "bsf_product_url_{$id}", $product['changelog_url'] ) : apply_filters( "bsf_product_url_{$id}", '' );
$info->homepage = isset( $product['purchase_url'] ) ? apply_filters( "bsf_product_homepage_{$id}", $product['purchase_url'] ) : apply_filters( "bsf_product_homepage_{$id}", '' );
if ( BSF_License_Manager::bsf_is_active_license( $id ) == true ) {
$package_url = $this->bsf_get_package_uri( $id );
$info->package = $package_url;
$info->download_link = $package_url;
}
$info->sections = array();
$product_decription = isset( $product['description'] ) ? $product['description'] : '';
$info->sections['description'] = apply_filters( "bsf_product_description_{$id}", $product_decription );
$product_changelog = 'Thank you for using ' . $info->name . '. </br></br>To make your experience using ' . $info->name . ' better we release updates regularly, you can view the full changelog <a href="' . $info->url . '">here</a>';
$info->sections['changelog'] = apply_filters( "bsf_product_changelog_{$id}", $product_changelog );
$_data = $info;
}
}
return $_data;
}
// helpers
public static function bsf_is_product_bundled( $bsf_product, $search_by = 'id' ) {
$brainstrom_bundled_products = get_option( 'brainstrom_bundled_products', array() );
$product_parent = array();
foreach ( $brainstrom_bundled_products as $parent => $products ) {
foreach ( $products as $key => $product ) {
if ( $search_by == 'init' ) {
if ( $product->init == $bsf_product ) {
$product_parent[] = $parent;
}
} elseif ( $search_by == 'id' ) {
if ( $product->id == $bsf_product ) {
$product_parent[] = $parent;
}
} elseif ( $search_by == 'name' ) {
if ( strcasecmp( $product->name, $bsf_product ) == 0 ) {
$product_parent[] = $parent;
}
}
}
}
// Bundled plugins are installed when the demo is imported on Ajax request and bundled products should be unchanged in the ajax.
if ( ! defined( 'DOING_AJAX' ) ) {
$key = array_search( 'astra-pro-sites', $product_parent );
if ( false !== $key ) {
unset( $product_parent[ $key ] );
}
}
$product_parent = apply_filters( 'bsf_is_product_bundled', array_unique( $product_parent ), $bsf_product, $search_by );
return $product_parent;
}
public function bsf_get_package_uri( $product_id ) {
// use the cached url for 2 hours.
if ( ! $this->time_since_last_versioncheck( 2 ) ) {
$product = get_brainstorm_product( $product_id );
$status = BSF_License_Manager::bsf_is_active_license( $product_id );
if ( $this->use_beta_version( $product_id ) ) {
$download_file = isset( $product['download_url_beta'] ) ? $product['download_url_beta'] : '';
} else {
$download_file = isset( $product['download_url'] ) ? $product['download_url'] : '';
}
if ( $download_file !== '' ) {
if ( $status == false ) {
return '';
}
$timezone = date_default_timezone_get();
$hash = 'file=' . $download_file . '&hashtime=' . strtotime( date( 'd-m-Y h:i:s a' ) ) . '&timezone=' . $timezone;
$get_path = 'http://downloads.brainstormforce.com/';
$download_path = rtrim( $get_path, '/' ) . '/download.php?' . $hash . '&base=ignore';
return $download_path;
}
}
$product = get_brainstorm_product( $product_id );
$status = BSF_License_Manager::bsf_is_active_license( $product_id );
$brainstrom_products = get_option( 'brainstrom_products', array() );
$brainstrom_bundled_products = get_option( 'brainstrom_bundled_products', array() );
$plugins = isset( $brainstrom_products['plugins'] ) ? $brainstrom_products['plugins'] : array();
$themes = isset( $brainstrom_products['themes'] ) ? $brainstrom_products['themes'] : array();
$all_products = $plugins + $themes;
$path = get_api_url() . '?referer=package-' . $product_id;
$is_bundled = self::bsf_is_product_bundled( $product_id );
$purchase_key = isset( $all_products[ $product_id ]['purchase_key'] ) ? $all_products[ $product_id ]['purchase_key'] : null;
$bundled = false;
if ( ! empty( $is_bundled ) ) {
$bundled = true;
}
$data = array(
'action' => 'bsf_product_update_request',
'id' => $product_id,
'username' => '', // username is being depracated in new Graupi
'purchase_key' => $purchase_key,
'site_url' => get_site_url(),
'bundled' => $bundled,
);
$request = wp_remote_post(
$path,
array(
'body' => $data,
'timeout' => '30',
)
);
// Request http URL if the https version fails.
if ( is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) !== 200 ) {
$path = get_api_url( true ) . '?referer=package-' . $product_id;
$request = wp_remote_post(
$path,
array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
$result = json_decode( wp_remote_retrieve_body( $request ) );
if ( isset( $result->error ) && ! $result->error ) {
if ( $this->use_beta_version( $product_id ) ) {
$download_path = $result->update_data->download_url_beta;
} else {
$download_path = $result->update_data->download_url;
}
$timezone = date_default_timezone_get();
$hash = 'file=' . $download_path . '&hashtime=' . strtotime( date( 'd-m-Y h:i:s a' ) ) . '&timezone=' . $timezone;
$get_path = 'http://downloads.brainstormforce.com/';
$download_path = rtrim( $get_path, '/' ) . '/download.php?' . $hash . '&base=ignore';
return $download_path;
}
}
}
public function bsf_update_transient_data( $product_type ) {
$this->_maybe_force_check_bsf_product_updates();
$all_products = array();
$update_required = array();
if ( $product_type == 'plugins' ) {
$all_products = brainstorm_get_all_products( false, true, false );
}
if ( $product_type == 'themes' ) {
$all_products = brainstorm_get_all_products( true, false, true );
}
foreach ( $all_products as $key => $product ) {
$product_id = isset( $product['id'] ) ? $product['id'] : '';
$constant = strtoupper( str_replace( '-', '_', $product_id ) );
$constant = 'BSF_' . $constant . '_CHECK_UPDATES';
if ( defined( $constant ) && ( constant( $constant ) === 'false' || constant( $constant ) === false ) ) {
continue;
}
$remote = isset( $product['remote'] ) ? $product['remote'] : '';
$local = isset( $product['version'] ) ? $product['version'] : '';
$version_beta = isset( $product['version_beta'] ) ? $product['version_beta'] : $remote;
if ( $this->use_beta_version( $product_id ) ) {
$remote = $version_beta;
}
if ( version_compare( $remote, $local, '>' ) ) {
array_push( $update_required, $product );
}
}
return $update_required;
}
public function _maybe_force_check_bsf_product_updates() {
if ( $this->time_since_last_versioncheck( 2 ) ) {
global $ultimate_referer;
$ultimate_referer = 'on-transient-delete-2-hours';
bsf_check_product_update();
update_option( 'bsf_local_transient', (string) current_time( 'timestamp' ) );
set_transient( 'bsf_check_product_updates', true, 2 * 24 * 60 * 60 );
}
}
public function time_since_last_versioncheck( $hours_completed ) {
$seconds = $hours_completed * 3600;
$status = false;
$bsf_local_transient = (int) get_option( 'bsf_local_transient', false );
if ( $bsf_local_transient != false ) {
// Find seconds passed since the last timestamp update (i.e. last request made)
$elapsed_seconds = (int) current_time( 'timestamp' ) - $bsf_local_transient;
// IF time is more than the required seconds allow a new HTTP request.
if ( $elapsed_seconds > $seconds ) {
$status = true;
}
} else {
// If timestamp is not yet set - allow the HTTP request.
$status = true;
}
return $status;
}
public function use_beta_version( $product_id ) {
$product = get_brainstorm_product( $product_id );
$stable = isset( $product['remote'] ) ? $product['remote'] : '';
$beta = isset( $product['version_beta'] ) ? $product['version_beta'] : '';
// If beta version is not set, return
if ( $beta == '' ) {
return false;
}
if ( version_compare( $stable, $beta, '<' ) &&
self::bsf_allow_beta_updates( $product_id ) ) {
return true;
}
return false;
}
public function beta_version_normalized( $beta ) {
$beta_explode = explode( '-', $beta );
$version = $beta_explode[0] . '.' . str_replace( 'beta', '', $beta_explode[1] );
return $version;
}
public static function bsf_allow_beta_updates( $product_id ) {
return apply_filters( "bsf_allow_beta_updates_{$product_id}", false );
}
public function bsf_get_plugin_slug( $template ) {
$slug = explode( '/', $template );
if ( isset( $slug[0] ) ) {
return $slug[0];
}
return '';
}
public function bsf_update_display_license_link() {
$brainstorm_all_products = $this->brainstorm_all_products();
foreach ( $brainstorm_all_products as $key => $product ) {
if ( isset( $product['id'] ) ) {
$id = $product['id'];
if ( isset( $product['template'] ) && $product['template'] != '' ) {
$template = $product['template'];
} elseif ( isset( $product['init'] ) && $product['init'] != '' ) {
$template = $product['init'];
}
if ( BSF_License_Manager::bsf_is_active_license( $id ) == false ) {
if ( is_plugin_active( $template ) ) {
add_action(
"in_plugin_update_message-$template",
array(
$this,
'bsf_add_registration_message',
),
9,
2
);
}
} else {
add_action(
"in_plugin_update_message-$template",
array(
$this,
'add_beta_update_message',
),
9,
2
);
}
}
}
}
public function brainstorm_all_products() {
$brainstrom_products = get_option( 'brainstrom_products', array() );
$brainstrom_products_plugins = isset( $brainstrom_products['plugins'] ) ? $brainstrom_products['plugins'] : array();
$brainstrom_products_themes = isset( $brainstrom_products['themes'] ) ? $brainstrom_products['themes'] : array();
$brainstrom_bundled_products = get_option( 'brainstrom_bundled_products', array() );
$bundled = array();
foreach ( $brainstrom_bundled_products as $parent => $children ) {
foreach ( $children as $key => $product ) {
$bundled[ $product->id ] = (array) $product;
}
}
// array of all the products
$all_products = $brainstrom_products_plugins + $brainstrom_products_themes + $bundled;
return $all_products;
}
public function bsf_add_registration_message( $plugin_data, $response ) {
$plugin_init = isset( $plugin_data['plugin'] ) ? $plugin_data['plugin'] : '';
if ( '' !== $plugin_init ) {
$product_id = brainstrom_product_id_by_init( $plugin_init );
$bundled = self::bsf_is_product_bundled( $plugin_init, 'init' );
$registration_page = bsf_registration_page_url( '', $product_id );
} else {
$plugin_name = isset( $plugin_data['name'] ) ? $plugin_data['name'] : '';
$product_id = brainstrom_product_id_by_name( $plugin_name );
$bundled = self::bsf_is_product_bundled( $plugin_name, 'name' );
$registration_page = bsf_registration_page_url( '', $product_id );
}
if ( ! empty( $bundled ) ) {
$parent_id = $bundled[0];
$registration_page = bsf_registration_page_url( '', $parent_id );
$parent_name = apply_filters( "bsf_product_name_{$parent_id}", brainstrom_product_name( $parent_id ) );
$message = sprintf( __( ' <br>This plugin is came bundled with the <i>%1$s</i>. For receiving updates, you need to register license of <i>%2$s</i> <a href="%3$s">here</a>.' ), $parent_name, $parent_name, $registration_page );
} else {
$message = sprintf( __( ' <i>Click <a href="%1$s">here</a> to activate your license.</i>' ), $registration_page );
}
if ( true == self::bsf_allow_beta_updates( $product_id ) && $this->is_beta_version( $plugin_data['new_version'] ) ) {
$message = $message . ' <i>It is recommended to use the beta version on a staging enviornment only.</i>';
}
echo $message;
}
public function add_beta_update_message( $plugin_data, $response ) {
$plugin_init = isset( $plugin_data['plugin'] ) ? $plugin_data['plugin'] : '';
if ( '' !== $plugin_init ) {
$product_id = brainstrom_product_id_by_init( $plugin_init );
} else {
$product_id = brainstrom_product_id_by_name( $plugin_name );
}
if ( true == self::bsf_allow_beta_updates( $product_id ) && $this->is_beta_version( $plugin_data['new_version'] ) ) {
echo ' <i>It is recommended to use the beta version on a staging enviornment only.</i>';
}
}
private function is_beta_version( $version ) {
return strpos( $version, 'beta' ) ||
strpos( $version, 'alpha' );
}
public function bsf_change_no_package_message( $reply, $package, $current ) {
// Read atts into separate veriables so that easy to reference below.
$strings = $current->strings;
if ( isset( $current->skin->plugin_info ) ) {
$plugin_info = $current->skin->plugin_info;
$plugin_name = $plugin_info['Name'];
$product_id = brainstrom_product_id_by_name( $plugin_name );
$plugin_name = apply_filters( "bsf_product_name_{$product_id}", $plugin_name );
$is_bundled = self::bsf_is_product_bundled( $plugin_name, 'name' );
$registration_page_url = bsf_registration_page_url( '', $product_id );
if ( empty( $is_bundled ) ) {
if ( strcasecmp( $plugin_info['Author'], 'Brainstorm Force' ) !== 0 ) {
// This is not our product, let's leave.
return $reply;
}
} else {
$is_bundled = isset( $is_bundled[0] ) ? $is_bundled[0] : $plugin_name;
$plugin_name = apply_filters( "bsf_product_name_{$is_bundled}", brainstrom_product_name( $is_bundled ) );
$registration_page_url = bsf_registration_page_url( '', $is_bundled );
}
$strings['downloading_package'] = 'Downloading the package...';
if ( $plugin_info['Author'] == 'Brainstorm Force' ) {
$plugin_init = BSF_License_Manager::instance()->bsf_get_product_info( $product_id, 'template' );
if ( is_plugin_active( $plugin_init ) ) {
$strings['no_package'] = sprintf(
__( 'Click <a target="_blank" href="%1$1s">here</a> to activate license of <i>%2$2s</i> to receive automatic updates.' ),
$registration_page_url,
$plugin_name
);
} else {
$strings['no_package'] = sprintf(
__( 'Activate license of <i>%2s</i> to receive automatic updates.' ),
$plugin_name
);
}
} elseif ( $is_bundled !== '' ) {
$strings['no_package'] = sprintf(
__( 'This plugin is came bundled with the <i>%1$1s</i>. For receiving updates, you need to register license of <i>%2$2s</i> <a target="_blank" href="%3$3s">here</a>.' ),
$plugin_name,
$plugin_name,
$registration_page_url
);
}
} elseif ( isset( $current->skin->theme_info ) ) {
$theme_info = $current->skin->theme_info;
$theme_author = $theme_info->get( 'Author' );
$theme_name = $theme_info->get( 'Name' );
$product_id = brainstrom_product_id_by_name( $theme_name );
if ( $theme_author == 'Brainstorm Force' ) {
$strings['downloading_package'] = 'Downloading the package...';
$strings['no_package'] = sprintf(
__( 'Click <a target="_blank" href="%1$1s">here</a> to activate license of <i>%2$2s</i> to receive automatic updates.' ),
bsf_registration_page_url( '', $product_id ),
$theme_name
);
}
}
// restore the strings back to WP_Upgrader
$current->strings = $strings;
// We are not changing teh return parameter.
return $reply;
}
} // class BSF_Update_Manager
new BSF_Update_Manager();
}
@@ -0,0 +1,88 @@
<?php
class BSF_WP_CLI_Command extends WP_CLI_Command {
private $license_manager = '';
public function __construct() {
$this->license_manager = new BSF_License_Manager();
}
/**
* WP CLI Command to activate and deactivate licenses for brainstormforce products.
*
* ## OPTIONS
*
* <action>
* activate or deactivate
*
* <priduct-id>
* Product id is unique for each brainstorm product, it can be found in the file <product-root-directory>/admin/.bsf.yml
*
* <license-key>
* Your purchase key.
*
* ## EXAMPLES
*
* 1. wp brainstormforce license activate uabb <purchase-key>
* - This will activate the license for plugin Ultimate Addons for beaver builder with purchase key <purchase-key>
* 2. wp brainstormforce license deactivate uabb <purchase-key>
* - This will deactivate the license for plugin Ultimate Addons for beaver builder with purchase key <purchase-key>
*/
public function license( $args, $assoc_args ) {
if ( isset( $args[0] ) && $args[0] == 'activate' || $args[0] == 'deactivate' ) {
$action = $args[0];
} else {
WP_CLI::error( 'Please enter the correct action.' );
}
if ( isset( $args[1] ) ) {
$poduct_id = $args[1];
} else {
WP_CLI::error( 'Please enter a product id.' );
}
if ( isset( $args[2] ) ) {
$purchase_key = $args[2];
} else {
WP_CLI::error( 'Please enter the purchase key.' );
}
// Setup brainstorm_products data.
init_bsf_core();
$_POST = array(
'bsf_license_manager' => array(
'license_key' => $purchase_key,
'product_id' => $poduct_id,
),
);
if ( $action == 'activate' ) {
$_POST['bsf_activate_license'] = true;
$this->license_manager->bsf_activate_license();
} else {
$_POST['bsf_deactivate_license'] = true;
$this->license_manager->bsf_deactivate_license();
}
if ( isset( $_POST['bsf_license_activation']['success'] ) && $_POST['bsf_license_activation']['success'] == true ) {
$success_message = esc_attr( $_POST['bsf_license_activation']['message'] );
WP_CLI::success( $success_message );
} else {
$error_message = esc_attr( $_POST['bsf_license_activation']['message'] );
WP_CLI::error( $error_message );
}
}
}
if ( class_exists( 'WP_CLI' ) ) {
WP_CLI::add_command( 'brainstormforce', 'BSF_WP_CLI_Command' );
}
@@ -0,0 +1,172 @@
/* ========================================================================
* Frosty.js
* https://owensbla.github.com/frosty
* by Blake Owens (http://blakeowens.com/)
* ======================================================================== */
.bsf-has-tip,
.has-tip {
cursor: help;
}
.tip {
background-color: black;
background-color: rgba(0, 0, 0, 0.8);
color: #eeeeee;
font-size: 11px;
line-height: 1.5em;
max-width: 200px;
padding: 4px 8px;
}
.tip.success {
background-color: #47fe42;
background-color: rgba(71, 254, 66, 0.8);
color: #025600;
}
.tip.error {
background-color: #ff7f86;
background-color: rgba(255, 127, 134, 0.8);
color: #7f0006;
}
.tip.light {
background-color: #ebebeb;
background-color: rgba(235, 235, 235, 0.8);
color: #222222;
}
.tip[class*="arrow"]:before {
content: ' ';
position: absolute;
border: solid transparent;
width: 0px;
height: 0px;
border-width: 5px;
border-color: black;
border-color: rgba(0, 0, 0, 0.8);
}
.success[class*="arrow"]:before {
border-color: #47fe42;
border-color: rgba(71, 254, 66, 0.8);
}
.error[class*="arrow"]:before {
border-color: #ff7f86;
border-color: rgba(255, 127, 134, 0.8);
}
.light[class*="arrow"]:before {
border-color: #ebebeb;
border-color: rgba(235, 235, 235, 0.8);
}
.tip.arrow-right:before {
border-right-color: transparent;
border-top-color: transparent;
border-bottom-color: transparent;
margin-top: -5px;
top: 50%;
left: 100%;
}
.tip.arrow-left:before {
border-left-color: transparent;
border-top-color: transparent;
border-bottom-color: transparent;
margin-top: -5px;
top: 50%;
right: 100%;
}
.tip.arrow-top:before {
border-top-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
margin-left: -5px;
bottom: 100%;
left: 50%;
}
.tip.arrow-bottom:before {
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
margin-left: -5px;
top: 100%;
left: 50%;
}
/* Customizer Tooltip */
.customize-support .tip {
background-color: rgba(0, 148, 221, 0.95);
color: #FFF;
font-size: 13px;
line-height: 1.5em;
max-width: 200px;
padding: 5px 11px;
border: 1px solid #0094DD;
border-radius: 1px;
}
.customize-support .tip[class*="arrow"]:before {
border-width: 5px;
border-color: #0094DD;
border-color: rgba(0, 148, 221, 0.95);
}
.customize-support .tip.arrow-right:before {
border-right-color: transparent;
border-top-color: transparent;
border-bottom-color: transparent;
margin-top: -5px;
top: 50%;
left: 100%;
}
.customize-support .tip.arrow-left:before {
border-left-color: transparent;
border-top-color: transparent;
border-bottom-color: transparent;
margin-top: -5px;
top: 50%;
right: 100%;
}
.customize-support .tip.arrow-top:before {
border-top-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
margin-left: -5px;
bottom: 100%;
left: 50%;
}
.customize-support .tip.arrow-bottom:before {
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
margin-left: -5px;
top: 100%;
left: 50%;
}
/*---close button tooltip--------*/
.tip[class*="close-tip-content"]{
border-radius:7px;
max-width:300px;
padding: 15px 30px;
}
.tip[class*="close-tip-content"]:before{
border-width: 8px!important;
margin-top: -8px!important;
}
.tip[class*="close-tip-content"][class*="arrow-bottom"]{
/* margin-top:-10px; */
}
.tip[class*="close-tip-content"][class*="arrow-bottom"]:before{
margin-top: -1px!important;
}
.tip[class*="close-tip-content"][class*="arrow-right"]:before {
left: 100%;
left: calc(100% - 1px);
}
.cp-innertip.tip[class*="close-tip-content"][class*="arrow"]{
margin-top: 30px!important;
}
@media (max-width:768px) {
.tip[class*="close-tip-content"]{
border-radius:7px;
max-width:200px;
padding: 5px 20px;
}
}
@media (max-width:610px) {
.tip[class*="close-tip-content"]{
max-width:170px;
}
}
@@ -0,0 +1,138 @@
.bsf-core-license-form p {
padding: 5px 0px 5px 0px;
font-style: normal;
}
.license-form-allow-email .submit-button-wrap > input,
.license-form-allow-email .submit-button-wrap > p {
display: inline-block;
vertical-align: bottom;
}
.bsf-core-license-form .license-form-allow-email .purchase-license a {
text-decoration: none;
}
.license-form-allow-email {
margin-bottom: 15px;
}
.license-form-allow-email .license-form-external-links {
font-style: italic;
}
.license-form-field input {
width: 100%;
}
.bsf-core-license-form .license-form-allow-email h3 {
font-size: 2em;
margin-bottom: 0.5em;
}
.bsf-core-license-form .license-form-allow-email .purchase-license {
margin-left: 10px;
}
.bsf-core-license-form .license-form-allow-email .submit-button-wrap {
padding: 20px 0px 10px 0px;
}
.license-form-allow-email .bsf-core-license-form-inner, {
padding: 10px 30px 30px;
}
.bsf-core-license-form .bsf-core-license-form-overlay {
background: #000;
opacity: 0.7;
filter: alpha(opacity=70);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 100050;
}
.bsf-core-license-form .bsf-core-license-form-inner {
background: #fcfcfc;
position: fixed;
background-color: #fff;
z-index: 999999999;
padding: 2px 20px 20px;
text-align: left;
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
}
.bsf-core-license-form-close-btn {
position: absolute;
left: auto;
right: 0;
top: 0;
width: 29px;
height: 29px;
border: 0;
padding: 0;
background: none;
cursor: pointer;
outline: none;
-webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
-webkit-transform: translateX(100%);
transform: translateX(100%);
transition: color .1s ease-in-out, background .1s ease-in-out;
color: #eee;
}
.bsf-core-license-form-close-btn:hover {
color: #00a0d2;
}
.bsf-core-license-form-close-btn .dashicons {
display: block;
text-align: center;
line-height: 29px;
width: 29px;
height: 29px;
font-size: 29px;
position: absolute;
top: 0;
right: 0;
}
.bsf-core-license-form .license-form-field input.regular-text {
margin-right: 10px;
}
/** License link */
.bsf-core-license-form-btn.inactive {
color: #3db634;
font-weight: 500;
}
.bsf-core-license-form-btn {
cursor: pointer;
}
.bsf-license-message.license-success {
display: none;
}
.bsf-system-info-wrapper {
overflow: scroll;
max-height: 60vh;
}
.bsf-license-heading {
margin: 1em 0;
}
.bsf-license-not-active-astra-portfolio.bsf-license-heading {
margin: 1em 0 0 0;
}
.envato-license-registration form {
margin-bottom: 1em;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,146 @@
input.form-control.smile-switch.switch + label.bsf-switch-btn:before {
display: none;
}
input.form-control.smile-input.bsf-switch-input {
display: none;
}
.switch-wrapper {
width: 95px;
}
.shadow_type .onoffswitch-switch {
width: 45px;
}
.shadow_type .onoffswitch-inactive .onoffswitch-switch:before {
right: 45px;
}
.shadow_type .onoffswitch-active .onoffswitch-switch:before {
left: 45px;
}
.ios-toggle, .ios-toggle:active {
position:absolute;
top:-5000px;
height:0;
width:0;
opacity:0;
border:none;
outline:none;
}
.checkbox-label {
display:block;
position:relative;
padding:0px;
margin: 0px;
margin-bottom:20px;
font-size:12px;
line-height:16px;
width:40px;
height:20px;
-webkit-border-radius:18px;
-moz-border-radius:18px;
border-radius:18px;
background:#f8f8f8;
cursor:pointer;
-webkit-transition:.25s ease-in-out;
-moz-transition:.25s ease-in-out;
-o-transition:.25s ease-in-out;
transition:.25s ease-in-out;
}
.checkbox-label:before {
content:'';
display:block;
position:absolute;
z-index:1;
line-height:34px;
text-indent:40px;
height:20px;
width:20px;
-webkit-border-radius:100%;
-moz-border-radius:100%;
border-radius:100%;
top:0px;
left:0px;
right:auto;
background:white;
-webkit-box-shadow:0 3px 3px rgba(0, 0, 0, .2), 0 0 0 2px #dddddd;
-moz-box-shadow:0 3px 3px rgba(0, 0, 0, .2), 0 0 0 2px #dddddd;
box-shadow:0 3px 3px rgba(0, 0, 0, .2), 0 0 0 2px #dddddd;
-webkit-transition:.25s ease-in-out;
-moz-transition:.25s ease-in-out;
-o-transition:.25s ease-in-out;
transition:.25s ease-in-out;
}
.checkbox-label:after {
content: attr(data-off);
font-size: 13px;
display: block;
position: absolute;
z-index: 0;
top: 0;
left: 50px;
padding: 0;
height: 20px;
line-height: 20px;
width: 36px;
text-align: left;
color: #BFBFBF;
white-space: nowrap;
-webkit-transition: .25s ease-in-out;
-moz-transition: .25s ease-in-out;
-o-transition: .25s ease-in-out;
transition: .25s ease-in-out;
}
/* Switch CHECKBOX */
.switch-checkbox + .checkbox-label {
-webkit-box-shadow:inset 0 0 0 18px #dddddd, 0 0 0 2px #dddddd;
-moz-box-shadow:inset 0 0 0 18px #dddddd, 0 0 0 2px #dddddd;
box-shadow:inset 0 0 0 18px #dddddd, 0 0 0 2px #dddddd;
background: #dddddd;
}
.switch-checkbox:checked + .checkbox-label {
-webkit-box-shadow:inset 0 0 0 18px #0094DD, 0 0 0 2px #0094DD;
-moz-box-shadow:inset 0 0 0 18px #0094DD, 0 0 0 2px #0094DD;
box-shadow:inset 0 0 0 18px #0094DD, 0 0 0 2px #0094DD;
background: #0094DD;
}
.switch-checkbox:checked + .checkbox-label:after {
color:#0094DD;
-webkit-transition:.25s ease-in-out;
-moz-transition:.25s ease-in-out;
-o-transition:.25s ease-in-out;
transition:.25s ease-in-out;
}
/* Toggle Checkbox */
.ios-toggle:checked + .checkbox-label {
-webkit-box-shadow:inset 0 0 0 20px #0094DD, 0 0 0 2px #0094DD;
-moz-box-shadow:inset 0 0 0 20px #0094DD, 0 0 0 2px #0094DD;
box-shadow:inset 0 0 0 20px #0094DD, 0 0 0 2px #0094DD;
}
.ios-toggle:checked + .checkbox-label:before {
left:calc(100% - 21px);
-webkit-box-shadow:0 0 0 1px transparent, 0 2px 2px rgba(0, 0, 0, .3);
-moz-box-shadow:0 0 0 1px transparent, 0 2px 2px rgba(0, 0, 0, .3);
box-shadow:0 0 0 1px transparent, 0 2px 2px rgba(0, 0, 0, .3);
-webkit-transition:.25s ease-in-out;
-moz-transition:.25s ease-in-out;
-o-transition:.25s ease-in-out;
transition:.25s ease-in-out;
}
.ios-toggle:checked + .checkbox-label:after {
content:attr(data-on);
-webkit-transition:.25s ease-in-out;
-moz-transition:.25s ease-in-out;
-o-transition:.25s ease-in-out;
transition:.25s ease-in-out;
}
.ios-toggle[type=checkbox] {
display: none;
}
.brainstorm-updater-switch {
display: inline-block;
position: absolute;
right: 0;
top: 0;
}
@@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe603;" d="M467.577-21.5c-2.284 7.369-0.104 15.762 7.18 20.556 10.155 6.679 25.5 20.586 84.534 27.952 35.525 4.396-8.694-54.877-3.142-34.181 1.955 7.287-25.91 1.952-25.91 1.952s-46.553-8.773-58.643-24.894c0 0-1.733 2.227-4.019 8.615zM138.271 557.027c0 0 15.887 237.492 368.384 222.11 0 0 146.319-12.099 215.165-56.96 0 0-293.96 10.546-583.551-165.149zM181.807 507.887c0 0 203.521 128.399 558.772 144.239 0 0 48.21-0.329 72.158-35.208 0 0 14.367-31.64 14.086-88.5 0 0-48.229-1.442-85.408-2.723 0 0-355.977-11.586-537.674-199.511 12.648 44.529-121.089 119.532-21.934 181.703zM255.72 238.57c0 0-14.079 43.451 43.498 69.493 54.329 24.572 127.831 96.191 426.625 133.305 0 0 124.558 25.427 48.884-54.439-84.28-88.948-100.337-111.947-100.337-111.947s-22.41-25.55-14.155 5.204c8.255 30.756-120.967 22.15-120.967 22.15s-201.788-45.676-252.733-113.604c0 0-21.178 22.924-30.816 49.839zM369.409 146.887c0 0 106.32 73.825 227.492 55.88 0 0 29.174-1.921-1.115-22.419-30.29-20.503-226.376-33.461-226.376-33.461zM418.719 53.659c0 0-11.482 30.506 7.413 36.941s36.903 30.834 136.907 41.988c40.619-4.038 1.169-110.607-7.296-79.135 2.763 10.295-10.126 9.762-10.126 9.762s-93.985-18.303-111.035-41.039c0 0-12.635 22.476-15.862 31.483zM899.013 687.749c92.851-208.867-26.868-487.037-271.661-536.994 233.968 65.7 273.711 363.944 218.284 497.451-81.853 197.157-343.286 268.698-505.34 206.428-162.056-62.269-203.018-122.175-238.522-224.811 32.087 89.126 91.171 209.056 273.127 278.972 181.958 69.917 431.262-12.179 524.112-221.047z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -0,0 +1,31 @@
jQuery( document ).on('click', '.bsf-envato-form-activation', function(event) {
submitButton = jQuery( this ).parent('.submit-button-wrap');
console.log(submitButton);
product_id = submitButton.siblings( 'form input[name="product_id"]' ).val();
url = submitButton.siblings( 'form input[name="url"]' ).val();
redirect = submitButton.siblings( 'form input[name="redirect"]' ).val();
privacyConsent = submitButton.siblings( 'input#bsf-license-privacy-consent').val();
termsConditionConsent = submitButton.siblings( 'input#bsf-license-terms-conditions-consent').val();
jQuery.ajax({
url: ajaxurl,
dataType: 'json',
data: {
action: 'bsf_envato_redirect_url',
product_id: product_id,
url: url,
redirect: redirect,
privacy_consent: privacyConsent,
terms_conditions_consent: termsConditionConsent,
}
})
.done(function( response ) {
window.location = response.data.url;
return true;
})
.fail(function(e) {
return false;
});
return false;
});
@@ -0,0 +1,263 @@
/* ========================================================================
* Frosty.js v1.0
* https://github.com/owensbla/frosty
* http://labs.blakeowens.com/frosty
*
* Plugin boilerplate provied by: http://jqueryboilerplate.com/
* ========================================================================
* Copyright 2013 Blake Owens
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ======================================================================== */
;(function ($, window, document, undefined) {
var pluginName = "frosty";
var defaults = {
attribute: 'title',
className: 'tip',
content: '',
delay: 0,
hasArrow: true,
html: false,
offset: 30,
position: 'left',
removeTitle: true,
selector: false,
trigger: 'hover,focus',
onHidden: function() {},
onShown: function() {},
};
function Frosty(anchor, options) {
this.anchor = anchor;
this.$anchor = $(anchor);
this.options = $.extend({}, defaults, options, this.$anchor.data());
this._defaults = defaults;
this._name = pluginName;
this.init();
}
Frosty.prototype = {
init: function () {
this._createTip();
this._bindEvents();
},
show: function() {
var _this = this,
delay = typeof this.options.delay === 'object' ? parseInt(this.options.delay.show) : parseInt(this.options.delay);
clearTimeout(this.timeout);
this.timeout = delay === 0 ?
this._setState('visible') :
setTimeout(function() { _this._setState('visible'); }, delay);
},
hide: function() {
var _this = this
delay = typeof this.options.delay === 'object' ? parseInt(this.options.delay.hide) : parseInt(this.options.delay);
clearTimeout(this.timeout);
this.timeout = delay === 0 ?
this._setState('hidden') :
setTimeout(function() { _this._setState('hidden'); }, delay);
},
toggle: function() {
this.state === 'visible' ? this.hide() : this.show();
},
addClass: function(klass) {
console.log("in");
if (typeof klass === 'string') { this.$el.addClass(klass); }
},
removeClass: function(klass) {
if (typeof klass === 'string') { this.$el.removeClass(klass); }
},
_setState: function(state) {
this.state = state;
switch (state) {
case 'visible':
this.$el.appendTo('body');
this._checkContent();
this._setPosition();
this.options.onShown.call(this);
this.$anchor.trigger('shown');
break;
case 'hidden':
this.$el.detach();
this.options.onHidden.call(this);
this.$anchor.trigger('hidden');
break;
}
},
_checkContent: function() {
if (this.options.selector) {
this.tipContent = $(this.options.selector).html();
this.$el.html(this.tipContent);
}
},
_createTip: function() {
if (this.options.html) {
this.tipContent = this.options.content;
} else if (this.options.selector) {
this.tipContent = $(this.options.selector).html();
} else {
this.tipContent = this.$anchor.attr(this.options.attribute);
if (this.options.attribute === 'title' && this.options.removeTitle) {
this.$anchor.attr('data-original-title', this.tipContent);
this.$anchor.removeAttr('title');
}
}
this.$el = $('<div />', {
'class': this.options.className,
html: '<span class="cp_tooltip_text">'+this.tipContent+'</span>'
}).css({
'z-index': '9999999999',
'left': '-9999px',
'position': 'absolute',
});
this.$el.appendTo('body');
var coords = this.getPosition();
this.$el.detach().css(coords);
if (this.options.hasArrow) { this._addArrowClass(); }
},
_addArrowClass: function() {
switch (this.options.position) {
case 'left':
this.$el.addClass('arrow-right');
break;
case 'right':
this.$el.addClass('arrow-left');
break;
case 'bottom':
this.$el.addClass('arrow-top');
break;
default:
this.$el.addClass('arrow-bottom');
}
},
_bindEvents: function() {
switch (this.options.trigger) {
case 'click':
this.$anchor.click($.proxy(this.toggle, this));
break
case 'manual':
break;
case 'focus':
this.$anchor.focus($.proxy(this.show, this));
this.$anchor.blur($.proxy(this.hide, this));
break;
default:
this.$anchor.hover($.proxy(this.show, this), $.proxy(this.hide, this));
}
//$(window).resize($.proxy(this._setPosition, this));
},
getPosition: function () {
var coords = this.$anchor.offset();
switch (this.options.position) {
case 'left':
coords.left = coords.left - this.$el.outerWidth() - this.options.offset;
coords.top = coords.top + (this.$anchor.outerHeight() / 2) - (this.$el.outerHeight() / 2);
break;
case 'right':
coords.left = coords.left + this.$anchor.outerWidth() + this.options.offset;
coords.top = coords.top + (this.$anchor.outerHeight() / 2) - (this.$el.outerHeight() / 2);
break;
case 'bottom':
coords.top = coords.top + this.$anchor.outerHeight() + this.options.offset;
coords.left = coords.left + (this.$anchor.outerWidth() / 2) - (this.$el.outerWidth() / 2);
break;
default:
coords.top = coords.top - this.$el.outerHeight() - this.options.offset;
var left = coords.left + (this.$anchor.outerWidth() / 2) - (this.$el.outerWidth() / 2);
if( left < 0 )
left = 0;
coords.left = left;
}
//console.log(coords);
return coords;
},
_setPosition: function() {
this.$el.css(this.getPosition());
}
};
$.fn[pluginName] = function (options, args) {
//console.log($.data(this, "plugin_" + pluginName));
if (typeof options === 'string') {
//console.log(options);
switch (options) {
case 'show':
this.each(function() { $.data(this, "plugin_" + pluginName)['show'](); });
break;
case 'hide':
this.each(function() { $.data(this, "plugin_" + pluginName)['hide'](); });
break;
case 'toggle':
this.each(function() { $.data(this, "plugin_" + pluginName)['toggle'](); });
break;
case 'addClass':
this.each(function() { $.data(this, "plugin_" + pluginName)['addClass'](args); });
break;
case 'removeClass':
this.each(function() { $.data(this, "plugin_" + pluginName)['removeClass'](args); });
break;
}
}
return this.each(function () {
if (!$.data(this, "plugin_" + pluginName)) {
$.data(this, "plugin_" + pluginName, new Frosty(this, options));
}
});
};
})(jQuery, window, document);
(function($){
$(document).ready(function(){
$('.bsf-has-tip, .has-tip').each(function(i,tip){
$tip = $(tip);
var attribute = (typeof $tip.attr('data-attribute') != 'undefined') ? $tip.attr('data-attribute') : 'title';
var offset = (typeof $tip.attr('data-offset') != 'undefined') ? $tip.attr('data-offset') : 10;
var position = (typeof $tip.attr('data-position') != 'undefined') ? $tip.attr('data-position') : 'top';
var trigger = (typeof $tip.attr('data-trigger')) ? $tip.attr('data-trigger') : 'hover,focus';
var className = (typeof $tip.attr('data-classes') != 'undefined') ? 'tip '+$tip.attr('data-classes') : 'tip';
$tip.frosty({
className : className,
attribute: attribute,
offset: offset,
position: position,
trigger: trigger
});
});
});
})(jQuery);
@@ -0,0 +1 @@
(function(e,t){"use strict";var n=e.History=e.History||{},r=e.jQuery;if(typeof n.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(e,t,n){r(e).bind(t,n)},trigger:function(e,t,n){r(e).trigger(t,n)},extractEventData:function(e,n,r){var i=n&&n.originalEvent&&n.originalEvent[e]||r&&r[e]||t;return i},onDomLoad:function(e){r(e)}},typeof n.init!="undefined"&&n.init()})(window),function(e,t){"use strict";var n=e.console||t,r=e.document,i=e.navigator,s=!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;try{s=e.sessionStorage,s.setItem("TEST","1"),s.removeItem("TEST")}catch(d){s=!1}l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(e){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(d){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?nLine truncated
@@ -0,0 +1,151 @@
(function($){
BSFCoreLicenseForm = {
/**
* Init
*/
init: function()
{
this._showFormOnLoad();
this._bind();
},
/**
* Binds events
*/
_bind: function()
{
$( document ).on('click', '.bsf-core-license-form-btn', BSFCoreLicenseForm._showFormOnClick);
$( document ).on('click', '.bsf-core-license-form-close-btn', BSFCoreLicenseForm._closeForm);
$( document ).on('click', '.bsf-core-license-form .bsf-core-license-form-overlay', BSFCoreLicenseForm._closeForm);
},
_changeURL: function( url )
{
History.pushState(null, null, url);
},
/**
* Show form on Load
*/
_showFormOnLoad: function( e )
{
if( BSFCoreLicenseForm._getParamFromURL('bsf-inline-license-form') ) {
var slug = BSFCoreLicenseForm._getParamFromURL('bsf-inline-license-form');
BSFCoreLicenseForm._showForm( slug );
}
},
/**
* Show form on Click
*/
_showFormOnClick: function( e )
{
// don't override click action if the link is not from the popup form.
var licenseFormURl = $( this ).attr('href') || '';
if ( null !== BSFCoreLicenseForm._getParamFromURL('bsf-inline-license-form', licenseFormURl) ||
true === $( this ).hasClass('bsf-core-plugin-link') ) {
e.preventDefault();
var slug = $( this ).attr('plugin-slug') || '';
var url_params = {'bsf-inline-license-form':slug};
BSFCoreLicenseForm._showForm( slug );
// Change URL.
if( ! BSFCoreLicenseForm._getParamFromURL('bsf-inline-license-form') ) {
var current_url = window.location.href;
var current_url_separator = ( window.location.href.indexOf( "?" ) === -1 ) ? "?" : "&";
var new_url = current_url + current_url_separator + decodeURIComponent( $.param( url_params ) );
BSFCoreLicenseForm._changeURL( new_url );
}
}
},
/**
* Show form by slug
*/
_showForm: function( slug )
{
if( $(".bsf-core-license-form[plugin-slug='"+slug+"']").length ) {
$(".bsf-core-license-form[plugin-slug='"+slug+"']").show();
$('body').addClass('bsf-core-license-form-open');
}
},
/**
* Close form.
*/
_closeForm: function( e )
{
e.preventDefault();
$('.bsf-core-license-form').hide();
$('body').removeClass('bsf-core-license-form-open');
if( BSFCoreLicenseForm._getParamFromURL('bsf-inline-license-form') ) {
var url_params = BSFCoreLicenseForm._getQueryStrings();
delete url_params['bsf-inline-license-form'];
delete url_params['bsf-inline-license-form'];
delete url_params['license_action'];
delete url_params['token'];
delete url_params['product_id'];
delete url_params['purchase_key'];
delete url_params['success'];
delete url_params['status'];
delete url_params['message'];
delete url_params['debug'];
delete url_params['activation_method'];
var current_url = window.location.href;
var root_url = current_url.substr(0, current_url.indexOf('?'));
if( jQuery.isEmptyObject( url_params ) ) {
var new_url = root_url + decodeURIComponent( $.param( url_params ) );
} else {
var current_url_separator = ( root_url.indexOf( "?" ) === -1 ) ? "?" : "&";
var new_url = root_url + current_url_separator + decodeURIComponent( $.param( url_params ) );
}
// Change URL.
BSFCoreLicenseForm._changeURL( new_url );
}
},
/**
* Get URL param.
*/
_getParamFromURL: function(name, url)
{
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
},
/**
* Get query strings.
*/
_getQueryStrings( str )
{
return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
}
};
/**
* Initialization
*/
$(function(){
BSFCoreLicenseForm.init();
});
})(jQuery);
@@ -0,0 +1,16 @@
jQuery(document).ready(function(){
var switch_btn = jQuery(".bsf-switch-btn");
jQuery(document).on('click', '.bsf-switch-btn', function(e){
var id = jQuery(this).data('id');
var value = jQuery(this).parents(".switch-wrapper").find("#"+id).val();
if( value == 1 || value == '1' ) {
jQuery(this).parents(".switch-wrapper").find("#"+id).attr('value','0');
} else {
jQuery(this).parents(".switch-wrapper").find("#"+id).attr('value','1');
}
jQuery(this).parents(".switch-wrapper").find(".bsf-switch-input").trigger('change');
});
});
@@ -0,0 +1,944 @@
<?php
// Generate 32 characters
if ( ! function_exists( 'bsf_generate_rand_token' ) ) {
function bsf_generate_rand_token() {
$validCharacters = 'abcdefghijklmnopqrstuvwxyz0123456789';
$myKeeper = '';
$length = 32;
for ( $n = 1; $n < $length; $n++ ) {
$whichCharacter = rand( 0, strlen( $validCharacters ) - 1 );
$myKeeper .= $validCharacters{$whichCharacter};
}
return $myKeeper;
}
}
// product registration
add_action( 'wp_ajax_bsf_register_product', 'bsf_register_product_callback' );
if ( ! function_exists( 'bsf_register_product_callback' ) ) {
function bsf_register_product_callback() {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$brainstrom_users = ( get_option( 'brainstrom_users' ) ) ? get_option( 'brainstrom_users' ) : array();
$bsf_product_plugins = $bsf_product_themes = array();
$type = isset( $_POST['type'] ) ? $_POST['type'] : '';
$product = isset( $_POST['product'] ) ? $_POST['product'] : '';
$id = isset( $_POST['id'] ) ? $_POST['id'] : '';
$bsf_username = isset( $_POST['bsf_username'] ) ? $_POST['bsf_username'] : '';
$bsf_useremail = isset( $_POST['bsf_useremail'] ) ? $_POST['bsf_useremail'] : '';
$purchase_key = isset( $_POST['purchase_key'] ) ? $_POST['purchase_key'] : '';
$version = isset( $_POST['version'] ) ? $_POST['version'] : '';
$step = isset( $_POST['step'] ) ? $_POST['step'] : '';
$product_name = isset( $_POST['product_name'] ) ? $_POST['product_name'] : '';
$token = bsf_generate_rand_token();
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
$product_key = $is_edd = '';
if ( $type === 'plugin' || $type === 'theme' ) {
$bsf_products_array = array();
if ( $type == 'plugin' ) {
$bsf_products_array = $bsf_product_plugins;
} elseif ( $type == 'theme' ) {
$bsf_products_array = $bsf_product_themes;
}
if ( ! empty( $bsf_products_array ) ) :
foreach ( $bsf_products_array as $key => $bsf_product ) {
$bsf_template = $bsf_product['template'];
if ( $product == $bsf_template ) {
$product_key = $key;
$brainstrom_products[ $type . 's' ][ $key ]['purchase_key'] = $purchase_key;
$brainstrom_products[ $type . 's' ][ $key ]['version'] = $version;
$brainstrom_products[ $type . 's' ][ $key ]['product_name'] = $product_name;
$is_edd = ( isset( $brainstrom_products[ $type . 's' ][ $key ]['edd'] ) ) ? $brainstrom_products[ $type . 's' ][ $key ]['edd'] : '';
}
}
endif;
}
update_option( 'brainstrom_products', $brainstrom_products );
$path = get_api_url() . '?referer=register-product-' . $id;
$data = array(
'action' => 'bsf_product_registration',
'purchase_key' => $purchase_key,
'bsf_username' => $bsf_username,
'bsf_useremail' => $bsf_useremail,
'site_url' => get_site_url(),
'version' => $version,
'token' => $token,
'referer' => 'customer',
'id' => $id,
);
if ( $is_edd ) {
$data['edd'] = $is_edd;
}
$data = apply_filters( 'bsf_product_registration_args', $data );
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
// Request http URL if the https version fails.
if ( is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) !== 200 ) {
$path = get_api_url( true ) . '?referer=register-product-' . $id;
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
$result = json_decode( $request['body'] );
$status = '';
// echo json_encode($result); die();
if ( isset( $result->status ) ) {
$status = $result->status;
$brainstrom_products[ $type . 's' ][ $product_key ]['status'] = $status;
}
if ( $status === 'registered' ) {
$brainstrom_products[ $type . 's' ][ $product_key ]['step'] = 'step-all-success';
$temp_info['product_info'] = $brainstrom_products[ $type . 's' ][ $product_key ];
$user_array = array(
'email' => $bsf_useremail,
'token' => $token,
);
if ( ! empty( $brainstrom_users ) ) {
$find_key = false;
foreach ( $brainstrom_users as $key => $user ) {
if ( $user['email'] === $bsf_useremail ) {
$brainstrom_users[ $key ]['token'] = $token;
$find_key = true;
}
}
if ( ! $find_key ) {
array_push( $brainstrom_users, $user_array );
}
} else {
array_push( $brainstrom_users, $user_array );
}
update_option( 'brainstrom_users', $brainstrom_users );
}
update_option( 'brainstrom_products', $brainstrom_products );
echo json_encode( $result );
} else {
$arr = array( 'response' => $request->get_error_message() );
echo json_encode( $arr );
}
wp_die();
} //end of bsf_register_product_callback
}
// function to de register licence
add_action( 'wp_ajax_bsf_deregister_product', 'bsf_deregister_product_callback' );
if ( ! function_exists( 'bsf_deregister_product_callback' ) ) {
function bsf_deregister_product_callback() {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$bsf_product_plugins = $bsf_product_themes = array();
$type = isset( $_POST['type'] ) ? $_POST['type'] : '';
$product = isset( $_POST['product'] ) ? $_POST['product'] : '';
$id = isset( $_POST['id'] ) ? $_POST['id'] : '';
$bsf_useremail = isset( $_POST['bsf_useremail'] ) ? $_POST['bsf_useremail'] : '';
$purchase_key = isset( $_POST['purchase_key'] ) ? $_POST['purchase_key'] : '';
$version = isset( $_POST['version'] ) ? $_POST['version'] : '';
$product_name = isset( $_POST['product_name'] ) ? $_POST['product_name'] : '';
$token = bsf_generate_rand_token();
if ( trim( $purchase_key ) == '' ) {
if ( class_exists( 'BSF_License_Manager' ) ) {
$bsf_license_manager = new BSF_License_Manager();
$purchase_key = $bsf_license_manager->bsf_get_product_info( $id, 'purchase_key' );
}
}
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
$product_key = $is_edd = '';
if ( $type === 'plugin' || $type === 'theme' ) {
$bsf_products_array = array();
if ( $type == 'plugin' ) {
$bsf_products_array = $bsf_product_plugins;
} elseif ( $type == 'theme' ) {
$bsf_products_array = $bsf_product_themes;
}
if ( ! empty( $bsf_products_array ) ) :
foreach ( $bsf_products_array as $key => $bsf_product ) {
if ( ! isset( $bsf_product['template'] ) ) {
continue;
}
$bsf_template = $bsf_product['template'];
if ( $product == $bsf_template ) {
$product_key = $key;
$brainstrom_products[ $type . 's' ][ $key ]['status'] = 'not-registered';
$is_edd = ( isset( $brainstrom_products[ $type . 's' ][ $key ]['edd'] ) ) ? $brainstrom_products[ $type . 's' ][ $key ]['edd'] : '';
}
}
endif;
}
update_option( 'brainstrom_products', $brainstrom_products );
$path = get_api_url() . '?referer=deregister-product-' . $id;
$data = array(
'action' => 'bsf_product_deregistration',
'purchase_key' => $purchase_key,
'bsf_useremail' => $bsf_useremail,
'site_url' => get_site_url(),
'version' => $version,
'id' => $id,
'token' => $token,
'product' => $product_name,
);
if ( $is_edd ) {
$data['edd'] = $is_edd;
}
$data = apply_filters( 'bsf_product_deregistration_args', $data );
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
// Request http URL if the https version fails.
if ( is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) !== 200 ) {
$path = get_api_url( true ) . '?referer=deregister-product-' . $id;
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
$result = json_decode( $request['body'] );
// $result->message_html = 'Site deactivated!<br/>'.$result->message_html;
echo json_encode( $result );
} else {
$res['response'] = array(
'title' => 'Error',
'message_html' => 'Site deactivated!<br/> Error while communicating with server' . $request->get_error_message(),
);
$res['proceed'] = true;
echo json_encode( $res );
}
wp_die();
}
}
// first step execution of user registration
add_action( 'wp_ajax_bsf_register_user', 'bsf_register_user_callback' );
if ( ! function_exists( 'bsf_register_user_callback' ) ) {
function bsf_register_user_callback() {
$brainstrom_users = ( get_option( 'brainstrom_users' ) ) ? get_option( 'brainstrom_users' ) : array();
$bsf_username = isset( $_POST['bsf_username'] ) ? $_POST['bsf_username'] : '';
$bsf_useremail = isset( $_POST['bsf_useremail'] ) ? $_POST['bsf_useremail'] : '';
$bsf_useremail_reenter = isset( $_POST['bsf_useremail_reenter'] ) ? $_POST['bsf_useremail_reenter'] : '';
$subscribe = isset( $_POST['ultimate_user_receive'] ) ? $_POST['ultimate_user_receive'] : '';
$token = bsf_generate_rand_token();
if ( $bsf_useremail !== $bsf_useremail_reenter ) {
$response['response'] = array(
'title' => 'Error',
'message_html' => 'Email address did not matched',
);
$response['proceed'] = false;
echo json_encode( $response );
wp_die();
}
$domain = substr( strrchr( $bsf_useremail, '@' ), 1 );
if ( $domain === '' || $domain === false ) {
$domain = $bsf_useremail;
}
if ( function_exists( 'checkdnsrr' ) ) {
$dns_check = checkdnsrr( $domain, 'MX' );
if ( ! $dns_check ) {
$response['response'] = array(
'title' => 'Error',
'message_html' => 'Please enter valid email address, username and password will sent to your provided email address',
);
$response['proceed'] = false;
echo json_encode( $response );
wp_die();
}
}
$path = get_api_url() . '&referrer=user_registration';
$data = array(
'action' => 'bsf_user_registration',
'bsf_username' => $bsf_username,
'bsf_useremail' => $bsf_useremail,
'bsf_useremail_confirm' => $bsf_useremail_reenter,
'ultimate_user_receive' => $subscribe,
'site_url' => get_site_url(),
'token' => $token,
);
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '60',
)
);
if ( is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) !== 200 ) {
$path = get_api_url( true ) . '&referrer=user_registration';
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '60',
)
);
}
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
$result = json_decode( $request['body'] );
if ( ( isset( $result->proceed ) ) && ( $result->proceed === 'true' || $result->proceed === true ) ) {
$user_array = array(
'name' => $bsf_username,
'email' => $bsf_useremail,
'token' => $token,
);
if ( ! empty( $brainstrom_users ) ) {
$find_key = false;
foreach ( $brainstrom_users as $key => $user ) {
if ( $user['email'] === $bsf_useremail ) {
$brainstrom_users[ $key ]['name'] = $bsf_username;
$brainstrom_users[ $key ]['token'] = $token;
$find_key = true;
break;
}
}
if ( ! $find_key ) {
array_push( $brainstrom_users, $user_array );
}
} else {
array_push( $brainstrom_users, $user_array );
}
update_option( 'brainstrom_users', $brainstrom_users );
global $ultimate_referer;
$ultimate_referer = 'on-user-register';
bsf_check_product_update();
}
echo json_encode( $result );
} else {
$arr = array( 'response' => $request->get_error_message() );
echo json_encode( $arr );
}
wp_die();
}//end bsf_register_user_callback()
}
/**
* Update version numbers of all the brainstorm products in options `brainstorm_products` and `brainstrom_bundled_products`
*
* @todo Current version numbers can be fetched from WordPress at runtime whenever ruquired,
* Remote version can only be required when transient for update data is deleted (i hope)
*/
if ( ! function_exists( 'bsf_update_all_product_version' ) ) {
function bsf_update_all_product_version() {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$brainstrom_bundled_products = ( get_option( 'brainstrom_bundled_products' ) ) ? get_option( 'brainstrom_bundled_products' ) : array();
$mix_products = $update_ready = $bsf_product_plugins = $bsf_product_themes = array();
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
$product_updated = $bundled_product_updated = false;
if ( ! empty( $bsf_product_plugins ) ) {
foreach ( $bsf_product_plugins as $key => $plugin ) {
if ( ! isset( $plugin['id'] ) || empty( $plugin['id'] ) ) {
continue;
}
if ( ! isset( $plugin['template'] ) || empty( $plugin['template'] ) ) {
continue;
}
if ( ! isset( $plugin['type'] ) || empty( $plugin['type'] ) ) {
continue;
}
$version = ( isset( $plugin['version'] ) ) ? $plugin['version'] : '';
$current_version = bsf_get_current_version( $plugin['template'], $plugin['type'] );
$name = bsf_get_current_name( $plugin['template'], $plugin['type'] );
if ( $name !== '' ) {
$brainstrom_products['plugins'][ $key ]['product_name'] = $name;
}
if ( $current_version !== '' ) {
if ( version_compare( $version, $current_version ) === - 1 || version_compare( $version, $current_version ) === 1 ) {
$brainstrom_products['plugins'][ $key ]['version'] = $current_version;
$product_updated = true;
}
}
}
}
if ( ! empty( $bsf_product_themes ) ) {
foreach ( $bsf_product_themes as $key => $theme ) {
if ( ! isset( $theme['id'] ) || empty( $theme['id'] ) ) {
continue;
}
if ( ! isset( $theme['template'] ) || empty( $theme['template'] ) ) {
continue;
}
if ( ! isset( $theme['type'] ) || empty( $theme['type'] ) ) {
continue;
}
$version = ( isset( $theme['version'] ) ) ? $theme['version'] : '';
$current_version = bsf_get_current_version( $theme['template'], $theme['type'] );
$name = bsf_get_current_name( $theme['template'], $theme['type'] );
if ( $name !== '' ) {
$brainstrom_products['themes'][ $key ]['product_name'] = $name;
}
if ( $current_version !== '' || $current_version !== false ) {
if ( version_compare( $version, $current_version ) === - 1 || version_compare( $version, $current_version ) === 1 ) {
$brainstrom_products['themes'][ $key ]['version'] = $current_version;
$product_updated = true;
}
}
}
}
if ( ! empty( $brainstrom_bundled_products ) ) {
foreach ( $brainstrom_bundled_products as $keys => $bps ) {
$version = '';
if ( strlen( $keys ) > 1 ) {
foreach ( $bps as $key => $bp ) {
if ( ! isset( $bp->id ) || $bp->id === '' ) {
continue;
}
$version = $bp->version;
$current_version = bsf_get_current_version( $bp->init, $bp->type );
if ( $current_version !== '' && $current_version !== false ) {
if ( version_compare( $version, $current_version ) === - 1 || version_compare( $version, $current_version ) === 1 ) {
if ( is_object( $brainstrom_bundled_products ) ) {
$brainstrom_bundled_products = array( $brainstrom_bundled_products );
}
$single_bp = $brainstrom_bundled_products[ $keys ];
$single_bp[ $key ]->version = $current_version;
$bundled_product_updated = true;
$brainstrom_bundled_products[ $keys ] = $single_bp;
}
}
}
} else {
if ( ! isset( $bps->id ) || $bps->id === '' ) {
continue;
}
$version = $bps->version;
$current_version = bsf_get_current_version( $bps->init, $bps->type );
if ( $current_version !== '' || $current_version !== false ) {
if ( version_compare( $version, $current_version ) === - 1 || version_compare( $version, $current_version ) === 1 ) {
$brainstrom_bundled_products[ $keys ]->version = $current_version;
$bundled_product_updated = true;
}
}
}
}
}
update_option( 'brainstrom_products', $brainstrom_products );
if ( $bundled_product_updated ) {
update_option( 'brainstrom_bundled_products', $brainstrom_bundled_products );
}
}
}
add_action( 'admin_init', 'bsf_update_all_product_version', 1000 );
if ( ! function_exists( 'bsf_get_current_version' ) ) {
function bsf_get_current_version( $template, $type ) {
if ( $template === '' ) {
return false;
}
if ( $type === 'theme' || $type === 'themes' ) {
$theme = wp_get_theme( $template );
$version = $theme->get( 'Version' );
} elseif ( $type === 'plugin' || $type === 'plugins' ) {
$plugin_file = rtrim( WP_PLUGIN_DIR, '/' ) . '/' . $template;
if ( ! is_file( $plugin_file ) ) {
return false;
}
$plugin = get_plugin_data( $plugin_file );
$version = $plugin['Version'];
}
return $version;
}
}
if ( ! function_exists( 'bsf_get_current_name' ) ) {
function bsf_get_current_name( $template, $type ) {
if ( $template === '' ) {
return false;
}
if ( $type === 'theme' || $type === 'themes' ) {
$theme = wp_get_theme( $template );
$name = $theme->get( 'Name' );
} elseif ( $type === 'plugin' || $type === 'plugins' ) {
$plugin_file = rtrim( WP_PLUGIN_DIR, '/' ) . '/' . $template;
if ( ! is_file( $plugin_file ) ) {
return false;
}
$plugin = get_plugin_data( $plugin_file );
$name = $plugin['Name'];
}
return $name;
}
}
add_action( 'admin_notices', 'bsf_notices', 1000 );
add_action( 'network_admin_notices', 'bsf_notices', 1000 );
if ( ! function_exists( 'bsf_notices' ) ) {
function bsf_notices() {
global $pagenow;
if ( $pagenow === 'plugins.php' || $pagenow === 'post-new.php' || $pagenow === 'edit.php' || $pagenow === 'post.php' ) {
$brainstrom_products = get_option( 'brainstrom_products' );
$brainstrom_bundled_products = ( get_option( 'brainstrom_bundled_products' ) ) ? get_option( 'brainstrom_bundled_products' ) : array();
if ( empty( $brainstrom_products ) ) {
return false;
}
$brainstrom_bundled_products_keys = array();
if ( ! empty( $brainstrom_bundled_products ) ) :
foreach ( $brainstrom_bundled_products as $bps ) {
foreach ( $bps as $key => $bp ) {
array_push( $brainstrom_bundled_products_keys, $bp->id );
}
}
endif;
$mix = array();
$plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
$mix = array_merge( $plugins, $themes );
if ( empty( $mix ) ) {
return false;
}
if ( ( defined( 'BSF_PRODUCTS_NOTICES' ) && ( BSF_PRODUCTS_NOTICES === 'false' || BSF_PRODUCTS_NOTICES === false ) ) ) {
return false;
}
$is_multisite = is_multisite();
$is_network_admin = is_network_admin();
foreach ( $mix as $product ) :
if ( ! isset( $product['id'] ) ) {
continue;
}
if ( false == apply_filters( "bsf_display_product_activation_notice_{$product['id']}", true ) ) {
continue;
}
if ( isset( $product['is_product_free'] ) && ( $product['is_product_free'] === 'true' || $product['is_product_free'] === true ) ) {
continue;
}
$constant = strtoupper( str_replace( '-', '_', $product['id'] ) );
$constant_nag = 'BSF_' . $constant . '_NAG';
$constant_notice = 'BSF_' . $constant . '_NOTICES';
if ( defined( $constant_nag ) && ( constant( $constant_nag ) === 'false' || constant( $constant_nag ) === false ) ) {
continue;
}
if ( defined( $constant_notice ) && ( constant( $constant_notice ) === 'false' || constant( $constant_notice ) === false ) ) {
continue;
}
$status = ( isset( $product['status'] ) ) ? $product['status'] : false;
$type = ( isset( $product['type'] ) ) ? $product['type'] : false;
if ( ! $type ) {
continue;
}
if ( $type === 'plugin' ) {
if ( ! is_plugin_active( $product['template'] ) ) {
continue;
}
} elseif ( $type === 'theme' ) {
$theme = wp_get_theme();
if ( $product['template'] !== $theme->template ) {
continue;
}
} else {
continue;
}
if ( BSF_Update_Manager::bsf_is_product_bundled( $product['id'] ) ) {
continue;
}
if ( $status !== 'registered' ) :
$url = bsf_registration_page_url( '', $product['id'] );
$message = __( 'Please', 'bsf' ) . ' <a href="' . $url . '" class="bsf-core-license-form-btn" plugin-slug="' . $product['id'] . '">' . __( 'activate', 'bsf' ) . '</a> ' . __( 'your copy of the', 'bsf' ) . ' <i>' . $product['product_name'] . '</i> ' . __( 'to get update notifications, access to support features & other resources!', 'bsf' );
$message = apply_filters( "bsf_product_activation_notice_{$product['id']}", $message, $url, $product['product_name'] );
if ( ( $is_multisite && $is_network_admin ) || ! $is_multisite ) {
echo '<div class="update-nag bsf-update-nag">' . $message . '</div>';
}
endif;
endforeach;
}
}
}
if ( ! function_exists( 'bsf_grant_developer_access' ) ) {
function bsf_grant_developer_access( $action ) {
$brainstrom_users = ( get_option( 'brainstrom_users' ) ) ? get_option( 'brainstrom_users' ) : array();
if ( empty( $brainstrom_users ) ) {
return false;
}
global $current_user;
$user = $current_user->user_login;
$email = $current_user->user_email;
// $token = bin2hex(openssl_random_pseudo_bytes(32));
$token = bsf_generate_rand_token();
$url = wp_nonce_url( get_site_url() . '/wp-login.php?developer_access=true&access_id=' . $user . '&access_token=' . $token );
$subject = $message = $vc_version = '';
$username = ( isset( $brainstrom_users[0]['name'] ) ) ? $brainstrom_users[0]['name'] : $user;
$response = bsf_allow_developer_access( $username, $url, $action );
if ( $response ) {
if ( $action === 'grant' ) {
update_option( 'developer_access', true );
$interval = time() + ( 15 * 24 * 60 * 60 );
update_option( 'access_time', $interval );
update_option( 'access_token', $token );
// echo '<div class="updated"><p>'.$response.'</p></div>';
} else {
$interval = time() - ( 10000 );
update_option( 'access_time', $interval );
if ( update_option( 'developer_access', false ) ) {
// echo __("Access Revoked!",'bsf');
} else {
?>
<div class="error"><p><?php echo __( 'Something went wrong. Please try again!', 'bsf' ); ?></p></div>
<?php
}
}
} else {
echo '<div class="error"><p>Something went wrong. Please try again.</p></div>';
update_option( 'developer_access', false );
$interval = time();
update_option( 'access_time', $interval );
}
}
}
if ( ! function_exists( 'bsf_allow_developer_access' ) ) {
function bsf_allow_developer_access( $username, $url, $process ) {
$path = get_api_url() . '?referer=allow-developer-access';
$new_url = $url;
$user = $username;
$request = wp_remote_post(
$path, array(
'body' => array(
'action' => 'give_developer_access',
'userid' => $user,
'login_url' => $new_url,
'site_url' => get_site_url(),
'process' => $process,
),
'timeout' => '30',
)
);
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
return ( $request['body'] );
}
}
}
if ( ! function_exists( 'bsf_process_developer_login' ) ) {
function bsf_process_developer_login() {
$basename = basename( $_SERVER['SCRIPT_NAME'] );
if ( $basename == 'wp-login.php' ) {
$interval = get_option( 'access_time' );
$now = time();
if ( $interval <= $now ) {
update_option( 'developer_access', false );
}
require_once ABSPATH . 'wp-includes/pluggable.php';
if ( isset( $_GET['access_token'] ) ) {
$access = get_option( 'developer_access' );
$access_token = get_option( 'access_token' );
$verify_token = $_GET['access_token'];
$verified = ( $access_token === $verify_token ) ? true : false;
if ( isset( $_GET['developer_access'] ) && $access && $verified ) {
$user_login = $_GET['access_id'];
$user = get_user_by( 'login', $user_login );
$user_id = $user->ID;
wp_set_current_user( $user_id, $user_login );
wp_set_auth_cookie( $user_id );
$redirect_to = user_admin_url();
setcookie( 'DeveloperAccess', 'active', time() + 86400 );
wp_safe_redirect( $redirect_to );
exit();
}
}
}
}
}
bsf_process_developer_login();
if ( ! function_exists( 'bsf_get_free_products' ) ) {
function bsf_get_free_products() {
$plugins = get_plugins();
$themes = wp_get_themes();
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$bsf_free_products = array();
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
foreach ( $plugins as $plugin => $plugin_data ) {
if ( trim( $plugin_data['Author'] ) === 'Brainstorm Force' ) {
if ( ! empty( $bsf_product_plugins ) ) :
foreach ( $bsf_product_plugins as $key => $bsf_product_plugin ) {
$bsf_template = ( isset( $bsf_product_plugin['template'] ) ) ? $bsf_product_plugin['template'] : '';
if ( $plugin == $bsf_template ) {
// $plugin_data = array_merge($plugin_data, $temp);
if ( isset( $bsf_product_plugin['is_product_free'] ) && ( $bsf_product_plugin['is_product_free'] === true || $bsf_product_plugin['is_product_free'] === 'true' ) ) {
$bsf_free_products[] = $bsf_product_plugin;
}
}
}
endif;
}
}
foreach ( $themes as $theme => $theme_data ) {
$data = wp_get_theme( $theme );
$theme_author = trim( $data->display( 'Author', false ) );
if ( $theme_author === 'Brainstorm Force' ) {
if ( ! empty( $bsf_product_themes ) ) :
foreach ( $bsf_product_themes as $key => $bsf_product_theme ) {
$bsf_template = $bsf_product_theme['template'];
if ( $theme == $bsf_template ) {
if ( isset( $bsf_product_theme['is_product_free'] ) && ( $bsf_product_theme['is_product_free'] === true || $bsf_product_theme['is_product_free'] === 'true' ) ) {
$bsf_free_products[] = $bsf_product_theme;
}
}
}
endif;
}
}
return $bsf_free_products;
}
}
// function to toggle licence from server
add_action( 'wp_ajax_bsf_update_client_license', 'bsf_server_update_client_license' );
add_action( 'wp_ajax_nopriv_bsf_update_client_license', 'bsf_server_update_client_license' );
if ( ! function_exists( 'bsf_server_update_client_license' ) ) {
function bsf_server_update_client_license() {
if ( isset( $_SERVER['HTTP_ORIGIN'] ) ) {
header( 'Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN'] );
header( 'Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS' );
header( 'Access-Control-Max-Age: 1000' );
header( 'Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With' );
}
$product_id = ( isset( $_POST['product_id'] ) ) ? $_POST['product_id'] : '';
$product_type = ( isset( $_POST['product_type'] ) ) ? $_POST['product_type'] : '';
$purchase_code = ( isset( $_POST['purchase_code'] ) ) ? $_POST['purchase_code'] : '';
$useremail = ( isset( $_POST['user_email'] ) ) ? $_POST['user_email'] : '';
$userid = $useremail;
$process = ( isset( $_POST['process'] ) ) ? $_POST['process'] : '';
$site_url = ( isset( $_POST['site_url'] ) ) ? $_POST['site_url'] : '';
$status = ( isset( $_POST['status'] ) ) ? $_POST['status'] : '';
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
if ( ! empty( $brainstrom_products ) ) {
if ( ( isset( $brainstrom_products[ $product_type . 's' ] ) ) && ( ! empty( $brainstrom_products[ $product_type . 's' ] ) ) ) {
if ( isset( $brainstrom_products[ $product_type . 's' ][ $product_id ] ) ) {
$brainstrom_products[ $product_type . 's' ][ $product_id ]['status'] = $status;
if ( empty( $brainstrom_products[ $product_type . 's' ][ $product_id ]['purchase_key'] ) ) {
$brainstrom_products[ $product_type . 's' ][ $product_id ]['purchase_key'] = $purchase_code;
}
update_option( 'brainstrom_products', $brainstrom_products );
echo true;
die();
}
}
}
echo false;
die();
}
}
// delete bundled products after switch theme
if ( ! function_exists( 'bsf_theme_deactivation' ) ) {
function bsf_theme_deactivation() {
delete_site_transient( 'bsf_get_bundled_products' );
delete_site_option( 'bsf_installer_menu' );
update_option( 'bsf_force_check_extensions', false );
}
}
add_action( 'switch_theme', 'bsf_theme_deactivation' );
add_action( 'deactivated_plugin', 'bsf_theme_deactivation' );
if ( ! function_exists( 'bsf_get_free_menu_position' ) ) {
function bsf_get_free_menu_position( $start, $increment = 0.3 ) {
foreach ( $GLOBALS['menu'] as $key => $menu ) {
$menus_positions[] = $key;
}
if ( ! in_array( $start, $menus_positions ) ) {
return $start;
}
/* the position is already reserved find the closet one */
while ( in_array( $start, $menus_positions ) ) {
$start += $increment;
}
return $start;
}
}
if ( ! function_exists( 'bsf_get_option' ) ) {
function bsf_get_option( $request = false ) {
$bsf_options = get_option( 'bsf_options' );
if ( ! $request ) {
return $bsf_options;
} else {
return ( isset( $bsf_options[ $request ] ) ) ? $bsf_options[ $request ] : false;
}
}
}
if ( ! function_exists( 'bsf_update_option' ) ) {
function bsf_update_option( $request, $value ) {
$bsf_options = get_option( 'bsf_options' );
$bsf_options[ $request ] = $value;
return update_option( 'bsf_options', $bsf_options );
}
}
// to sort array of objects
if ( ! function_exists( 'bsf_sort' ) ) {
function bsf_sort( $a, $b ) {
return @strcmp( strtolower( $a->short_name ), strtolower( $b->short_name ) );
}
}
/**
* Brainstorm Switch
*
* Outputs markup for the switch
*
* @param $name (string) - name for the switch, this will be the reference for saving the value
* @param $default (boolean) - Default valuw of switch, true|false
*/
if ( ! function_exists( 'brainstorm_switch' ) ) {
function brainstorm_switch( $name = '', $default = false ) {
$checked = '0';
$bsf_updater_options = get_option( 'bsf_updater_options', array() );
if ( isset( $bsf_updater_options[ $name ] ) ) {
$checked = $bsf_updater_options[ $name ];
}
$uid = uniqid();
$switch = '';
$switch .= "\t\t" . '<div class="switch-wrapper">
<input type="text" id="brainstorm_switch_' . $uid . '" class="' . $name . ' form-control smile-input bsf-switch-input" value="' . esc_attr( $checked ) . '"/>
<input type="checkbox" ' . checked( true, $checked, false ) . ' id="brainstorm_core_switch_' . $uid . '" name="' . $name . '" class="ios-toggle smile-input bsf-switch-input switch-checkbox smile-switch " value="0" >
<label class="bsf-switch-btn checkbox-label" data-on="ON" data-off="OFF" data-id="brainstorm_switch_' . $uid . '" for="brainstorm_core_switch_' . $uid . '">
</label>
</div>';
return $switch;
}
}
/**
* Save option brainstorm updater advanced/debug settings
*/
if ( ! function_exists( 'update_bsf_core_options_callback' ) ) {
function update_bsf_core_options_callback() {
$option = isset( $_POST['option'] ) ? esc_attr( $_POST['option'] ) : '';
$value = isset( $_POST['value'] ) ? esc_attr( $_POST['value'] ) : '';
$bsf_updater_options = get_option( 'bsf_updater_options', array() );
$bsf_updater_options[ $option ] = $value;
update_option( 'bsf_updater_options', $bsf_updater_options );
$bsf_updater_options = get_option( 'bsf_updater_options', array() );
$location = bsf_registration_page_url( '&author' );
$response = array(
'redirect' => $location,
);
wp_send_json( $response );
}
}
add_action( 'wp_ajax_update_bsf_core_options', 'update_bsf_core_options_callback' );
@@ -0,0 +1,950 @@
<?php
$tab = '';
if ( isset( $_POST['bsf-advanced-form-btn'] ) ) {
$bsf_settings = $_POST['bsf_settings'];
update_option( 'bsf_settings', $bsf_settings );
}
?>
<?php
$request_product_id = ( isset( $_GET['id'] ) ) ? $_GET['id'] : '';
$updgrate_action = ( isset( $_GET['action'] ) && $_GET['action'] === 'upgrade' ) ? $_GET['action'] : '';
if ( $updgrate_action === 'upgrade' ) {
$request_product_id = ( isset( $_GET['id'] ) ) ? $_GET['id'] : '';
if ( $request_product_id !== '' ) {
if ( isset( $_GET['bundled'] ) && $_GET['bundled'] !== '' ) {
$bundled = $_GET['bundled'];
} else {
$bundled = false;
}
?>
<div class="clear"></div>
<div class="wrap bsf-sp-screen">
<h2><?php echo __( 'Upgrading Extension', 'bsf' ); ?></h2>
<?php
$response = upgrade_bsf_product( $request_product_id, $bundled );
?>
<?php
if ( isset( $response['status'] ) && $response['status'] ) :
$url = ( $response['type'] === 'theme' ) ? 'themes.php' : 'plugins.php';
$txt = ( $response['type'] === 'theme' ) ? 'theme' : 'plugin';
$name = ( isset( $response['name'] ) ) ? $response['name'] : '';
if ( $name !== '' ) {
$hashname = preg_replace( '![^a-z0-9]+!i', '-', $name );
$url .= '#' . $hashname;
}
$reg_url = bsf_registration_page_url();
?>
<a href="<?php echo ( is_multisite() ) ? network_admin_url( $url ) : admin_url( $url ); ?>"><?php echo __( 'Manage ' . $txt . ' here', 'bsf' ); ?></a> |
<a href="<?php echo $reg_url; ?>"><?php echo __( 'Back to Registration', 'bsf' ); ?></a>
<?php endif; ?>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
exit;
}
}
if ( isset( $_POST['bsf-developer-access'] ) ) {
// echo $_POST['bsf-developer-access-action'];
if ( isset( $_POST['bsf-developer-access-action'] ) || $_POST['bsf-developer-access-action'] !== '' ) {
$dev_action = $_POST['bsf-developer-access-action'];
bsf_grant_developer_access( $dev_action );
}
}
$author = ( isset( $_GET['author'] ) ) ? true : false;
if ( $author ) {
$tab = 'author';
}
$is_product_theme = false;
?>
<script type="text/javascript">
(function ($) {
"use strict";
$(document).ready(function () {
if (window.location.hash) {
var hash = window.location.hash;
$('.nav-tab').removeClass('nav-tab-active');
$('.nav-tab').each(function (i, nav) {
var href = $(nav).attr('href');
if (href === hash) {
$(nav).addClass('nav-tab-active');
}
});
$('.bsf-tab').hide();
$(hash).show();
}
if ($('body').find('bsf-popup').length == 0)
$('body').append('<div class="bsf-popup"></div><div class="bsf-popup-message"><div class="bsf-popup-message-inner"></div><span class="bsf-popup-close dashicons dashicons-no-alt"></span></div>');
$('body').on('click', '.bsf-popup, .bsf-popup-close', function () {
$('.bsf-popup, .bsf-popup-message').fadeOut(300);
});
$('body').on('click', '.bsf-close-reload', function () {
location.reload();
$('.bsf-popup, .bsf-popup-message').fadeOut(300);
});
/* local storage */
if (localStorage["bsf_username"]) {
$('#bsf_username').val(localStorage["bsf_username"]);
}
if (localStorage["bsf_useremail"]) {
$('#bsf_useremail').val(localStorage["bsf_useremail"]);
}
if (localStorage["bsf_useremail_reenter"]) {
$('#bsf_useremail_reenter').val(localStorage["bsf_useremail_reenter"]);
}
$('.bsf-pr-input.stored').keyup(function () {
localStorage[$(this).attr('name')] = $(this).val();
});
$('.bsf-pr-input.stored').change(function () {
localStorage[$(this).attr('name')] = $(this).val();
});
/* local storage */
$('body').on('click', '.bsf-pr-form-submit', function () {
var form_id = $(this).attr('data-form-id');
var $form = $('#' + form_id);
var $wrapper = $form.parent().parent();
$wrapper.find('.bsf-spinner').toggleClass('bsf-spinner-show');
var errors = 0;
$form.parent().find('.bsf-pr-input').each(function (i, input) {
var type = $(input).attr('type');
var required = $(input).attr('data-required');
if (required === 'true' || required === true) {
if (type === 'text') {
$(input).removeClass('bsf-pr-input-required');
if ($(input).val() === '') {
$(input).addClass('bsf-pr-input-required');
errors++;
}
}
}
});
if (errors > 0) {
$wrapper.find('.bsf-spinner').toggleClass('bsf-spinner-show');
return false;
}
var data = $form.serialize();
$.post(ajaxurl, data, function (response) {
//console.log($.parseJSON(response));
//return false;
localStorage.clear(); // clear local storage on success
var result = $.parseJSON(response);
console.log(result);
if (typeof result === 'undefined' || result === null)
return false;
var step = $form.find('input[name="step"]').val();
var state = '';
//result.proceed = true;
if (result.proceed === 'false' || result.proceed === false) {
var html = '';
if (typeof result.response.title !== 'undefined')
html += '<h2><span class="dashicons dashicons-info" style="transform: scale(-1);-web-kit-transform: scale(-1);margin-right: 10px;color: rgb(244, 0, 0); font-size: 25px;"></span>' + result.response.title + '</h2>';
if (typeof result.response.message_html !== 'undefined')
html += '<div class="bsf-popup-message-inner-html">' + result.response.message_html + '</div>';
$('.bsf-popup-message-inner').html(html);
$('.bsf-popup, .bsf-popup-message').fadeIn(300);
}
else if (result.proceed === 'true' || result.proceed === true) {
if (step === 'step-product-registration') {
$wrapper.slideUp(200);
setTimeout(function () {
$wrapper.append(result.next_action_html);
$wrapper.find('.bsf-step-1').remove();
$wrapper.slideDown(300);
}, 300);
}
else {
var html = '';
if (typeof result.response.title !== 'undefined')
html += '<h2><span class="dashicons dashicons-yes" style="margin-right: 10px;color: rgb(0, 213, 0); font-size: 25px;"></span>' + result.response.title + '</h2>';
if (typeof result.response.message_html !== 'undefined')
html += '<div class="bsf-popup-message-inner-html">' + result.response.message_html + '</div>';
$('.bsf-popup-message-inner').html(html);
if (typeof result.state !== 'undefined')
state = result.state;
$('.bsf-popup-message').addClass(state);
$('.bsf-popup, .bsf-popup-message').fadeIn(300);
$('.bsf-popup').addClass('bsf-close-reload');
$('.bsf-popup-close').addClass('bsf-close-reload');
//setTimeout(function(){
//location.reload();
//},4000);
}
}
$wrapper.find('.bsf-spinner').toggleClass('bsf-spinner-show');
});
});
$('body').on('click', '.bsf-registration-form-toggle', function () {
var toggle = $(this).attr('data-toggle');
if (toggle === 'show-form') {
//$(this).find('span').removeClass('dashicons-arrow-down-alt2').addClass('dashicons-arrow-up-alt2');
$(this).find('span').addClass('toggle-icon');
$(this).next('.bsf-pr-form-wrapper').slideDown(300);
$(this).attr('data-toggle', 'hide-form');
}
else {
//$(this).find('span').removeClass('dashicons-arrow-up-alt2').addClass('dashicons-arrow-down-alt2');
$(this).find('span').removeClass('toggle-icon');
$(this).next('.bsf-pr-form-wrapper').slideUp(300);
$(this).attr('data-toggle', 'show-form');
}
});
$("input[name='bsf_useremail_reenter']").bind("cut copy paste", function (e) {
e.preventDefault();
});
});
})(jQuery);
</script>
<div class="clear"></div>
<div class="wrap bsf-sp-screen">
<?php
$brainstrom_users = ( get_option( 'brainstrom_users' ) ) ? get_option( 'brainstrom_users' ) : array();
$brainstorm_users_skip = get_site_option( 'bsf_skip_author', false );
$bsf_user_name = $bsf_user_email = $bsf_token = '';
$hide_license_screen = false;
$skip_brainstorm_menu = get_site_option( 'bsf_skip_braisntorm_menu', false );
if ( ( defined( 'BSF_UNREG_MENU' ) && ( BSF_UNREG_MENU === true || BSF_UNREG_MENU === 'true' ) ) ||
$skip_brainstorm_menu == true ) {
$hide_license_screen = true;
}
if ( empty( $brainstrom_users ) && ( ! $author ) && $brainstorm_users_skip != true ) :
?>
<div class="bsf-pr-header">
<h2><?php echo __( "Let's Get Started!", 'imedica' ); ?></h2>
<div
class="bsf-pr-decription"><?php echo __( 'Please register using the form below and get instant access to our support portal, updates, extensions and more!', 'bsf' ); ?></div>
</div>
<div class="bsf-user-registration-form-wrapper">
<div class="bsf-user-registration-inner-wrapper">
<div class="bsf-ur-wrap">
<div class="bsf-reg-form-wrap">
<form action="" method="post" id="bsf-user-form" class="bsf-pr-form">
<input type="hidden" name="action" value="bsf_register_user"/>
<div class="bsf-pr-form-row">
<input type="text" id="bsf_username" name="bsf_username" value="" spellcheck="false"
placeholder="<?php echo __( 'Your Name', 'bsf' ); ?>" class="bsf-pr-input stored"
data-required="true"/>
</div>
<div class="bsf-pr-form-row">
<input type="text" id="bsf_useremail" name="bsf_useremail" value="" spellcheck="false"
placeholder="<?php echo __( 'Your Email Address', 'bsf' ); ?>"
class="bsf-pr-input stored" data-required="true"/>
</div>
<div class="bsf-pr-form-row">
<input type="text" id="bsf_useremail_reenter" name="bsf_useremail_reenter" value=""
spellcheck="false"
placeholder="<?php echo __( 'Verify Email Address', 'bsf' ); ?>"
class="bsf-pr-input stored" data-required="true"/>
</div>
<div class="bsf-pr-form-row">
<input type="checkbox" name="ultimate_user_receive" id="checkbox-subscribe" value="true"
checked="checked" data-required="false"/>
<label class="checkbox-subscribe"
for="checkbox-subscribe"><?php echo __( 'Receive important news, updates & freebies on email.', 'bsf' ); ?></label>
</div>
</form>
<div class="bsf-pr-submit-row">
<input type="button" class="bsf-pr-form-submit button-primary bsf-button-primary"
data-form-id="bsf-user-form"
value="<?php echo __( 'Register and Proceed', 'bsf' ); ?>"/>
<span class="spinner bsf-spinner"></span>
</div>
<a href="<?php echo bsf_registration_page_url( '&bsf-skip-author' ); ?>" class="bsf-skip-author">Skip Registration</a>
</div>
<div
class="bsf-pr-form-row bsf-privacy-stat"><?php echo __( 'We respect your privacy & of course you can unsubscribe at any time.', 'bsf' ); ?></div>
</div>
</div>
</div>
<?php
return false;
else :
$bsf_user_email = ( isset( $brainstrom_users[0]['email'] ) ) ? $brainstrom_users[0]['email'] : '';
$bsf_user_name = ( isset( $brainstrom_users[0]['name'] ) ) ? $brainstrom_users[0]['name'] : '';
if ( empty( $brainstrom_users ) && $brainstorm_users_skip == false ) {
$hide_license_screen = true;
}
endif;
?>
<?php
$brainstrom_bundled_products = ( get_option( 'brainstrom_bundled_products' ) ) ? get_option( 'brainstrom_bundled_products' ) : array();
$brainstrom_bundled_products_keys = array();
if ( ! empty( $brainstrom_bundled_products ) ) :
foreach ( $brainstrom_bundled_products as $bkeys => $bps ) {
if ( strlen( $bkeys ) > 1 ) {
foreach ( $bps as $key => $bp ) {
if ( ! isset( $bp->id ) || $bp->id == '' ) {
continue;
}
array_push( $brainstrom_bundled_products_keys, $bp->id );
}
} else {
if ( ! isset( $bps->id ) || $bps->id == '' ) {
continue;
}
array_push( $brainstrom_bundled_products_keys, $bps->id );
}
}
endif;
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$bsf_product_plugins = $bsf_product_themes = array();
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
$plugins = get_plugins();
$themes = wp_get_themes();
?>
<div class="bsf-pr-header bsf-left-header">
<h2><?php printf( __( 'Welcome to %s', 'bsf' ), BSF_UPDATER_FULLNAME ); ?></h2>
<div
class="bsf-pr-decription"><?php echo __( 'Validate your purchase keys and get eligible for receiving one click updates, extensions and freebies.', 'bsf' ); ?></div>
</div>
<div class="inside">
<?php if ( isset( $bsf_user_email ) && $bsf_user_email !== '' ) : ?>
<div class="bsf-logged-user-email"><?php echo $bsf_user_email; ?></div>
<?php endif ?>
<?php
foreach ( $plugins as $plugin => $plugin_data ) {
if ( trim( $plugin_data['Author'] ) === 'Brainstorm Force' ) {
if ( ! empty( $bsf_product_plugins ) ) :
foreach ( $bsf_product_plugins as $key => $bsf_product_plugin ) {
$temp = array();
if ( ! isset( $bsf_product_plugin['template'] ) ) {
continue;
}
if ( isset( $bsf_product_plugin['is_product_free'] ) && $bsf_product_plugin['is_product_free'] === 'true' ) {
continue;
}
$bsf_template = $bsf_product_plugin['template'];
if ( $plugin == $bsf_template ) {
$temp['product_info'] = $bsf_product_plugin;
$plugin_data = array_merge( $plugin_data, $temp );
}
}
endif;
$bsf_plugins[ $plugin ] = $plugin_data;
}
}
foreach ( $themes as $theme => $theme_data ) {
$data = wp_get_theme( $theme );
$theme_author = trim( $data->display( 'Author', false ) );
if ( $theme_author === 'Brainstorm Force' ) {
if ( ! empty( $bsf_product_themes ) ) :
foreach ( $bsf_product_themes as $key => $bsf_product_theme ) {
$temp = array();
if ( ! isset( $bsf_product_theme['template'] ) ) {
continue;
}
if ( isset( $bsf_product_theme['is_product_free'] ) && $bsf_product_theme['is_product_free'] === 'true' ) {
continue;
}
$bsf_template = $bsf_product_theme['template'];
if ( $theme == $bsf_template ) {
$temp['product_info'] = $bsf_product_theme;
$theme_data = array_merge( (array) $theme_data, $temp );
}
}
endif;
$bsf_themes[ $theme ] = $theme_data;
}
}
?>
<h2 class="nav-tab-wrapper">
<?php if ( $hide_license_screen == false ) : ?>
<a href="#bsf-licenses"
class="nav-tab <?php echo ( $tab !== 'author' ) ? 'nav-tab-active' : ''; ?>"><?php echo __( 'Licenses', 'bsf' ); ?></a>
<?php endif ?>
<a href="#bsf-help" class="nav-tab"><?php echo __( 'Help', 'bsf' ); ?></a>
<!--<a href="#bsf-advanced-tab" class="nav-tab"><?php // echo __('Custom Scripts','bsf'); ?></a>-->
<?php if ( $author ) : ?>
<a href="#bsf-author"
class="nav-tab <?php echo ( $tab === 'author' ) ? 'nav-tab-active' : ''; ?>"><?php echo __( 'Debug', 'bsf' ); ?></a>
<?php endif; ?>
<a href="#bsf-system" class="nav-tab"><?php echo __( 'System Info', 'bsf' ); ?></a>
</h2>
<div id="bsf-licenses" class="bsf-tab <?php echo ( $tab !== 'author' ) ? 'bsf-tab-active' : ''; ?>">
<div class="inner">
<table class="wp-list-table widefat fixed licenses">
<thead>
<tr>
<th scope="col" class="manage-column column-product_name">Product</th>
<th scope="col" class="manage-column column-product_version">Version</th>
<th scope="col" class="manage-column column-product_status">Purchase code / License Key</th>
<th scope="col" class="manage-column column-product_action">Action</th>
</tr>
</thead>
<tbody>
<?php
$count = $registered_licence = 0;
if ( ! empty( $bsf_plugins ) ) :
foreach ( $bsf_plugins as $plugin => $plugin_data ) :
$readonly = '';
if ( ! isset( $plugin_data['product_info'] ) ) {
continue;
}
$info = $plugin_data['product_info'];
$status = ( isset( $info['status'] ) ) ? $info['status'] : '';
$purchase_key = ( isset( $info['purchase_key'] ) ) ? $info['purchase_key'] : '';
$type = ( isset( $info['type'] ) ) ? $info['type'] : 'plugin';
$template = ( isset( $info['template'] ) ) ? $info['template'] : $plugin;
$id = ( isset( $info['id'] ) ) ? $info['id'] : '';
$version = ( isset( $plugin_data['Version'] ) ) ? $plugin_data['Version'] : '';
$name = apply_filters( "agency_updater_productname_{$id}", $plugin_data['Name'] );
$purchase_url = ( isset( $info['purchase_url'] ) ) ? $info['purchase_url'] : 'javascript:void(0)';
$bsf_username = ( isset( $info['bsf_username'] ) ) ? $info['bsf_username'] : $bsf_user_name;
$bsf_useremail = ( isset( $info['bsf_useremail'] ) ) ? $info['bsf_useremail'] : $bsf_user_email;
if ( $request_product_id != '' ) {
$init_single_product_show = true;
} else {
$init_single_product_show = false;
}
if ( $id === '' ) {
continue;
}
if ( in_array( $id, $brainstrom_bundled_products_keys ) ) {
continue;
}
if ( $init_single_product_show && $request_product_id !== $id ) {
continue;
}
$constant = 'BSF_REMOVE_' . $id . '_FROM_REGISTRATION_LISTING';
if ( defined( $constant ) && ( $constant == 'true' || $constant == true ) ) {
continue;
}
$remove_frm_registration = apply_filters( 'bsf_remove_' . $id . '_from_registration_listing', false, $id );
if ( $remove_frm_registration ) {
continue;
}
$step = ( isset( $plugin_data['step'] ) && $plugin_data['step'] != '' ) ? $plugin_data['step'] : 'step-product-registration';
$common_data = ' data-product-id="' . $id . '" ';
$common_data .= ' data-bsf_username="' . $bsf_username . '" ';
$common_data .= ' data-bsf_useremail="' . $bsf_useremail . '" ';
$common_data .= ' data-product-type="' . $type . '" ';
$common_data .= ' data-template="' . $template . '" ';
$common_data .= ' data-version="' . $version . '" ';
$common_data .= ' data-step="' . $step . '" ';
$common_data .= ' data-product-name="' . $name . '" ';
$mod = ( $count % 2 );
$alternate = ( $mod ) ? 'alternate' : '';
$row_id = 'bsf-row-' . $count;
if ( $status === 'registered' ) {
$readonly = ' readonly="readonly" ';
$common_data .= ' data-action="bsf_deregister_product" ';
$registered_licence ++;
} else {
$common_data .= ' data-action="bsf_register_product" ';
}
?>
<tr id="<?php echo $row_id; ?>" class="<?php echo $alternate . ' ' . $status; ?>">
<td><?php echo $name; ?></td>
<td><?php echo $plugin_data['Version']; ?></td>
<td>
<?php if ( $purchase_key !== '' && $status === 'registered' ) : ?>
Purchase Verified
<?php else : ?>
<input type="text" class="bsf-form-input" name="purchase_key" spellcheck="false"
data-required="true"
value="<?php echo $purchase_key; ?>" <?php echo $readonly; ?>/>
<?php endif ?>
</td>
<td>
<?php if ( $status !== 'registered' ) : ?>
<input type="button" class="button button-primary bsf-submit-button" value="Register" data-row-id="<?php echo $row_id; ?>" <?php echo $common_data; ?>/>
<a href="<?php echo $purchase_url; ?>" target="_blank" class="bsf-purchase-link" data-row-id="<?php echo $row_id; ?>" />Buy License</a> <span class="spinner bsf-spinner"></span>
<?php else : ?>
<input type="button" class="button bsf-submit-button-deregister" value="De-register" data-row-id="<?php echo $row_id; ?>" <?php echo $common_data; ?>/> <span class="spinner bsf-spinner"></span>
<?php endif; ?>
</td>
</tr>
<?php
$count ++;
endforeach;
endif;
if ( ! empty( $bsf_themes ) ) :
foreach ( $bsf_themes as $theme => $theme_data ) :
// echo '<pre>';
// print_r($theme_data);
// echo '</pre>';
$readonly = '';
if ( isset( $theme_data['product_info'] ) ) {
$info = $theme_data['product_info'];
} else {
continue;
}
$status = ( isset( $info['status'] ) ) ? $info['status'] : '';
$bsf_username = ( isset( $info['bsf_username'] ) ) ? $info['bsf_username'] : $bsf_user_name;
$bsf_useremail = ( isset( $info['bsf_useremail'] ) ) ? $info['bsf_useremail'] : $bsf_user_email;
$purchase_key = ( isset( $info['purchase_key'] ) ) ? $info['purchase_key'] : '';
$type = ( isset( $info['type'] ) ) ? $info['type'] : 'theme';
$template = ( isset( $info['template'] ) ) ? $info['template'] : $plugin;
$id = ( isset( $info['id'] ) ) ? $info['id'] : '';
$purchase_url = ( isset( $info['purchase_url'] ) ) ? $info['purchase_url'] : 'javascript:void(0)';
if ( $request_product_id != '' ) {
$init_single_product_show = true;
} else {
$init_single_product_show = false;
}
if ( $init_single_product_show && $request_product_id !== $id ) {
continue;
}
$constant = 'BSF_REMOVE_' . $id . '_FROM_REGISTRATION';
if ( defined( $constant ) && ( $constant == 'true' || $constant == true ) ) {
continue;
}
$version = bsf_get_current_version( $template, $type );
$name = bsf_get_current_name( $template, $type );
$step = ( isset( $theme_data['step'] ) && $theme_data['step'] != '' ) ? $theme_data['step'] : 'step-product-registration';
$common_data = ' data-product-id="' . $id . '" ';
$common_data .= ' data-bsf_username="' . $bsf_username . '" ';
$common_data .= ' data-bsf_useremail="' . $bsf_useremail . '" ';
$common_data .= ' data-product-type="' . $type . '" ';
$common_data .= ' data-template="' . $template . '" ';
$common_data .= ' data-version="' . $version . '" ';
$common_data .= ' data-step="' . $step . '" ';
$common_data .= ' data-product-name="' . $name . '" ';
$mod = ( $count % 2 );
$alternate = ( $mod ) ? 'alternate' : '';
$row_id = 'bsf-row-' . $count;
if ( $status === 'registered' ) {
$readonly = ' readonly="readonly" ';
$common_data .= ' data-action="bsf_deregister_product" ';
$registered_licence ++;
} else {
$common_data .= ' data-action="bsf_register_product" ';
}
if ( $type === 'theme' ) {
$is_product_theme = true;
}
?>
<tr id="<?php echo $row_id; ?>" class="<?php echo $alternate . ' ' . $status; ?>">
<td><?php echo $name; ?></td>
<td><?php echo $version; ?></td>
<td>
<?php if ( $purchase_key !== '' && $status === 'registered' ) : ?>
Purchase Verified
<?php else : ?>
<input type="text" class="bsf-form-input" name="purchase_key" spellcheck="false"
data-required="true"
value="<?php echo $purchase_key; ?>" <?php echo $readonly; ?>/>
<?php endif ?>
</td>
<td>
<?php if ( $status !== 'registered' ) : ?>
<input type="button" class="button button-primary bsf-submit-button" value="Register" data-row-id="<?php echo $row_id; ?>" <?php echo $common_data; ?>/>
<a href="<?php echo $purchase_url; ?>" target="_blank" class="bsf-purchase-link" data-row-id="<?php echo $row_id; ?>" />Buy License</a> <span class="spinner bsf-spinner"></span>
<?php else : ?>
<input type="button" class="button bsf-submit-button-deregister" value="De-register" data-row-id="<?php echo $row_id; ?>" <?php echo $common_data; ?>/> <span class="spinner bsf-spinner"></span>
<?php endif; ?>
</td>
</tr>
<?php
$count ++;
endforeach;
endif;
?>
</tbody>
</table>
<div class="bsf-listing-cta">
<a href="https://support.brainstormforce.com/license-registration-faqs/" target="_blank">Questions?
Having Issues?</a>
</div>
</div>
</div>
<!-- bsf-licence-tab -->
<div id="bsf-help" class="bsf-tab">
<div class="inner">
<div class="bsf-row">
<div class="bsf-column">
<div class="bsf-column-inner">
<h2>Developer Access</h2>
<span class="bsf-span"><?php echo __( 'Enable Developer access', 'bsf' ); ?>
,<br/><?php echo __( 'Read more about developer access ', 'bsf' ); ?><a
href="<?php echo get_api_site() . 'license-registration-faqs/#developer-access'; ?>"
target="_blank"><?php echo __( 'here', 'bsf' ); ?></a></span>
<form action="" class="bsf-cp-dev-access" method="post">
<?php
$title = '';
if ( $registered_licence > 0 ) {
$disabled = '';
} else {
$disabled = 'disabled="disabled"';
$title = __( 'Activate your license to enable!', 'bsf' );
update_option( 'developer_access', false );
}
$developer_access = get_option( 'developer_access' );
if ( $developer_access ) {
$button_text = 'Revoke developer access';
$action = 'revoke';
} else {
$button_text = 'Allow developer access';
$action = 'grant';
}
?>
<input type="hidden" name="bsf-developer-access-action" value="<?php echo $action; ?>"/>
<input type="submit" class="button-primary bsf-access-<?php echo $action; ?>-button"
name="bsf-developer-access" value="<?php echo $button_text; ?>"
title="<?php echo $title; ?>" <?php echo $disabled; ?>/>
</form>
</div>
</div>
<div class="bsf-column">
<div class="bsf-column-inner">
<h2>Force Check Updates</h2>
<span
class="bsf-span"><?php printf( __( 'Check if there are updates available of plugins by %s.', 'bsf' ), BSF_UPDATER_FULLNAME ); ?></span>
<?php
$reset_url = add_query_arg( 'force-check-update', '' );
?>
<a class="button-primary bsf-cp-update-btn"
href="<?php echo $reset_url; ?>"><?php echo __( 'Check Updates Now', 'bsf' ); ?></a>
</div>
</div>
<div class="bsf-column">
<div class="bsf-column-inner">
<h2>Request Support</h2>
<?php
$request_support = apply_filters( 'agency_updater_request_support', get_api_site() . 'request-support/' );
?>
<span
class="bsf-span"><?php echo __( 'Having any trouble using our products? Head to our support center to get your issues resolved.', 'bsf' ); ?></span>
<a class="button-primary bsf-cp-support-btn"
href="<?php echo $request_support; ?>"
target="_blank"><?php echo __( 'Request Support', 'bsf' ); ?></a>
</div>
</div>
</div>
</div>
</div>
<?php if ( $author ) : ?>
<div id="bsf-author" class="bsf-tab <?php echo ( $tab == 'author' ) ? 'bsf-tab-active' : ''; ?>">
<div class="inner">
<div class="bsf-row">
<div class="bsf-column">
<div class="bsf-column-inner">
<?php
$reset_url = bsf_registration_page_url( '&reset-bsf-users' );
?>
<h2>Reset <?php echo BSF_UPDATER_SHORTNAME; ?> Registration</h2>
<span class="bsf-span">
Reset all the <?php echo BSF_UPDATER_SHORTNAME; ?> registration data?
</span>
<a class="button-primary"
href="<?php echo $reset_url; ?>"><?php printf( __( 'Reset %s Registration', 'bsf' ), BSF_UPDATER_SHORTNAME ); ?></a>
</div>
</div>
<div class="bsf-column">
<div class="bsf-column-inner">
<?php
$url = add_query_arg( 'remove-bundled-products', '' );
?>
<h2>Reset Bundled Products data</h2>
<span class="bsf-span">
Reload the bundled products data from <?php echo BSF_UPDATER_SHORTNAME; ?>'s Servers?
</span>
<a class="button-primary"
href="<?php echo $url; ?>"><?php echo __( 'Check Bundled Products', 'bsf' ); ?></a>
</div>
</div>
<div class="bsf-column">
<div class="bsf-column-inner">
<div class="brainstorm-updater-switch">
<?php echo brainstorm_switch( 'brainstorm_menu', false ); ?>
</div>
<h2><?php printf( __( '%s Menu in Settings?', 'bsf' ), BSF_UPDATER_SHORTNAME ); ?></h2>
<span class="bsf-span">
<?php printf( __( 'Move the %s menu to WordPress settings?', 'bsf' ), BSF_UPDATER_SHORTNAME ); ?>
</span>
<a class="button-primary brainstorm_menu"
href="#"><?php echo __( 'Update', 'bsf' ); ?></a>
<span class="spinner bsf-spinner"></span>
</div>
</div>
</div>
</div>
</div><!-- bsf-author-tab -->
<?php endif; ?>
<div id="bsf-system" class="bsf-tab">
<div class="inner">
<?php
echo bsf_systeminfo();
?>
</div>
</div>
<!-- bsf-system-tab -->
</div>
</div>
<script type="text/javascript">
(function ($) {
"use strict";
$(document).ready(function () {
$('body').on('click', '.brainstorm_menu.button-primary', function (event) {
event.preventDefault();
var spinner = jQuery( this ).siblings('.bsf-spinner');
spinner.toggleClass('bsf-spinner-show');
var val = jQuery('.brainstorm_menu.bsf-switch-input').val();
jQuery.ajax({
url: ajaxurl,
type: 'POST',
dataType: 'JSON',
data: {
action: 'update_bsf_core_options',
option: 'brainstorm_menu',
value: val
},
})
.done(function (result) {
if ( window.location.href !== result.redirect ) {
window.location.replace(result.redirect);
}
spinner.toggleClass('bsf-spinner-show');
})
.fail(function (e) {
console.log("error");
console.log( e );
spinner.toggleClass('bsf-spinner-show');
});
});
$('body').on('click', '.bsf-submit-button', function () {
var row_id = $(this).attr('data-row-id');
var $row = $('#' + row_id);
var errors = 0;
$row.find('.bsf-spinner').toggleClass('bsf-spinner-show');
var purchase_key = $row.find('input[name="purchase_key"]').val();
var product_id = $(this).attr('data-product-id');
var username = $(this).attr('data-bsf_username');
var useremail = $(this).attr('data-bsf_useremail');
var product_type = $(this).attr('data-product-type');
var template = $(this).attr('data-template');
var version = $(this).attr('data-version');
var step = $(this).attr('data-step');
var product_name = $(this).attr('data-product-name');
var action = $(this).attr('data-action');
var admin_url = '<?php echo ( is_multisite() ) ? rtrim( network_admin_url(), '/' ) : rtrim( admin_url(), '/' ); ?>';
$row.find('.bsf-form-input').each(function (i, input) {
var type = $(input).attr('type');
var required = $(input).attr('data-required');
if (required === 'true' || required === true) {
if (type === 'text') {
$(input).removeClass('bsf-pr-input-required');
if ($(input).val() === '') {
$(input).addClass('bsf-pr-input-required');
errors++;
}
}
}
});
if (errors > 0) {
$row.find('.bsf-spinner').toggleClass('bsf-spinner-show');
return false;
}
var data = {
action: action,
bsf_username: username,
bsf_useremail: useremail,
purchase_key: purchase_key,
type: product_type,
id: product_id,
product: template,
version: version,
step: step,
product_name: product_name
};
$.post(ajaxurl, data, function (response) {
console.log(response);
//return false;
var result = $.parseJSON(response);
console.log(result);
if (typeof result === 'undefined' || result === null)
return false;
//result.proceed = true;
if (result.proceed === 'false' || result.proceed === false) {
var html = '';
if (typeof result.response.title !== 'undefined')
html += '<h2><span class="dashicons dashicons-info" style="transform: scale(-1);-web-kit-transform: scale(-1);margin-right: 10px;color: rgb(244, 0, 0); font-size: 25px;"></span>' + result.response.title + '</h2>';
if (typeof result.response.message_html !== 'undefined')
html += '<div class="bsf-popup-message-inner-html">' + result.response.message_html + '</div>';
$('.bsf-popup-message-inner').html(html);
$('.bsf-popup, .bsf-popup-message').fadeIn(300);
}
else if (result.proceed === 'true' || result.proceed === true) {
var html = '';
if (typeof result.response.title !== 'undefined')
html += '<h2><span class="dashicons dashicons-yes" style="margin-right: 10px;color: rgb(0, 213, 0); font-size: 25px;"></span>' + result.response.title + '</h2>';
if (typeof result.response.message_html !== 'undefined')
html += '<div class="bsf-popup-message-inner-html">' + result.response.message_html + '</div>';
$('.bsf-popup-message-inner').html(html);
$('.bsf-popup, .bsf-popup-message').fadeIn(300);
if (typeof result.after_registration_action !== 'undefined' && result.after_registration_action !== '')
if (result.after_registration_action == 'admin.php?page=bsf-extensions') {
window.location.href = admin_url + '/' + result.after_registration_action + '?product_id=10395942';
} else {
window.location.href = admin_url + '/' + result.after_registration_action;
}
else
location.reload();
}
$row.find('.bsf-spinner').toggleClass('bsf-spinner-show');
});
}); //end of submit button
$('body').on('click', '.bsf-submit-button-deregister', function () {
var row_id = $(this).attr('data-row-id');
var $row = $('#' + row_id);
var errors = 0;
$row.find('.bsf-spinner').toggleClass('bsf-spinner-show');
var purchase_key = $row.find('input[name="purchase_key"]').val();
var bsf_username = $(this).attr('data-bsf_username');
var bsf_useremail = $(this).attr('data-bsf_useremail');
var product_id = $(this).attr('data-product-id');
var product_type = $(this).attr('data-product-type');
var template = $(this).attr('data-template');
var version = $(this).attr('data-version');
var name = $(this).attr('data-product-name');
var action = $(this).attr('data-action');
var data = {
action: action,
purchase_key: purchase_key,
bsf_username: bsf_username,
bsf_useremail: bsf_useremail,
type: product_type,
id: product_id,
product: template,
version: version,
product_name: name
};
console.log(data);
$.post(ajaxurl, data, function (response) {
//console.log($.parseJSON(response));
//return false;
console.log(response);
//return false;
var result = $.parseJSON(response);
var html = '';
if (typeof result.response.title !== 'undefined')
html += '<h2><span class="dashicons dashicons-yes" style="margin-right: 10px;color: rgb(0, 213, 0); font-size: 25px;"></span>' + result.response.title + '</h2>';
if (typeof result.response.message_html !== 'undefined')
html += '<div class="bsf-popup-message-inner-html">' + result.response.message_html + '</div>';
$('.bsf-popup-message-inner').html(html);
$('.bsf-popup, .bsf-popup-message').fadeIn(300);
if (result.proceed === 'true' || result.proceed === true) {
//setTimeout(function(){
location.reload();
//},2000);
}
});
}); // end of de-registering licence
$('body').on('click', '.nav-tab', function (event) {
//event.preventDefault();
$('.nav-tab').removeClass('nav-tab-active');
$(this).addClass('nav-tab-active');
var tab = $(this).attr('href');
$('.bsf-tab').fadeOut(200);
setTimeout(function () {
$(tab).fadeIn(200);
}, 200);
}); // end of tabs functionality
});
})(jQuery);
</script>
@@ -0,0 +1,349 @@
<?php
// Alternative function for wp_remote_get
if ( ! function_exists( 'bsf_get_remote_version' ) ) {
function bsf_get_remote_version( $products, $check_license ) {
global $ultimate_referer;
$path = get_api_url() . '?referer=' . $ultimate_referer;
$data = array(
'action' => 'bsf_get_product_versions',
'ids' => $products,
'linceses_check' => $check_license,
);
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
// Request http URL if the https version fails.
if ( is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) !== 200 ) {
$path = get_api_url( true ) . '?referer=' . $ultimate_referer;
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
$result = json_decode( $request['body'] );
bsf_update_license_checked( $result->updated_licenses );
if ( ! $result->error ) {
return $result->updated_versions;
} else {
return $result->error;
}
}
}
}
if ( ! function_exists( 'bsf_update_license_checked' ) ) {
function bsf_update_license_checked( $updated_licenses ) {
$brainstrom_products = get_option( 'brainstrom_products', array() );
if ( empty( $brainstrom_products ) ) {
return false;
}
if ( empty( $updated_licenses ) ) {
return false;
}
$is_updated = false;
foreach ( $updated_licenses as $license ) :
$product_id = $license->product_id;
$type = $license->type . 's';
$new_status = $license->status;
$purchase_key = $license->purchase_code;
if ( isset( $brainstrom_products[ $type ] ) && ! empty( $brainstrom_products[ $type ] ) ) {
if ( isset( $brainstrom_products[ $type ][ $product_id ] ) ) {
$old_status = $brainstrom_products[ $type ][ $product_id ]['status'];
if ( $old_status !== $new_status ) {
$brainstrom_products[ $type ][ $product_id ]['status'] = $new_status;
$is_updated = true;
}
}
}
endforeach;
if ( $is_updated ) {
update_option( 'brainstrom_products', $brainstrom_products );
}
}
}
if ( ! function_exists( 'bsf_check_product_update' ) ) {
function bsf_check_product_update() {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$bsf_users = ( get_option( 'brainstrom_users' ) ) ? get_option( 'brainstrom_users' ) : array();
$bsf_user_email = $bsf_user_name = '';
$mix = $bsf_product_plugins = $bsf_product_themes = $registered = $check_license = array();
if ( ! empty( $bsf_users ) ) {
$bsf_user_email = isset( $bsf_users[0]['email'] ) ? $bsf_users[0]['email'] : '';
$bsf_user_name = isset( $bsf_users[0]['name'] ) ? $bsf_users[0]['name'] : '';
}
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
$mix = array_merge( $bsf_product_plugins, $bsf_product_themes );
$is_update = false;
$temp = '';
if ( ! empty( $mix ) ) :
foreach ( $mix as $key => $product ) :
if ( ! isset( $product['id'] ) ) {
continue;
}
$constant = strtoupper( str_replace( '-', '_', $product['id'] ) );
$constant = 'BSF_' . $constant . '_CHECK_UPDATES';
if ( defined( $constant ) && ( constant( $constant ) === 'false' || constant( $constant ) === false ) ) {
continue;
}
array_push( $registered, $product['id'] );
// check license array build
$temp = array();
$temp['site_url'] = site_url();
if ( ! isset( $product['purchase_key'] ) ) {
continue;
}
$is_wp = ( isset( $product['in_house'] ) && $product['in_house'] === 'wp' ) ? true : false;
if ( $is_wp ) {
continue;
}
$temp['purchase_code'] = $product['purchase_key'];
$temp['user_email'] = $bsf_user_email;
$temp['user_name'] = $bsf_user_name;
$temp['product_id'] = $product['id'];
$temp['type'] = $product['type'];
array_push( $check_license, $temp );
endforeach;
endif;
if ( ! empty( $registered ) ) {
$remote_versions = bsf_get_remote_version( $registered, $check_license );
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$brainstrom_bundled_products = ( get_option( 'brainstrom_bundled_products' ) ) ? get_option( 'brainstrom_bundled_products' ) : array();
if ( $remote_versions !== false ) {
if ( ! empty( $remote_versions ) ) {
$is_bundled_update = false;
foreach ( $remote_versions as $rkey => $remote_data ) {
$rid = (string) $remote_data->id;
$remote_version = ( isset( $remote_data->remote_version ) ) ? $remote_data->remote_version : '';
$in_house = ( isset( $remote_data->in_house ) ) ? $remote_data->in_house : '';
$on_market = ( isset( $remote_data->on_market ) ) ? $remote_data->on_market : '';
$is_product_free = ( isset( $remote_data->is_product_free ) ) ? $remote_data->is_product_free : '';
$short_name = ( isset( $remote_data->short_name ) ) ? $remote_data->short_name : '';
$changelog_url = ( isset( $remote_data->changelog_url ) ) ? $remote_data->changelog_url : '';
$purchase_url = ( isset( $remote_data->purchase_url ) ) ? $remote_data->purchase_url : '';
$version_beta = ( isset( $remote_data->version_beta ) ) ? $remote_data->version_beta : '';
$download_url_beta = ( isset( $remote_data->download_url_beta ) ) ? $remote_data->download_url_beta : '';
if ( ! empty( $bsf_product_plugins ) ) {
foreach ( $bsf_product_plugins as $key => $plugin ) {
if ( ! isset( $plugin['id'] ) ) {
continue;
}
$pid = (string) $plugin['id'];
if ( $pid === $rid ) {
$brainstrom_products['plugins'][ $key ]['remote'] = $remote_version;
$brainstrom_products['plugins'][ $key ]['in_house'] = $in_house;
$brainstrom_products['plugins'][ $key ]['on_market'] = $on_market;
$brainstrom_products['plugins'][ $key ]['is_product_free'] = $is_product_free;
$brainstrom_products['plugins'][ $key ]['short_name'] = $short_name;
$brainstrom_products['plugins'][ $key ]['changelog_url'] = $changelog_url;
$brainstrom_products['plugins'][ $key ]['purchase_url'] = $purchase_url;
$brainstrom_products['plugins'][ $key ]['version_beta'] = $version_beta;
$brainstrom_products['plugins'][ $key ]['download_url_beta'] = $download_url_beta;
$is_update = true;
}
}
}
if ( ! empty( $bsf_product_themes ) ) {
foreach ( $bsf_product_themes as $key => $theme ) {
if ( ! isset( $theme['id'] ) ) {
continue;
}
$pid = $theme['id'];
if ( $pid === $rid ) {
$brainstrom_products['themes'][ $key ]['remote'] = $remote_version;
$brainstrom_products['themes'][ $key ]['in_house'] = $in_house;
$brainstrom_products['themes'][ $key ]['on_market'] = $on_market;
$brainstrom_products['themes'][ $key ]['is_product_free'] = $is_product_free;
$brainstrom_products['themes'][ $key ]['short_name'] = $short_name;
$brainstrom_products['themes'][ $key ]['changelog_url'] = $changelog_url;
$brainstrom_products['themes'][ $key ]['purchase_url'] = $purchase_url;
$brainstrom_products['themes'][ $key ]['version_beta'] = $version_beta;
$brainstrom_products['themes'][ $key ]['download_url_beta'] = $download_url_beta;
$is_update = true;
}
}
}
if ( isset( $remote_data->bundled_products ) && ! empty( $remote_data->bundled_products ) ) {
if ( ! empty( $brainstrom_bundled_products ) && is_array( $brainstrom_bundled_products ) ) {
foreach ( $brainstrom_bundled_products as $bkeys => $bps ) {
foreach ( $bps as $bkey => $bp ) {
if ( ! isset( $bp->id ) ) {
continue;
}
foreach ( $remote_data->bundled_products as $rbp ) {
if ( ! isset( $rbp->id ) ) {
continue;
}
if ( $rbp->id === $bp->id ) {
$bprd = $brainstrom_bundled_products[ $bkeys ];
$brainstrom_bundled_products[ $bkeys ][ $bkey ]->remote = $rbp->remote_version;
$brainstrom_bundled_products[ $bkeys ][ $bkey ]->parent = $rbp->parent;
$brainstrom_bundled_products[ $bkeys ][ $bkey ]->short_name = $rbp->short_name;
$brainstrom_bundled_products[ $bkeys ][ $bkey ]->changelog_url = $rbp->changelog_url;
$is_bundled_update = true;
}
}
}
}
}
}
}
if ( $is_bundled_update ) {
update_option( 'brainstrom_bundled_products', $brainstrom_bundled_products );
}
}
}
}
if ( $is_update ) {
update_option( 'brainstrom_products', $brainstrom_products );
}
}
}
if ( ! defined( 'BSF_CHECK_PRODUCT_UPDATES' ) ) {
$BSF_CHECK_PRODUCT_UPDATES = true;
} else {
$BSF_CHECK_PRODUCT_UPDATES = BSF_CHECK_PRODUCT_UPDATES;
}
if ( ( false === get_transient( 'bsf_check_product_updates' ) && ( $BSF_CHECK_PRODUCT_UPDATES === true || $BSF_CHECK_PRODUCT_UPDATES === 'true' ) ) ) {
$proceed = true;
if ( phpversion() > 5.2 ) {
$bsf_local_transient = get_option( 'bsf_local_transient' );
if ( $bsf_local_transient != false ) {
$datetime1 = new DateTime();
$date_string = gmdate( 'Y-m-d\TH:i:s\Z', $bsf_local_transient );
$datetime2 = new DateTime( $date_string );
$interval = $datetime1->diff( $datetime2 );
$elapsed = $interval->format( '%h' );
$elapsed = $elapsed + ( $interval->days * 24 );
if ( $elapsed <= 48 || $elapsed <= '48' ) {
$proceed = false;
}
}
}
if ( $proceed ) {
global $ultimate_referer;
$ultimate_referer = 'on-transient-delete';
bsf_check_product_update();
update_option( 'bsf_local_transient', current_time( 'timestamp' ) );
set_transient( 'bsf_check_product_updates', true, 2 * 24 * 60 * 60 );
}
}
if ( ! function_exists( 'get_bsf_product_upgrade_link' ) ) {
function get_bsf_product_upgrade_link( $product ) {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$mix = $bsf_product_plugins = $bsf_product_themes = $registered = array();
$licence_require_update = '';
if ( ! empty( $brainstrom_products ) ) :
$bsf_product_plugins = ( isset( $brainstrom_products['plugins'] ) ) ? $brainstrom_products['plugins'] : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
endif;
$mix = array_merge( $bsf_product_plugins, $bsf_product_themes );
$status = ( isset( $product['status'] ) ) ? $product['status'] : '';
$name = ( isset( $product['bundled'] ) && ( $product['bundled'] ) ) ? $product['name'] : $product['product_name'];
$free = ( isset( $product['is_product_free'] ) && ( $product['is_product_free'] == true || $product['is_product_free'] == 'true' ) ) ? $product['is_product_free'] : 'false';
$id = $product['id'];
$original_id = $id;
$not_registered_msg = 'Activate your licence for one click update.';
if ( $product['bundled'] ) {
$product_name = '';
$parent = $product['parent'];
foreach ( $mix as $key => $bsf_p ) {
if ( $bsf_p['id'] == $parent ) {
$status = ( isset( $bsf_p['status'] ) ) ? $bsf_p['status'] : '';
$product_name = ( isset( $bsf_p['product_name'] ) ) ? $bsf_p['product_name'] : '';
$id = $parent;
break;
}
}
$not_registered_msg = 'This is bundled with ' . $product_name . ', Activate ' . $product_name . '\'s licence for one click update.';
}
if ( array_key_exists( 'licence_require_update', $product ) ) {
$licence_require_update = $product['licence_require_update'];
}
if ( $status === 'registered' || ( $free === true || $free === 'true' ) || $licence_require_update == 'false' ) {
$request = bsf_registration_page_url( '&action=upgrade&id=' . $original_id );
if ( $product['bundled'] ) {
$request .= '&bundled=' . $id;
}
if ( is_multisite() ) {
$link = '<a href="' . network_admin_url( $request ) . '" data-pid="' . $original_id . '" data-bundled="' . $product['bundled'] . '" data-bid="' . $id . '" class="bsf-update-product-button">' . __( 'Update ' . $name . '.', 'bsf' ) . '</a><span class="spinner bsf-update-spinner"></span>';
} else {
$link = '<a href="' . admin_url( $request ) . '" data-pid="' . $original_id . '" data-bundled="' . $product['bundled'] . '" data-bid="' . $id . '" class="bsf-update-product-button">' . __( 'Update ' . $name . '.', 'bsf' ) . '</a><span class="spinner bsf-update-spinner"></span>';
}
} else {
$link = '<a href="' . bsf_registration_page_url( '&id=' . $id ) . '">' . __( $not_registered_msg, 'bsf' ) . '</a>';
}
return $link;
}
}
/**
* Unique sort final update ready array
*
* @param array
*
* @return array with unique plugins
*/
if ( ! function_exists( 'bsf_array_unique' ) ) {
function bsf_array_unique( $arrs ) {
$available_inits = array();
foreach ( $arrs as $key => $arr ) {
if ( array_key_exists( 'init', $arr ) ) {
if ( in_array( $arr['init'], $available_inits ) ) {
unset( $arrs[ $key ] );
} else {
array_push( $available_inits, $arr['init'] );
}
}
}
return $arrs;
}
}
@@ -0,0 +1,2 @@
/* Do not change otherwise you won't get updates */
ID:[bsf-core]
@@ -0,0 +1,18 @@
### Version - 1.21
# Support for beta updates of the products.
### Version - 1.19
- License Manager v2.0 - Allow plugins to individually set the license form.
- Update themes and plugins with WordPress's transients. so support for WP-CLI and any other website management tools.
- New License manager API.
- Improvement: Force check product update now works when WordPress updates are force checked.
- Slight redesign of help and debug settings screens.
- Support for white label with filters.
- Option to move Brainstorm registration menu in settings.
- Hide purchase key when it is validated.
- Remove use of deprecated 'mysql_' functions.
- Allow users to skip brainstorm account registration.
- Allow plugins/themes to completely hide the screen for Brainstorm Registration.
- Allow using staging API server for development.
- Fix: Occasional PHP fatal errors when using the child theme.
@@ -0,0 +1,77 @@
<?php
/**
* BSF Core Update
*
* @package Astra
* @author Astra
* @copyright Copyright (c) 2018, Astra
* @link http://wpastra.com/
* @since Astra 1.0.0
*/
if ( ! class_exists( 'BSF_Core_Update' ) ) {
/**
* BSF_Core_Update initial setup
*
* @since 1.0.0
*/
class BSF_Core_Update {
/**
* Class instance.
*
* @access private
* @var $instance Class instance.
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
// Theme Updates.
add_action( 'admin_init', __CLASS__ . '::init', 0 );
}
/**
* Implement theme update logic.
*
* @since 1.0.0
*/
public static function init() {
do_action( 'astra_update_before' );
// Get auto saved version number.
$saved_version = get_option( 'bsf-updater-version', false );
// If equals then return.
if ( version_compare( $saved_version, BSF_UPDATER_VERSION, '=' ) ) {
return;
}
// // Update auto saved version number.
update_option( 'bsf-updater-version', BSF_UPDATER_VERSION );
do_action( 'astra_update_after' );
}
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
BSF_Core_Update::get_instance();
@@ -0,0 +1,8 @@
{
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3",
"squizlabs/php_codesniffer": "^3.1",
"wimg/php-compatibility": "^8",
"wp-coding-standards/wpcs": "^0.14.0"
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.2-"/>
<!-- <rule ref="WordPress-Core" /> -->
<!-- <rule ref="WordPress-Docs" /> -->
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show sniff codes in all reports -->
<arg value="s"/>
<rule ref="PHPCompatibility.PHP.NewIniDirectives.max_input_varsFound">
<exclude-pattern>index.php</exclude-pattern>
</rule>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>
@@ -0,0 +1,312 @@
<?php
if ( ! function_exists( 'get_bsf_product_id' ) ) {
function get_bsf_product_id( $template ) {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
if ( empty( $brainstrom_products ) ) {
return false;
}
$id = '';
foreach ( $bsf_product_themes as $theme ) {
if ( $theme['template'] === $template ) {
$id = $theme['id'];
break;
}
}
if ( $id != '' ) {
return $id;
} else {
return false;
}
}
}
if ( ! function_exists( 'check_bsf_product_status' ) ) {
function check_bsf_product_status( $id ) {
$brainstrom_products = ( get_option( 'brainstrom_products' ) ) ? get_option( 'brainstrom_products' ) : array();
$bsf_product_themes = ( isset( $brainstrom_products['themes'] ) ) ? $brainstrom_products['themes'] : array();
if ( empty( $brainstrom_products ) ) {
return false;
}
$status = false;
foreach ( $brainstrom_products as $products ) {
foreach ( $products as $key => $product ) {
if ( $product['id'] === $id ) {
$status = ( isset( $product['status'] ) ) ? $product['status'] : '';
break;
}
}
}
return $status;
}
}
if ( ! function_exists( 'get_bundled_plugins' ) ) {
function get_bundled_plugins( $template = '' ) {
global $ultimate_referer;
$brainstrom_products = get_option( 'brainstrom_products', array() );
$prd_ids = array();
if ( $brainstrom_products == array() ) {
init_bsf_core();
}
foreach ( $brainstrom_products as $key => $value ) {
foreach ( $value as $key => $value2 ) {
array_push( $prd_ids, $key );
}
}
$path = get_api_url() . '?referer=' . $ultimate_referer;
$data = array(
'action' => 'bsf_fetch_brainstorm_products',
'id' => $prd_ids,
);
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
// Request http URL if the https version fails.
if ( is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) !== 200 ) {
$path = get_api_url( true ) . '?referer=' . $ultimate_referer;
$request = wp_remote_post(
$path, array(
'body' => $data,
'timeout' => '30',
)
);
}
if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
$brainstrom_bundled_products = get_option( 'brainstrom_bundled_products', array() );
$result = json_decode( $request['body'] );
$bundled = $result->bundled;
if ( empty( $bundled ) ) {
$bundled = array();
}
foreach ( $bundled as $key => $value ) {
if ( empty( $value ) ) {
unset( $bundled->$key );
}
}
$brainstrom_bundled_products = (array) $bundled;
update_option( 'brainstrom_bundled_products', $brainstrom_bundled_products );
// update 'brainstorm_products'
$simple = json_decode( json_encode( $result->simple ), 1 );
foreach ( $brainstrom_products as $type => $products ) {
foreach ( $products as $key => $product ) {
$old_id = isset( $product['id'] ) ? $product['id'] : '';
$old_template = $product['template'];
$simple[ $type ][ $old_id ]['template'] = isset( $brainstrom_products[ $type ][ $old_id ]['template'] ) ? $brainstrom_products[ $type ][ $old_id ]['template'] : '';
$simple[ $type ][ $old_id ]['remote'] = isset( $simple[ $type ][ $old_id ]['version'] ) ? $simple[ $type ][ $old_id ]['version'] : '';
$simple[ $type ][ $old_id ]['version'] = isset( $brainstrom_products[ $type ][ $old_id ]['version'] ) ? $brainstrom_products[ $type ][ $old_id ]['version'] : '';
$simple[ $type ][ $old_id ]['purchase_key'] = isset( $brainstrom_products[ $type ][ $old_id ]['purchase_key'] ) ? $brainstrom_products[ $type ][ $old_id ]['purchase_key'] : '';
$simple[ $type ][ $old_id ]['status'] = isset( $brainstrom_products[ $type ][ $old_id ]['status'] ) ? $brainstrom_products[ $type ][ $old_id ]['status'] : '';
$simple[ $type ][ $old_id ]['message'] = isset( $brainstrom_products[ $type ][ $old_id ]['message'] ) ? $brainstrom_products[ $type ][ $old_id ]['message'] : '';
}
}
update_option( 'brainstrom_products', $simple );
}
}
}
// add_action('init', 'bsf_network_get_bundled_products');
// if(!function_exists('bsf_network_get_bundled_products')) {
// function bsf_network_get_bundled_products() {
if ( false === get_site_transient( 'bsf_get_bundled_products' ) ) {
global $bsf_theme_template;
$proceed = true;
if ( phpversion() > 5.2 ) {
$bsf_local_transient_bundled = get_option( 'bsf_local_transient_bundled' );
if ( $bsf_local_transient_bundled != false ) {
$datetime1 = new DateTime();
$date_string = gmdate( 'Y-m-d\TH:i:s\Z', $bsf_local_transient_bundled );
$datetime2 = new DateTime( $date_string );
$interval = $datetime1->diff( $datetime2 );
$elapsed = $interval->format( '%h' );
$elapsed = $elapsed + ( $interval->days * 24 );
if ( $elapsed <= 168 || $elapsed <= '168' ) {
$proceed = false;
}
}
}
if ( $proceed ) {
global $ultimate_referer;
$ultimate_referer = 'on-bundled-products-transient-delete';
$template = ( is_multisite() ) ? $bsf_theme_template : get_template();
get_bundled_plugins( $template );
update_option( 'bsf_local_transient_bundled', current_time( 'timestamp' ) );
set_site_transient( 'bsf_get_bundled_products', true, 7 * 24 * 60 * 60 );
}
}
// }
// }
if ( ! function_exists( 'install_bsf_product' ) ) {
function install_bsf_product( $install_id ) {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'You do not have sufficient permissions to install plugins for this site.', 'bsf' ) );
}
$brainstrom_bundled_products = ( get_option( 'brainstrom_bundled_products' ) ) ? get_option( 'brainstrom_bundled_products' ) : array();
$install_product_data = array();
if ( ! empty( $brainstrom_bundled_products ) ) :
foreach ( $brainstrom_bundled_products as $keys => $products ) :
if ( strlen( $keys ) > 1 ) {
foreach ( $products as $key => $product ) {
if ( $product->id === $install_id ) {
$install_product_data = $product;
break;
}
}
} else {
if ( $products->id === $install_id ) {
$install_product_data = $products;
break;
}
}
endforeach;
endif;
if ( empty( $install_product_data ) ) {
return false;
}
if ( $install_product_data->type !== 'plugin' ) {
return false;
}
/*
temp */
/*
$install_product_data->in_house = 'wp';
$install_product_data->download_url = 'https://downloads.wordpress.org/plugin/redux-framework.3.5.9.zip';*/
$is_wp = ( isset( $install_product_data->in_house ) && $install_product_data->in_house === 'wp' ) ? true : false;
if ( $is_wp ) {
$download_path = $install_product_data->download_url;
} else {
$path = get_api_url() . '?referer=download-bundled-extension';
$timezone = date_default_timezone_get();
$call = 'file=' . $install_product_data->download_url . '&hashtime=' . strtotime( date( 'd-m-Y h:i:s a' ) ) . '&timezone=' . $timezone;
$hash = $call;
// $parse = parse_url($path);
// $download = $parse['scheme'].'://'.$parse['host'];
$get_path = 'http://downloads.brainstormforce.com/';
$download_path = rtrim( $get_path, '/' ) . '/download.php?' . $hash . '&base=ignore';
}
require_once ABSPATH . '/wp-admin/includes/file.php';
WP_Filesystem();
global $wp_filesystem;
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$WP_Upgrader = new WP_Upgrader();
$res = $WP_Upgrader->fs_connect(
array(
WP_CONTENT_DIR,
)
);
if ( ! $res ) {
wp_die( new WP_Error( 'Server error', __( "Error! Can't connect to filesystem", 'bsf' ) ) );
}
$Plugin_Upgrader = new Plugin_Upgrader();
$defaults = array(
'clear_update_cache' => true,
);
$args = array();
$parsed_args = wp_parse_args( $args, $defaults );
$Plugin_Upgrader->init();
$Plugin_Upgrader->install_strings();
$Plugin_Upgrader->strings['downloading_package'] = __( 'Downloading package from Server', 'bsf' );
$Plugin_Upgrader->strings['remove_old'] = __( 'Removing old plugin, if exists', 'bsf' );
add_filter( 'upgrader_source_selection', array( $Plugin_Upgrader, 'check_package' ) );
$Plugin_Upgrader->run(
array(
'package' => $download_path,
'destination' => WP_PLUGIN_DIR,
'clear_destination' => true, // Do not overwrite files.
'clear_working' => true,
'hook_extra' => array(
'type' => 'plugin',
'action' => 'install',
),
)
);
remove_filter( 'upgrader_source_selection', array( $Plugin_Upgrader, 'check_package' ) );
if ( ! $Plugin_Upgrader->result || is_wp_error( $Plugin_Upgrader->result ) ) {
return $Plugin_Upgrader->result;
}
// Force refresh of plugin update information
wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
// return true;
$response = array(
'status' => true,
'type' => 'plugin',
'name' => $install_product_data->name,
'init' => $install_product_data->init,
);
$plugin_abs_path = WP_PLUGIN_DIR . '/' . $install_product_data->init;
if ( is_file( $plugin_abs_path ) ) {
if ( ! isset( $_GET['action'] ) && ! isset( $_GET['id'] ) ) {
echo '|bsf-plugin-installed|';
}
$is_plugin_installed = true;
if ( ! is_plugin_active( $install_product_data->init ) ) {
activate_plugin( $install_product_data->init );
if ( is_plugin_active( $install_product_data->init ) ) {
if ( ! isset( $_GET['action'] ) && ! isset( $_GET['id'] ) ) {
echo '|bsf-plugin-activated|';
}
}
} else {
if ( ! isset( $_GET['action'] ) && ! isset( $_GET['id'] ) ) {
echo '|bsf-plugin-activated|';
}
}
}
return $response;
}
}
if ( ! function_exists( 'bsf_install_callback' ) ) {
function bsf_install_callback() {
$product_id = esc_attr( $_POST['product_id'] );
$bundled = esc_attr( $_POST['bundled'] );
$response = install_bsf_product( $product_id );
$redirect_url = apply_filters( 'redirect_after_extension_install', $redirect_url = '', $product_id );
$response['redirect'] = $redirect_url;
wp_send_json( $response );
}
}
add_action( 'wp_ajax_bsf_install', 'bsf_install_callback' );
@@ -0,0 +1,448 @@
<?php
$action = ( isset( $_GET['action'] ) && $_GET['action'] === 'install' ) ? $_GET['action'] : '';
if ( $action === 'install' ) {
$request_product_id = ( isset( $_GET['id'] ) ) ? $_GET['id'] : '';
if ( $request_product_id !== '' ) {
?>
<div class="clear"></div>
<div class="wrap">
<h2><?php echo __( 'Installing Extension', 'bsf' ); ?></h2>
<?php
$installed = install_bsf_product( $request_product_id );
?>
<?php if ( isset( $installed['status'] ) && $installed['status'] === true ) : ?>
<?php $current_name = strtolower( bsf_get_current_name( $installed['init'], $installed['type'] ) ); ?>
<?php $current_name = preg_replace( '![^a-z0-9]+!i', '-', $current_name ); ?>
<a href="<?php echo ( is_multisite() ) ? network_admin_url( 'plugins.php#' . $current_name ) : admin_url( 'plugins.php#' . $current_name ); ?>"><?php echo __( 'Manage plugin here', 'bsf' ); ?></a>
<?php endif; ?>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
exit;
}
}
global $bsf_theme_template;
if ( is_multisite() ) {
$template = $bsf_theme_template;
} else {
$template = get_template();
}
$current_page = '';
if ( isset( $_GET['page'] ) ) {
$current_page = esc_attr( $_GET['page'] );
$arr = explode( 'bsf-extensions-', $current_page );
$product_id = $arr[1];
}
$redirect_url = network_admin_url( 'admin.php?page=' . $current_page );
$extensions_installer_heading = apply_filters( "bsf_extinstaller_heading_{$product_id}", 'iMedica Extensions' );
$extensions_installer_subheading = apply_filters( "bsf_extinstaller_subheading_{$product_id}", 'iMedica is already very flexible & feature rich theme. It further aims to be all-in-one solution for your WordPress needs. Install any necessary extensions you like from below and take it on the steroids.' );
$status = check_bsf_product_status( $product_id );
$reset_bundled_url = bsf_exension_installer_url( $product_id . '&remove-bundled-products&redirect=' . $redirect_url );
?>
<div class="clear"></div>
<div class="wrap about-wrap bsf-sp-screen bend <?php echo 'extension-installer-' . $product_id; ?>">
<div class="bend-heading-section extension-about-header">
<h1><?php _e( $extensions_installer_heading, 'bsf' ); ?></h1>
<h3><?php _e( $extensions_installer_subheading, 'bsf' ); ?></h3>
<div class="bend-head-logo">
<?php /*<img src="<?php echo get_template_directory_uri().'/css/img/brainstorm-logo.png' ?>" /> */ ?>
<div class="bend-product-ver"><?php _e( 'Extensions ', 'bsf' ); ?></div>
</div>
</div> <!--heading section-->
<div class="bend-content-wrap">
<hr class="bsf-extensions-lists-separator">
<h3 class="bf-ext-sub-title"><?php echo __( 'Available Extensions', 'bsf' ); ?></h3>
<?php
// update_option( 'brainstrom_bundled_products', '' );
$brainstrom_bundled_products = ( get_option( 'brainstrom_bundled_products' ) ) ? (array) get_option( 'brainstrom_bundled_products' ) : array();
if ( isset( $brainstrom_bundled_products[ $product_id ] ) ) {
$brainstrom_bundled_products = $brainstrom_bundled_products[ $product_id ];
}
usort( $brainstrom_bundled_products, 'bsf_sort' );
if ( ! empty( $brainstrom_bundled_products ) ) :
$global_plugin_installed = $global_plugin_activated = 0;
$total_bundled_plugins = count( $brainstrom_bundled_products );
foreach ( $brainstrom_bundled_products as $key => $plugin ) {
if ( ! isset( $plugin->id ) || $plugin->id == '' ) {
continue;
}
if ( isset( $request_product_id ) && $request_product_id !== $plugin->id ) {
continue;
}
$plugin_abs_path = WP_PLUGIN_DIR . '/' . $plugin->init;
if ( is_file( $plugin_abs_path ) ) {
$global_plugin_installed++;
if ( is_plugin_active( $plugin->init ) ) {
$global_plugin_activated++;
}
}
}
?>
<ul class="bsf-extensions-list">
<?php
// if($global_plugin_activated != 0) :
foreach ( $brainstrom_bundled_products as $key => $plugin ) :
if ( ! isset( $plugin->id ) || $plugin->id == '' ) {
continue;
}
if ( isset( $request_product_id ) && $request_product_id !== $plugin->id ) {
continue;
}
$is_plugin_installed = false;
$is_plugin_activated = false;
$plugin_abs_path = WP_PLUGIN_DIR . '/' . $plugin->init;
if ( is_file( $plugin_abs_path ) ) {
$is_plugin_installed = true;
if ( is_plugin_active( $plugin->init ) ) {
$is_plugin_activated = true;
}
}
if ( $is_plugin_installed ) {
continue;
}
if ( $is_plugin_installed && $is_plugin_activated ) {
$class = 'active-plugin';
} elseif ( $is_plugin_installed && ! $is_plugin_activated ) {
$class = 'inactive-plugin';
} else {
$class = 'plugin-not-installed';
}
?>
<li id="ext-<?php echo $key; ?>" class="bsf-extension <?php echo $class; ?>">
<?php if ( ! $is_plugin_installed ) : ?>
<div class="bsf-extension-start-install">
<div class="bsf-extension-start-install-content">
<h2><?php echo __( 'Downloading', 'bsf' ); ?><div class="bsf-css-loader"></div></h2>
</div>
</div>
<?php endif; ?>
<div class="top-section">
<?php if ( ! empty( $plugin->product_image ) ) : ?>
<div class="bsf-extension-product-image">
<div class="bsf-extension-product-image-stick">
<img src="<?php echo $plugin->product_image; ?>" class="img" alt="image"/>
</div>
</div>
<?php endif; ?>
<div class="bsf-extension-info">
<?php $name = ( isset( $plugin->short_name ) ) ? $plugin->short_name : $plugin->name; ?>
<h4 class="title"><?php echo $name; ?></h4>
<?php
/*
<span class="status">
<?php if($is_plugin_installed) : ?>
<?php //$is_plugin_installed = true; ?>
<?php if($is_plugin_activated) : ?>
<?php echo __('Active','bsf'); ?>
<?php else : ?>
<?php echo __('Not Active','bsf'); ?>
<?php endif; ?>
<?php else : ?>
<?php echo __('Not Installed','bsf'); ?>
<?php endif; ?>
</span>
*/
?>
<p class="desc"><?php echo $plugin->description; ?><span class="author"><cite>By <?php echo $plugin->author; ?></cite></span></p>
</div>
</div>
<div class="bottom-section">
<?php
$button_class = '';
if ( ! $is_plugin_installed ) {
if ( ( ! $plugin->licence_require || $plugin->licence_require === 'false' ) || $status === 'registered' ) {
$link = bsf_exension_installer_url( $product_id );
$button = __( 'Install', 'bsf' );
$button_class = 'bsf-install-button';
} elseif ( ( $plugin->licence_require || $plugin->licence_require === 'true' ) && $status !== 'registered' ) {
$link = bsf_registration_page_url( '&id=' . $product_id, $product_id );
$button = __( 'Validate Purchase', 'bsf' );
$button_class = 'bsf-validate-licence-button';
}
} else {
$current_name = strtolower( bsf_get_current_name( $plugin->init, $plugin->type ) );
$current_name = preg_replace( '![^a-z0-9]+!i', '-', $current_name );
if ( is_multisite() ) {
$link = network_admin_url( 'plugins.php#' . $current_name );
} else {
$link = admin_url( 'plugins.php#' . $current_name );
}
$button = __( 'Installed', 'bsf' );
}
?>
<a class="button button-primary extension-button <?php echo $button_class; ?>" href="<?php echo $link; ?>" data-ext="<?php echo $key; ?>" data-pid="<?php echo $plugin->id; ?>" data-bundled="true" data-action="install"><?php echo $button; ?></a>
</div>
</li>
<?php endforeach; ?>
<?php
if ( $total_bundled_plugins === $global_plugin_installed ) :
?>
<div class="bsf-extensions-no-active">
<div class="bsf-extensions-title-icon"><span class="dashicons dashicons-smiley"></span></div>
<p class="bsf-text-light"><em><?php echo __( 'All available extensions have been installed!', 'bsf' ); ?></em></p>
</div>
<?php endif; ?>
</ul>
<!-- Stat - Just Design Purpose -->
<hr class="bsf-extensions-lists-separator">
<h3 class="bf-ext-sub-title"><?php echo __( 'Installed Extensions', 'bsf' ); ?></h3>
<ul class="bsf-extensions-list">
<?php
if ( $global_plugin_installed != 0 ) :
foreach ( $brainstrom_bundled_products as $key => $plugin ) :
if ( ! isset( $plugin->id ) || $plugin->id == '' ) {
continue;
}
if ( isset( $request_product_id ) && $request_product_id !== $plugin->id ) {
continue;
}
$is_plugin_installed = false;
$is_plugin_activated = false;
$plugin_abs_path = WP_PLUGIN_DIR . '/' . $plugin->init;
if ( is_file( $plugin_abs_path ) ) {
$is_plugin_installed = true;
if ( is_plugin_active( $plugin->init ) ) {
$is_plugin_activated = true;
}
}
if ( ! $is_plugin_installed ) {
continue;
}
if ( $is_plugin_installed && $is_plugin_activated ) {
$class = 'active-plugin';
} elseif ( $is_plugin_installed && ! $is_plugin_activated ) {
$class = 'inactive-plugin';
} else {
$class = 'plugin-not-installed';
}
?>
<li id="ext-<?php echo $key; ?>" class="bsf-extension <?php echo $class; ?>">
<?php if ( ! $is_plugin_installed ) : ?>
<div class="bsf-extension-start-install">
<div class="bsf-extension-start-install-content">
<h2><?php echo __( 'Downloading', 'bsf' ); ?><div class="bsf-css-loader"></div></h2>
</div>
</div>
<?php endif; ?>
<div class="top-section">
<?php if ( ! empty( $plugin->product_image ) ) : ?>
<div class="bsf-extension-product-image">
<div class="bsf-extension-product-image-stick">
<img src="<?php echo $plugin->product_image; ?>" class="img" alt="image"/>
</div>
</div>
<?php endif; ?>
<div class="bsf-extension-info">
<?php $name = ( isset( $plugin->short_name ) ) ? $plugin->short_name : $plugin->name; ?>
<h4 class="title"><?php echo $name; ?></h4>
<?php
/*
<span class="status">
<?php if($is_plugin_installed) : ?>
<?php //$is_plugin_installed = true; ?>
<?php if($is_plugin_activated) : ?>
<?php echo __('Active','bsf'); ?>
<?php else : ?>
<?php echo __('Not Active','bsf'); ?>
<?php endif; ?>
<?php else : ?>
<?php echo __('Not Installed','bsf'); ?>
<?php endif; ?>
</span>
*/
?>
<p class="desc"><?php echo $plugin->description; ?><span class="author"><cite>By <?php echo $plugin->author; ?></cite></span></p>
</div>
</div>
<div class="bottom-section">
<?php
$button_class = '';
if ( ! $is_plugin_installed ) {
if ( ( ! $plugin->licence_require || $plugin->licence_require === 'false' ) || $status === 'registered' ) {
$link = bsf_exension_installer_url( $product_id );
$button = __( 'Install', 'bsf' );
$button_class = 'bsf-install-button';
} elseif ( ( $plugin->licence_require || $plugin->licence_require === 'true' ) && $status !== 'registered' ) {
$link = bsf_registration_page_url( '&id=' . $product_id );
$button = __( 'Validate Purchase', 'bsf' );
$button_class = 'bsf-validate-licence-button';
}
} else {
$current_name = strtolower( bsf_get_current_name( $plugin->init, $plugin->type ) );
$current_name = preg_replace( '![^a-z0-9]+!i', '-', $current_name );
if ( is_multisite() ) {
$link = network_admin_url( 'plugins.php#' . $current_name );
} else {
$link = admin_url( 'plugins.php#' . $current_name );
}
$button = __( 'Installed', 'bsf' );
}
?>
<a class="button button-primary extension-button <?php echo $button_class; ?>" href="<?php echo $link; ?>" data-ext="<?php echo $key; ?>"><?php echo $button; ?></a>
</div>
</li>
<?php
endforeach;
else :
?>
<div class="bsf-extensions-no-active">
<div class="bsf-extensions-title-icon"><span class="dashicons dashicons-download"></span></div>
<p class="bsf-text-light"><em><?php echo __( 'No extensions installed yet!', 'bsf' ); ?></em></p>
</div>
<?php endif; ?>
</ul>
<!-- End - Just Design Purpose -->
<?php else : ?>
<div class="bsf-extensions-no-active">
<div class="bsf-extensions-title-icon"><span class="dashicons dashicons-download"></span></div>
<p class="bsf-text-light"><em><?php echo __( 'No extensions available yet!', 'bsf' ); ?></em></p>
<div class="bsf-cp-rem-bundle" style="margin-top: 30px;">
<a class="button-primary" href="<?php echo $reset_bundled_url; ?>">Refresh Bundled Products</a>
</div>
</div>
<?php endif; ?>
</div>
</div>
<?php if ( isset( $_GET['noajax'] ) ) : ?>
<script type="text/javascript">
(function($){
$(document).ready(function(){
$('.bsf-install-button').on('click',function(e){
if((typeof $(this).attr('disabled') !== 'undefined' && $(this).attr('disabled') === 'disabled'))
return false;
$('.bsf-install-button').attr('disabled',true);
var ext = $(this).attr('data-ext');
var $ext = $('#ext-'+ext);
$ext.find('.bsf-extension-start-install').addClass('show-install');
});
});
})(jQuery);
</script>
<?php else : ?>
<script type="text/javascript">
(function($){
$(document).ready(function(){
$('.bsf-install-button').on('click',function(e){
e.preventDefault();
var is_plugin_installed = is_plugin_activated = false;
if((typeof $(this).attr('disabled') !== 'undefined' && $(this).attr('disabled') === 'disabled'))
return false;
$(this).attr('disabled',true);
var ext = $(this).attr('data-ext');
var product_id = $(this).attr('data-pid');
var action = 'bsf_'+$(this).attr('data-action');
var bundled = $(this).attr('data-bundled');
var $ext = $('#ext-'+ext);
$ext.find('.bsf-extension-start-install').addClass('show-install');
var data = {
'action': action,
'product_id': product_id,
'bundled' : bundled
};
var $link = $(this).attr('href');
// We can also pass the url value separately from ajaxurl for front end AJAX implementations
jQuery.post(ajaxurl, data, function(response) {
console.log(response);
var redirect = /({.+})/img;
var matches = redirect.exec(response);
if ( typeof matches[1] != "undefined" ) {
var responseObj = jQuery.parseJSON( matches[1] );
if ( responseObj.redirect != "" ) {
window.location = responseObj.redirect;
}
}
var blank_response = true;
var plugin_status = response.split('|');
var is_ftp = false;
$.each(plugin_status, function(i,res){
if(res === 'bsf-plugin-installed') {
is_plugin_installed = true;
blank_response = false;
}
if(res === 'bsf-plugin-activated') {
is_plugin_activated = true;
blank_response = false;
}
if(/Connection Type/i.test(response)) {
is_ftp = true;
}
});
if(is_plugin_installed) {
$ext.addClass('bsf-plugin-installed');
$ext.find('.bsf-install-button').addClass('bsf-plugin-installed-button').html('Installed <i class="dashicons dashicons-yes"></i>');
$ext.find('.bsf-extension-start-install').removeClass('show-install');
}
if(is_plugin_activated) {
$ext.addClass('bsf-plugin-activated');
}
if(blank_response) {
//$ext.find('.bsf-extension-start-install').find('.bsf-extension-start-install-content').html(response);
if(is_ftp == true) {
$ext.find('.bsf-extension-start-install').find('.bsf-extension-start-install-content').html('<h3>FTP protected, <br/>redirecting to traditional installer.</h3>');
$('.bsf-install-button').attr('disabled',true);
setTimeout(function(){
window.location = $link;
},2000);
} else {
$ext.find('.bsf-extension-start-install').find('.bsf-extension-start-install-content').html('<h3>Something went wrong! Contact plugin author.</h3>');
}
}
});
});
});
})(jQuery);
</script>
<?php endif; ?>
@@ -0,0 +1 @@
1.22.62
@@ -0,0 +1 @@
ID:[6892199]
@@ -0,0 +1,102 @@
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:3000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.active:hover,.bootstrap-datetimepicker-widget td.active:hover:hover,.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active,.bootstrap-datetimepicker-widget td.active.disabled,.bootstrap-datetimepicker-widget td.active:hover.disabled,.bootstrap-datetimepicker-widget td.active[disabled],.bootstrap-datetimepicker-widget td.active:hover[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.active:hover,.bootstrap-datetimepiLine truncated
.bootstrap-datetimepicker-widget{
display: none;
background: #FFF;
box-shadow: 0px 0px 10px -1px;
z-index: 999999;
}
.bootstrap-datetimepicker-widget.dropdown-menu{
z-index: 999999 !important;
}
.bootstrap-datetimepicker-widget li.picker-switch.accordion-toggle{
background: #0061CC;
padding: 5px 0;
border-radius: 5px;
}
.bootstrap-datetimepicker-widget li.picker-switch.accordion-toggle i{
color: white;
}
.bootstrap-datetimepicker-widget li.picker-switch.accordion-toggle:hover{
background: #eee;
}
.bootstrap-datetimepicker-widget li.picker-switch.accordion-toggle:hover i{
color: #0061CC;
}
.ult-datetime .add-on{
font-size: 18px;
line-height: 1em;
border: 1px solid #AFAFAF;
border-radius: 0 5px 5px 0;
background: #E6E6E6;
margin-left: -1px;
margin-top: 1px;
display: inline-block;
padding: 7px;
position: relative;
top: 2px;
cursor: pointer;
}
.ult-datetime input.wpb_vc_param_value.datetime.datetimepicker:read-only {
border: 1px solid #AFAFAF;
}
.bootstrap-datetimepicker-widget a{
text-decoration: none;
}
.bootstrap-datetimepicker-widget a{
text-decoration: none;
font-size: 1.5em;
}
.bootstrap-datetimepicker-widget .collapse.in{
height: auto;
}
.bootstrap-datetimepicker-widget .collapse {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition: height 0.35s ease;
-moz-transition: height 0.35s ease;
-o-transition: height 0.35s ease;
transition: height 0.35s ease;
}
/*CAL AND TIME FONTS*/
@font-face {
font-family: 'count-down-timer';
src:url('fonts/count-down-timer.eot?32bexs');
src:url('fonts/count-down-timer.eot?#iefix32bexs') format('embedded-opentype'),
url('fonts/count-down-timer.woff?32bexs') format('woff'),
url('fonts/count-down-timer.ttf?32bexs') format('truetype'),
url('fonts/count-down-timer.svg?32bexs#count-down-timer') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="bdticon-"], [class*=" bdticon-"] {
font-family: 'count-down-timer';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.bdticon-stopwatch:before {
content: "\e600";
}
.bdticon-calendar:before {
content: "\e602";
}
.bdticon-arrow-down:before {
content: "\e604";
}
.bdticon-arrow-up:before {
content: "\e605";
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

@@ -0,0 +1,14 @@
<?xml version="1.0" standalone="no"?>␍␍␍␍␍␍␍␍
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >␍␍␍␍␍␍␍␍
<svg xmlns="http://www.w3.org/2000/svg">␍␍␍␍␍␍␍␍
<metadata>Generated by IcoMoon</metadata>␍␍␍␍␍␍␍␍
<defs>␍␍␍␍␍␍␍␍
<font id="count-down-timer" horiz-adv-x="512">␍␍␍␍␍␍␍␍
<font-face units-per-em="512" ascent="480" descent="-32" />␍␍␍␍␍␍␍␍
<missing-glyph horiz-adv-x="512" />␍␍␍␍␍␍␍␍
<glyph unicode="&#x20;" d="" horiz-adv-x="256" />␍␍␍␍␍␍␍␍
<glyph unicode="&#xe600;" d="M256 462.72c-130.073 0-235.52-105.472-235.52-235.52 0-130.073 105.447-235.52 235.52-235.52s235.52 105.447 235.52 235.52c0 130.073-105.447 235.52-235.52 235.52zM256 42.88c-101.811 0-184.32 82.534-184.32 184.32s82.509 184.32 184.32 184.32 184.32-82.534 184.32-184.32-82.509-184.32-184.32-184.32zM273.92 360.32h-35.84v-140.544l87.168-87.168 25.344 25.344-76.672 76.672z" />␍␍␍␍␍␍␍␍
<glyph unicode="&#xe602;" d="M435.2 409.6h-23.040v-51.2h-81.92v51.2h-148.48v-51.2h-81.92v51.2h-23.040c-28.16 0-51.2-23.040-51.2-51.2v-307.2c0-28.16 23.040-51.2 51.2-51.2h358.4c28.16 0 51.2 23.040 51.2 51.2v307.2c0 28.16-23.040 51.2-51.2 51.2zM435.2 51.2h-358.4v204.8h358.4v-204.8zM158.72 460.8h-35.84v-87.040h35.84v87.040zM389.12 460.8h-35.84v-87.040h35.84v87.040z" />␍␍␍␍␍␍␍␍
<glyph unicode="&#xe604;" d="M66.099 343.014c-6.938 6.861-18.151 6.861-25.063 0-6.912-6.835-6.912-17.946 0-24.807l202.445-200.448c6.938-6.861 18.125-6.861 25.063 0l202.445 200.448c6.912 6.861 6.938 17.945 0 24.806s-18.176 6.861-25.063 0.026l-189.927-182.81-189.901 182.784z" />␍␍␍␍␍␍␍␍
<glyph unicode="&#xe605;" d="M445.901 117.785c6.938-6.861 18.151-6.861 25.063 0 6.938 6.861 6.938 17.945 0 24.807l-202.445 200.448c-6.912 6.861-18.125 6.861-25.037 0l-202.445-200.448c-6.912-6.861-6.938-17.945 0-24.807s18.125-6.861 25.063 0l189.901 182.81 189.901-182.81z" />␍␍␍␍␍␍␍␍
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,382 @@
.gfont span.variants, .gfont span.subsets
{
display:none;
}
.font-delete
{
position: absolute;
right: 0;
top: 0;
cursor: pointer;
padding: 8px 5px;
}
.font-delete:hover
{
color: #e14d43;
}
.font-delete i
{
height: 100%;
}
.font-delete i:before
{
vertical-align: sub;
}
.selected-font-top
{
position: relative;
}
.selected-font-top.have-variants
{
cursor:pointer;
}
.selected-font-top
{
padding: 5px 10px;
background: #F7F7F7;
background: -webkit-linear-gradient(#FAFAFA, #F3F3F3);
background: -o-linear-gradient(#FAFAFA, #F3F3F3);
background: -moz-linear-gradient(#FAFAFA, #F3F3F3);
background: linear-gradient(#FAFAFA, #F3F3F3);
}
.selected-font-top.fopened
{
border-bottom: 1px solid #ECECEC;
}
.selected-font-content
{
display: none;
padding: 15px 10px;
background: #FDFDFD;
position: relative;
}
.selected-font-content .spinner.fspinner {
bottom: 23px;
right: 10px;
position: absolute;
float: right !important;
}
.fspinner-show
{
float: left;
display: block;
visibility:visible;
}
/*Fixed*/
.wrap {
position: relative;
}
.nav {
background: #fff;
border: 1px solid #e9e9e9;
padding: 8px 12px;
margin: 15px 0 17px;
display: block;
width: 100%;
box-sizing: border-box;
}
.fonts-list {
width: 65%;
float: left;
}
.gfont {
border: 1px solid #dcdcdc;
margin: 0 3px 10px 0;
background: #fff;
position: relative;
-moz-box-shadow: 0 1px 1px #e1e1e1;
-webkit-box-shadow: 0 1px 1px #eee;
-o-box-shadow: 0 1px 1px #eee;
box-shadow: 0 1px 1px #eee;
padding: 8px 10px;
}
.gfont div.font-header,
.fonts-selected-list div.font-header
{
margin: 0;
float: left;
font-size: 17px;
line-height: 34px;
}
.fonts-selected-list {
overflow-y: auto;
max-height: 91%;
margin: 0;
padding:0;
width: 360px;
float:right;
background: #fff;
border: 1px solid #dcdcdc;
-moz-box-shadow: 0px 3px 3px #D6D6D6;
-webkit-box-shadow: 0px 3px 3px #D6D6D6;
-o-box-shadow: 0px 3px 3px #D6D6D6;
box-shadow: 0px 3px 3px #D6D6D6;
}
#fonts-selected-wrapper
{
margin-top: 0.5em;
border-top: 1px solid #F0F0F0;
padding: 10px;
}
#fonts-selected-wrapper .selected-font
{
background: #F1F1F1;
margin-bottom: 7px;
position: relative;
border: 1px solid #ECECEC;
}
#fonts-selected-wrapper .selected-font:last-child {
margin-bottom: 0;
}
.fonts-selected-list h3
{
margin:5px;
padding: 8px 10px;
}
.font-variant input
{
vertical-align: bottom;
margin-right: 8px;
}
input.button.update-google-font-button {
float: left;
display: block;
width: 100%;
margin: 10px 0 0;
padding: 3px 0;
clear: both;
-mox-box-sizing: content-box;
box-sizing: content-box;
-webkit-transition: all 0.218s linear;
-moz-transition: all 0.218s linear;
transition: all 0.218s linear;
background: #04a4cc;
border-color: #037c9a;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #22cffb,0 1px 0 rgba(0,0,0,.15);
}
input.button.update-google-font-button:focus,
input.button.update-google-font-button:hover,
input.button.update-google-font-button:active {
outline: none;
background: #0490b3;
border-color: #036881;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #09cafa,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #09cafa,0 1px 0 rgba(0,0,0,.15);
}
.font-variant, .font-subset
{
display: inline-block;
font-size: 14px;
margin: 0 0 6px;
min-width: 100px;
}
.uagffixed {
position: fixed;
top: 50px;
right: 20px;
z-index: 999999999;
margin: 0 !important;
float:none;
}
@media all and (max-width: 1200px) {
.fonts-selected-list,
.uagffixed {
width: 23%;
}
}
/*Customizations*/
.wrap.uavc-gfont .add-new-h2,
.wrap.uavc-gfont .add-new-h2:active {
padding: 6px 10px;
color: #0074a2;
}
.wrap.uavc-gfont .add-new-h2:hover{
background: #2ea2cc;
color: #fff;
}
.wrap.uavc-gfont input#refresh-google-fonts:focus {
outline: none;
cursor: pointer;
}
.wrap.uavc-gfont .nav {
position: relative;
min-width: 255px;
border: 1px solid #e5e5e5;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
box-shadow: 0 1px 1px rgba(0,0,0,.04);
background: #fff;
margin-top: 10px;
}
.wrap.uavc-gfont input#search_gfont {
max-width: 50%;
width: 320px;
padding: 5px 7px !important;
font-size: 13px;
line-height: 1.5em !important;
font-weight: 600;
}
/*buttons*/
.wrap.uavc-gfont .add-google-font,
.google-font-message-buttons
{
cursor: pointer;
padding: 8px 12px;
text-align: center;
font-size: 12px;
min-width: 111px;
text-align: center;
background: #2ea2cc;
color: #fff;
border: 1px solid #0074a2;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);
text-decoration: none;
-webkit-transition: all 0.218s;
-moz-transition: all 0.218s;
transition: all 0.218s;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.google-font-confirmation .google-font-message-buttons {
min-width: 70px;
background: #D6D6D6;
color: #4d4d4d;
font-weight: 700;
border: 1px solid #C2C2C2;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.5),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(182, 182, 182, 0.5),0 1px 0 rgba(0,0,0,.15);
}
.wrap.uavc-gfont .add-google-font:hover,
.wrap.uavc-gfont .add-google-font:active,
.wrap.uavc-gfont .add-google-font:focus,
.google-font-message-buttons:hover,
.google-font-message-buttons:active,
.google-font-message-buttons:focus {
background: #1e8cbe;
border-color: #0074a2;
color: #fff;
outline: none;
}
.wrap.uavc-gfont .font-added,
.wrap.uavc-gfont .font-added:active,
.wrap.uavc-gfont .font-added:focus,
.wrap.uavc-gfont .font-added:hover {
cursor: not-allowed;
background: #738e96;
border-color: #4D707A;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #8EAAB3,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #8EAAB3,0 1px 0 rgba(0,0,0,.15);
}
.fonts-selected-list .dashicons.dashicons-arrow-down {
margin-left: 15px;
margin-top: 3px;
font-size: 27px;
}
.font-delete:before {
content: "Remove";
position: absolute;
right: 20px;
top: 11px;
background: #e14d43;
border: 1px solid #D54036;
color: #fff;
padding: 2px 5px;
opacity: 0;
-webkit-transition: all 300ms ease-in;
-moz-transition: all 300ms ease-in;
transition: all 300ms ease-in;
}
.font-delete:hover:before {
right: 30px;
opacity: 1;
}
.google-font-overlay
{
position:fixed;
top:0;
left:0;
background:rgba(0,0,0,0.6);
width: 100%;
height: 100%;
z-index: 999999999;
}
.google-font-confirmation
{
position: fixed;
top: 40%;
left: 0;
right: 0;
margin: 0 auto;
width: 420px;
max-width: 90%;
padding: 35px 35px 15px;
background: white;
border: 1px solid #525252;
border-radius: 5px;
box-shadow: 0px 0px 7px #525252;
z-index: 99999999999;
}
.google-font-message .google-font-message-buttons:first-child {
margin-right: 20px;
/*
background: #e14d43;
border-color: #d02a21;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #ec8a85,0 1px 0 rgba(0,0,0,.15);
*/
background: #D6D6D6;
color: #333;
border: 1px solid #C2C2C2;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.5),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(182, 182, 182, 0.5),0 1px 0 rgba(0,0,0,.15);
}
.google-font-message .google-font-message-buttons:first-child:hover {
background: #dd362d;
border-color: #ba251e;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #e8756f,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #e8756f,0 1px 0 rgba(0,0,0,.15);
}
.google-font-confirmation-header h3
{
margin: 0;
padding: 0px 8px;
text-align: center;
}
.google-font-message
{
padding: 25px 0 10px;
display: block;
margin: 0 auto;
width: 220px;
}
.gfont-anchor-buttons
{
text-decoration: none;
position: absolute;
top: 10px;
right: 20px;
}
.gfont-anchor-buttons i
{
font-size: 28px;
}
#vc-gf-msg .updated
{
padding:10px;
}
.selected-font-subset-wrapper {
margin-top: 5px;
padding-top: 10px;
border-top: 1px solid #F7F7F7;
}
@@ -0,0 +1,111 @@
/*Admin CSS for Icon Manager*/
/*Admin Menu Icons*/
.menu-icon-services .wp-menu-image:before {
content: "\f322";
}
.menu-icon-testimonials .wp-menu-image:before {
content: "\f205";
}
/*Icon Manager*/
.fi_icon li {
float: left;
width: 36px;
height: 36px;
text-align: center;
display: block;
box-shadow: 0px 0px 0px 1px #DDD;
margin: 0;
}
.fi_icon li > i {
font-size: 18px;
vertical-align: text-bottom;
display: inline-block;
line-height: 36px;
}
.fi_icon li label {
display: none;
}
.preview-icon {
display: inline-block;
width: 48px;
height: 48px;
text-align: center;
margin-right: 15px;
}
.preview-icon > i {
font-size: 32px;
vertical-align: text-top;
line-height: 48px;
}
.icon_search {
border: 1px solid #C7C7C7;
width: 99%;
max-height: 106px;
height: auto;
overflow: scroll;
overflow-x: hidden;
margin-bottom: -10px;
}
.icon_search > ul {
margin: 0;
}
[class^="icon_set-"], [class*=" icon_set-"] {
max-width: 50%;
width: 48%;
float: left;
margin-right: 2%;
}
/*[class^="icon_set-"] > .postbox, [class*=" icon_set-"] > .postbox {
min-height: 180px;
}*/
[class^="icon_set-"]:nth-child(odd), [class*=" icon_set-"]:nth-child(odd) {
float: right;
}
[class^="icon_set-"]:nth-child(even), [class*=" icon_set-"]:nth-child(even) {
float: left;
}
.fonts-count {
display: inline-block;
font-size: 1em;
line-height: 17px;
font-weight: 600;
margin: 1px 0 0 2px;
vertical-align: top;
-webkit-border-radius: 10px;
border-radius: 10px;
z-index: 26;
background-color: #D54E21;
color: #FFF;
padding: 0 6px;
margin-left: 10px;
}
.icon_font_name button {
margin-top: -2px !important;
float: right;
}
.icon_font_name {
padding-bottom: 12px;
border-bottom: 1px solid #DDD;
margin-bottom: 10px;
}
.appearance_page_smile_icon_manager .wrap h2 {
margin-bottom: 15px;
}
.appearance_page_smile_icon_manager .postbox {
margin-bottom: 10px;
}
.metabox-holder.meta-search {
max-width: 98%;
}
.search-icon {
padding: 5px;
vertical-align: middle;
margin-right: 15px;
width: 320px;
}
.postbox .search-icon {
width: 25%;
}
.media-sidebar .setting {
display: none;
}
@@ -0,0 +1,435 @@
/*Admin CSS for Icon Manager*/
i.ultimate_icons{
background-image: url(../img/icon-icons.png) !important;
background-position:0 0 !important;
}
i.ultimate_carousel{
background-image: url(../img/icon-advanced-carousel.png) !important;
background-position:0 0 !important;
}
i.ultimate_icon_list{
background-image: url(../img/icon-list-icon-parent.png) !important;
background-position:0 0 !important;
}
i.icon_list_item {
background-image: url(../img/icon-list-icon-child.png) !important;
background-position:0 0 !important;
}
i.ult_buttons{
background-image: url(../img/icon-button.png) !important;
background-position:0 0 !important;
}
i.animation_block {
background-image: url(../img/icon-animation.png) !important;
background-position:0 0 !important;
}
i.vc_swatch_container {
background-image: url(../img/icon-swatch-parent.png) !important;
background-position:0 0 !important;
}
i.vc_swatch_item {
background-image: url(../img/icon-swatch-child.png) !important;
background-position:0 0 !important;
}
i.list_icon{
background-image: url(../img/icon-list.png) !important;
background-position:0 0 !important;
}
i.vc_icon_tabs{
background-image: url(../img/icon-info-tabs.png) !important;
background-position:0 0 !important;
}
i.uavc_heading_nav{
background-image: url(../img/icon-heading.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_heading{
background-image: url(../img/icon-heading.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_video{
background-image: url(../img/icon-video.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_ribbon{
background-image: url(../img/icon-ribbon.png) !important;
background-position:0 0 !important;
}
i.vc_google_trends{
background-image: url(../img/icon-google-trends.png) !important;
background-position:0 0 !important;
}
i.vc_countdown{
background-image: url(../img/icon-countdown.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_info_table{
background-image: url(../img/icon-info-table.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_info_table{
background-image: url(../img/icon-info-table.png) !important;
background-position:0 0 !important;
}
i.vc_info_circle_item{
background-image: url(../img/icon-info-circle-block.png) !important;
background-position:0 0 !important;
}
i.vc_info_circle {
background-image: url(../img/icon-info-circle.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_pricing{
background-image: url(../img/icon-price-box.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_pricing{
background-image: url(../img/icon-price-box.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_spacer{
background-image: url(../img/icon-spacer.png) !important;
background-position:0 0 !important;
}
i.vc_timeline_feat_icon{
background-image: url(../img/icon-timeline-featured.png) !important;
background-position:0 0 !important;
}
i.vc_timeline_sep_icon{
background-image: url(../img/icon-timeline-sep.png) !important;
background-position:0 0 !important;
}
i.vc_timeline_item_icon {
background-image: url(../img/icon-timeline.png) !important;
background-position:0 0 !important;
}
i.vc_timeline_icon{
background-image: url(../img/icon-timeline.png) !important;
background-position:0 0 !important;
}
i.vc_icon_block{
background-image: url(../img/icon-flip-box.png) !important;
background-position:0 0 !important;
}
i.vc_icon_list{
background-image: url(../img/icon-info-list.png) !important;
background-position:0 0 !important;
}
i.vc_icon_content_box{
background-image: url(../img/content-box.png) !important;
background-position:0 0 !important;
}
i.vc_icon_stats, .vc_stats_counter > .wpb_element_wrapper {
background-image: url(../img/icon-counter.png) !important;
}
i.vc_just_icon{
background-image: url(../img/icon-just-icon.png) !important;
background-position:0 0 !important;
}
i.vc_info_box, .info_box{
background-image: url(../img/icon-info-box.png) !important;
background-position:0 0 !important;
}
i.vc_modal_box, .modal_box{
background-image: url(../img/icon-modal.png) !important;
background-position:0 0 !important;
}
i.vc_icon_interactive{
background-image: url(../img/icon-interactive-banner.png) !important;
background-position:0 0 !important;
}
i.vc_google_map{
background-image: url(../img/icon-map.png) !important;
background-position:0 0 !important;
}
i.vc_ultimate_fancytext{
background-image: url(../img/icon-fancy-text.png) !important;
background-position:0 0 !important;
}
i.vc_icon_ctaction{
background-image: url(../img/icon-highlight-box.png) !important;
background-position:0 0 !important;
}
i.vc_icon_info_banner{
background-image: url(../img/icon-info-banner.png) !important;
background-position:0 0 !important;
}
i.ult_ihover{
background-image: url(../img/icon-hover.png) !important;
background-position:0 0 !important;
}
i.ult_hotspot {
background-image: url(../img/icon-hotspot.png) !important;
background-position: 0 0 !important;
}
i.vc_ultimate_video_banner {
background-image: url(../img/icon-video-banner.png) !important;
background-position: 0 0 !important;
}
i.vc_icon_img_separator {
background-image: url(../img/icon-image-separator.png) !important;
background-position: 0 0 !important;
}
i.vc_icon_team {
background-image: url(../img/icon-team.png) !important;
background-position: 0 0 !important;
}
i.vc_icon_sticky_section {
background-image: url(../img/icon-sticky-section.png) !important;
background-position: 0 0 !important;
}
i.vc_icon_range_slider {
background-image: url(../img/icon-range-slider.png) !important;
background-position: 0 0 !important;
}
a#ult_tab_element .vc_element-icon {
background-image: url(../img/tab-icon.png) !important;
background-position: 0 0 !important;
}
i.uvc_creative_link {
background-image: url(../img/creative-link.png) !important;
background-position: 0 0 !important;
}
i.uvc_expandable {
background-image: url(../img/collapsable.png) !important;
background-position: 0 0 !important;
}
i.uvc_dual_button {
background-image: url(../img/dual_button.png) !important;
background-position: 0 0 !important;
}
.wpb_ult_tab_element.ult_tab_eleicon {
background: none !important;
}
/*icon-manager*/
#smile_icon_search {
width: 96%;
height: 136px;
overflow-y: scroll;
overflow-x: hidden;
border: 1px solid #DDD;
}
#smile_icon_search p {
margin-left: 8px;
margin-bottom: 7px;
clear: both;
padding-top: 7px;
}
.icons-list.smile_icon {
margin-top: -10px;
}
.edit_form_line .search-icon {
width: 350px !important;
}
.smile_icon li {
float: left;
width: 36px;
height: 36px;
text-align: center;
display: block;
box-shadow: 0px 0px 0px 1px #DDD;
margin: 0;
}
.smile_icon li > i {
font-size: 18px;
vertical-align: text-bottom;
display: inline-block;
line-height: 36px;
}
.smile_icon li label {
display: none;
}
.preview-icon {
width: 64px;
height: 56px;
line-height: 56px;
font-size: 40px;
float: left;
text-align: center;
margin-top: -10px;
}
.smile_icon li:hover i {
z-index: 99;
zoom: 1.3;
font-size: 18px;
top: -3px;
left: -3px;
position: relative;
width: 36px;
line-height: 36px;
height: 36px;
display: block;
background: #4C4C4C;
color: #FFF;
cursor: pointer;
}
.smile_icon li.selected {
background: #0785E7;
color: #FFF;
}
/*Search box of Info Box*/
input.search-icon {
padding: 5px 7px !important;
font-size: 13px;
line-height: 1.5em !important;
}
/*TinyMCE height*/
/*
#wpb_tinymce_content_tbl {
height: 150px !important;
}
#wpb_tinymce_content_ifr {
height: 130px !important;
}
.smile_icon li:before {
content: '' !important;
}
*/
/*On Off Checkbox Switch*/
.ult-onoffswitch {
position: relative;
width: 95px;
display: inline-block;
float: left;
margin-right: 15px;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select: none;
}
.ult-onoffswitch-checkbox {
position: absolute;
outline: none;
top: 2px;
left:0;
}
.ult-onoffswitch-checkbox:foucs {
outline: none;
}
.ult-onoffswitch-label {
display: block;
overflow: hidden;
cursor: pointer;
border: 0px solid #999999;
border-radius: 0px;
}
.ult-onoffswitch-inner {
width: 200%;
margin-left: -100%;
-moz-transition: margin 0.3s ease-in 0s;
-webkit-transition: margin 0.3s ease-in 0s;
-o-transition: margin 0.3s ease-in 0s;
transition: margin 0.3s ease-in 0s;
}
.ult-onoffswitch-inner > div {
float: left;
position: relative;
width: 50%;
height: 24px;
padding: 0;
line-height: 24px;
font-size: 12px;
color: white;
font-weight: bold;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.ult-onoffswitch-inner .ult-onoffswitch-active {
padding-left: 15px;
background-color: #CCCCCC;
color: #FFFFFF;
}
.ult-onoffswitch-inner .ult-onoffswitch-inactive {
padding-right: 15px;
background-color: #CCCCCC;
color: #FFFFFF;
text-align: right;
}
.ult-onoffswitch-switch {
/*width: 50px;*/
width:35px;
margin: 0px;
text-align: center;
border: 0px solid #999999;
border-radius: 0px;
position: absolute;
top: 0;
bottom: 0;
}
.ult-onoffswitch-active .ult-onoffswitch-switch {
background: #3F9CC7;
left: 0;
}
.ult-onoffswitch-inactive .ult-onoffswitch-switch {
background: #7D7D7D;
right: 0;
}
.ult-onoffswitch-active .ult-onoffswitch-switch:before {
content: " ";
position: absolute;
top: 0;
/*left: 50px;*/
left:35px;
border-style: solid;
border-color: #3F9CC7 transparent transparent #3F9CC7;
/*border-width: 12px 8px;*/
border-width: 15px;
}
.ult-onoffswitch-inactive .ult-onoffswitch-switch:before {
content: " ";
position: absolute;
top: 0;
/*right: 50px;*/
right:35px;
border-style: solid;
border-color: transparent #7D7D7D #7D7D7D transparent;
/*border-width: 12px 8px;*/
border-width: 50px;
}
.ult-onoffswitch-checkbox:checked + .ult-onoffswitch-label .ult-onoffswitch-inner {
margin-left: 0;
}
.icon_type.none, .icon_type option.none {
display:block !important;
}
/* Aktina theme carousel navigation fix */
.wpb_el_type_slick_icon .icon-list li:before {
display:none !important;
}
.wp-picker-container .iris-picker {
z-index: 99;
}
.wpb-edit-form select.none, .wpb-select option.none {
display: block !important;
}
.wpb_el_type_css_editor.no-vc-border .vc_border > label:nth-of-type(1),
.wpb_el_type_css_editor.no-vc-border .vc_border > .vc_top,
.wpb_el_type_css_editor.no-vc-border .vc_border > .vc_right,
.wpb_el_type_css_editor.no-vc-border .vc_border > .vc_bottom,
.wpb_el_type_css_editor.no-vc-border .vc_border > .vc_left,
.wpb_el_type_css_editor.no-vc-border .vc_settings label:nth-of-type(1),
.wpb_el_type_css_editor.no-vc-border .vc_settings label:nth-of-type(3),
.wpb_el_type_css_editor.no-vc-border .vc_settings label:nth-of-type(4),
.wpb_el_type_css_editor.no-vc-border .vc_settings .color-group:nth-of-type(1),
.wpb_el_type_css_editor.no-vc-border .vc_settings .vc_border-style,
.wpb_el_type_css_editor.no-vc-border .vc_settings .vc_border-radius,
.wpb_el_type_css_editor.no-vc-background .vc_settings label:nth-of-type(2),
.wpb_el_type_css_editor.no-vc-background .vc_settings .color-group ~ .color-group,
.wpb_el_type_css_editor.no-vc-background .vc_settings .vc_background-image,
.wpb_el_type_css_editor.no-vc-background .vc_settings .vc_background-style {
display:none;
}
.wpb_el_type_css_editor.no-vc-border .vc_border {
border:0 !important;
}
.wpb_el_type_css_editor.no-vc-border .vc_border .vc_padding {
margin:0;
}
@@ -0,0 +1,25 @@
/*!
* jQuery ClassyGradient
* www.class.pm
*
* Written by Marius Stanciu - Sergiu <marius@class.pm>
* Licensed under the MIT license www.class.pm/LICENSE-MIT
* Version 1.1.0
*
*/.ClassyGradient{margin-bottom:18px}.ClassyGradient .canvas{border:1px solid #333}.ClassyGradient .info{display:none;margin-right:20px;margin-top:20px;position:absolute;z-index:80}.ClassyGradient .info .arrow{top:-17px;border-style:solid;border-width:10px;height:0;width:0;margin-left:20px;border-color:transparent transparent #000 transparent}.ClassyGradient .info .content{color:#fff;background-color:#000;padding:8px;padding-top:5px;padding-bottom:4px;font-size:12px;font-family:Verdana,Arial;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.ClassyGradient .points{position:absolute;z-index:99;max-height:20px;margin-top:2px}.ClassyGradient .point{position:absolute;width:8px;margin-left:-4px;height:8px;top:0;border:1px solid #333;cursor:pointer}.ClassyGradient .point-position{position:relative;top:-12px;margin-left:6px}.ClassyGradient .delete{display:inline-block;width:16px;height:16px;background-image:url(../img/close.png);position:relative;top:-9px;margin-left:8px}.ClassyGradient .point-color{display:inline-block;width:36px;height:36px;background:url(../img/select.png)}.ClassyGradient .point-color div{position:relative;top:4px;left:4px;width:28px;height:28px;background:url(../img/select.png) center}
/*Sid Custom*/
.grad_hold{
width: 350px;
height: 50px;
margin: 5px 0 0 20px;
}
.grad_trgt{
width: 550px;
height: 150px;
}
.grad_type {
margin-bottom:10px !important;
}
.vc_ug_control{
/*margin-left: 20px;*/
}
@@ -0,0 +1,179 @@
/**
*
* Color picker
* Author: Stefan Petre www.eyecon.ro
*
* Dual licensed under the MIT and GPL licenses
*
*/
.colorpicker {
width: 356px;
height: 176px;
overflow: hidden;
position: absolute;
z-index: 100;
background: url(../img/colorpicker_background.png);
font-family: Arial, Helvetica, sans-serif;
display: none;
}
.colorpicker_color {
width: 150px;
height: 150px;
left: 14px;
top: 13px;
position: absolute;
background: #f00;
overflow: hidden;
cursor: crosshair;
}
.colorpicker_color div {
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: url(../img/colorpicker_overlay.png);
}
.colorpicker_color div div {
position: absolute;
top: 0;
left: 0;
width: 11px;
height: 11px;
overflow: hidden;
background: url(../img/colorpicker_select.gif);
margin: -5px 0 0 -5px;
}
.colorpicker_hue {
position: absolute;
top: 13px;
left: 171px;
width: 35px;
height: 150px;
cursor: n-resize;
}
.colorpicker_hue div {
position: absolute;
width: 35px;
height: 9px;
overflow: hidden;
background: url(../img/colorpicker_indic.gif) left top;
margin: -4px 0 0 0;
left: 0px;
}
.colorpicker_new_color {
position: absolute;
width: 60px;
height: 30px;
left: 213px;
top: 13px;
background: #f00;
}
.colorpicker_current_color {
position: absolute;
width: 60px;
height: 30px;
left: 283px;
top: 13px;
background: #f00;
}
.colorpicker input {
background-color: transparent;
border: 1px solid transparent;
position: absolute;
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
color: #898989;
top: 4px;
right: 11px;
text-align: right;
margin: 0;
padding: 0;
outline:none;
width: 29px;
}
.colorpicker_hex input {
width:40px !important;
}
.colorpicker input:focus, .colorpicker input:active {
outline:none;
box-shadow:none;
border: 1px solid transparent;
}
.colorpicker_hex {
position: absolute;
width: 72px;
height: 22px;
background: url(../img/colorpicker_hex.png) top;
left: 212px;
top: 142px;
}
.colorpicker_hex input {
right: 6px;
}
.colorpicker_field {
height: 22px;
width: 62px;
background-position: top;
position: absolute;
}
.colorpicker_field span {
position: absolute;
width: 12px;
height: 22px;
overflow: hidden;
top: 0;
right: 0;
cursor: n-resize;
}
.colorpicker_rgb_r {
background-image: url(../img/colorpicker_rgb_r.png);
top: 52px;
left: 212px;
}
.colorpicker_rgb_g {
background-image: url(../img/colorpicker_rgb_g.png);
top: 82px;
left: 212px;
}
.colorpicker_rgb_b {
background-image: url(../img/colorpicker_rgb_b.png);
top: 112px;
left: 212px;
}
.colorpicker_hsb_h {
background-image: url(../img/colorpicker_hsb_h.png);
top: 52px;
left: 282px;
}
.colorpicker_hsb_s {
background-image: url(../img/colorpicker_hsb_s.png);
top: 82px;
left: 282px;
}
.colorpicker_hsb_b {
background-image: url(../img/colorpicker_hsb_b.png);
top: 112px;
left: 282px;
}
.colorpicker_submit {
position: absolute;
width: 22px;
height: 22px;
background: url(../img/colorpicker_submit.png) top;
left: 322px;
top: 142px;
overflow: hidden;
}
.colorpicker_focus {
background-position: center;
}
.colorpicker_hex.colorpicker_focus {
background-position: bottom;
}
.colorpicker_submit.colorpicker_focus {
background-position: bottom;
}
.colorpicker_slider {
background-position: bottom;
}
@@ -0,0 +1,225 @@
/*SID EDIT */
.alpha_clear{
padding: 4px 13px;
margin-left: 13px;
cursor: pointer;
}
.colorpicker_alpha{
padding: 13px 0 13px 45px !important;
}
.minicolors {
position: relative;
}
.minicolors-swatch {
position: absolute;
vertical-align: middle;
background: url(../img/jquery.minicolors.png) -80px 0;
border: solid 1px #4d4d4d;
cursor: text;
padding: 5px;
margin: 0;
display: inline-block;
cursor: pointer;
}
.minicolors-swatch-color {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.minicolors input[type=hidden] + .minicolors-swatch {
width: 28px;
position: static;
cursor: pointer;
}
/* Panel */
.minicolors-panel {
position: absolute;
width: 173px;
height: 152px;
background: white;
border: solid 1px #CCC;
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
z-index: 99999;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
display: none;
margin-bottom: 20px;
}
.minicolors-panel.minicolors-visible {
display: block;
}
/* Panel positioning */
.minicolors-position-top .minicolors-panel {
top: -154px;
}
.minicolors-position-right .minicolors-panel {
right: 0;
}
.minicolors-position-bottom .minicolors-panel {
top: auto;
}
.minicolors-position-left .minicolors-panel {
left: 0;
}
.minicolors-with-opacity .minicolors-panel {
width: 194px;
}
.minicolors .minicolors-grid {
position: absolute;
top: 1px;
left: 1px;
width: 150px;
height: 150px;
background: url(../img/jquery.minicolors.png) -120px 0;
cursor: crosshair;
}
.minicolors .minicolors-grid-inner {
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: none;
}
.minicolors-slider-saturation .minicolors-grid {
background-position: -420px 0;
}
.minicolors-slider-saturation .minicolors-grid-inner {
background: url(../img/jquery.minicolors.png) -270px 0;
}
.minicolors-slider-brightness .minicolors-grid {
background-position: -570px 0;
}
.minicolors-slider-brightness .minicolors-grid-inner {
background: black;
}
.minicolors-slider-wheel .minicolors-grid {
background-position: -720px 0;
}
.minicolors-slider,
.minicolors-opacity-slider {
position: absolute;
top: 1px;
left: 152px;
width: 20px;
height: 150px;
background: white url(../img/jquery.minicolors.png) 0 0;
cursor: row-resize;
}
.minicolors-slider-saturation .minicolors-slider {
background-position: -60px 0;
}
.minicolors-slider-brightness .minicolors-slider {
background-position: -20px 0;
}
.minicolors-slider-wheel .minicolors-slider {
background-position: -20px 0;
}
.minicolors-opacity-slider {
left: 173px;
background-position: -40px 0;
display: none;
}
.minicolors-with-opacity .minicolors-opacity-slider {
display: block;
}
/* Pickers */
.minicolors-grid .minicolors-picker {
position: absolute;
top: 70px;
left: 70px;
width: 12px;
height: 12px;
border: solid 1px black;
border-radius: 10px;
margin-top: -6px;
margin-left: -6px;
background: none;
}
.minicolors-grid .minicolors-picker > div {
position: absolute;
top: 0;
left: 0;
width: 8px;
height: 8px;
border-radius: 8px;
border: solid 2px white;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.minicolors-picker {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 2px;
background: white;
border: solid 1px black;
margin-top: -2px;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
/* Inline controls */
.minicolors-inline {
display: inline-block;
}
.minicolors-inline .minicolors-input {
display: none !important;
}
.minicolors-inline .minicolors-panel {
position: relative;
top: auto;
left: auto;
box-shadow: none;
z-index: auto;
display: inline-block;
}
/* Default theme */
.minicolors-theme-default .minicolors-swatch {
/*top:5px;*/
left: 0px;
width: 18px;
height: 18px;
}
.minicolors-theme-default.minicolors-position-right .minicolors-swatch {
left: auto;
right: 5px;
}
.minicolors-theme-default.minicolors {
width: auto;
display: inline-block;
}
.minicolors-theme-default .minicolors-input {
height: 20px;
width: auto;
display: inline-block;
padding-left: 26px;
}
.minicolors-theme-default.minicolors-position-right .minicolors-input {
padding-right: 26px;
padding-left: inherit;
}
/* Bootstrap theme */
.minicolors-theme-bootstrap .minicolors-swatch {
top: 3px;
left: 3px;
width: 28px;
height: 28px;
border-radius: 3px;
}
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch {
left: auto;
right: 3px;
}
.minicolors-theme-bootstrap .minicolors-input {
padding-left: 44px;
}
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
padding-right: 44px;
padding-left: 12px;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,33 @@
@charset "utf-8";.ult-no-effect,.ult-no-effect *{transform:none!important;transition:none!important}.ult-param-heading-wrapper a,.ult-param-heading-wrapper a:active,.ult-param-heading-wrapper a:focus,.ult-param-heading-wrapper a:visited,.ult-param-important-wrapper a,.ult-param-important-wrapper a:active,.ult-param-important-wrapper a:focus,.ult-param-important-wrapper a:visited{text-decoration:none;outline:0;display:inline-block}.ult_hide_editor_fullscreen #qt_wpb_tinymce_content_dfw,.ult_hide_editor_fullscreen .mce-widget.mce-btn.mce-wp-dfw{display:none}.creative_link_css_editor.no-vc-border .vc_border-radius,.creative_link_css_editor.no-vc-border .vc_settings label,.creative_link_css_editor.no-vc-border .vc_settings label:nth-last-child(2),.video_banner_css_editor.no-vc-border .vc_border-radius,.video_banner_css_editor.no-vc-border .vc_settings label,.video_banner_css_editor.no-vc-border .vc_settings label:nth-last-child(2){display:none}.creative_link_css_editor.no-vc-border .vc_settings label:last-child,.video_banner_css_editor.no-vc-border .vc_settings label:last-child{display:block}.ult-param-heading-wrapper{padding:10px 15px;font-size:14px;background:#e6e6e6;color:#6c6c6c;margin-bottom:0;margin-top:10px}.ult-param-heading-wrapper.no-top-margin{margin-top:0}.ult-param-heading-wrapper h4{margin:0}.ult-param-heading-wrapper p{text-align:center;margin:0 auto}.ult-param-padding-remove.vc_col-sm-4{padding-top:0!important}.uvc-divider{background:#f7f7f7;margin-top:10px!important;margin-bottom:0!important;padding-top:15px!important;padding-bottom:15px!important;border-top:1px solid #e9e9e9}.uvc-divider.first-uvc-divider{margin-top:0!important}.uvc-divider-content-last{border-bottom:1px solid #e9e9e9;padding-bottom:15px;margin-bottom:15px!important}.ult-param-important-wrapper{background:#e6e6e6;padding-top:0!important;margin-top:15px}.ult-dashicon .dashicons{width:auto!important;height:auto!important}.ult-align-center{text-align:center!important}.ult-align-right{text-align:left!important}.ult-bold-font{font-weight:700!important}.ult-dashicon.ult-red-font a,.ult-red-font{color:#c20000!important}.ult-blue-font{color:#28a9ee!important}#plugin_activation,#plugin_activation *,#plugin_activation_sidebar,#plugin_activation_sidebar *,.bsf-overlay,.bsf-overlay *,.wrap.ultimate_updater,.wrap.ultimate_updater *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wrap.ultimate_updater{max-width:100%;margin:0;padding:25px 20px}.wrap.ultimate_updater h1{font-size:36px}.wrap.ultimate_updater .ultimate_updater_text{font-size:14px;max-width:900px;margin:35px 0 25px;color:#777;line-height:1.65em}.wrap.ultimate_updater .updater-title-logo{width:150px;height:150px;background-image:url(../img/brainstorm-logo.png);background-repeat:no-repeat;background-size:contain;position:absolute;top:15px;left:25px;z-index:-1}.ultimate_updater #poststuff #post-body.columns-2{margin-left:400px}.ultimate_updater #post-body.columns-2 #postbox-container-1{float:left;margin-left:-380px;width:350px}#ultimate_user_receive{vertical-align:bottom}.masterUltTooltip.dashicons-editor-help{cursor:pointer}#plugin_activation,#plugin_activation_sidebar{background:#f5f5f5;background-color:transparent;background:-webkit-linear-gradient(top,#fff 1%,#f9f9f9 98%) repeat scroll 100% 0 transparent;background:linear-gradient(to bottom,#fff 1%,#f9f9f9 98%) repeat scroll 100% 0 transparent;box-shadow:0 1px 1px 0 rgba(0,0,0,.04);min-height:100px;position:relative;z-index:1;border:1px solid #ececec;border-bottom-right-radius:7px;border-bottom-left-radius:7px;border-bottom:3px solid #c6c6c6;padding:20px 30px}#plugin_activation.postbox h3.hndle{border-bottom:1px solid #ececec;padding:0 15px 12px;margin-top:-5px;margin-right:-30px;margin-left:-30px}#plugin_activation.postbox .hndle{border:none;border-top:none!important}#plugin_activation .inside{margin:0;padding:15px 10px 15px}#plugin_activation .main.after-regi-text{margin-bottom:20px;padding:0}#plugin_activation .main.after-regi-text p{margin:10px 0 5px;padding:0;display:inline-block;width:100%;font-size:13px;text-align:right;line-height:1.64em}#plugin_activation #signup-steps{width:100%;display:inline-block;padding:0;margin:0 0 10px}#plugin_activation .sf__step-indicator>li{width:50%;padding:10px 30px 10px;margin:0;cursor:not-allowed;text-align:center;position:relative;display:inline;height:auto;float:right}#plugin_activation span.sf__step-count{padding:0;margin:0 auto;font-size:13px;width:4em;height:4em;line-height:4em;color:#0074a2;background:#2ea2cc;font-weight:400;text-align:center;border-radius:100%;display:block;position:relative;z-index:2}#plugin_activation span.sf__step-title{color:#2ea2cc;font-weight:300;display:block;z-index:2;padding-top:.625rem}#plugin_activation .sf__step-indicator>li:after,#plugin_activation .sf__step-indicator>li:before{background:#2ea2cc;content:"";display:block;height:3px;position:absolute;top:32%;z-index:1}#plugin_activation .sf__step-indicator>li:first-childLine truncated
Animate.css - http://daneden.me/animate
Licensed under the MIT license
Copyright (c) 2013 Daniel Eden
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/.wp-admin span#animate-me{display:inline-block;position:relative}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);-ms-transform:translateY(-15px);transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scaleX(1.25) scaleY(.75);transform:scaleX(1.25) scaleY(.75)}40%{-webkit-transform:scaleX(.75) scaleY(1.25);transform:scaleX(.75) scaleY(1.25)}60%{-webkit-transform:scaleX(1.15) scaleY(.85);transform:scaleX(1.15) scaleY(.85)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes rubberBand{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scaleX(1.25) scaleY(.75);-ms-transform:scaleX(1.25) scaleY(.75);transform:scaleX(1.25) scaleY(.75)}40%{-webkit-transform:scaleX(.75) scaleY(1.25);-ms-transform:scaleX(.75) scaleY(1.25);transform:scaleX(.75) scaleY(1.25)}60%{-webkit-transform:scaleX(1.15) scaleY(.85);-ms-transform:scaleX(1.15) scaleY(.85);transform:scaleX(1.15) scaleY(.85)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(10px);transform:translateX(10px)}20%,40%,60%,80%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}20%,40%,60%,80%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(-15deg);transform:rotate(-15deg)}40%{-webkit-transform:rotate(10deg);transform:rotate(10deg)}60%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}80%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}100%{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes swing{20%{-webkit-transform:rotate(-15deg);-ms-transform:rotate(-15deg);transform:rotate(-15deg)}40%{-webkit-transform:rotate(10deg);-ms-transform:rotate(10deg);transform:rotate(10deg)}60%{-webkit-transform:rotate(-5deg);-ms-transform:rotate(-5deg);transform:rotate(-5deg)}80%{-webkit-transform:rotate(5deg);-ms-transform:rotate(5deg);transform:rotate(5deg)}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(3deg);transform:scale(.9) rotate(3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@keyframes tada{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(3deg);-ms-transform:scale(.9) rotate(3deg);transform:scale(.9) rotate(3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(-3deg);-ms-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deLine truncated
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.2.0
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2014 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;right:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{right:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 8px 0 0;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-left:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-left:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;left:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;left:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 100% 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 5px 4px 20px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 0% -20px;background:url(chosen-sprite.png) no-repeat 0% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;right:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 0 4px 4px;padding:0 4px 0 0;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-right:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:right;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;backgroLine truncated
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-datetimepicker-widget{top:0;right:0;width:250px;padding:4px;margin-top:1px;z-index:3000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;right:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-right:6px solid transparent;border-left:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;right:7px}.bootstrap-datetimepicker-widget.pull-right:before{right:auto;left:6px}.bootstrap-datetimepicker-widget.pull-right:after{right:auto;left:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:700;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.new,.bootstrap-datetimepicker-widget td.old{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active.disabled,.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover,.bootstrap-datetimepicker-widget td.active:hover.active,.bootstrap-datetimepicker-widget td.active:hover.disabled,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active:hover:hover,.bootstrap-datetimepicker-widget td.active:hover[disabled],.bootstrap-datetimepicker-widget td.active[disabled]{color:#fff;background-color:#04c}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:100%;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:right;margin:2px;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.active.active,.bootstrap-datetimepicker-widget td span.active.disabled,.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active:hover,.bootstrap-datetimepicker-widget td span.active[disabled]{color:#fff;background-color:#04c}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:100%;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{bacLine truncated
* jQuery ClassyGradient
* www.class.pm
*
* Written by Marius Stanciu - Sergiu <marius@class.pm>
* Licensed under the MIT license www.class.pm/LICENSE-MIT
* Version 1.1.0
*
*/.ClassyGradient{margin-bottom:18px}.ClassyGradient .canvas{border:1px solid #333}.ClassyGradient .info{display:none;margin-left:20px;margin-top:20px;position:absolute;z-index:80}.ClassyGradient .info .arrow{top:-17px;border-style:solid;border-width:10px;height:0;width:0;margin-right:20px;border-color:transparent transparent #000 transparent}.ClassyGradient .info .content{color:#fff;background-color:#000;padding:8px;padding-top:5px;padding-bottom:4px;font-size:12px;font-family:Verdana,Arial;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.ClassyGradient .points{position:absolute;z-index:99;max-height:20px;margin-top:2px}.ClassyGradient .point{position:absolute;width:8px;margin-right:-4px;height:8px;top:0;border:1px solid #333;cursor:pointer}.ClassyGradient .point-position{position:relative;top:-12px;margin-right:6px}.ClassyGradient .delete{display:inline-block;width:16px;height:16px;background-image:url(../img/close.png);position:relative;top:-9px;margin-right:8px}.ClassyGradient .point-color{display:inline-block;width:36px;height:36px;background:url(../img/select.png)}.ClassyGradient .point-color div{position:relative;top:4px;right:4px;width:28px;height:28px;background:url(../img/select.png) center}.grad_hold{width:350px;height:50px;margin:5px 20px 0 0}.grad_trgt{width:550px;height:150px}.grad_type{margin-bottom:10px!important}.ubtn{border:inherit;-webkit-border-radius:none;border-radius:none;font-size:12px;font-weight:400;line-height:1.4em;color:inherit;background:100% 0;cursor:pointer;display:inline-block;margin:0;padding:25px 80px;outline:0;text-align:center;text-decoration:none;position:relative;-webkit-transition:all .3s;transition:all .3s;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;z-index:1;max-width:100%;visibility:visible;-webkit-backface-visibility:hidden;backface-visibility:hidden}.ubtn:after{content:'';position:absolute;z-index:-1;-webkit-transition:all .3s;transition:all .3s}.ubtn-data{z-index:3;position:inherit;display:block;font-family:inherit;font-weight:inherit;font-size:inherit;color:inherit}button.ubtn{background:inherit;color:inherit}button.ubtn:active,button.ubtn:focus,button.ubtn:hover,button.ubtn:visited{color:inherit;background:inherit;-webkit-box-shadow:inherit;box-shadow:inherit;outline:0}.ubtn-ctn-left{display:block;text-align:right}.ubtn-ctn-center{display:block;text-align:center}.ubtn-ctn-right{display:block;text-align:left}.ubtn-ctn-inline{display:inline-block;text-align:center}a.ubtn-link{display:inline-block;margin:0;color:inherit;text-decoration:none;max-width:100%}a.ubtn-link:hover{color:inherit;text-decoration:none}a.ubtn-link .ubtn{margin:0}button.ubtn-mini{padding:5px 10px}button.ubtn-small{padding:8px 16px}button.ubtn-normal{padding:15px 30px}button.ubtn-large{padding:21px 42px}.ubtn-block{display:block;width:100%!important;margin-right:0!important;margin-left:0!important;padding-right:0;padding-left:0}button.ubtn-custom{padding:0}@media(max-width:768px){.ubtn-small{padding:6px 12px}.ubtn-normal{padding:10px 24px}.ubtn-large{padding:12px 36px}}.ubtn-shd{-webkit-border-radius:5px;border-radius:5px;background:#eaeaea;-webkit-box-shadow:0 5px #bebebe;box-shadow:0 5px #bebebe;-webkit-transition:none!important;transition:none!important}.ubtn-sep-icon .ubtn-icon{position:absolute;top:50%;opacity:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);line-height:1;-webkit-transition:all .3s;transition:all .3s}.ubtn-sep-icon:hover .ubtn-icon{opacity:1}.ubtn-sep-icon .ubtn-icon span{line-height:inherit;display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:400;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ubtn.ubtn-sep-icon.ubtn-only-icon .ubtn-icon{position:relative;right:0;top:0;left:0;bottom:0;-webkit-transform:translate(0);-ms-transform:translate(0);transform:translate(0)}.ubtn-sep-icon.ubtn-sep-icon-at-left .ubtn-icon{right:20px;opacity:1}.ubtn-img-container .ubtn-sep-icon.ubtn-sep-icon-at-left .ubtn-icon{right:20px;opacity:1}.ubtn-img-container .ubtn-sep-icon.ubtn-sep-icon-at-right .ubtn-icon{left:20px;opacity:1}.ubtn-sep-icon.ubtn-sep-icon-at-right .ubtn-icon{left:20px;opacity:1}.ubtn-sep-icon-left .ubtn-icon{right:-2em}.ubtn-sep-icon-left:hover .ubtn-icon{right:10px}.ubtn-img-container .ubtn-sep-icon-left:hover .ubtn-icon{right:10px}.ubtn-sep-icon-left-rev .ubtn-icon{right:4em}.ubtn-sep-icon-left-rev:hover .ubtn-icon{right:20px}.ubtn-sep-icon-right .ubtn-icon{left:-2em}.ubtn-img-container .ubtn-sep-icon-right:hover .ubtn-icon{left:30px}.ubtn-sep-icon-right:hover .ubtn-icon{left:5px}.ubtn-sep-icon-right-rev .ubtn-icon{left:4em}.ubtn-sep-icon-right-rev:hover .ubtn-icon{left:20px}.ubtn-sep-icon.ubtn-sep-icon-bottom-push .ubtn-icon,.ubtn-sep-icon.ubtn-sep-icon-left-push .ubtn-icon,.ubtn-sep-icon.ubtn-sep-icon-right-push .ubtn-icon,.ubtn-sep-icon.ubtn-sep-icon-top-push .ubtn-icon{position:absolute;widLine truncated
@@ -0,0 +1,33 @@
@charset "utf-8";.ult-no-effect,.ult-no-effect *{transform:none!important;transition:none!important}.ult-param-heading-wrapper a,.ult-param-heading-wrapper a:active,.ult-param-heading-wrapper a:focus,.ult-param-heading-wrapper a:visited,.ult-param-important-wrapper a,.ult-param-important-wrapper a:active,.ult-param-important-wrapper a:focus,.ult-param-important-wrapper a:visited{text-decoration:none;outline:0;display:inline-block}.ult_hide_editor_fullscreen #qt_wpb_tinymce_content_dfw,.ult_hide_editor_fullscreen .mce-widget.mce-btn.mce-wp-dfw{display:none}.creative_link_css_editor.no-vc-border .vc_border-radius,.creative_link_css_editor.no-vc-border .vc_settings label,.creative_link_css_editor.no-vc-border .vc_settings label:nth-last-child(2),.video_banner_css_editor.no-vc-border .vc_border-radius,.video_banner_css_editor.no-vc-border .vc_settings label,.video_banner_css_editor.no-vc-border .vc_settings label:nth-last-child(2){display:none}.creative_link_css_editor.no-vc-border .vc_settings label:last-child,.video_banner_css_editor.no-vc-border .vc_settings label:last-child{display:block}.ult-param-heading-wrapper{padding:10px 15px;font-size:14px;background:#e6e6e6;color:#6c6c6c;margin-bottom:0;margin-top:10px}.ult-param-heading-wrapper.no-top-margin{margin-top:0}.ult-param-heading-wrapper h4{margin:0}.ult-param-heading-wrapper p{text-align:center;margin:0 auto}.ult-param-padding-remove.vc_col-sm-4{padding-top:0!important}.uvc-divider{background:#f7f7f7;margin-top:10px!important;margin-bottom:0!important;padding-top:15px!important;padding-bottom:15px!important;border-top:1px solid #e9e9e9}.uvc-divider.first-uvc-divider{margin-top:0!important}.uvc-divider-content-last{border-bottom:1px solid #e9e9e9;padding-bottom:15px;margin-bottom:15px!important}.ult-param-important-wrapper{background:#e6e6e6;padding-top:0!important;margin-top:15px}.ult-dashicon .dashicons{width:auto!important;height:auto!important}.ult-align-center{text-align:center!important}.ult-align-right{text-align:right!important}.ult-bold-font{font-weight:700!important}.ult-dashicon.ult-red-font a,.ult-red-font{color:#c20000!important}.ult-blue-font{color:#28a9ee!important}#plugin_activation,#plugin_activation *,#plugin_activation_sidebar,#plugin_activation_sidebar *,.bsf-overlay,.bsf-overlay *,.wrap.ultimate_updater,.wrap.ultimate_updater *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wrap.ultimate_updater{max-width:100%;margin:0;padding:25px 20px}.wrap.ultimate_updater h1{font-size:36px}.wrap.ultimate_updater .ultimate_updater_text{font-size:14px;max-width:900px;margin:35px 0 25px;color:#777;line-height:1.65em}.wrap.ultimate_updater .updater-title-logo{width:150px;height:150px;background-image:url(../img/brainstorm-logo.png);background-repeat:no-repeat;background-size:contain;position:absolute;top:15px;right:25px;z-index:-1}.ultimate_updater #poststuff #post-body.columns-2{margin-right:400px}.ultimate_updater #post-body.columns-2 #postbox-container-1{float:right;margin-right:-380px;width:350px}#ultimate_user_receive{vertical-align:bottom}.masterUltTooltip.dashicons-editor-help{cursor:pointer}#plugin_activation,#plugin_activation_sidebar{background:#f5f5f5;background-color:transparent;background:-webkit-linear-gradient(top,#fff 1%,#f9f9f9 98%) repeat scroll 0 0 transparent;background:linear-gradient(to bottom,#fff 1%,#f9f9f9 98%) repeat scroll 0 0 transparent;box-shadow:0 1px 1px 0 rgba(0,0,0,.04);min-height:100px;position:relative;z-index:1;border:1px solid #ececec;border-bottom-left-radius:7px;border-bottom-right-radius:7px;border-bottom:3px solid #c6c6c6;padding:20px 30px}#plugin_activation.postbox h3.hndle{border-bottom:1px solid #ececec;padding:0 15px 12px;margin-top:-5px;margin-left:-30px;margin-right:-30px}#plugin_activation.postbox .hndle{border:none;border-top:none!important}#plugin_activation .inside{margin:0;padding:15px 10px 15px}#plugin_activation .main.after-regi-text{margin-bottom:20px;padding:0}#plugin_activation .main.after-regi-text p{margin:10px 0 5px;padding:0;display:inline-block;width:100%;font-size:13px;text-align:left;line-height:1.64em}#plugin_activation #signup-steps{width:100%;display:inline-block;padding:0;margin:0 0 10px}#plugin_activation .sf__step-indicator>li{width:50%;padding:10px 30px 10px;margin:0;cursor:not-allowed;text-align:center;position:relative;display:inline;height:auto;float:left}#plugin_activation span.sf__step-count{padding:0;margin:0 auto;font-size:13px;width:4em;height:4em;line-height:4em;color:#0074a2;background:#2ea2cc;font-weight:400;text-align:center;border-radius:100%;display:block;position:relative;z-index:2}#plugin_activation span.sf__step-title{color:#2ea2cc;font-weight:300;display:block;z-index:2;padding-top:.625rem}#plugin_activation .sf__step-indicator>li:after,#plugin_activation .sf__step-indicator>li:before{background:#2ea2cc;content:"";display:block;height:3px;position:absolute;top:32%;z-index:1}#plugin_activation .sf__step-indicator>li:first-child:beLine truncated
Animate.css - http://daneden.me/animate
Licensed under the MIT license
Copyright (c) 2013 Daniel Eden
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/.wp-admin span#animate-me{display:inline-block;position:relative}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);-ms-transform:translateY(-15px);transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scaleX(1.25) scaleY(.75);transform:scaleX(1.25) scaleY(.75)}40%{-webkit-transform:scaleX(.75) scaleY(1.25);transform:scaleX(.75) scaleY(1.25)}60%{-webkit-transform:scaleX(1.15) scaleY(.85);transform:scaleX(1.15) scaleY(.85)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes rubberBand{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scaleX(1.25) scaleY(.75);-ms-transform:scaleX(1.25) scaleY(.75);transform:scaleX(1.25) scaleY(.75)}40%{-webkit-transform:scaleX(.75) scaleY(1.25);-ms-transform:scaleX(.75) scaleY(1.25);transform:scaleX(.75) scaleY(1.25)}60%{-webkit-transform:scaleX(1.15) scaleY(.85);-ms-transform:scaleX(1.15) scaleY(.85);transform:scaleX(1.15) scaleY(.85)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}100%{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);-ms-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);-ms-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);-ms-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);-ms-transform:rotate(-5deg);transform:rotate(-5deg)}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg);transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@keyframes tada{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg);-ms-transform:scale(.9) rotate(-3deg);transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);-ms-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3Line truncated
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.2.0
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2014 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 100% -20px;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;backgroLine truncated
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:3000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:700;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.new,.bootstrap-datetimepicker-widget td.old{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active.disabled,.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover,.bootstrap-datetimepicker-widget td.active:hover.active,.bootstrap-datetimepicker-widget td.active:hover.disabled,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active:hover:hover,.bootstrap-datetimepicker-widget td.active:hover[disabled],.bootstrap-datetimepicker-widget td.active[disabled]{color:#fff;background-color:#04c}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.active.active,.bootstrap-datetimepicker-widget td span.active.disabled,.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active:hover,.bootstrap-datetimepicker-widget td span.active[disabled]{color:#fff;background-color:#04c}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0;Line truncated
* jQuery ClassyGradient
* www.class.pm
*
* Written by Marius Stanciu - Sergiu <marius@class.pm>
* Licensed under the MIT license www.class.pm/LICENSE-MIT
* Version 1.1.0
*
*/.ClassyGradient{margin-bottom:18px}.ClassyGradient .canvas{border:1px solid #333}.ClassyGradient .info{display:none;margin-right:20px;margin-top:20px;position:absolute;z-index:80}.ClassyGradient .info .arrow{top:-17px;border-style:solid;border-width:10px;height:0;width:0;margin-left:20px;border-color:transparent transparent #000 transparent}.ClassyGradient .info .content{color:#fff;background-color:#000;padding:8px;padding-top:5px;padding-bottom:4px;font-size:12px;font-family:Verdana,Arial;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.ClassyGradient .points{position:absolute;z-index:99;max-height:20px;margin-top:2px}.ClassyGradient .point{position:absolute;width:8px;margin-left:-4px;height:8px;top:0;border:1px solid #333;cursor:pointer}.ClassyGradient .point-position{position:relative;top:-12px;margin-left:6px}.ClassyGradient .delete{display:inline-block;width:16px;height:16px;background-image:url(../img/close.png);position:relative;top:-9px;margin-left:8px}.ClassyGradient .point-color{display:inline-block;width:36px;height:36px;background:url(../img/select.png)}.ClassyGradient .point-color div{position:relative;top:4px;left:4px;width:28px;height:28px;background:url(../img/select.png) center}.grad_hold{width:350px;height:50px;margin:5px 0 0 20px}.grad_trgt{width:550px;height:150px}.grad_type{margin-bottom:10px!important}.ubtn{border:inherit;-webkit-border-radius:none;border-radius:none;font-size:12px;font-weight:400;line-height:1.4em;color:inherit;background:0 0;cursor:pointer;display:inline-block;margin:0;padding:25px 80px;outline:0;text-align:center;text-decoration:none;position:relative;-webkit-transition:all .3s;transition:all .3s;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;z-index:1;max-width:100%;visibility:visible;-webkit-backface-visibility:hidden;backface-visibility:hidden}.ubtn:after{content:'';position:absolute;z-index:-1;-webkit-transition:all .3s;transition:all .3s}.ubtn-data{z-index:3;position:inherit;display:block;font-family:inherit;font-weight:inherit;font-size:inherit;color:inherit}button.ubtn{background:inherit;color:inherit}button.ubtn:active,button.ubtn:focus,button.ubtn:hover,button.ubtn:visited{color:inherit;background:inherit;-webkit-box-shadow:inherit;box-shadow:inherit;outline:0}.ubtn-ctn-left{display:block;text-align:left}.ubtn-ctn-center{display:block;text-align:center}.ubtn-ctn-right{display:block;text-align:right}.ubtn-ctn-inline{display:inline-block;text-align:center}a.ubtn-link{display:inline-block;margin:0;color:inherit;text-decoration:none;max-width:100%}a.ubtn-link:hover{color:inherit;text-decoration:none}a.ubtn-link .ubtn{margin:0}button.ubtn-mini{padding:5px 10px}button.ubtn-small{padding:8px 16px}button.ubtn-normal{padding:15px 30px}button.ubtn-large{padding:21px 42px}.ubtn-block{display:block;width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:0;padding-right:0}button.ubtn-custom{padding:0}@media(max-width:768px){.ubtn-small{padding:6px 12px}.ubtn-normal{padding:10px 24px}.ubtn-large{padding:12px 36px}}.ubtn-shd{-webkit-border-radius:5px;border-radius:5px;background:#eaeaea;-webkit-box-shadow:0 5px #bebebe;box-shadow:0 5px #bebebe;-webkit-transition:none!important;transition:none!important}.ubtn-sep-icon .ubtn-icon{position:absolute;top:50%;opacity:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);line-height:1;-webkit-transition:all .3s;transition:all .3s}.ubtn-sep-icon:hover .ubtn-icon{opacity:1}.ubtn-sep-icon .ubtn-icon span{line-height:inherit;display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:400;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ubtn.ubtn-sep-icon.ubtn-only-icon .ubtn-icon{position:relative;left:0;top:0;right:0;bottom:0;-webkit-transform:translate(0);-ms-transform:translate(0);transform:translate(0)}.ubtn-sep-icon.ubtn-sep-icon-at-left .ubtn-icon{left:20px;opacity:1}.ubtn-img-container .ubtn-sep-icon.ubtn-sep-icon-at-left .ubtn-icon{left:20px;opacity:1}.ubtn-img-container .ubtn-sep-icon.ubtn-sep-icon-at-right .ubtn-icon{right:20px;opacity:1}.ubtn-sep-icon.ubtn-sep-icon-at-right .ubtn-icon{right:20px;opacity:1}.ubtn-sep-icon-left .ubtn-icon{left:-2em}.ubtn-sep-icon-left:hover .ubtn-icon{left:10px}.ubtn-img-container .ubtn-sep-icon-left:hover .ubtn-icon{left:10px}.ubtn-sep-icon-left-rev .ubtn-icon{left:4em}.ubtn-sep-icon-left-rev:hover .ubtn-icon{left:20px}.ubtn-sep-icon-right .ubtn-icon{right:-2em}.ubtn-img-container .ubtn-sep-icon-right:hover .ubtn-icon{right:30px}.ubtn-sep-icon-right:hover .ubtn-icon{right:5px}.ubtn-sep-icon-right-rev .ubtn-icon{right:4em}.ubtn-sep-icon-right-rev:hover .ubtn-icon{right:20px}.ubtn-sep-icon.ubtn-sep-icon-bottom-push .ubtn-icon,.ubtn-sep-icon.ubtn-sep-icon-left-push .ubtn-icon,.ubtn-sep-icon.ubtn-sep-icon-right-push .ubtn-icon,.ubtn-sep-icon.ubtn-sep-icon-top-push .ubtn-icon{position:absolute;width:100%Line truncated
@@ -0,0 +1,124 @@
<?php
if(isset($_GET['deregister-licence']))
{
delete_option('ultimate_license_activation');
}
?>
<div class="wrap ultimate_updater">
<h1><?php echo __("Brainstorm Force","ultimate_vc"); ?></h1>
<p class="ultimate_updater_text">
<?php
$ultimate_step = get_option('ultimate_next_step');
if($ultimate_step == 2 || $ultimate_step == 3) :
echo __('Thank you for choosing Brainstorm Force. You are awesome!','ultimate_vc');
else :
echo __('Thank you for choosing Brainstorm Force. Please take a moment to register yourself as doing so will allow us to provide you support & lifetime updates. We look forward to having you as a part of our community and serve your web design needs.','ultimate_vc');
endif;
?>
</p>
<div class="updater-title-logo"></div>
<div id="msg"></div>
<div id="bsf-message"></div>
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content" class="postbox-container">
<div id="normal-sortables" class="meta-box-sortables ui-sortable">
<div id="plugin_activation" class="postbox ">
<?php
if($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1')
{
?>
<div class="overlay-bg"></div>
<div class="running-localhost">
<h2><?php echo __('Looks like you are working on local setup.','ultimate_vc') ?> <br/> <?php echo __('Don\'t worry about registering your purchase & license.','ultimate_vc'); ?></h2>
</div>
<?php
}
if(isset($_GET['action']) && $_GET['action']==='upgrade') {
Ultimate_Admin_Area::upgradeFromMarketplace();
} else {
?>
<h3 class="hndle">
<span class="dashicons-before dashicons-admin-network" style="padding-right: 5px;"></span>
<?php
if($ultimate_step == 2)
$title = __('Signup For Support','ultimate_vc');
else if($ultimate_step == 3)
$title = __('Manage Registration and Support','ultimate_vc');
else
$title = __('Register Your License','ultimate_vc');
?>
<span><?php echo $title ?></span>
</h3>
<?php
require_once('updater/updater.php');
}?>
</div>
</div>
</div>
<div id="postbox-container-1" class="postbox-container updater-sidebar">
<div id="normal-sortables" class="meta-box-sortables ui-sortable">
<div id="plugin_activation_sidebar" class="postbox ">
<h3 class="hndle">
<span class="dashicons-before dashicons-admin-post" style="padding-right: 5px;"></span>
<span>Important Links</span>
</h3>
<div class="inside">
<div class="main" style="text-align: center;">
<ul class="sidebar-link-list">
<!--<li><a href="https://www.brainstormforce.com/support/forums/forum/ultimate-addons/" target="_blank" class="bsf-sidebar-link">Visit Support Forum</a></li>-->
<li><a href="https://www.brainstormforce.com/demos/ultimate/" target="_blank" class="bsf-sidebar-link">Ultimate Addons Website</a></li>
<li><a href="https://www.youtube.com/user/TheBrainstormForce/videos" target="_blank" class="bsf-sidebar-link"><?php echo __('Video Tutorials & Documentation','ultimate_vc'); ?></a></li>
<li><a href="http://brainstormforce.com/support" target="_blank" class="bsf-sidebar-link"><?php echo __('Request Support','ultimate_vc'); ?></a></li>
<li><a href="https://www.brainstormforce.com/support/wp-admin/admin.php?page=site-registration" target="_blank" class="bsf-sidebar-link"><?php echo __('Manage License Registrations','ultimate_vc') ?></a></li>
</ul>
<ul class="sidebar-social-list">
<li><a href="https://www.facebook.com/brainstormforce" target="_blank" class="bsf-social-link"><span class="dashicons dashicons-facebook"></span></a></li>
<li><a href="https://www.youtube.com/user/TheBrainstormForce/videos" target="_blank" class="bsf-social-link"><span class="dashicons dashicons-video-alt3"></span></a></li>
<li><a href="http://codecanyon.net/user/BrainstormForce/portfolio?WT.ac=item_portfolio&WT.z_author=BrainstormForce" target="_blank" class="bsf-social-link"><span class="dashicons dashicons-portfolio"></span></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style type="text/css">
.tooltip {
display:none;
position:absolute;
border:1px solid #333;
background-color:#161616;
border-radius:5px;
padding:10px;
color:#fff;
font-size:12px Arial;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function() {
// Tooltip only Text
jQuery('.masterTooltip').hover(function(){
// Hover over code
var title = jQuery(this).attr('title');
jQuery(this).data('tipText', title).removeAttr('title');
jQuery('<p class="tooltip"></p>')
.html(title)
.appendTo('body')
.fadeIn('slow');
}, function() {
// Hover out code
jQuery(this).attr('title', jQuery(this).data('tipText'));
jQuery('.tooltip').remove();
}).mousemove(function(e) {
var mousex = e.pageX + 20; //Get X coordinates
var mousey = e.pageY + 10; //Get Y coordinates
jQuery('.tooltip')
.css({ top: mousey, left: mousex })
});
});
</script>
@@ -0,0 +1,553 @@
<?php
$author = true;
$author_extend = '';
if($author)
$author_extend = '&author';
?>
<div class="wrap about-wrap bsf-page-wrapper ultimate-debug bend">
<div class="wrap-container">
<div class="bend-heading-section ultimate-header">
<h1><?php _e( "Ultimate Addons Settings", "ultimate_vc" ); ?></h1>
<h3><?php _e( "Enable or disable the features as per your preference.", "ultimate_vc" ); ?></h3>
<div class="bend-head-logo">
<div class="bend-product-ver">
<?php _e( "Version", "ultimate_vc" ); echo ' '.ULTIMATE_VERSION; ?>
</div>
</div>
</div><!-- bend-heading section -->
<div id="msg"></div>
<div id="bsf-message"></div>
<div class="bend-content-wrap">
<div class="smile-settings-wrapper">
<h2 class="nav-tab-wrapper">
<a href="<?php echo admin_url('admin.php?page=about-ultimate'.$author_extend); ?>" data-tab="about-ultimate" class="nav-tab"> <?php echo __('About','ultimate_vc'); ?> </a>
<a href="<?php echo admin_url('admin.php?page=ultimate-dashboard'.$author_extend); ?>" data-tab="ultimate-modules" class="nav-tab"> <?php echo __('Modules','ultimate_vc'); ?> </a>
<a href="<?php echo admin_url('admin.php?page=ultimate-smoothscroll'.$author_extend); ?>" data-tab="css-settings" class="nav-tab"> <?php echo __('Smooth Scroll','ultimate_vc'); ?> </a>
<a href="<?php echo admin_url('admin.php?page=ultimate-scripts-and-styles'.$author_extend); ?>" data-tab="css-settings" class="nav-tab"> <?php echo __('Scripts and Styles','ultimate_vc'); ?> </a>
<?php if($author) : ?>
<a href="<?php echo admin_url('admin.php?page=ultimate-debug-settings'); ?>" data-tab="ultimate-debug" class="nav-tab nav-tab-active"> Debug </a>
<?php endif; ?>
</h2>
</div><!-- smile-settings-wrapper -->
</hr>
<div class="container ultimate-content">
<div class="col-md-12">
<?php if($author) : ?>
<div id="ultimate-debug" class="ult-tabs active-tab">
<form method="post" id="ultimate_debug_settings">
<input type="hidden" name="security" value="<?php echo wp_create_nonce( 'ultimate-debug-settings' ); ?>" />
<input type="hidden" name="action" value="update_ultimate_debug_options" />
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php echo __('Theme', 'ultimate_vc') ?></th>
<td>
<?php
$site_theme = wp_get_theme();
$current_theme = $site_theme->get( 'Name' );
echo $current_theme;
?>
</td>
</tr>
<?php
$ultimate_video_fixer = get_option('ultimate_video_fixer');
if($ultimate_video_fixer == 'enable')
$ultimate_video_fixer = 'checked="checked"';
?>
<tr valign="top">
<th scope="row"><?php echo __("Video Fixer","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_video_fixer; ?> id="ultimate_video_fixer" value="enable" class="onoffswitch-checkbox" name="ultimate_video_fixer" />
<label class="onoffswitch-label" for="ultimate_video_fixer">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<?php
$ultimate_ajax_theme = get_option('ultimate_ajax_theme');
if($ultimate_ajax_theme == 'enable')
$ultimate_ajax_theme = 'checked="checked"';
?>
<tr valign="top">
<th scope="row"><?php echo __("Ajax","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_ajax_theme; ?> id="ultimate_ajax_theme" value="enable" class="onoffswitch-checkbox" name="ultimate_ajax_theme" />
<label class="onoffswitch-label" for="ultimate_ajax_theme">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php echo __("Icon Fonts","ultimate"); ?></th>
<td>
<a href="<?php echo admin_url('admin.php?page=bsf-font-icon-manager&delete-bsf-fonts'); ?>" target="_blank" class="button">Reset Icon Fonts</a>
</td>
</tr>
<?php
$ultimate_theme_support = get_option('ultimate_theme_support');
$theme_dependant = '';
if($ultimate_theme_support == 'enable')
{
$ultimate_theme_support = 'checked="checked"';
$theme_dependant = 'display:none;';
}
?>
<tr valign="top">
<th scope="row"><?php echo __("Theme Support","ultimate_vc"); ?></th>
<td> <div class="onoffswitch" id="ult-theme-support-row">
<input type="checkbox" <?php echo $ultimate_theme_support; ?> id="ultimate_theme_support" value="enable" class="onoffswitch-checkbox" name="ultimate_theme_support" />
<label class="onoffswitch-label" for="ultimate_theme_support">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<?php
$ultimate_rtl_support = get_option('ultimate_rtl_support');
if($ultimate_rtl_support == 'enable')
{
$ultimate_rtl_support = 'checked="checked"';
}
?>
<tr valign="top">
<th scope="row"><?php echo __("RTL Suport","ultimate_vc"); ?></th>
<td> <div class="onoffswitch" id="ult-rtl-support-row">
<input type="checkbox" <?php echo $ultimate_rtl_support; ?> id="ultimate_rtl_support" value="enable" class="onoffswitch-checkbox" name="ultimate_rtl_support" />
<label class="onoffswitch-label" for="ultimate_rtl_support">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<?php
$ultimate_custom_vc_row = get_option('ultimate_custom_vc_row');
?>
<tr valign="top" class="ult-theme-support-row-dependant" style="<?php echo $theme_dependant; ?>">
<th scope="row"><?php echo __("Custom VC Row Class","ultimate_vc"); ?></th>
<td>
<div>
<input type="text" id="ultimate_custom_vc_row" value="<?php echo esc_attr( $ultimate_custom_vc_row ); ?>" name="ultimate_custom_vc_row" />
</div>
</td>
</tr>
<!--<tr valign="top">
<th scope="row"><?php echo __("Deregister Licence","ultimate_vc"); ?></th>
<td>
<div>
<a href="<?php echo admin_url('admin.php?page=bsf-dashboard&deregister-licence'); ?>" target="_blank" class="button-primary">Deregister Licence</a>
</div>
</td>
</tr>-->
<?php
$ultimate_modal_fixer = get_option('ultimate_modal_fixer');
if($ultimate_modal_fixer == 'enable')
{
$ultimate_modal_fixer = 'checked="checked"';
}
?>
<!--<tr valign="top">
<th scope="row"><?php echo __("Modal Fixer","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_modal_fixer; ?> id="ultimate_modal_fixer" value="enable" class="onoffswitch-checkbox" name="ultimate_modal_fixer" />
<label class="onoffswitch-label" for="ultimate_modal_fixer">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>-->
<?php
$bsf_dev_mode = bsf_get_option('dev_mode');
if($bsf_dev_mode == 'enable')
{
$bsf_dev_mode = 'checked="checked"';
}
?>
<tr>
<th scope="row"><?php echo __("Developer Mode","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $bsf_dev_mode; ?> id="bsf_dev_mode" value="enable" class="onoffswitch-checkbox" name="bsf_options[dev_mode]" />
<label class="onoffswitch-label" for="bsf_dev_mode">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<?php
$ultimate_global_scripts = bsf_get_option('ultimate_global_scripts');
if($ultimate_global_scripts == 'enable')
{
$ultimate_global_scripts = 'checked="checked"';
}
?>
<tr>
<th scope="row"><?php echo __("Load scripts globally","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_global_scripts; ?> id="ultimate_global_scripts" value="enable" class="onoffswitch-checkbox" name="bsf_options[ultimate_global_scripts]" />
<label class="onoffswitch-label" for="ultimate_global_scripts">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<?php
$ultimate_modal_menu = bsf_get_option('ultimate_modal_menu');
if($ultimate_modal_menu == 'enable')
{
$ultimate_modal_menu = 'checked="checked"';
}
?>
<tr>
<th scope="row"><?php echo __("Modal on Menu","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_modal_menu; ?> id="ultimate_modal_menu" value="enable" class="onoffswitch-checkbox" name="bsf_options[ultimate_modal_menu]" />
<label class="onoffswitch-label" for="ultimate_modal_menu">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<tr valign="top">
<?php
$ultimate_smooth_scroll_compatible = get_option('ultimate_smooth_scroll_compatible');
if($ultimate_smooth_scroll_compatible == "enable"){
$ultimate_smooth_scroll_compatible_attr = 'checked="checked"';
} else {
$ultimate_smooth_scroll_compatible_attr = '';
}
?>
<th scope="row"><?php echo __("Smooth Scroll - Old library","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_smooth_scroll_compatible_attr; ?> id="ultimate_smooth_scroll_compatible" value="enable" class="onoffswitch-checkbox" name="ultimate_smooth_scroll_compatible" />
<label class="onoffswitch-label" for="ultimate_smooth_scroll_compatible">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<tr valign="top">
<?php
$ultimate_animation = get_option('ultimate_animation');
if($ultimate_animation == "enable"){
$ultimate_animation = 'checked="checked"';
} else {
$ultimate_animation = '';
}
?>
<th scope="row"><?php echo __("Animation Block on Mobile","ultimate_vc"); ?></th>
<td> <div class="onoffswitch">
<input type="checkbox" <?php echo $ultimate_animation; ?> id="ultimate_animations" value="enable" class="onoffswitch-checkbox" name="ultimate_animation" />
<label class="onoffswitch-label" for="ultimate_animations">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch"><?php echo __('ON','ultimate_vc'); ?></div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch"><?php echo __('OFF','ultimate_vc'); ?></div>
</div>
</div>
</label>
</div>
</td>
</tr>
<tr valign="top">
<?php
$bsf_ultimate_roles = (bsf_get_option('ultimate_roles')) ? bsf_get_option('ultimate_roles') : array();
?>
<th scope="row"><?php echo __("Enable access","ultimate_vc"); ?></th>
<td>
<?php
$roles = get_editable_roles();
foreach ($roles as $role_name => $role_info) :
$is_admin = ($role_name == 'administrator') ? true : false;
$checked = (in_array($role_name, $bsf_ultimate_roles) || $is_admin) ? 'checked' : '';
?>
<div>
<input <?php echo ($is_admin) ? 'disabled' : ''; ?> id="<?php echo $role_name ?>" type="checkbox" name="bsf_options[ultimate_roles][]" value="<?php echo $role_name ?>" <?php echo $checked; ?> /><label for="<?php echo $role_name ?>"><?php echo $role_info['name'] ?></label>
</div>
<?php
endforeach;
?>
</td>
</tr>
<?php
$license_form_url = add_query_arg( array(
'bsf-inline-license-form' => '6892199',
'license-form-method' => 'license-key'
), network_admin_url( 'plugins.php' ) );
?>
<tr valign="top" class="ult-theme-support-row-dependant" style="<?php echo $theme_dependant; ?>">
<th scope="row"><?php echo __("Activate License using purchase key", "ultimate_vc"); ?></th>
<td>
<a class="button button-secondarry" href="<?php echo esc_url( $license_form_url ); ?>"><?php echo _e( 'Purchase Key License Form', 'ultimate_vc' )?></a>
</td>
</tr>
</tbody>
</table>
</form>
<p class="submit"><input type="submit" name="submit" id="submit-debug-settings" class="button button-primary" value="<?php echo __("Save Changes","ultimate");?>"></p>
</div>
<?php endif; ?>
</div> <!--col-md-12 -->
</div> <!-- ultimate-content -->
</div> <!-- bend-content-wrap -->
</div> <!-- .wrap-container -->
</div> <!-- .bend -->
<script type="text/javascript">
var submit_btn = jQuery("#submit-debug-settings");
submit_btn.bind('click',function(e){
e.preventDefault();
var data = jQuery("#ultimate_debug_settings").serialize();
jQuery.ajax({
url: ajaxurl,
data: data,
dataType: 'html',
type: 'post',
success: function(result){
result = jQuery.trim(result);
console.log(result);
if(result == "success"){
jQuery("#msg").html('<div class="updated"><p><?php echo __('Settings updated successfully!','ultimate_vc'); ?></p></div>');
} else {
jQuery("#msg").html('<div class="error"><p><?php echo __('No settings were updated.','ultimate_vc'); ?></p></div>');
}
}
});
});
jQuery(document).ready(function(e) {
jQuery('.onoffswitch').on('onUltimateSwitchClick',function(){
setTimeout(function(){
if(jQuery('#ultimate_theme_support').is(':checked'))
{
jQuery('.ult-theme-support-row-dependant').fadeOut(200);
}
else
{
jQuery('.ult-theme-support-row-dependant').fadeIn(200);
}
},300);
});
jQuery('.onoffswitch').click(function(){
$switch = jQuery(this);
setTimeout(function(){
if($switch.find('.onoffswitch-checkbox').is(':checked'))
$switch.find('.onoffswitch-checkbox').attr('checked',false);
else
$switch.find('.onoffswitch-checkbox').attr('checked',true);
$switch.trigger('onUltimateSwitchClick');
},300);
});
});
</script>
<style type="text/css">
/*On Off Checkbox Switch*/
.onoffswitch {
position: relative;
width: 95px;
display: inline-block;
float: left;
margin-right: 15px;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select: none;
}
.onoffswitch-checkbox {
display: none !important;
}
.onoffswitch-label {
display: block;
overflow: hidden;
cursor: pointer;
border: 0px solid #999999;
border-radius: 0px;
}
.onoffswitch-inner {
width: 200%;
margin-left: -100%;
-moz-transition: margin 0.3s ease-in 0s;
-webkit-transition: margin 0.3s ease-in 0s;
-o-transition: margin 0.3s ease-in 0s;
transition: margin 0.3s ease-in 0s;
}
.rtl .onoffswitch-inner{
margin: 0;
}
.rtl .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
margin-right: -100%;
margin-left:auto;
}
.onoffswitch-inner > div {
float: left;
position: relative;
width: 50%;
height: 24px;
padding: 0;
line-height: 24px;
font-size: 12px;
color: white;
font-weight: bold;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.onoffswitch-inner .onoffswitch-active {
padding-left: 15px;
background-color: #CCCCCC;
color: #FFFFFF;
}
.onoffswitch-inner .onoffswitch-inactive {
padding-right: 15px;
background-color: #CCCCCC;
color: #FFFFFF;
text-align: right;
}
.onoffswitch-switch {
/*width: 50px;*/
width:35px;
margin: 0px;
text-align: center;
border: 0px solid #999999;
border-radius: 0px;
position: absolute;
top: 0;
bottom: 0;
}
.onoffswitch-active .onoffswitch-switch {
background: #3F9CC7;
left: 0;
}
.onoffswitch-inactive .onoffswitch-switch {
background: #7D7D7D;
right: 0;
}
.onoffswitch-active .onoffswitch-switch:before {
content: " ";
position: absolute;
top: 0;
/*left: 50px;*/
left:35px;
border-style: solid;
border-color: #3F9CC7 transparent transparent #3F9CC7;
/*border-width: 12px 8px;*/
border-width: 15px;
}
.onoffswitch-inactive .onoffswitch-switch:before {
content: " ";
position: absolute;
top: 0;
/*right: 50px;*/
right:35px;
border-style: solid;
border-color: transparent #7D7D7D #7D7D7D transparent;
/*border-width: 12px 8px;*/
border-width: 50px;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
margin-left: 0;
}
#ultimate-settings, #ultimate-modules, .ult-tabs{ display:none; }
#ultimate-settings.active-tab, #ultimate-modules.active-tab, .ult-tabs.active-tab{ display:block; }
.ult-badge {
padding-bottom: 10px;
height: 170px;
width: 150px;
position: absolute;
border-radius: 3px;
top: 0;
right: 0;
}
div#msg > .updated, div#msg > .error { display:block !important;}
div#msg {
position: absolute;
left: 20px;
top: 140px;
max-width: 30%;
}
.onoffswitch-inner:before,
.onoffswitch-inner:after {
display:none
}
.onoffswitch-switch {
height: initial !important;
color: white !important;
}
</style>
@@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="OPN" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe600;" d="M524.616 850.661c-222.392 0-402.661-180.267-402.661-402.661s180.269-402.661 402.661-402.661c222.394 0 402.661 180.267 402.661 402.661s-180.267 402.661-402.661 402.661zM524.616 91.598c-196.841 0-356.402 159.563-356.402 356.402s159.562 356.402 356.402 356.402c196.84 0 356.402-159.563 356.402-356.402s-159.563-356.402-356.402-356.402zM758.386 404.164c0-24.206-19.623-43.83-43.83-43.83s-43.83 19.623-43.83 43.83c0 24.206 19.623 43.83 43.83 43.83s43.83-19.623 43.83-43.83zM699.949 332.593v-118.366h29.216v118.366c-4.735-0.967-9.614-1.48-14.608-1.48-4.996 0-9.871 0.513-14.608 1.48zM729.164 475.739v206.033h-29.216v-206.033c4.737 0.961 9.612 1.479 14.608 1.479 4.994 0 9.873-0.518 14.608-1.479zM334.685 360.335c-24.204 0-43.841-19.637-43.841-43.83 0-24.203 19.637-43.838 43.841-43.838 24.192 0 43.829 19.634 43.829 43.838 0 24.193-19.637 43.83-43.829 43.83zM320.068 244.932v-30.704h29.223v30.704c-4.735-0.973-9.587-1.48-14.606-1.48-5.032 0-9.884 0.507-14.617 1.48zM349.291 388.068v293.704h-29.223v-293.704c4.733 0.973 9.585 1.491 14.617 1.491 5.018 0 9.871-0.517 14.606-1.491zM524.618 550.272c-24.202 0-43.831-19.638-43.831-43.831 0-24.228 19.628-43.829 43.831-43.829 24.195 0 43.83 19.601 43.83 43.829 0 24.193-19.634 43.831-43.83 43.831zM539.226 578.014v103.758h-29.223v-103.758c4.744 0.962 9.622 1.48 14.615 1.48 4.994 0 9.873-0.518 14.608-1.48zM510.003 434.869v-220.641h29.223v220.641c-4.735-0.973-9.614-1.48-14.608-1.48s-9.871 0.507-14.615 1.48z" horiz-adv-x="1049" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="Ultimate" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe600;" d="M516 545.906l90.094-39.438 81.344 40.625-89.688 35.531zM513.719 467.375l90.781-37.375v71.812l-90.781 40.594zM426.625 424.531l87.094-38.75 86.281 40.25-90.031 35.156zM422.844 346l90.5-37.875 0.375 71.813-90.875 40.625zM513.719 551l-90.062 36.875-86.281-36.875 87.906-39.219zM336.562 545.906l0.188-72.219 86.062-39.063-0.312 72.75zM704.5 834.25h-381.062c0 0-17.281-93.203-175.688-93.125-19.875-275.234 86.562-579.281 367.875-679.375 328.437 144.125 346.375 426.656 362.937 678.828-155.656-6.641-174.062 93.672-174.062 93.672zM512.312 123.094c-243.469 103.438-308.156 349.922-308.156 569.844 110.375 16.438 148 88.734 148 88.734l162.281 1.047 153.688-1.047c0 0 14.375-71.969 151.344-90.953-22.438-217-49.406-441.156-307.156-567.625z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Loaded 100 of 13389 files, more files were not shown because too many files have changed in this diff. Show more