This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$all_pages = array(); | |
/* change language (ensure WPML is properly set up) */ | |
do_action( 'wpml_switch_language', 'pt-br' ); | |
/* building query */ | |
$posts = new WP_Query( array( | |
'orderby' => 'title', // Corrected from 'sort_column' | |
'order' => 'ASC', // Corrected from 'sort_order' | |
'post_type' => 'page', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.siteColorScheme = siteColorScheme = getColorScheme() | |
function getColorScheme() { | |
if (localStorage.getItem('color-scheme')) | |
return localStorage.getItem('color-scheme') | |
else | |
return window.matchMedia('(prefers-color-scheme: dark)').matches | |
? 'dark' | |
: 'light' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Custom 404 page | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ error.php [L] | |
# Force http to https | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const links = document.querySelectorAll('a[href^="#"]:not(.modal-toggle)') | |
links.forEach((nodeElement) => { | |
nodeElement.addEventListener('click', function (e) { | |
e.preventDefault() | |
const href = this.getAttribute('href') | |
if (href === '#') { | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('BROWSER_AVIF', strpos($_SERVER['HTTP_ACCEPT'], 'image/avif') !== false); | |
define('BROWSER_WEBP', strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* List of timezones | |
*/ | |
return array( | |
'Pacific/Midway' => '(UTC-11:00) Midway', | |
'Pacific/Niue' => '(UTC-11:00) Niue', | |
'Pacific/Pago_Pago' => '(UTC-11:00) Pago Pago', | |
'America/Adak' => '(UTC-10:00) Adak', | |
'Pacific/Honolulu' => '(UTC-10:00) Honolulu', |