HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
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/html/wppartneramazingsecret/wp-content/themes/themify-ultra/themify/themify-config.php
<?php
/***************************************************************************
 *
 * 	----------------------------------------------------------------------
 * 							DO NOT EDIT THIS FILE
 *	----------------------------------------------------------------------
 *
 * 						Copyright (C) Themify
 *
 *	----------------------------------------------------------------------
 *
 ***************************************************************************/


if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 

/**
 * Theme and Themify Framework Path and URI
 * @since 1.2.2 
 */
defined( 'THEME_DIR' ) || define( 'THEME_DIR', get_template_directory() );
defined( 'THEME_URI' ) || define( 'THEME_URI', get_template_directory_uri() );
defined( 'THEMIFY_DIR' ) || define( 'THEMIFY_DIR', THEME_DIR . '/themify' );
defined( 'THEMIFY_URI' ) || define( 'THEMIFY_URI', THEME_URI . '/themify' );

function themify_config_init() {

	/* 	Global Vars
 	***************************************************************************/
	global $pagenow, $content_width;

	if ( ! isset( $content_width ) ) {
		$content_width = 1165;
	}

	/* 	Themify Framework Version
 	****************************************************************************/
	define( 'THEMIFY_VERSION', '5.4.8' );

	/* 	Run after update
 	***************************************************************************/
	if ( is_admin() && 'update_ok' === get_option( 'themify_update_ok_flag' ) ) {
		/**
		 * Fires after the updater finished the updating process.
		 *
		 * @since 1.8.3
		 */
		do_action( 'themify_updater_post_install' );
	}
	/* 	Woocommerce
	 ***************************************************************************/
	if( themify_is_woocommerce_active() ) {
	    defined( 'WOOCOMMERCE_VERSION' ) || define( 'WOOCOMMERCE_VERSION', '' );
	    add_theme_support('woocommerce');
	    if(!themify_check( 'setting-disable_product_image_zoom',true)){
		    add_theme_support( 'wc-product-gallery-zoom' );
	    }
	    add_theme_support( 'wc-product-gallery-lightbox' );
	    add_theme_support( 'wc-product-gallery-slider' );
	}

	/**
	 * Editor Style
	 * @since 2.0.2
	 */
	add_editor_style();
	add_theme_support( 'title-tag' );

	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
	$plugins = array(
		'woocommerce' => 'woocommerce/woocommerce.php',
		'learndash' => 'sfwd-lms/sfwd_lms.php',
		'sensei' => 'sensei-lms/sensei-lms.php',
		'wpmlstrings' => 'wpml-string-translation/plugin.php',
		'cartflows' => 'cartflows/cartflows.php',
		'wpviews' => 'wp-views/wp-views.php',
	);
	foreach ( $plugins as $plugin => $active_check ) {
		if ( is_plugin_active( $active_check ) ) {
			include( THEMIFY_DIR . '/plugin-compat/' . $plugin . '.php' );
			$classname = "Themify_Compat_{$plugin}";
			$classname::init();
		}
	}
}
add_action( 'after_setup_theme', 'themify_config_init' );

function themify_theme_first_run() {
	themify_maybe_clear_legacy();
	flush_rewrite_rules();
	themify_migrate_settings_name();

	$data = themify_get_data();
	if ( empty( $data ) ) {
		$data = apply_filters( 'themify_default_settings', array() );
		themify_set_data( $data );
	}

	update_option( 'theme_switched', false ); // flag to disable "after_switch_theme" hook, stops the infinite loop

	wp_redirect( admin_url() . 'admin.php?page=themify&firsttime=true' );
	exit;
}
add_action( 'after_switch_theme', 'themify_theme_first_run', 9999 );

///////////////////////////////////////
// Load theme languages
///////////////////////////////////////

load_theme_textdomain( 'themify', THEME_DIR.'/languages' );


/**
 * Load Filesystem Class
 * @since 2.5.8
 */
require_once( THEMIFY_DIR . '/class-themify-filesystem.php' );


require_once( THEMIFY_DIR . '/themify-icon-picker/themify-icon-picker.php' );

if ( is_file( THEMIFY_DIR . '/class-themify-get-image-size.php' ) ) {
	require_once THEMIFY_DIR . '/class-themify-get-image-size.php';
}

require_once THEMIFY_DIR . '/img.php';


/**
 * Load Cache
 */
require_once(THEMIFY_DIR . '/cache/class-themify-cache.php');

