Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : layouts-sc-gutenberg.php
<?php
/**
 * ThemeREX Addons Layouts: Gutenberg utilities
 *
 * @package ThemeREX Addons
 * @since v1.6.51
 */

// Don't load directly
if ( ! defined( 'TRX_ADDONS_VERSION' ) ) {
	exit;
}


// Add shortcode's specific lists to the JS storage
if ( ! function_exists( 'trx_addons_cpt_layouts_gutenberg_sc_params' ) ) {
	add_filter( 'trx_addons_filter_gutenberg_sc_params', 'trx_addons_cpt_layouts_gutenberg_sc_params' );
	function trx_addons_cpt_layouts_gutenberg_sc_params( $vars = array() ) {

		// If editor is active now
		$is_edit_mode = trx_addons_is_post_edit();

		// Return list of allowed layouts (moved to api/gutenberg/gutenberg.php)
		//$vars['sc_layouts'] = !$is_edit_mode ? array() : apply_filters( 'trx_addons_filter_gutenberg_sc_layouts', array() );

		// Prepare list of layouts
		$vars['list_layouts'] = !$is_edit_mode ? array() : trx_addons_get_list_layouts();

		return $vars;
	}
}


// Generate content to show layout
//------------------------------------------------------------------------
if ( !function_exists( 'trx_addons_cpt_layouts_gutenberg_layout_content' ) ) {
	add_filter( 'trx_addons_filter_sc_layout_content', 'trx_addons_cpt_layouts_gutenberg_layout_content', 11, 3 );
	function trx_addons_cpt_layouts_gutenberg_layout_content( $content, $post_id = 0, $force_styles = false ) {
		// Check if this post built with Gutenberg
		if ( ! empty( $content) && function_exists('trx_addons_gutenberg_is_content_built') && trx_addons_gutenberg_is_content_built($content) ) {
			trx_addons_sc_stack_push('show_layout_gutenberg');
			$content = apply_filters( 'trx_addons_filter_sc_layout_content_from_builder', do_shortcode( do_blocks( $content ) ), $post_id, 'gutenberg' );
			trx_addons_sc_stack_pop();
		}
		return $content;
	}
}
© 2026 GrazzMean-Shell