|
Server IP : 10.106.20.8 / Your IP : 216.73.216.148 Web Server : Apache System : Linux webm008.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : sixiemesrc ( 611999) PHP Version : 8.0.30 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/sixiemesrc/new/wp-content/languages/../themes/gaaga/modules/404/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
add_action( 'gaaga_after_main_css', 'notfound_style' );
function notfound_style() {
if( is_404() ) {
wp_enqueue_style( 'gaaga-404', get_theme_file_uri('/modules/404/assets/css/404.css'), false, GAAGA_THEME_VERSION, 'all');
}
}
add_filter( 'gaaga_add_inline_style', 'notfound_inline_style' );
function notfound_inline_style( $style ) {
if( is_404() ) {
$params = gaaga_404_page_params();
if( isset( $params['notfound_bg_style'] ) && !empty( $params['notfound_bg_style'] ) ) {
$style .= 'body.error404 div.wrapper {'.$params['notfound_bg_style'].'}'."\n";
}
if( isset( $params['notfound_bg'] ) ) {
$bgoptions = $params['notfound_bg'];
$css = !empty( $bgoptions['background-image'] ) ? 'background-image: url("'.$bgoptions['background-image'].'");':'';
$css .= !empty( $bgoptions['background-attachment'] ) ? 'background-attachment:'.$bgoptions['background-attachment'].';':'';
$css .= !empty( $bgoptions['background-position'] ) ? 'background-position:'.$bgoptions['background-position'].';':'';
$css .= !empty( $bgoptions['background-size'] ) ? 'background-size:'.$bgoptions['background-size'].';':'';
$css .= !empty( $bgoptions['background-repeat'] ) ? 'background-repeat:'.$bgoptions['background-repeat'].';':'';
$css .= !empty( $bgoptions['background-color'] ) ? 'background-color:'.$bgoptions['background-color'].';':'';
if( !empty( $css ) ) {
$style .= 'body.error404 div.wrapper {'.$css.'}'."\n";
}
}
}
return $style;
}
function gaaga_404_page_params() {
$params = array(
'enable_404message' => 1,
'notfound_style' => 'type2',
'notfound_darkbg' => 1,
'notfound_bg_style' => 'background-color:var(--wdtHeadAltColor);'
);
return apply_filters( 'gaaga_404_page_params', $params );
}