HEX
Server: Apache
System: Linux server11 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64
User: web78 (5081)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client1/web78/web/wp-content/themes/bfastmag/inc/prevdem_tpacific/init-prevdem.php
<?php
/**
 * Initialize theme preview on demo
 *
 * @package bfastmag
 */

/**
 * Check if it is demo theme preview
 *
 * @return bool
 */
function bfastmag_isprevdem() {
	$tp_theme = wp_get_theme();
	$theme_name = $tp_theme ->get( 'TextDomain' );
	$active_theme = bfastmag_get_raw_option( 'template' );
	return apply_filters( 'bfastmag_isprevdem', ( $active_theme != strtolower( $theme_name ) ) );
}

/**
 * All options or a single option val
 *
 * @param string $opt_name Option name.
 *
 * @return bool|mixed
 */
function bfastmag_get_raw_option( $opt_name ) {
	$alloptions = wp_cache_get( 'alloptions', 'options' );
	$alloptions = maybe_unserialize( $alloptions );
	return isset( $alloptions[ $opt_name ] ) ? maybe_unserialize( $alloptions[ $opt_name ] ) : false;
}
/**
 * Load functions if we're on demo preview.
 */
if ( bfastmag_isprevdem() ) {
	load_template( get_template_directory() . '/inc/prevdem_tpacific/prevdem-functions.php' );
}