/**
 * Load Page Builder
 * @since 1.1.3
 */
require_once( THEMIFY_DIR . '/themify-builder/themify-builder.php' );

/**
 * Load Themify Role Access Control
 * @since 2.6.2
 */
require_once( THEMIFY_DIR . '/class-themify-access-role.php' );
Themify_Access_Role::get_instance();

/**
 * Load Enqueue Class
 * @since 2.5.8
 */
require_once( THEMIFY_DIR . '/class-themify-enqueue.php' );
Themify_Enqueue_Assets::init();

require_once( THEMIFY_DIR . '/class-themify-custom-fonts.php' );
Themify_Custom_Fonts::init();

/**
 * Load Customizer
 * @since 1.8.2
 */
require_once THEMIFY_DIR . '/customizer/class-themify-customizer.php';

/**
 * Load Schema.org Microdata
 * @since 2.6.5
 */
if ( 'on' !== themify_get( 'setting-disable_microdata',false,true ) ) {
	require_once THEMIFY_DIR . '/themify-microdata.php';
	$GLOBALS['themify_microdata'] = new Themify_Microdata;
}

require_once THEMIFY_DIR . '/themify-wp-filters.php';
require_once THEMIFY_DIR . '/themify-template-tags.php';
require_once THEMIFY_DIR . '/class-themify-menu-icons.php';
Themify_Menu_Icons::init();

if( is_admin() ){
    require_once THEMIFY_DIR . '/themify-admin.php';
    include_once THEME_DIR.'/admin/admin.php';
    require_once THEMIFY_DIR . '/themify-status.php';
	Themify_System_Status::init();
    require_once THEMIFY_DIR . '/class-themify-child-theme-generator.php';
	Themify_Child_Theme_Generator::init();
}

/**
 * Add support for feeds on the site
 */
add_theme_support( 'automatic-feed-links' );


/**
 * Load Themify Hooks
 * @since 1.2.2
 */
require_once(THEMIFY_DIR . '/themify-hooks.php' );
require_once(THEMIFY_DIR . '/class-hook-contents.php' );
$GLOBALS['themify_hooks'] = new Themify_Hooks();

/**
 * Load Themify Theme Metabox
 * @since 2.6.2
 */
function themify_use_theme_metabox( $url ) {
	remove_action( 'site_url', 'themify_builder_plugin_metabox', 20 );

	return $url;
}
add_action( 'site_url', 'themify_use_theme_metabox', 10 );

defined( 'THEMIFY_METABOX_URI' ) || define( 'THEMIFY_METABOX_URI', THEMIFY_URI . '/themify-metabox/' );
defined( 'THEMIFY_METABOX_DIR' ) || define( 'THEMIFY_METABOX_DIR', THEMIFY_DIR . '/themify-metabox/' );
require_once( THEMIFY_DIR . '/themify-metabox/themify-metabox.php' );


require_once( THEMIFY_DIR . '/google-fonts/functions.php' );


/**
 * Clear legacy themify-ajax.php and strange files that might have been uploaded to or directories created in the uploads folder within the theme.
 * @since 1.6.3
 */
function themify_maybe_clear_legacy() {
	$flag = 'themify_clear_legacy';
	$clear = get_option( $flag );
	if ( empty( $clear )) {
	    
		if ( ! function_exists( 'WP_Filesystem' ) ) {
			require_once( ABSPATH . 'wp-admin/includes/file.php' );
		}

		WP_Filesystem();
		global $wp_filesystem;

		$legacy = THEMIFY_DIR . '/themify-ajax.php';
		if ( $exists = $wp_filesystem->exists( $legacy ) ) {
			$wp_filesystem->delete( $legacy );
		}
		$list = $wp_filesystem->dirlist( THEME_DIR . '/uploads/', true, true );
		if ( is_array( $list ) ) {
			foreach ( $list as $item ) {
				if ( 'd' === $item['type'] ) {
					foreach ( $item['files'] as $subitem ) {
						if ( 'd' === $subitem['type'] ) {
							// There shouldn't be a directory here, let's delete it
							$del_dir = THEME_DIR . '/uploads/' . $item['name'] . '/' . $subitem['name'];
							$wp_filesystem->delete( $del_dir, true );
						} else {
							$extension = pathinfo( $subitem['name'], PATHINFO_EXTENSION );
							if ( ! in_array( $extension, array( 'jpg', 'gif', 'png', 'jpeg', 'bmp','webp','apng' ),true ) ) {
								$del_file = THEME_DIR . '/uploads/' . $item['name'] . '/' . $subitem['name'];
								$wp_filesystem->delete( $del_file );
							}
						}
					}
				} else {
					$extension = pathinfo( $item['name'], PATHINFO_EXTENSION );
					if ( ! in_array( $extension, array( 'jpg', 'gif', 'png', 'jpeg', 'bmp','webp','apng' ),true ) ) {
						$del_file = THEME_DIR . '/uploads/' . $item['name'];
						$wp_filesystem->delete( $del_file );
					}
				}
			}
		}
		update_option( $flag, true );
	}
}

