Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Attempt to read property "name" on array").
Previous exceptions
  • Attempt to read property "name" on array (2)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Attempt to read property "name" on array")." Stacktrace: #63 Twig\Error\RuntimeError in /var/www/1/web/wp-content/themes/g5_hydrogen/views/partials/content-page.html.twig:45 #62 Whoops\Exception\ErrorException in /var/www/1/web/wp-content/themes/immopro-2/functions.php:320 #61 Gantry\Component\Whoops\SystemFacade:handleError in /var/www/1/web/wp-content/themes/immopro-2/functions.php:320 #60 ipm2_property_thumbnail in /var/www/1/web/wp-content/themes/immopro-2/functions.php:1206 #59 ipm2_listing in /var/www/1/web/wp-includes/shortcodes.php:434 #58 do_shortcode_tag in [internal]:0 #57 preg_replace_callback in /var/www/1/web/wp-includes/shortcodes.php:273 #56 do_shortcode in /var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php:318 #55 wpb_js_remove_wpautop in /var/www/1/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_column_text.php:32 #54 require in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:448 #53 WPBakeryShortCode:loadTemplate in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:421 #52 WPBakeryShortCode:content in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:543 #51 WPBakeryShortCode:output in /var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php:1371 #50 vc_do_shortcode in /var/www/1/web/wp-includes/shortcodes.php:434 #49 do_shortcode_tag in [internal]:0 #48 preg_replace_callback in /var/www/1/web/wp-includes/shortcodes.php:273 #47 do_shortcode in /var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php:318 #46 wpb_js_remove_wpautop in /var/www/1/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_column.php:94 #45 require in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:448 #44 WPBakeryShortCode:loadTemplate in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:421 #43 WPBakeryShortCode:content in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:543 #42 WPBakeryShortCode:output in /var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php:1371 #41 vc_do_shortcode in /var/www/1/web/wp-includes/shortcodes.php:434 #40 do_shortcode_tag in [internal]:0 #39 preg_replace_callback in /var/www/1/web/wp-includes/shortcodes.php:273 #38 do_shortcode in /var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php:318 #37 wpb_js_remove_wpautop in /var/www/1/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_row.php:156 #36 require in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:448 #35 WPBakeryShortCode:loadTemplate in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/vc-row.php:40 #34 WPBakeryShortCode_Vc_Row:content in /var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:543 #33 WPBakeryShortCode:output in /var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php:1371 #32 vc_do_shortcode in /var/www/1/web/wp-includes/shortcodes.php:434 #31 do_shortcode_tag in [internal]:0 #30 preg_replace_callback in /var/www/1/web/wp-includes/shortcodes.php:273 #29 do_shortcode in /var/www/1/web/wp-includes/class-wp-hook.php:324 #28 WP_Hook:apply_filters in /var/www/1/web/wp-includes/plugin.php:205 #27 apply_filters in /var/www/1/web/wp-content/plugins/gantry5/vendor/timber/timber/lib/Post.php:1228 #26 Timber\Post:content in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:700 #25 Twig\Template:getAttribute in /var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/8e/8eed5bf38bbe247cb849f08298f1a0c0b716b1e8bf6f08aac53038fc2dca3f22.php:147 #24 __TwigTemplate_89f1f9aa76bb9f99e864b19d2a365967c31f163873045f5d85d7df6850c44027:block_content in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #23 Twig\Template:displayBlock in /var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/8e/8eed5bf38bbe247cb849f08298f1a0c0b716b1e8bf6f08aac53038fc2dca3f22.php:41 #22 __TwigTemplate_89f1f9aa76bb9f99e864b19d2a365967c31f163873045f5d85d7df6850c44027:doDisplay in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #21 Twig\Template:displayWithErrorHandling in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #20 Twig\Template:display in /var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/15/1537aae52508633445b7adfc3fb212a0673da1d313864fdb7402254be9edc402.php:54 #19 __TwigTemplate_849b17d798986d1ecf655eeef07a06a5f43dbf1957b33fbec5aced3a701967c3:block_content in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #18 Twig\Template:displayBlock in /var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/25/2549f73493408f5b8fde80aee0beb48138e85219aad63973707c33318e6892e8.php:55 #17 __TwigTemplate_019b91d3a25eb47a0a8c21249e693738764d75e31416d4875fdfc65fb18dec0a:doDisplay in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #16 Twig\Template:displayWithErrorHandling in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #15 Twig\Template:display in /var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/d6/d6f9422adbd08bdf4a99da6b5da6fd218cdf8135dcc2b5a9104c3b15d1df3190.php:36 #14 __TwigTemplate_cc8ca3b0003eeef33abcca42796a0913d897ddd2ecf27da82b108e517a73f445:doDisplay in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #13 Twig\Template:displayWithErrorHandling in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #12 Twig\Template:display in /var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/15/1537aae52508633445b7adfc3fb212a0673da1d313864fdb7402254be9edc402.php:40 #11 __TwigTemplate_849b17d798986d1ecf655eeef07a06a5f43dbf1957b33fbec5aced3a701967c3:doDisplay in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #10 Twig\Template:displayWithErrorHandling in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #9 Twig\Template:display in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:432 #8 Twig\Template:render in /var/www/1/web/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /var/www/1/web/wp-content/plugins/gantry5/vendor/timber/timber/lib/Loader.php:79 #6 Timber\Loader:render in /var/www/1/web/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:334 #5 Timber\Timber:compile in /var/www/1/web/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:383 #4 Timber\Timber:fetch in /var/www/1/web/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:410 #3 Timber\Timber:render in /var/www/1/web/wp-content/themes/g5_hydrogen/page.php:41 #2 include in /var/www/1/web/wp-includes/template-loader.php:106 #1 require_once in /var/www/1/web/wp-blog-header.php:19 #0 require in /var/www/1/web/index.php:17
