Files
Romhack-Plaza---WordPress-T…/back_treville.php

51 lines
1.3 KiB
PHP
Raw Normal View History

2026-01-29 19:10:03 +01:00
<?php
namespace RomhackPlaza\Backwards;
defined( '\ABSPATH' ) || exit;
/*
* This file contains some snippets used in the base Treville theme.
* This function are not edited. All rights are for ThemeZee.
*/
if( ! function_exists( 'treville_is_amp' ) ) {
/**
* Checks if AMP page is rendered.
*/
function treville_is_amp() {
return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
}
}
if( ! function_exists( 'treville_amp_menu_toggl' ) ) {
function treville_amp_menu_toggle() {
if ( treville_is_amp() ) {
echo "[aria-expanded]=\"mobileMenuExpanded? 'true' : 'false'\" ";
echo 'on="tap:AMP.setState({mobileMenuExpanded: !mobileMenuExpanded})"';
}
}
}
if( ! function_exists( 'treville_amp_secondary_menu_is_toggled' ) ) {
function treville_amp_secondary_menu_is_toggled() {
if ( treville_is_amp() ) {
echo "[class]=\"'secondary-navigation' + ( mobileMenuExpanded ? ' toggled-on' : '' )\"";
}
}
}
if( !function_exists( 'treville_amp_primary_menu_is_toggled' ) ) {
function treville_amp_primary_menu_is_toggled() {
if ( treville_is_amp() ) {
echo "[class]=\"'primary-navigation-wrap' + ( mobileMenuExpanded ? ' toggled-on' : '' )\"";
}
}
}