/**
 * Change setting name where theme settings are stored.
 * Runs after updater succeeded.
 * @since 1.7.6
 */
function themify_migrate_settings_name() {
	$flag = 'themify_migrate_settings_name';
	$change = get_option( $flag );
	if ( empty( $change )) {
		if ( $themify_data = get_option( wp_get_theme()->display('Name') . '_themify_data' ) ) {
			themify_set_data( $themify_data );
		}
		update_option( $flag, true,false );
	}
}

/**
 * Function called after a successful update through WP Admin.
 * Code to run ONLY ONCE after update must be added here.
 *
 * @since 1.8.3
 */
function themify_theme_updater_post_install() {
	// Once all tasks have been executed, delete the flag.
	delete_option( 'themify_update_ok_flag' );
}
add_action( 'themify_updater_post_install', 'themify_theme_updater_post_install' );

/**
 * Refresh permalinks to avoid 404 on custom post type fetching.
 * @since 1.9.3
 */
function themify_flush_rewrite_rules_after_manual_update() {
	$flag = 'themify_flush_rewrite_rules_after_manual_update';
	$change = get_option( $flag );
	if (  empty( $change ) ) {
		flush_rewrite_rules();
		update_option( $flag, true,false );
	}
}
add_action( 'init', 'themify_flush_rewrite_rules_after_manual_update', 99 );

/**
 * After a Builder layout is loaded, adjust some page settings for better page display.
 *
 * @since 2.8.9
 */
function themify_adjust_page_settings_for_layouts( $args ) {
	if( 'custom' === $args['layout_group'] )
		return;
	$post_id = $args['current_builder_id'];
	$post = get_post( $post_id );
	update_post_meta( $post_id, 'content_width', 'full_width' );
	if( $post->post_type === 'page' ) {
		update_post_meta( $post_id, 'page_layout', 'sidebar-none' );
		update_post_meta( $post_id, 'hide_page_title', 'yes' );
	} else {
		update_post_meta( $post_id, 'layout', 'sidebar-none' );
		update_post_meta( $post_id, 'hide_post_title', 'yes' );
	}
}
add_action( 'themify_builder_layout_loaded', 'themify_adjust_page_settings_for_layouts' );
add_action( 'themify_builder_layout_appended', 'themify_adjust_page_settings_for_layouts' );

/**
 * Load themeforest-functions.php file if available
 * Additional functions for the theme from ThemeForest store.
 */
if( is_file( trailingslashit( get_template_directory() ) . 'themeforest-functions.php' ) ) {
	include( trailingslashit( get_template_directory() ) . 'themeforest-functions.php' );
}

/**
 * Setup procedure to load theme features packed in Themify framework
 *
 * @since 3.2.0
 */
function themify_load_theme_features() {
	/* load megamenu feature */
	if ( current_theme_supports( 'themify-mega-menu' ) ) {
		include( THEMIFY_DIR . '/megamenu/class-mega-menu.php' );
	}

	if ( current_theme_supports( 'themify-toggle-dropdown' ) ) {
		include( THEMIFY_DIR . '/class-themify-menu-toggle-dropdown.php' );
		Themify_Menu_Toggle_Dropdown::get_instance();
	}

	/* check if Google fonts are disabled */
	if ( ! defined( 'THEMIFY_GOOGLE_FONTS' ) && themify_get( 'setting-webfonts_list',false,true ) === 'disabled' ) {
		define( 'THEMIFY_GOOGLE_FONTS', false );
	}

}
add_action( 'after_setup_theme', 'themify_load_theme_features', 11 );

add_action( 'template_redirect', 'themify_maintenance_redirect', 11 ); // Priority = 11 that is *after* WP default filter `redirect_canonical` in order to avoid redirection loop.