HEX
Server: LiteSpeed
System: Linux hz1.serversetup.co 4.18.0-513.18.1.el8_9.x86_64 #1 SMP Thu Feb 22 03:02:37 EST 2024 x86_64
User: axonvira (1009)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,curl_multi_exec,show_source
Upload Files
File: /home/axonvira/public_html/wp-content/plugins/fusion-builder/templates/template-card.php
<?php
/**
 * Template used for post card.
 *
 * @package Avada
 * @subpackage Templates
 */

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Direct script access denied.' );
}
?>
<?php get_header(); ?>
<section id="content" <?php ( class_exists( 'Avada' ) ? Avada()->layout->add_style( 'content_style' ) : '' ); ?>>
	<div class="post-content">
		<?php
			global $post, $wp_query;
			$post_card                         = $post;
			$target                            = Fusion_Template_Builder()->get_target_example( $post->ID );
			$option                            = fusion_get_page_option( 'dynamic_content_preview_type', $post->ID );
			FusionBuilder()->editing_post_card = true;

			add_filter(
				'fusion_dynamic_post_id',
				function() use ( $target ) {
					if ( property_exists( $target, 'term_id' ) ) {
						return $target->term_id;
					}
					return $target->ID;
				},
				10
			);

			add_filter(
				'fusion_component_element_target',
				function() use ( $target ) {
					return $target;
				},
				10
			);

			add_filter(
				'fusion_app_preview_data',
				function( $data, $page_id, $post_type ) {
					$data['is_fusion_element']   = true;
					$data['fusion_element_type'] = 'post_cards';
					$data['template_category']   = 'post_cards';

					return $data;
				},
				20,
				3
			);

			if ( property_exists( $target, 'term_id' ) ) {
				$GLOBALS['wp_query']->is_tax         = true;
				$GLOBALS['wp_query']->is_archive     = true;
				$GLOBALS['wp_query']->queried_object = $target;
			} else {
				$post = $target;
				$wp_query->setup_postdata( $target );
			}

			FusionBuilder()->post_card_data['is_rendering'] = true;
			Fusion_Template_Builder()->render_content( $post_card, true );
			FusionBuilder()->post_card_data['is_rendering'] = false;
			?>
	</div>
</section>
<?php do_action( 'avada_after_content' ); ?>
<?php get_footer(); ?>