文件操作 - core.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/jimbrandstatter/public_html/wp-content/themes/Total/inc/footer/core.php
编辑文件内容
<?php namespace TotalTheme\Footer; \defined( 'ABSPATH' ) || exit; /** * Footer. */ class Core { /** * Header is enabled or not. */ protected static $is_enabled; /** * Header is custom, aka using the header builder. */ protected static $is_custom; /** * Static-only class. */ private function __construct() {} /** * Checks if the header is enabled or not. */ public static function is_enabled(): bool { if ( ! \is_null( self::$is_enabled ) ) { return self::$is_enabled; } $check = true; if ( \is_page_template( [ 'templates/landing-page.php', 'templates/blank.php' ] ) ) { $check = false; } $post_id = \wpex_get_current_post_id(); if ( $post_id && $meta = \get_post_meta( $post_id, 'wpex_disable_footer', true ) ) { if ( 'on' === $meta ) { $check = false; } elseif ( 'enable' === $meta ) { $check = true; } } /** * Filters whether the site has a footer or not. * * @param bool $check * @todo rename filter to wpex_has_footer */ $check = \apply_filters( 'totaltheme/footer/is_enabled', $check ); /*** deprecated ***/ $check = \apply_filters( 'wpex_display_footer', $check ); self::$is_enabled = (bool) $check; return self::$is_enabled; } /** * Checks if the header is custom or not. */ public static function is_custom(): bool { if ( ! \is_null( self::$is_custom ) ) { return self::$is_custom; } self::$is_custom = ! empty( \wpex_footer_builder_id() ); return self::$is_custom; } /** * Checks if the footer has reveal on scroll or not. */ public static function has_reveal(): bool { if ( ! self::is_enabled() || 'boxed' === \wpex_site_layout() || 'six' === \totaltheme_call_static( 'Header\Core', 'style' ) || \wpex_vc_is_inline() ) { return false; } $check = \get_theme_mod( 'footer_reveal', false ); $post_id = \wpex_get_current_post_id(); if ( $post_id && $meta = \get_post_meta( $post_id, 'wpex_footer_reveal', true ) ) { if ( 'on' === $meta ) { $check = true; } elseif ( 'off' === $meta ) { $check = false; } } /** * Filters whether the footer reveal is enabled. * * @param bool $check */ $check = \apply_filters( 'totaltheme/footer/has_reveal', $check ); /*** deprecated ***/ $check = \apply_filters( 'wpex_has_footer_reveal', $check ); return (bool) $check; } /** * Returns wrapper classes. */ public static function get_wrapper_classes(): array { $class = [ 'site-footer', ]; if ( \get_theme_mod( 'footer_dark_surface', true ) ) { $class[] = 'wpex-surface-dark'; } if ( \get_theme_mod( 'footer_bg_img' ) && $bg_style = (string) \get_theme_mod( 'footer_bg_img_style' ) ) { $class[] = 'bg-' . sanitize_html_class( $bg_style ); // deprecated class. $class[] = wpex_parse_background_style_class( $bg_style ); } $class[] = 'wpex-print-hidden'; /** * Returns the footer wrapper class. * * @param array $class */ $class = \apply_filters( 'totaltheme/footer/wrapper_class', $class ); /*** deprecated ***/ $class = \apply_filters( 'wpex_footer_class', $class ); return (array) $class; } /** * Returns the wrapper class. */ public static function wrapper_class(): void { if ( $classes = self::get_wrapper_classes() ) { echo 'class="' . \esc_attr( \implode( ' ', $classes ) ) . '"'; } } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件