an error occured! You may not be able to access this plugin via direct URL...';
exit();
}
else if (!defined('ABSPATH'))
{
echo '
an error occured! You may not be able to access this plugin via direct URL...
';
exit();
}
/*Define Consts*/
if (!defined('WPJSLOADBYMDZ_VER')) { define('WPJSLOADBYMDZ_VER', '1.5.01'); }
if (!defined('WPJSLOADBYMDZ_PATH')) { define('WPJSLOADBYMDZ_PATH', trailingslashit(plugin_dir_path(__FILE__))); }
if (!defined('WPJSLOADBYMDZ_URL')) { define('WPJSLOADBYMDZ_URL', trailingslashit(plugin_dir_url(__FILE__))); }
if (!defined('WPJSLOADBYMDZ_PLG')) { define('WPJSLOADBYMDZ_PLG', __FILE__); }
/**/
/*add settings btn*/
if(!function_exists('wpjsloadbymdz_addsettingsbtn'))
{
function wpjsloadbymdz_addsettingsbtn( array $links )
{
$url = get_admin_url() . 'tools.php?page=wp-js-loader-bymdz';
$settings_link = '' . __('Settings', 'wpjs-loader-bymdez'). '';
$links[] = $settings_link;
return $links;
}
}add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'wpjsloadbymdz_addsettingsbtn' );
/**/
/*Translations*/
if (!function_exists('wpjsloadbymdz_i18n'))
{
function wpjsloadbymdz_i18n()
{
$test = load_plugin_textdomain( 'wpjs-loader-bymdez', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
}add_action('init', 'wpjsloadbymdz_i18n');
/**/
/*Admin*/
if(is_admin())
{
include_once WPJSLOADBYMDZ_PATH.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'admin-ajax.php';
include_once WPJSLOADBYMDZ_PATH.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'class-admin.php';
}
/**/
/*Core*/
if(!is_admin())
{
$is_active = get_option('wpjsloadbymdz_activate');
if($is_active == '1')
{//dont run anything on the front if plugin is deactive
if(!function_exists('wpjsloadbymdz_def_settings'))
{
function wpjsloadbymdz_def_settings()
{
//Fetch Settings
$is_active = get_option('wpjsloadbymdz_activate');
$doon_scroll = get_option('wpjsloadbymdz_doon_scroll');
$loader_css = get_option('wpjsloadbymdz_loadercss');
$loader_effect = get_option('wpjsloadbymdz_loadereffect');
$apply_on_exts = get_option('wpjsloadbymdz_applyonexts');
$a_tags_exc_classes = get_option('wpjsloadbymdz_clasesexc');
$a_tags_exc_attrs = get_option('wpjsloadbymdz_attrsexc');
$a_tags_exc_par_css = get_option('wpjsloadbymdz_par_classexc');
$a_tags_exc_par_attr = get_option('wpjsloadbymdz_par_attrexc');
$is_cache = get_option('wpjsloadbymdz_cache');
$cache_time = get_option('wpjsloadbymdz_cache_time');
$cache_exc_pages = get_option('wpjsloadbymdz_cache_excpages');
$cache_on_loggedins = get_option('wpjsloadbymdz_cacheon_users');
$don_cache_queries = get_option('wpjsloadbymdz_dont_cachequeries');
$cache_force_remove = get_option('wpjsloadbymdz_cache_remover');
$ajax_cache = get_option('wpjsloadbymdz_ajax_cache');
$dis_pwa = get_option('wpjsloader_dispwa');
$pwa_param = get_option('wpjsloadbymdz_pwaparam');
$is_drag_detect = get_option('wpjsloader_is_dragdetect');
$drag_threshold = get_option('wpjsloadbymdz_dragthreshold');
$trans_time = get_option('wpjsloadbymdz_trans_time');
if($trans_time === NULL || $trans_time == '' || $trans_time == ' ' || !is_numeric($trans_time))
{
$trans_time = '.5';
}else $trans_time = $trans_time/1000;
switch($loader_effect)
{
case 'simple':
$class_to_print = '
.waiting-for-ajx1 {
opacity: .5 !important;
pointer-events: none !important;
}
';
break;
case 'glassy':
$class_to_print = '
.waiting-for-ajx2 {
opacity: .5 !important;
pointer-events: none !important;
filter: blur(3px) !important;
}
';
break;
case 'fantasy':
$class_to_print = '
.waiting-for-ajx3 {
filter: hue-rotate(45deg) !important;
pointer-events: none !important;
}
';
break;
case 'xray':
$class_to_print = '
.waiting-for-ajx4 {
opacity: .77 !important;
filter: invert(1) !important;
pointer-events: none !important;
}
';
break;
case 'dark':
$class_to_print = '
.waiting-for-ajx5 {
filter: brightness(0.5) !important;
pointer-events: none !important;
}
';
break;
case 'sepia':
$class_to_print = '
.waiting-for-ajx6 {
opacity: .9 !important;
filter: sepia(1) !important;
pointer-events: none !important;
}
';
break;
case 'black':
$class_to_print = '
.waiting-for-ajx7 {
opacity: .5 !important;
filter: grayscale(1) !important;
pointer-events: none !important;
}
';
break;
case 'blackglass':
$class_to_print = '
.waiting-for-ajx8 {
filter: brightness(0.3)blur(3px) !important;
pointer-events: none !important;
}
';
break;
}
//Print options (for the JS file)
ob_start();
?>