| Server IP : 89.108.64.180 / Your IP : 216.73.217.92 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dom-schastya.ru/wp-content/plugins/loftloader/ |
Upload File : |
<?php
/*
Plugin Name: LoftLoader
Plugin URI: http://www.loftocean.com/
Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
Version: 2.3.6
Author: Loft.Ocean
Author URI: http://www.loftocean.com/
Text Domain: loftloader
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* LoftLoader main file
*
* @package LoftLoader
* @link http://www.loftocean.com/
* @author Suihai Huang from Loft Ocean Team
*/
// Not allowed by directly accessing.
if ( ! defined( 'ABSPATH' ) ) {
die( esc_html__( 'Access not allowed!', 'loftloader' ) );
}
if ( ! class_exists( 'LoftLoader' ) ) {
/**
* Define the constant used in this plugin
*/
define( 'LOFTLOADER_ROOT', dirname( __FILE__ ) . '/' );
define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) );
define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) );
define( 'LOFTLOADER_ASSET_VERSION', '2021041202' );
class LoftLoader {
public function __construct() {
load_plugin_textdomain( 'loftloader' );
$this->load_upgrade();
$this->load_customize();
add_action( 'wp', array( $this, 'load_front' ) );
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
add_filter( 'plugin_action_links_' . LOFTLOADER_NAME, array( $this, 'plugin_action_links' ) );
}
/**
* For LoftLoader customize, load the customize related functions
*/
function load_upgrade() {
require_once LOFTLOADER_ROOT . 'inc/class-loftloader-upgrade.php';
}
/**
* For LoftLoader upgrade, load the upgrade related functions
*/
function load_customize() {
require_once LOFTLOADER_ROOT . 'inc/class-loftloader-customize.php';
}
/**
* For LoftLoader front, load the front end related functions
*/
function load_front() {
require_once LOFTLOADER_ROOT . 'inc/class-loftloader-front.php';
}
/**
* Add new setting link to loftloader
*/
function plugin_action_links( $links ) {
$customize_url = $this->get_customize_uri();
$action_links = array(
'settings' => '<a href="' . $customize_url . '" title="' . esc_attr__('View LoftLoader Settings', 'loftloader') . '">' . esc_html__('Settings', 'loftloader') . '</a>'
);
return array_merge( $action_links, $links );
}
/**
* Add an admin menu for loftloader
*/
function admin_menu() {
global $submenu;
$customize_url = $this->get_customize_uri();
$submenu['options-general.php'][] = array( esc_html__( 'LoftLoader Lite', 'loftloader' ), 'manage_options', $customize_url, 'hide-if-no-customize' );
}
/**
* Helper function to get loftloader customize url
* @return url loftloader customize uri
*/
function get_customize_uri() {
$return_url = '';
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
$return_url = urlencode( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
}
return add_query_arg( array('return' => $return_url, 'plugin' => 'loftloader-lite' ), 'customize.php' );
}
}
// Init loftloader lite
add_action( 'after_setup_theme', 'loftloader_init' );
function loftloader_init() {
if ( ! class_exists( 'LoftLoader_Pro' ) ) {
new LoftLoader();
}
}
add_action( 'plugins_loaded', 'loftloader_any_page' );
function loftloader_any_page() {
if ( ! class_exists( 'LoftLoader_Pro' ) ) {
$enable_any_page = get_option( 'loftloader_enable_any_page', '' );
if ( $enable_any_page === 'on' ) {
require_once LOFTLOADER_ROOT . 'inc/any-page/class-loftloader-any-page.php';
}
}
}
// Remove widget panels
add_filter( 'customize_loaded_components', 'loftloader_remove_widget_panels', 1000 );
function loftloader_remove_widget_panels( $components ) {
if ( ! class_exists( 'LoftLoader_Pro' ) && ( isset( $_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite' ) ) ) {
foreach ( $components as $i => $c ) {
if ( false !== $i ) {
unset( $components[ $i ] );
}
}
}
return $components;
}
/**
* Helper function to test on loftloader customize page
*
* @return boolean
*/
function loftloader_is_customize() {
global $wp_customize;
return ( isset($_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite') ) || ( isset( $wp_customize ) && $wp_customize->is_preview() && ! is_admin() ) || defined( 'DOING_AJAX' );
}
}