| Server IP : 185.252.147.100 / Your IP : 216.73.217.33 Web Server : nginx/1.27.3 System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 User : mitr ( 1000) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/html/tour.mitrofanov.ru/public/wp-content/plugins/tour-addons/ |
Upload File : |
<?php
/*
* @wordpress-plugin
* Plugin Name: East Point Tour addons
* Plugin URI: http://mitrofanov.ru
* Description: <strong>Обязательный</strong> плагин для работы сайта.
* Version: 1.0.0
* Author: @AlimovD
* Author URI: https://t.me/AlimovD
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
###################
# scripts and styles
###################
function eptour_enqueue_script() {
wp_enqueue_style( 'eptour-custom-style', plugin_dir_url( __FILE__ ) . 'css/eptour.min.css' );
wp_enqueue_style( 'glightbox-css', plugin_dir_url( __FILE__ ) . 'css/glightbox.min.css' );
wp_enqueue_script( 'glightbox', plugin_dir_url( __FILE__ ) . 'js/glightbox.min.js', '', '', true );
wp_add_inline_script( 'glightbox', 'const lightbox = GLightbox({
touchNavigation: true,
loop: true,
autoplayVideos: false,
zoomable: false
});' );
}
add_action('wp_enqueue_scripts', 'eptour_enqueue_script');
// preconnect openstreet maps scripts
function eptour_resource_hints( $hints, $relation_type ) {
if ( 'preconnect' === $relation_type ) {
if (is_page( 'contact' )) {
$hints[] = [
'href' => 'https://unpkg.com/',
'crossorigin' => 'anonymous',
];
}
$hints[] = [
'href' => 'https://cdn.gtranslate.net/',
'crossorigin' => 'anonymous',
];
$hints[] = [
'href' => 'https://cdn.jsdelivr.net/',
'crossorigin' => 'anonymous',
];
$hints[] = [
'href' => 'https://translate.google.com/',
'crossorigin' => 'anonymous',
];
$hints[] = [
'href' => 'https://translate.googleapis.com/',
'crossorigin' => 'anonymous',
];
$hints[] = [
'href' => 'https://translate-pa.googleapis.com/',
'crossorigin' => 'anonymous',
];
}
return $hints;
}
add_filter( 'wp_resource_hints', 'eptour_resource_hints', 10, 2 );
###########
#
# Admin notices
#
###########
function pr_disable_admin_notices() {
global $wp_filter;
if ( is_user_admin() ) {
if ( isset( $wp_filter['user_admin_notices'] ) ) {
unset( $wp_filter['user_admin_notices'] );
}
} elseif ( isset( $wp_filter['admin_notices'] ) ) {
unset( $wp_filter['admin_notices'] );
}
if ( isset( $wp_filter['all_admin_notices'] ) ) {
unset( $wp_filter['all_admin_notices'] );
}
}
add_action( 'admin_print_scripts', 'pr_disable_admin_notices' );
##########
# includes
##########
require plugin_dir_path( __FILE__ ) . 'includes/image-editor.php';
require plugin_dir_path( __FILE__ ) . 'includes/wp-hooks.php';
//require plugin_dir_path( __FILE__ ) . 'includes/metrika.php';
require plugin_dir_path( __FILE__ ) . 'includes/gallery.php';
require plugin_dir_path( __FILE__ ) . 'includes/shortcodes.php';