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/wpicare/wp-content/plugins/envato-elements/vendor/template-kit-import/inc/helper.php
<?php

namespace Envato_Template_Kit_Import;

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


/**
 * @param $template_kit_id
 *
 * @return bool|Builder_Elementor|Builder_Gutenberg|Builder_Elementor_Kit
 */
function envato_template_kit_import_get_builder( $template_kit_id ) {
	// Grab out the uploaded template kit from the CPT.
	$post = $template_kit_id ? get_post( $template_kit_id ) : false;
	if ( $post && CPT_Kits::get_instance()->cpt_slug === $post->post_type ) {
		// Confirmed that the required ID is in fact one of our uploaded template kits.
		$builder = get_post_meta( $post->ID, 'envato_tk_builder', true );
		if ( 'elementor' === $builder ) {
			$builder_class = new Builder_Elementor();
			$builder_class->load_kit( $post->ID );
			return $builder_class;
		} elseif ( 'gutenberg' === $builder ) {
			$builder_class = new Builder_Gutenberg();
			$builder_class->load_kit( $post->ID );
			return $builder_class;
		}elseif ( ENVATO_TEMPLATE_KIT_IMPORT_TYPE_ELEMENTOR === $builder ) {
			$builder_class = new Builder_Elementor_Kit();
			$builder_class->load_kit( $post->ID );
			return $builder_class;
		}
	}

	return false;
}