| Server IP : / Your IP : 216.73.216.44 Web Server : nginx/1.31.3 System : Linux dcde39c899c5 6.12.95+deb13-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.95-1 (2026-07-04) x86_64 User : www-data ( 1000) PHP Version : 8.4.15 Disable Function : phpinfo MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/yuki/inc/ |
Upload File : |
<?php
/**
* Yuki admin functions
*
* @package Yuki
*/
use LottaFramework\Utils;
if ( ! function_exists( 'yuki_dismiss_notice' ) ) {
/**
* Dismiss admin notice
*/
function yuki_dismiss_notice() {
global $current_user;
$user_id = $current_user->ID;
$dismiss_option = filter_input( INPUT_GET, 'yuki_dismiss', FILTER_UNSAFE_RAW );
if ( is_string( $dismiss_option ) ) {
add_user_meta( $user_id, "yuki_dismissed_$dismiss_option", 'true', true );
// delete_user_meta( $user_id, "yuki_dismissed_$dismiss_option", 'true', true );
wp_die( '', '', array( 'response' => 200 ) );
}
}
}
add_action( 'admin_init', 'yuki_dismiss_notice' );
if ( ! function_exists( 'yuki_premium_child_theme_notice' ) ) {
/**
* Show premium child theme download notice
*/
function yuki_premium_child_theme_notice() {
get_template_part( 'template-parts/admin-premium-child-notice' );
}
}
// Yuki as parent theme
if ( get_stylesheet() !== 'yuki' && get_stylesheet() !== 'yuki-premium' ) {
// Not using premium child theme but yuki-premium has been installed
$premium = wp_get_theme( 'yuki-premium' );
if ( $premium->exists() && ! Utils::str_ends_with( get_template(), 'premium' ) ) {
/**
* Show download premium child theme notice
*/
add_action( 'admin_notices', 'yuki_premium_child_theme_notice' );
}
}