Stack frames (64)
63
Twig\Error\RuntimeError
/var/www/1/web/wp-content/themes/g5_hydrogen/views/partials/content-page.html.twig45
62
Whoops\Exception\ErrorException
/var/www/1/web/wp-content/themes/immopro-2/functions.php320
61
Gantry\Component\Whoops\SystemFacade handleError
/var/www/1/web/wp-content/themes/immopro-2/functions.php320
60
ipm2_property_thumbnail
/var/www/1/web/wp-content/themes/immopro-2/functions.php1206
59
ipm2_listing
/var/www/1/web/wp-includes/shortcodes.php434
58
do_shortcode_tag
[internal]0
57
preg_replace_callback
/var/www/1/web/wp-includes/shortcodes.php273
56
do_shortcode
/var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php318
55
wpb_js_remove_wpautop
/var/www/1/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_column_text.php32
54
require
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php448
53
WPBakeryShortCode loadTemplate
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php421
52
WPBakeryShortCode content
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php543
51
WPBakeryShortCode output
/var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php1371
50
vc_do_shortcode
/var/www/1/web/wp-includes/shortcodes.php434
49
do_shortcode_tag
[internal]0
48
preg_replace_callback
/var/www/1/web/wp-includes/shortcodes.php273
47
do_shortcode
/var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php318
46
wpb_js_remove_wpautop
/var/www/1/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_column.php94
45
require
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php448
44
WPBakeryShortCode loadTemplate
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php421
43
WPBakeryShortCode content
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php543
42
WPBakeryShortCode output
/var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php1371
41
vc_do_shortcode
/var/www/1/web/wp-includes/shortcodes.php434
40
do_shortcode_tag
[internal]0
39
preg_replace_callback
/var/www/1/web/wp-includes/shortcodes.php273
38
do_shortcode
/var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php318
37
wpb_js_remove_wpautop
/var/www/1/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_row.php156
36
require
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php448
35
WPBakeryShortCode loadTemplate
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/vc-row.php40
34
WPBakeryShortCode_Vc_Row content
/var/www/1/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php543
33
WPBakeryShortCode output
/var/www/1/web/wp-content/plugins/js_composer/include/helpers/helpers.php1371
32
vc_do_shortcode
/var/www/1/web/wp-includes/shortcodes.php434
31
do_shortcode_tag
[internal]0
30
preg_replace_callback
/var/www/1/web/wp-includes/shortcodes.php273
29
do_shortcode
/var/www/1/web/wp-includes/class-wp-hook.php324
28
WP_Hook apply_filters
/var/www/1/web/wp-includes/plugin.php205
27
apply_filters
/vendor/timber/timber/lib/Post.php1228
26
Timber\Post content
/compat/vendor/twig/twig/src/Template.php700
25
Twig\Template getAttribute
/var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/8e/8eed5bf38bbe247cb849f08298f1a0c0b716b1e8bf6f08aac53038fc2dca3f22.php147
24
__TwigTemplate_89f1f9aa76bb9f99e864b19d2a365967c31f163873045f5d85d7df6850c44027 block_content
/compat/vendor/twig/twig/src/Template.php214
23
Twig\Template displayBlock
/var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/8e/8eed5bf38bbe247cb849f08298f1a0c0b716b1e8bf6f08aac53038fc2dca3f22.php41
22
__TwigTemplate_89f1f9aa76bb9f99e864b19d2a365967c31f163873045f5d85d7df6850c44027 doDisplay
/compat/vendor/twig/twig/src/Template.php453
21
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
20
Twig\Template display
/var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/15/1537aae52508633445b7adfc3fb212a0673da1d313864fdb7402254be9edc402.php54
19
__TwigTemplate_849b17d798986d1ecf655eeef07a06a5f43dbf1957b33fbec5aced3a701967c3 block_content
/compat/vendor/twig/twig/src/Template.php214
18
Twig\Template displayBlock
/var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/25/2549f73493408f5b8fde80aee0beb48138e85219aad63973707c33318e6892e8.php55
17
__TwigTemplate_019b91d3a25eb47a0a8c21249e693738764d75e31416d4875fdfc65fb18dec0a doDisplay
/compat/vendor/twig/twig/src/Template.php453
16
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
15
Twig\Template display
/var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/d6/d6f9422adbd08bdf4a99da6b5da6fd218cdf8135dcc2b5a9104c3b15d1df3190.php36
14
__TwigTemplate_cc8ca3b0003eeef33abcca42796a0913d897ddd2ecf27da82b108e517a73f445 doDisplay
/compat/vendor/twig/twig/src/Template.php453
13
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
12
Twig\Template display
/var/www/1/web/wp-content/cache/gantry5/immopro-2/twig/15/1537aae52508633445b7adfc3fb212a0673da1d313864fdb7402254be9edc402.php40
11
__TwigTemplate_849b17d798986d1ecf655eeef07a06a5f43dbf1957b33fbec5aced3a701967c3 doDisplay
/compat/vendor/twig/twig/src/Template.php453
10
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
9
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
8
Twig\Template render
/compat/vendor/twig/twig/src/TemplateWrapper.php47
7
Twig\TemplateWrapper render
/vendor/timber/timber/lib/Loader.php79
6
Timber\Loader render
/vendor/timber/timber/lib/Timber.php334
5
Timber\Timber compile
/vendor/timber/timber/lib/Timber.php383
4
Timber\Timber fetch
/vendor/timber/timber/lib/Timber.php410
3
Timber\Timber render
/var/www/1/web/wp-content/themes/g5_hydrogen/page.php41
2
include
/var/www/1/web/wp-includes/template-loader.php106
1
require_once
/var/www/1/web/wp-blog-header.php19
0
require
/var/www/1/web/index.php17
        </section>
        {# End Entry Header #}
 
        {# Check if page is password protected #}
        {% if not function( 'post_password_required', post.ID ) %}
 
            {# Begin Entry Content #}
            <section class="entry-content">
 
                {# Begin Featured Image #}
                {% if gantry.config.get('content.' ~ scope ~ '.featured-image.enabled', '1') and post.thumbnail.src %}
                    {% set position = (gantry.config.get('content.' ~ scope ~ '.featured-image.position', 'none') == 'none') ? '' : 'float-' ~ gantry.config.get('content.' ~ scope ~ '.featured-image.position', 'none') %}
                    <a href="{{ post.link }}" class="post-thumbnail" aria-hidden="true">
                        <img src="{{ post.thumbnail.src|resize(gantry.config.get('content.' ~ scope ~ '.featured-image.width', '1200'), gantry.config.get('content.' ~ scope ~ '.featured-image.height', '350')) }}" class="featured-image tease-featured-image {{ position }}" alt="{{ post.title }}" />
                    </a>
                {% endif %}
                {# End Featured Image #}
 
                {# Begin Page Content #}
                {{ post.content|raw }}
 
                {{ function('wp_link_pages', {'before': '<div class="page-links" itemprop="pagination">', 'after': '</div>', 'link_before': '<span class="page-number page-numbers">', 'link_after': '</span>', 'echo': 0}) }}
                {# End Page Content #}
 
                {# Begin Edit Link #}
                {{ function('edit_post_link', __('Edit', 'g5_hydrogen'), '<span class="edit-link">', '</span>') }}
                {# End Edit Link #}
 
            </section>
            {# End Entry Content #}
 
        {% else %}
 
            {# Begin Password Protected Form #}
            <div class="password-form">
 
                {# Include the password form #}
                {% include 'partials/password-form.html.twig' %}
 
            </div>
                            if($go) {
                ?>
                <img src="<?php echo $u; ?>" alt="<?php echo $p->field_312; ?>" <?php echo $srcset; ?> class="ipm2_property_thumbnail_image <?php echo $class; ?>  <?php echo $cl; ?> ipm2_property_thumbnail_image_<?php echo $i; ?>" id="ipm2_property_thumbnail_image_<?php echo $p->id.'_'.$i; ?>" />
                <?php       }
                    } 
                    else {
                        if($n=0) {
                            ?>                        
                            <img src="<?php echo $no_image; ?>" alt="<?php echo $p->field_312; ?>" class="ipm2_property_thumbnail_image ipm2_property_thumbnail_no_image ipm2_property_thumbnail_image_<?php echo $i; ?> <?php echo $class; ?>" id="ipm2_property_thumbnail_image_<?php echo $p->id.'_'.$i; ?>" />
                            <?php
                        }
                    }
                    $class='';
                }
                ?>
            </div>
            <div class="ipm2_property_thumbnail_description_wrapper" id="ipm2_property_thumbnail_description_wrapper_<?php echo $p->id; ?>">
                <div class="ipm2_property_thumbnail_description" id="ipm2_property_thumbnail_description_<?php echo $p->id; ?>">
                    <div class="ipm2_property_thumbnail_description_type">
                        <a href="<?php echo $url; ?>"><?php echo ipm2_encoding_title($property_type->name.$quartier); ?></a>
                    </div>
                    <div class="ipm2_property_thumbnail_description_price">
                        <?php echo prix_produit($p->id); ?>
                    </div>
                </div> 
                <div class="ipm2_property_thumbnail_description_gradient_wrapper">
                    <div class="ipm2_property_thumbnail_description_gradient"></div>
                </div>    
            </div>            
        </div>
    </div>
<?php   
    
}

add_shortcode('ipm2_teaser','ipm2_teaser');

function ipm2_teaser($atts, $content = null) {
    extract(shortcode_atts(array(
        "image" => '',
Exception message: Attempt to read property "name" on array
                            if($go) {
                ?>
                <img src="<?php echo $u; ?>" alt="<?php echo $p->field_312; ?>" <?php echo $srcset; ?> class="ipm2_property_thumbnail_image <?php echo $class; ?>  <?php echo $cl; ?> ipm2_property_thumbnail_image_<?php echo $i; ?>" id="ipm2_property_thumbnail_image_<?php echo $p->id.'_'.$i; ?>" />
                <?php       }
                    } 
                    else {
                        if($n=0) {
                            ?>                        
                            <img src="<?php echo $no_image; ?>" alt="<?php echo $p->field_312; ?>" class="ipm2_property_thumbnail_image ipm2_property_thumbnail_no_image ipm2_property_thumbnail_image_<?php echo $i; ?> <?php echo $class; ?>" id="ipm2_property_thumbnail_image_<?php echo $p->id.'_'.$i; ?>" />
                            <?php
                        }
                    }
                    $class='';
                }
                ?>
            </div>
            <div class="ipm2_property_thumbnail_description_wrapper" id="ipm2_property_thumbnail_description_wrapper_<?php echo $p->id; ?>">
                <div class="ipm2_property_thumbnail_description" id="ipm2_property_thumbnail_description_<?php echo $p->id; ?>">
                    <div class="ipm2_property_thumbnail_description_type">
                        <a href="<?php echo $url; ?>"><?php echo ipm2_encoding_title($property_type->name.$quartier); ?></a>
                    </div>
                    <div class="ipm2_property_thumbnail_description_price">
                        <?php echo prix_produit($p->id); ?>
                    </div>
                </div> 
                <div class="ipm2_property_thumbnail_description_gradient_wrapper">
                    <div class="ipm2_property_thumbnail_description_gradient"></div>
                </div>    
            </div>            
        </div>
    </div>
<?php   
    
}

add_shortcode('ipm2_teaser','ipm2_teaser');

function ipm2_teaser($atts, $content = null) {
    extract(shortcode_atts(array(
        "image" => '',
                             ?>
                                <li><a href="<?php echo get_permalink($pc->ID); ?>"><?php echo get_post($pc->ID)->post_title; ?></a></li>
                             <?php } ?>
                            </ul>     
                          <?php } ?>
                    <?php } ?>
                </ul>
            </div>
        </div>        
    </div>        
    <?php } ?>
    <?php echo $search; ?>
    <div class="ipm2_home_container">
        <div class="ipm2_home_products_wrapper wpb_animate_when_almost_visible wpb_fadeInUp fadeInUp wpb_start_animation animated">
            <div class="ipm2_home_city_content  visible ">
                <div class="ipm2_home_city_content_wrapper">
                    <?php 
                    if($props) {
                        foreach($props as $p) {
                            ipm2_property_thumbnail($p);
                        }
                    }
                    else {
                        echo '<p class="ipm2_noresult">Aucun résultat</p>';
                    }
                    ?>
                </div>  
                <div class="ipm2_listing_pagination">    
                    <?php echo ipm_pagination($total,$page,6,"","",$params); ?>          
                </div>
            </div>
        </div>
    </div>
<?php  
    }  
}

add_shortcode('ipm2_product_page','ipm2_product_page');

function ipm2_product_page() {
     *
     * Returning a non-false value from filter will short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag    Shortcode name.
     * @param array        $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array        $m      Regular expression match array.
     */
    $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
    if ( false !== $return ) {
        return $return;
    }
 
    $content = isset( $m[5] ) ? $m[5] : null;
 
    $output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
 
    /**
     * Filters the output created by a shortcode callback.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param string $output Shortcode output.
     * @param string $tag    Shortcode name.
     * @param array  $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array  $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Searches only inside HTML elements for shortcodes and process them.
 *
 * Any [ or ] characters remaining inside elements will be HTML encoded
 * to prevent interference with shortcodes that are outside the elements.
    // Find all registered tag names in $content.
    preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
 
    if ( empty( $tagnames ) ) {
        return $content;
    }
 
    // Ensure this context is only added once if shortcodes are nested.
    $has_filter   = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    $filter_added = false;
 
    if ( ! $has_filter ) {
        $filter_added = add_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    $content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
 
    $pattern = get_shortcode_regex( $tagnames );
    $content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
 
    // Always restore square braces so we don't break things like <!--[if IE ]>.
    $content = unescape_invalid_shortcodes( $content );
 
    // Only remove the filter if it was added in this scope.
    if ( $filter_added ) {
        remove_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    return $content;
}
 
/**
 * Filter the `wp_get_attachment_image_context` hook during shortcode rendering.
 *
 * When wp_get_attachment_image() is called during shortcode rendering, we need to make clear
 * that the context is a shortcode and not part of the theme's template rendering logic.
 *
 * @since 6.3.0
 * @access private
        $output = 'vc_col-sm-' . $width;
    }

    return apply_filters( 'vc_translate_column_width_class', $output, $width );
}

/**
 * @param $content
 * @param bool $autop
 *
 * @return string
 * @since 4.2
 */
function wpb_js_remove_wpautop( $content, $autop = false ) {

    if ( $autop ) {
        $content = wpautop( preg_replace( '/<\/?p\>/', "\n", $content ) . "\n" );
    }

    return do_shortcode( shortcode_unautop( $content ) );
}

if ( ! function_exists( 'shortcode_exists' ) ) {
    /**
     * Check if a shortcode is registered in WordPress.
     *
     * Examples: shortcode_exists( 'caption' ) - will return true.
     * shortcode_exists( 'blah' ) - will return false.
     *
     * @param bool $shortcode
     *
     * @return bool
     * @since 4.2
     */
    function shortcode_exists( $shortcode = false ) {
        global $shortcode_tags;

        if ( ! $shortcode ) {
            return false;
        }
 * @var $content - shortcode content
 * Shortcode class
 * @var WPBakeryShortCode_Vc_Column_text $this
 */
$el_class = $el_id = $css = $css_animation = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );

$element_class = empty( $this->settings['element_default_class'] ) ? '' : $this->settings['element_default_class'];
$class_to_filter = 'wpb_text_column ' . esc_attr( $element_class ) . $this->getCSSAnimation( $css_animation );
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
    $wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '
    <div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
        <div class="wpb_wrapper">
            ' . wpb_js_remove_wpautop( $content, true ) . '
        </div>
    </div>
';

echo $output;
 
     * vc_filter: vc_shortcode_content_filter_after - hook after template is loaded to override output
     *
     * @return mixed
     * @throws \Exception
     */
    protected function loadTemplate( $atts, $content = null ) {
        $output = '';
        if ( ! is_null( $content ) ) {
            /** @var string $content */
            $content = apply_filters( 'vc_shortcode_content_filter', $content, $this->shortcode, $atts );
        }
        $this->findShortcodeTemplate();
        if ( $this->html_template && file_exists( $this->html_template ) ) {
            if ( strpos( $this->html_template, WPB_PLUGIN_DIR ) === false ) {
                // Modified or new
                Vc_Modifications::$modified = true;
            }
            ob_start();
            /** @var string $content - used inside template */
            $output = require $this->html_template;
            // Allow return in template files
            if ( 1 === $output ) {
                $output = ob_get_contents();
            }
            ob_end_clean();
        }

        return apply_filters( 'vc_shortcode_content_filter_after', $output, $this->shortcode, $atts, $content );
    }

    /**
     * @param $atts
     * @param $content
     *
     * @return string
     * @throws \Exception
     */
    public function contentAdmin( $atts, $content = null ) {
        $output = $custom_markup = $width = $el_position = '';
        if ( null !== $content ) {
            return $this->setTemplate( $default_dir . $this->getFileName() . '.php' );
        }
        $template = apply_filters( 'vc_shortcode_set_template_' . $this->shortcode, '' );

        if ( ! empty( $template ) ? $template : '' ) {
            return $this->setTemplate( $template );
        }

        return '';
    }

    /**
     * @param $atts
     * @param null $content
     *
     * @return mixed
     * @throws \Exception
     */
    protected function content( $atts, $content = null ) {
        return $this->loadTemplate( $atts, $content );
    }

    /**
     * @param $atts
     * @param null $content
     *
     * vc_filter: vc_shortcode_content_filter - hook to edit template content
     * vc_filter: vc_shortcode_content_filter_after - hook after template is loaded to override output
     *
     * @return mixed
     * @throws \Exception
     */
    protected function loadTemplate( $atts, $content = null ) {
        $output = '';
        if ( ! is_null( $content ) ) {
            /** @var string $content */
            $content = apply_filters( 'vc_shortcode_content_filter', $content, $this->shortcode, $atts );
        }
        $this->findShortcodeTemplate();
        if ( $this->html_template && file_exists( $this->html_template ) ) {
        $content = empty( $content ) && ! empty( $atts['content'] ) ? $atts['content'] : $content;
        if ( ( $this->isInline() || vc_is_page_editable() ) && method_exists( $this, 'contentInline' ) ) {
            $output .= $this->contentInline( $this->atts, $content );
        } else {
            $this->enqueueDefaultScripts();
            $custom_output = VC_SHORTCODE_CUSTOMIZE_PREFIX . $this->shortcode;
            $custom_output_before = VC_SHORTCODE_BEFORE_CUSTOMIZE_PREFIX . $this->shortcode; // before shortcode function hook
            $custom_output_after = VC_SHORTCODE_AFTER_CUSTOMIZE_PREFIX . $this->shortcode; // after shortcode function hook

            // Before shortcode
            if ( function_exists( $custom_output_before ) ) {
                $output .= $custom_output_before( $this->atts, $content );
            } else {
                $output .= $this->beforeShortcode( $this->atts, $content );
            }
            // Shortcode content
            if ( function_exists( $custom_output ) ) {
                $output .= $custom_output( $this->atts, $content );
            } else {
                $output .= $this->content( $this->atts, $content );
            }
            // After shortcode
            if ( function_exists( $custom_output_after ) ) {
                $output .= $custom_output_after( $this->atts, $content );
            } else {
                $output .= $this->afterShortcode( $this->atts, $content );
            }
        }
        // Filter for overriding outputs
        $output = apply_filters( 'vc_shortcode_output', $output, $this, $prepared_atts, $this->shortcode );

        return $output;
    }

    public function enqueueDefaultScripts() {
        if ( false === self::$default_scripts_enqueued ) {
            wp_enqueue_script( 'wpb_composer_front_js' );
            wp_enqueue_style( 'js_composer_front' );
            self::$default_scripts_enqueued = true;
        }
 */
function vc_is_responsive_disabled() {
    $disable_responsive = vc_settings()->get( 'not_responsive_css' );

    return '1' === $disable_responsive;
}

/**
 * Do shortcode single render point
 *
 * @param $atts
 * @param null $content
 * @param null $tag
 *
 * @return string
 * @throws \Exception
 */
function vc_do_shortcode( $atts, $content = null, $tag = null ) {
    ob_start();
    echo Vc_Shortcodes_Manager::getInstance()->getElementClass( $tag )->output( $atts, $content );
    $content = ob_get_clean();
    // @codingStandardsIgnoreStart
    global $wp_embed;
    if ( is_object( $wp_embed ) ) {
        $content = $wp_embed->run_shortcode( $content );
        $content = $wp_embed->autoembed( $content );
        // @codingStandardsIgnoreEnd
    }

    return $content;
}

/**
 * Return random string
 *
 * @param int $length
 *
 * @return string
 */
function vc_random_string( $length = 10 ) {
     *
     * Returning a non-false value from filter will short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag    Shortcode name.
     * @param array        $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array        $m      Regular expression match array.
     */
    $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
    if ( false !== $return ) {
        return $return;
    }
 
    $content = isset( $m[5] ) ? $m[5] : null;
 
    $output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
 
    /**
     * Filters the output created by a shortcode callback.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param string $output Shortcode output.
     * @param string $tag    Shortcode name.
     * @param array  $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array  $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Searches only inside HTML elements for shortcodes and process them.
 *
 * Any [ or ] characters remaining inside elements will be HTML encoded
 * to prevent interference with shortcodes that are outside the elements.
    // Find all registered tag names in $content.
    preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
 
    if ( empty( $tagnames ) ) {
        return $content;
    }
 
    // Ensure this context is only added once if shortcodes are nested.
    $has_filter   = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    $filter_added = false;
 
    if ( ! $has_filter ) {
        $filter_added = add_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    $content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
 
    $pattern = get_shortcode_regex( $tagnames );
    $content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
 
    // Always restore square braces so we don't break things like <!--[if IE ]>.
    $content = unescape_invalid_shortcodes( $content );
 
    // Only remove the filter if it was added in this scope.
    if ( $filter_added ) {
        remove_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    return $content;
}
 
/**
 * Filter the `wp_get_attachment_image_context` hook during shortcode rendering.
 *
 * When wp_get_attachment_image() is called during shortcode rendering, we need to make clear
 * that the context is a shortcode and not part of the theme's template rendering logic.
 *
 * @since 6.3.0
 * @access private
        $output = 'vc_col-sm-' . $width;
    }

    return apply_filters( 'vc_translate_column_width_class', $output, $width );
}

/**
 * @param $content
 * @param bool $autop
 *
 * @return string
 * @since 4.2
 */
function wpb_js_remove_wpautop( $content, $autop = false ) {

    if ( $autop ) {
        $content = wpautop( preg_replace( '/<\/?p\>/', "\n", $content ) . "\n" );
    }

    return do_shortcode( shortcode_unautop( $content ) );
}

if ( ! function_exists( 'shortcode_exists' ) ) {
    /**
     * Check if a shortcode is registered in WordPress.
     *
     * Examples: shortcode_exists( 'caption' ) - will return true.
     * shortcode_exists( 'blah' ) - will return false.
     *
     * @param bool $shortcode
     *
     * @return bool
     * @since 4.2
     */
    function shortcode_exists( $shortcode = false ) {
        global $shortcode_tags;

        if ( ! $shortcode ) {
            return false;
        }
        if ( ! empty( $parallax_image_src[0] ) ) {
            $parallax_image_src = $parallax_image_src[0];
        }
    }
    $wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
}
if ( ! $parallax && $has_video_bg ) {
    $wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
}

$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $css_classes ) ), $this->settings['base'], $atts ) );
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
if ( ! empty( $el_id ) ) {
    $wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
$innerColumnClass = 'vc_column-inner ' . esc_attr( trim( vc_shortcode_custom_css_class( $css ) ) );
$output .= '<div class="' . trim( $innerColumnClass ) . '">';
$output .= '<div class="wpb_wrapper">';
$output .= wpb_js_remove_wpautop( $content );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';

echo $output;
 
     * vc_filter: vc_shortcode_content_filter_after - hook after template is loaded to override output
     *
     * @return mixed
     * @throws \Exception
     */
    protected function loadTemplate( $atts, $content = null ) {
        $output = '';
        if ( ! is_null( $content ) ) {
            /** @var string $content */
            $content = apply_filters( 'vc_shortcode_content_filter', $content, $this->shortcode, $atts );
        }
        $this->findShortcodeTemplate();
        if ( $this->html_template && file_exists( $this->html_template ) ) {
            if ( strpos( $this->html_template, WPB_PLUGIN_DIR ) === false ) {
                // Modified or new
                Vc_Modifications::$modified = true;
            }
            ob_start();
            /** @var string $content - used inside template */
            $output = require $this->html_template;
            // Allow return in template files
            if ( 1 === $output ) {
                $output = ob_get_contents();
            }
            ob_end_clean();
        }

        return apply_filters( 'vc_shortcode_content_filter_after', $output, $this->shortcode, $atts, $content );
    }

    /**
     * @param $atts
     * @param $content
     *
     * @return string
     * @throws \Exception
     */
    public function contentAdmin( $atts, $content = null ) {
        $output = $custom_markup = $width = $el_position = '';
        if ( null !== $content ) {
            return $this->setTemplate( $default_dir . $this->getFileName() . '.php' );
        }
        $template = apply_filters( 'vc_shortcode_set_template_' . $this->shortcode, '' );

        if ( ! empty( $template ) ? $template : '' ) {
            return $this->setTemplate( $template );
        }

        return '';
    }

    /**
     * @param $atts
     * @param null $content
     *
     * @return mixed
     * @throws \Exception
     */
    protected function content( $atts, $content = null ) {
        return $this->loadTemplate( $atts, $content );
    }

    /**
     * @param $atts
     * @param null $content
     *
     * vc_filter: vc_shortcode_content_filter - hook to edit template content
     * vc_filter: vc_shortcode_content_filter_after - hook after template is loaded to override output
     *
     * @return mixed
     * @throws \Exception
     */
    protected function loadTemplate( $atts, $content = null ) {
        $output = '';
        if ( ! is_null( $content ) ) {
            /** @var string $content */
            $content = apply_filters( 'vc_shortcode_content_filter', $content, $this->shortcode, $atts );
        }
        $this->findShortcodeTemplate();
        if ( $this->html_template && file_exists( $this->html_template ) ) {
        $content = empty( $content ) && ! empty( $atts['content'] ) ? $atts['content'] : $content;
        if ( ( $this->isInline() || vc_is_page_editable() ) && method_exists( $this, 'contentInline' ) ) {
            $output .= $this->contentInline( $this->atts, $content );
        } else {
            $this->enqueueDefaultScripts();
            $custom_output = VC_SHORTCODE_CUSTOMIZE_PREFIX . $this->shortcode;
            $custom_output_before = VC_SHORTCODE_BEFORE_CUSTOMIZE_PREFIX . $this->shortcode; // before shortcode function hook
            $custom_output_after = VC_SHORTCODE_AFTER_CUSTOMIZE_PREFIX . $this->shortcode; // after shortcode function hook

            // Before shortcode
            if ( function_exists( $custom_output_before ) ) {
                $output .= $custom_output_before( $this->atts, $content );
            } else {
                $output .= $this->beforeShortcode( $this->atts, $content );
            }
            // Shortcode content
            if ( function_exists( $custom_output ) ) {
                $output .= $custom_output( $this->atts, $content );
            } else {
                $output .= $this->content( $this->atts, $content );
            }
            // After shortcode
            if ( function_exists( $custom_output_after ) ) {
                $output .= $custom_output_after( $this->atts, $content );
            } else {
                $output .= $this->afterShortcode( $this->atts, $content );
            }
        }
        // Filter for overriding outputs
        $output = apply_filters( 'vc_shortcode_output', $output, $this, $prepared_atts, $this->shortcode );

        return $output;
    }

    public function enqueueDefaultScripts() {
        if ( false === self::$default_scripts_enqueued ) {
            wp_enqueue_script( 'wpb_composer_front_js' );
            wp_enqueue_style( 'js_composer_front' );
            self::$default_scripts_enqueued = true;
        }
 */
function vc_is_responsive_disabled() {
    $disable_responsive = vc_settings()->get( 'not_responsive_css' );

    return '1' === $disable_responsive;
}

/**
 * Do shortcode single render point
 *
 * @param $atts
 * @param null $content
 * @param null $tag
 *
 * @return string
 * @throws \Exception
 */
function vc_do_shortcode( $atts, $content = null, $tag = null ) {
    ob_start();
    echo Vc_Shortcodes_Manager::getInstance()->getElementClass( $tag )->output( $atts, $content );
    $content = ob_get_clean();
    // @codingStandardsIgnoreStart
    global $wp_embed;
    if ( is_object( $wp_embed ) ) {
        $content = $wp_embed->run_shortcode( $content );
        $content = $wp_embed->autoembed( $content );
        // @codingStandardsIgnoreEnd
    }

    return $content;
}

/**
 * Return random string
 *
 * @param int $length
 *
 * @return string
 */
function vc_random_string( $length = 10 ) {
     *
     * Returning a non-false value from filter will short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag    Shortcode name.
     * @param array        $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array        $m      Regular expression match array.
     */
    $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
    if ( false !== $return ) {
        return $return;
    }
 
    $content = isset( $m[5] ) ? $m[5] : null;
 
    $output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
 
    /**
     * Filters the output created by a shortcode callback.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param string $output Shortcode output.
     * @param string $tag    Shortcode name.
     * @param array  $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array  $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Searches only inside HTML elements for shortcodes and process them.
 *
 * Any [ or ] characters remaining inside elements will be HTML encoded
 * to prevent interference with shortcodes that are outside the elements.
    // Find all registered tag names in $content.
    preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
 
    if ( empty( $tagnames ) ) {
        return $content;
    }
 
    // Ensure this context is only added once if shortcodes are nested.
    $has_filter   = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    $filter_added = false;
 
    if ( ! $has_filter ) {
        $filter_added = add_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    $content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
 
    $pattern = get_shortcode_regex( $tagnames );
    $content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
 
    // Always restore square braces so we don't break things like <!--[if IE ]>.
    $content = unescape_invalid_shortcodes( $content );
 
    // Only remove the filter if it was added in this scope.
    if ( $filter_added ) {
        remove_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    return $content;
}
 
/**
 * Filter the `wp_get_attachment_image_context` hook during shortcode rendering.
 *
 * When wp_get_attachment_image() is called during shortcode rendering, we need to make clear
 * that the context is a shortcode and not part of the theme's template rendering logic.
 *
 * @since 6.3.0
 * @access private
        $output = 'vc_col-sm-' . $width;
    }

    return apply_filters( 'vc_translate_column_width_class', $output, $width );
}

/**
 * @param $content
 * @param bool $autop
 *
 * @return string
 * @since 4.2
 */
function wpb_js_remove_wpautop( $content, $autop = false ) {

    if ( $autop ) {
        $content = wpautop( preg_replace( '/<\/?p\>/', "\n", $content ) . "\n" );
    }

    return do_shortcode( shortcode_unautop( $content ) );
}

if ( ! function_exists( 'shortcode_exists' ) ) {
    /**
     * Check if a shortcode is registered in WordPress.
     *
     * Examples: shortcode_exists( 'caption' ) - will return true.
     * shortcode_exists( 'blah' ) - will return false.
     *
     * @param bool $shortcode
     *
     * @return bool
     * @since 4.2
     */
    function shortcode_exists( $shortcode = false ) {
        global $shortcode_tags;

        if ( ! $shortcode ) {
            return false;
        }
if ( ! empty( $parallax_image ) ) {
    if ( $has_video_bg ) {
        $parallax_image_src = $parallax_image;
    } else {
        $parallax_image_id = preg_replace( '/[^\d]/', '', $parallax_image );
        $parallax_image_src = wp_get_attachment_image_src( $parallax_image_id, 'full' );
        if ( ! empty( $parallax_image_src[0] ) ) {
            $parallax_image_src = $parallax_image_src[0];
        }
    }
    $wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
}
if ( ! $parallax && $has_video_bg ) {
    $wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
}
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( array_unique( $css_classes ) ) ), $this->settings['base'], $atts ) );
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';

$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
$output .= wpb_js_remove_wpautop( $content );
$output .= '</div>';
$output .= $after_output;

echo $output;
 
     * vc_filter: vc_shortcode_content_filter_after - hook after template is loaded to override output
     *
     * @return mixed
     * @throws \Exception
     */
    protected function loadTemplate( $atts, $content = null ) {
        $output = '';
        if ( ! is_null( $content ) ) {
            /** @var string $content */
            $content = apply_filters( 'vc_shortcode_content_filter', $content, $this->shortcode, $atts );
        }
        $this->findShortcodeTemplate();
        if ( $this->html_template && file_exists( $this->html_template ) ) {
            if ( strpos( $this->html_template, WPB_PLUGIN_DIR ) === false ) {
                // Modified or new
                Vc_Modifications::$modified = true;
            }
            ob_start();
            /** @var string $content - used inside template */
            $output = require $this->html_template;
            // Allow return in template files
            if ( 1 === $output ) {
                $output = ob_get_contents();
            }
            ob_end_clean();
        }

        return apply_filters( 'vc_shortcode_content_filter_after', $output, $this->shortcode, $atts, $content );
    }

    /**
     * @param $atts
     * @param $content
     *
     * @return string
     * @throws \Exception
     */
    public function contentAdmin( $atts, $content = null ) {
        $output = $custom_markup = $width = $el_position = '';
        if ( null !== $content ) {
     */
    public function __construct( $settings ) {
        parent::__construct( $settings );
        $this->shortcodeScripts();
    }

    protected function shortcodeScripts() {
        wp_register_script( 'vc_jquery_skrollr_js', vc_asset_url( 'lib/vendor/node_modules/skrollr/dist/skrollr.min.js' ), array( 'jquery-core' ), WPB_VC_VERSION, true );
        wp_register_script( 'vc_youtube_iframe_api_js', 'https://www.youtube.com/iframe_api', array(), WPB_VC_VERSION, true );
    }

    /**
     * @param $atts
     * @param null $content
     * @return mixed|string
     */
    protected function content( $atts, $content = null ) {
        $prefix = '';

        return $prefix . $this->loadTemplate( $atts, $content );
    }

    /**
     * This returs block controls
     */
    public function getLayoutsControl() {
        global $vc_row_layouts;
        $controls_layout = '<span class="vc_row_layouts vc_control">';
        foreach ( $vc_row_layouts as $layout ) {
            $controls_layout .= '<a class="vc_control-set-column set_columns" data-cells="' . $layout['cells'] . '" data-cells-mask="' . $layout['mask'] . '" title="' . $layout['title'] . '"><i class="vc-composer-icon vc-c-icon-' . $layout['icon_class'] . '"></i></a> ';
        }
        $controls_layout .= '<br/><a class="vc_control-set-column set_columns custom_columns" data-cells="custom" data-cells-mask="custom" title="' . esc_attr__( 'Custom layout', 'js_composer' ) . '">' . esc_html__( 'Custom', 'js_composer' ) . '</a> ';
        $controls_layout .= '</span>';

        return $controls_layout;
    }

    /**
     * @param $controls
     * @param string $extended_css
        $content = empty( $content ) && ! empty( $atts['content'] ) ? $atts['content'] : $content;
        if ( ( $this->isInline() || vc_is_page_editable() ) && method_exists( $this, 'contentInline' ) ) {
            $output .= $this->contentInline( $this->atts, $content );
        } else {
            $this->enqueueDefaultScripts();
            $custom_output = VC_SHORTCODE_CUSTOMIZE_PREFIX . $this->shortcode;
            $custom_output_before = VC_SHORTCODE_BEFORE_CUSTOMIZE_PREFIX . $this->shortcode; // before shortcode function hook
            $custom_output_after = VC_SHORTCODE_AFTER_CUSTOMIZE_PREFIX . $this->shortcode; // after shortcode function hook

            // Before shortcode
            if ( function_exists( $custom_output_before ) ) {
                $output .= $custom_output_before( $this->atts, $content );
            } else {
                $output .= $this->beforeShortcode( $this->atts, $content );
            }
            // Shortcode content
            if ( function_exists( $custom_output ) ) {
                $output .= $custom_output( $this->atts, $content );
            } else {
                $output .= $this->content( $this->atts, $content );
            }
            // After shortcode
            if ( function_exists( $custom_output_after ) ) {
                $output .= $custom_output_after( $this->atts, $content );
            } else {
                $output .= $this->afterShortcode( $this->atts, $content );
            }
        }
        // Filter for overriding outputs
        $output = apply_filters( 'vc_shortcode_output', $output, $this, $prepared_atts, $this->shortcode );

        return $output;
    }

    public function enqueueDefaultScripts() {
        if ( false === self::$default_scripts_enqueued ) {
            wp_enqueue_script( 'wpb_composer_front_js' );
            wp_enqueue_style( 'js_composer_front' );
            self::$default_scripts_enqueued = true;
        }
 */
function vc_is_responsive_disabled() {
    $disable_responsive = vc_settings()->get( 'not_responsive_css' );

    return '1' === $disable_responsive;
}

/**
 * Do shortcode single render point
 *
 * @param $atts
 * @param null $content
 * @param null $tag
 *
 * @return string
 * @throws \Exception
 */
function vc_do_shortcode( $atts, $content = null, $tag = null ) {
    ob_start();
    echo Vc_Shortcodes_Manager::getInstance()->getElementClass( $tag )->output( $atts, $content );
    $content = ob_get_clean();
    // @codingStandardsIgnoreStart
    global $wp_embed;
    if ( is_object( $wp_embed ) ) {
        $content = $wp_embed->run_shortcode( $content );
        $content = $wp_embed->autoembed( $content );
        // @codingStandardsIgnoreEnd
    }

    return $content;
}

/**
 * Return random string
 *
 * @param int $length
 *
 * @return string
 */
function vc_random_string( $length = 10 ) {
     *
     * Returning a non-false value from filter will short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag    Shortcode name.
     * @param array        $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array        $m      Regular expression match array.
     */
    $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
    if ( false !== $return ) {
        return $return;
    }
 
    $content = isset( $m[5] ) ? $m[5] : null;
 
    $output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
 
    /**
     * Filters the output created by a shortcode callback.
     *
     * @since 4.7.0
     * @since 6.5.0 The `$attr` parameter is always an array.
     *
     * @param string $output Shortcode output.
     * @param string $tag    Shortcode name.
     * @param array  $attr   Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
     * @param array  $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Searches only inside HTML elements for shortcodes and process them.
 *
 * Any [ or ] characters remaining inside elements will be HTML encoded
 * to prevent interference with shortcodes that are outside the elements.
    // Find all registered tag names in $content.
    preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
 
    if ( empty( $tagnames ) ) {
        return $content;
    }
 
    // Ensure this context is only added once if shortcodes are nested.
    $has_filter   = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    $filter_added = false;
 
    if ( ! $has_filter ) {
        $filter_added = add_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    $content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
 
    $pattern = get_shortcode_regex( $tagnames );
    $content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
 
    // Always restore square braces so we don't break things like <!--[if IE ]>.
    $content = unescape_invalid_shortcodes( $content );
 
    // Only remove the filter if it was added in this scope.
    if ( $filter_added ) {
        remove_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
    }
 
    return $content;
}
 
/**
 * Filter the `wp_get_attachment_image_context` hook during shortcode rendering.
 *
 * When wp_get_attachment_image() is called during shortcode rendering, we need to make clear
 * that the context is a shortcode and not part of the theme's template rendering logic.
 *
 * @since 6.3.0
 * @access private
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
 
            $priority = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 === $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
        $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return $value;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    // Pass the value to WP_Hook.
    array_unshift( $args, $value );
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 *                      functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_filters        Stores the number of times each filter was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the filter hook.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
        }
        if ( $form = $this->maybe_show_password_form() ) {
            return $form;
        }
        if ( $len == -1 && $page == 0 && $this->___content ) {
            return $this->___content;
        }
        $content = $this->post_content;
        if ( $len > 0 ) {
            $content = wp_trim_words($content, $len);
        }
        if ( $page ) {
            $contents = explode('<!--nextpage-->', $content);
            $page--;
            if ( count($contents) > $page ) {
                $content = $contents[$page];
            }
        }
        $content = $this->content_handle_no_teaser_block( $content );
        $content = apply_filters('the_content', ($content));
        if ( $len == -1 && $page == 0 ) {
            $this->___content = $content;
        }
        return $content;
    }
 
    /**
     * Handles for an circumstance with the Block editor where a "more" block has an option to
     * "Hide the excerpt on the full content page" which hides everything prior to the inserted
     * "more" block
     * @ticket #2218
     * @param string $content
     * @return string
     */
    protected function content_handle_no_teaser_block( $content ) {
        if ( (strpos($content, 'noTeaser:true') !== false || strpos($content, '"noTeaser":true') !== false) && strpos($content, '<!-- /wp:more -->') !== false) {
            $arr = explode('<!-- /wp:more -->', $content);
            return trim($arr[1]);
        }
        return $content;
            if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
                return;
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
                echo "\" class=\"post-thumbnail\" aria-hidden=\"true\">
                        <img src=\"";
                // line 39
                echo Timber\ImageHelper::resize($this->getAttribute($this->getAttribute(($context["post"] ?? null), "thumbnail", []), "src", []), $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".featured-image.width"), 1 => "1200"], "method"), $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".featured-image.height"), 1 => "350"], "method"));
                echo "\" class=\"featured-image tease-featured-image ";
                echo ($context["position"] ?? null);
                echo "\" alt=\"";
                echo $this->getAttribute(($context["post"] ?? null), "title", []);
                echo "\" />
                    </a>
                ";
            }
            // line 42
            echo "                ";
            // line 43
            echo "
                ";
            // line 45
            echo "                ";
            echo $this->getAttribute(($context["post"] ?? null), "content", []);
            echo "
 
                ";
            // line 47
            echo call_user_func_array($this->env->getFunction('function')->getCallable(), ["wp_link_pages", ["before" => "<div class=\"page-links\" itemprop=\"pagination\">", "after" => "</div>", "link_before" => "<span class=\"page-number page-numbers\">", "link_after" => "</span>", "echo" => 0]]);
            echo "
                ";
            // line 49
            echo "
                ";
            // line 51
            echo "                ";
            echo call_user_func_array($this->env->getFunction('function')->getCallable(), ["edit_post_link", __("Edit", "g5_hydrogen"), "<span class=\"edit-link\">", "</span>"]);
            echo "
                ";
            // line 53
            echo "
            </section>
            ";
            // line 56
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
 
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<article class=\"post-type-";
        echo $this->getAttribute(($context["post"] ?? null), "post_type", []);
        echo " ";
        echo $this->getAttribute(($context["post"] ?? null), "class", []);
        echo "\" id=\"post-";
        echo $this->getAttribute(($context["post"] ?? null), "ID", []);
        echo "\">
 
    ";
        // line 3
        $this->displayBlock('content', $context, $blocks);
        // line 71
        echo "
</article>
";
    }
 
    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "
        ";
        // line 6
        echo "        <section class=\"entry-header\">
 
            ";
        // line 9
        echo "            ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".title.enabled"), 1 => "1"], "method")) {
            // line 10
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        $context["twigTemplate"] = "page.html.twig";
        // line 3
        $context["scope"] = "page";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 6
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 11
        $this->loadTemplate([0 => (("partials/content-" . ($context["scope"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "page.html.twig", 11)->display($context);
        // line 12
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
";
    }
 
    public function getTemplateName()
    {
        return "page.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "startTimer", [0 => "render", 1 => "Rendering page"], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "setLayout", [], "method");
        // line 3
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["segments"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "segments", [], "method");
        // line 6
        ob_start(function () { return ''; });
        // line 7
        echo "    ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "hasContent", [], "method")) {
            // line 8
            echo "        ";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "    ";
        }
        $context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 13
        $context["offcanvas"] = null;
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            // line 15
            if (($this->getAttribute($context["segment"], "type", []) == "offcanvas")) {
                // line 16
                $context["offcanvas"] = $context["segment"];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 20
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_head($context, array $blocks = [])
    {
        // line 4
        if (($context["page_head"] ?? null)) {
            // line 5
            echo "        ";
            echo ($context["page_head"] ?? null);
            echo "
    ";
        } else {
            // line 7
            echo "        ";
            $this->displayParentBlock("page_head", $context, $blocks);
            echo "
    ";
        }
    }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 2
        $context["twigTemplate"] = "page.html.twig";
        // line 3
        $context["scope"] = "page";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 6
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 11
        $this->loadTemplate([0 => (("partials/content-" . ($context["scope"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "page.html.twig", 11)->display($context);
        // line 12
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
 
        $key = null;
        $output = false;
        if ( false !== $expires ) {
            ksort($data);
            $key = md5($file.json_encode($data));
            $output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
        }
 
        if ( false === $output || null === $output ) {
            $twig = $this->get_twig();
            if ( strlen($file) ) {
                $loader = $this->get_loader();
                $result = $loader->getCacheKey($file);
                do_action('timber_loader_render_file', $result);
            }
            $data = apply_filters('timber_loader_render_data', $data);
            $data = apply_filters('timber/loader/render_data', $data, $file);
            $template = $twig->load($file);
            $output = $template->render($data);
        }
 
        if ( false !== $output && false !== $expires && null !== $key ) {
            $this->delete_cache();
            $this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
        }
        $output = apply_filters('timber_output', $output);
        return apply_filters('timber/output', $output, $data, $file);
    }
 
    protected function delete_cache() {
        Cleaner::delete_transients();
    }
 
    /**
     * Get first existing template.
     *
     * @param array|string $templates  Name(s) of the Twig template(s) to choose from.
     * @return string|bool             Name of chosen template, otherwise false.
     */
        if ( $via_render ) {
            $file = apply_filters('timber_render_file', $file);
        } else {
            $file = apply_filters('timber_compile_file', $file);
        }
 
        $output = false;
 
        if ($file !== false) {
            if ( is_null($data) ) {
                $data = array();
            }
 
            if ( $via_render ) {
                $data = apply_filters('timber_render_data', $data);
            } else {
                $data = apply_filters('timber_compile_data', $data);
            }
 
            $output = $loader->render($file, $data, $expires, $cache_mode);
        } else {
            if ( is_array($filenames) ) {
                $filenames = implode(", ", $filenames);
            }
            Helper::error_log( 'Error loading your template files: '.$filenames.'. Make sure one of these files exists.' );
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
        $twig = $dummy_loader->get_twig();
        $template = $twig->createTemplate($string);
        return $template->render($data);
    }
 
    /**
     * Fetch function.
     *
     * @api
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The returned output.
     */
    public static function fetch( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        $output = apply_filters('timber_compile_result', $output);
        return $output;
    }
 
    /**
     * Render function.
     *
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The echoed output.
     */
    public static function render( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::fetch($filenames, $data, $expires, $cache_mode);
        echo $output;
        return $output;
    }
 
    /**
     * Render a string with Twig variables.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * Timber::render_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   An array of data to use in Twig template.
     * @return bool|string
     */
 *
 * To generate specific templates for your pages you can use:
 * /mytheme/views/page-mypage.html.twig
 * (which will still route through this PHP file)
 * OR
 * /mytheme/page-mypage.php
 * (in which case you'll want to duplicate this file and save to the above path)
 */

$gantry = Gantry\Framework\Gantry::instance();
$theme  = $gantry['theme'];

// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);

$post            = Timber::query_post();
$context['post'] = $post;

Timber::render(['page-' . $post->post_name . '.html.twig', 'page.html.twig'], $context);
 
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */

if ( ! isset( $wp_did_header ) ) {

    $wp_did_header = true;

    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';

    // Set up the WordPress query.
    wp();

    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';

}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

Key Value
q /immobilier/
idp 36
wplview
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.24.0
REQUEST_URI /immobilier/?idp=36
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
TEMP /var/www/1/tmp
TMPDIR /var/www/1/tmp
TMP /var/www/1/tmp
HOSTNAME
USER web1
HOME /var/www/1
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
HTTP_HOST www.immobilier-pro-maroc.com
SCRIPT_FILENAME /var/www/immobilier-pro-maroc.com/web/index.php
REDIRECT_STATUS 200
SERVER_NAME immobilier-pro-maroc.com
SERVER_PORT 443
SERVER_ADDR 92.243.26.65
REMOTE_USER
REMOTE_PORT 16819
REMOTE_ADDR 216.73.216.118
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /var/www/immobilier-pro-maroc.com/web
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING q=/immobilier/&idp=36
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1757354458.8244
REQUEST_TIME 1757354458
empty
0. Whoops\Handler\PrettyPageHandler