Whoops \ Exception \ ErrorException (E_NOTICE)
Undefined index: type Whoops\Exception\ErrorException thrown with message "Undefined index: type" Stacktrace: #47 Whoops\Exception\ErrorException in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/config/shortcodes.php:120 #46 Whoops\Run:handleError in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/config/shortcodes.php:120 #45 Syltaen\Files:Syltaen\{closure} in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php:356 #44 do_shortcode_tag in [internal]:0 #43 preg_replace_callback in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php:228 #42 do_shortcode in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/config/shortcodes.php:216 #41 Syltaen\Files:Syltaen\{closure} in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php:356 #40 do_shortcode_tag in [internal]:0 #39 preg_replace_callback in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php:228 #38 do_shortcode in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #37 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:191 #36 apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-wysiwyg.php:461 #35 acf_field_wysiwyg:format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #34 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:235 #33 apply_filters_ref_array in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php:101 #32 _acf_apply_hook_variations in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #31 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:191 #30 apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php:141 #29 acf_format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php:602 #28 acf_field_repeater:format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #27 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:235 #26 apply_filters_ref_array in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php:101 #25 _acf_apply_hook_variations in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #24 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:191 #23 apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php:141 #22 acf_format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php:866 #21 acf_field_flexible_content:format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #20 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:235 #19 apply_filters_ref_array in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php:101 #18 _acf_apply_hook_variations in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #17 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:191 #16 apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php:141 #15 acf_format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php:602 #14 acf_field_repeater:format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #13 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:235 #12 apply_filters_ref_array in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php:101 #11 _acf_apply_hook_variations in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php:307 #10 WP_Hook:apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php:191 #9 apply_filters in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php:141 #8 acf_format_value in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php:54 #7 get_field in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/Helpers/Data.php:20 #6 Syltaen\Data:get in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/Controllers/PageController.php:24 #5 Syltaen\PageController:__construct in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/Helpers/Route.php:38 #4 Syltaen\Route:respond in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/Helpers/Route.php:161 #3 Syltaen\Route:is in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/index.php:57 #2 include in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/template-loader.php:106 #1 require_once in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-blog-header.php:19 #0 require in /var/www/vhosts/bewapp.hungryminds.host/httpdocs/index.php:17
Stack frames (48)
47
Whoops\Exception\ErrorException
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/config/shortcodes.php120
46
Whoops\Run handleError
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/config/shortcodes.php120
45
Syltaen\Files Syltaen\{closure}
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php356
44
do_shortcode_tag
[internal]0
43
preg_replace_callback
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php228
42
do_shortcode
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/config/shortcodes.php216
41
Syltaen\Files Syltaen\{closure}
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php356
40
do_shortcode_tag
[internal]0
39
preg_replace_callback
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/shortcodes.php228
38
do_shortcode
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
37
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php191
36
apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-wysiwyg.php461
35
acf_field_wysiwyg format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
34
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php235
33
apply_filters_ref_array
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php101
32
_acf_apply_hook_variations
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
31
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php191
30
apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php141
29
acf_format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php602
28
acf_field_repeater format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
27
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php235
26
apply_filters_ref_array
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php101
25
_acf_apply_hook_variations
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
24
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php191
23
apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php141
22
acf_format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php866
21
acf_field_flexible_content format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
20
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php235
19
apply_filters_ref_array
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php101
18
_acf_apply_hook_variations
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
17
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php191
16
apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php141
15
acf_format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php602
14
acf_field_repeater format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
13
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php235
12
apply_filters_ref_array
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php101
11
_acf_apply_hook_variations
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/class-wp-hook.php307
10
WP_Hook apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/plugin.php191
9
apply_filters
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php141
8
acf_format_value
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php54
7
get_field
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/Helpers/Data.php20
6
Syltaen\Data get
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/Controllers/PageController.php24
5
Syltaen\PageController __construct
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/Helpers/Route.php38
4
Syltaen\Route respond
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/app/Helpers/Route.php161
3
Syltaen\Route is
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/index.php57
2
include
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/template-loader.php106
1
require_once
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-blog-header.php19
0
require
/var/www/vhosts/bewapp.hungryminds.host/httpdocs/index.php17
// > GNP / AMB / EVENTS
// =============================================================================
 
// GNP COUNTER
add_shortcode("gnp_counter", function ($args) {
    $stat   = $args["stat"] ?? "total";
    $entity = $args["entity"] ?? "members";
    return TeamsGNP::getCachedStats()[$stat][$entity];
});
 
// AMB COUNTER
add_shortcode("amb_counter", function () {
    $stat   = $args["stat"] ?? "total";
    $entity = $args["entity"] ?? "members";
    return TeamsAmb::getCachedStats()[$stat][$entity];
});
 
// AMB PICKUP COUNTER
add_shortcode("pickup_amb_stats", function ($attrs) {
    $type = $attrs["type"] ?: false;
 
    $counts = PickupAmb::getCachedStats();
 
    if ($type) {
        $counts = $counts[$type] ?? [];
    } else {
        $counts = array_reduce(array_keys(array_values($counts)[0]), function ($total, $stat) use ($counts) {
            $total[$stat] = number_format(array_sum(array_map(function ($num) {
                return (int) str_replace(".", "", $num);
            }, array_column($counts, $stat))), 0, ",", ".");
            return $total;
        }, []);
    }
 
    if (!empty($attrs["field"])) {
        return $counts[$attrs["field"]];
    }
 
    return '
    <p class="flex-row__item pickup-count pickup-count--big pickup-count--blancs">
Arguments
  1. "Undefined index: type"
    
// > GNP / AMB / EVENTS
// =============================================================================
 
// GNP COUNTER
add_shortcode("gnp_counter", function ($args) {
    $stat   = $args["stat"] ?? "total";
    $entity = $args["entity"] ?? "members";
    return TeamsGNP::getCachedStats()[$stat][$entity];
});
 
// AMB COUNTER
add_shortcode("amb_counter", function () {
    $stat   = $args["stat"] ?? "total";
    $entity = $args["entity"] ?? "members";
    return TeamsAmb::getCachedStats()[$stat][$entity];
});
 
// AMB PICKUP COUNTER
add_shortcode("pickup_amb_stats", function ($attrs) {
    $type = $attrs["type"] ?: false;
 
    $counts = PickupAmb::getCachedStats();
 
    if ($type) {
        $counts = $counts[$type] ?? [];
    } else {
        $counts = array_reduce(array_keys(array_values($counts)[0]), function ($total, $stat) use ($counts) {
            $total[$stat] = number_format(array_sum(array_map(function ($num) {
                return (int) str_replace(".", "", $num);
            }, array_column($counts, $stat))), 0, ",", ".");
            return $total;
        }, []);
    }
 
    if (!empty($attrs["field"])) {
        return $counts[$attrs["field"]];
    }
 
    return '
    <p class="flex-row__item pickup-count pickup-count--big pickup-count--blancs">
     * Filters whether to call a shortcode callback.
     *
     * Returning a non-false value from filter will short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     *
     * @param false|string $return      Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag         Shortcode name.
     * @param array|string $attr        Shortcode attributes array or empty string.
     * @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
     *
     * @param string       $output Shortcode output.
     * @param string       $tag    Shortcode name.
     * @param array|string $attr   Shortcode attributes array or empty string.
     * @param array        $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Search 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.
 * Assumes $content processed by KSES already.  Users with unfiltered_html
    if ( false === strpos( $content, '[' ) ) {
        return $content;
    }
 
    if ( empty( $shortcode_tags ) || ! is_array( $shortcode_tags ) ) {
        return $content;
    }
 
    // 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;
    }
 
    $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 );
 
    return $content;
}
 
/**
 * Retrieve the shortcode regular expression for searching.
 *
 * The regular expression combines the shortcode tags in the regular expression
 * in a regex class.
 *
 * The regular expression contains 6 different sub matches to help with parsing.
 *
 * 1 - An extra [ to allow for escaping shortcodes with double [[]]
 * 2 - The shortcode name
 * 3 - The shortcode argument list
 * 4 - The self closing /
 * 5 - The content of a shortcode when it wraps some content.
        JOIN postmeta postmeta ON postmeta.meta_key = '$meta_key' AND postmeta.post_id = posts.ID
        WHERE posts.post_status = '$post_status' AND posts.post_type = '$post_type'
    ");
});
 
// FORM COUNT
add_shortcode("form_count", function ($attrs) {
    $form_ids   = explode(",", $attrs["form_ids"] ?? "");
    $fields_ids = explode(",", $attrs["fields_ids"] ?? "");
 
    if (empty($form_ids) || empty($fields_ids)) return "";
 
    $number = array_sum(Events::getAllStats($form_ids, false, $fields_ids));
 
    return number_format($number, 0, ",", ".");
});
 
add_shortcode("total", function ($attrs, $total) {
    // Apply shortcodes in total
    $total = do_shortcode($total);
    // Keep only numbers and math signs
    $total = preg_replace("/[^0-9\+\-\/\*\(\)]/", "", $total);
    // Run the math
    return number_format(eval("return $total;"), 0, ",", ".");
});
 
// =============================================================================
// > PRIME RETOUR
// =============================================================================
add_shortcode("primeretour_stats", function ($labels) {
    return (new Controller)->view(
        "includes/contents/_primeretourstats",
        [
            "stats" => (array) json_decode((new Request("https://primeretour.be/api/totalcountstats/"))->get()->responseBody),
            "labels" => $labels
        ]
    );
});
 
 
     * Filters whether to call a shortcode callback.
     *
     * Returning a non-false value from filter will short-circuit the
     * shortcode generation process, returning that value instead.
     *
     * @since 4.7.0
     *
     * @param false|string $return      Short-circuit return value. Either false or the value to replace the shortcode with.
     * @param string       $tag         Shortcode name.
     * @param array|string $attr        Shortcode attributes array or empty string.
     * @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
     *
     * @param string       $output Shortcode output.
     * @param string       $tag    Shortcode name.
     * @param array|string $attr   Shortcode attributes array or empty string.
     * @param array        $m      Regular expression match array.
     */
    return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
 
/**
 * Search 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.
 * Assumes $content processed by KSES already.  Users with unfiltered_html
    if ( false === strpos( $content, '[' ) ) {
        return $content;
    }
 
    if ( empty( $shortcode_tags ) || ! is_array( $shortcode_tags ) ) {
        return $content;
    }
 
    // 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;
    }
 
    $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 );
 
    return $content;
}
 
/**
 * Retrieve the shortcode regular expression for searching.
 *
 * The regular expression combines the shortcode tags in the regular expression
 * in a regex class.
 *
 * The regular expression contains 6 different sub matches to help with parsing.
 *
 * 1 - An extra [ to allow for escaping shortcodes with double [[]]
 * 2 - The shortcode name
 * 3 - The shortcode argument list
 * 4 - The self closing /
 * 5 - The content of a shortcode when it wraps some content.
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 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`.
 * @return mixed The filtered value after all hooked functions are applied to it.
    *
    *  @param    $value (mixed) the value which was loaded from the database
    *  @param    $post_id (mixed) the $post_id from which the value was loaded
    *  @param    $field (array) the field array holding all the field options
    *
    *  @return    $value (mixed) the modified value
    */
    
    function format_value( $value, $post_id, $field ) {
        
        // bail early if no value
        if( empty($value) ) {
            
            return $value;
        
        }
        
        
        // apply filters
        $value = apply_filters( 'acf_the_content', $value );
        
        
        // follow the_content function in /wp-includes/post-template.php
        $value = str_replace(']]>', ']]&gt;', $value);
        
    
        return $value;
    }
    
}
 
 
// initialize
acf_register_field_type( 'acf_field_wysiwyg' );
 
endif; // class_exists check
 
?>
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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.
    // Do 'all' actions first.
    if ( isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
        $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 $args[0];
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $args[0], $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Checks if any filter has been registered for a hook.
 *
 * When using the `$callback` argument, this function may return a non-boolean value
 * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
 *
 * @since 2.5.0
 *
 * @global WP_Hook[] $wp_filter Stores all of the filters and actions.
 *
 * @param string                      $hook_name The name of the filter hook.
 * @param callable|string|array|false $callback  Optional. The callback to check for.
 *                                               This function can be called unconditionally to speculatively check
 *                                               a callback that may or may not exist. Default false.
    
    // Find field in args using index.
    $field = $args[ $index ];
    
    // Loop over variations and apply filters.
    foreach( $variations as $variation ) {
        
        // Get value from field.
        // First look for "backup" value ("_name", "_key").
        if( isset($field[ "_$variation" ]) ) {
            $value = $field[ "_$variation" ];
        } elseif( isset($field[ $variation ]) ) {
            $value = $field[ $variation ];
        } else {
            continue;
        }
        
        // Apply filters.
        if( $type === 'filter' ) {
            $args[0] = apply_filters_ref_array( "$filter/$variation=$value", $args );
        
        // Or do action.
        } else {
            do_action_ref_array( "$filter/$variation=$value", $args );
        }
    }
    
    // Return first arg.
    return $args[0];
}
 
// Register store.
acf_register_store( 'deprecated-hooks' );
 
/**
 * acf_add_deprecated_filter
 *
 * Registers a deprecated filter to run during the replacement.
 *
 * @date    25/1/19
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 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`.
 * @return mixed The filtered value after all hooked functions are applied to it.
    // Get field name.
    $field_name = $field['name'];
    
    // Check store.
    $store = acf_get_store( 'values' );
    if( $store->has( "$post_id:$field_name:formatted" ) ) {
        return $store->get( "$post_id:$field_name:formatted" );
    }
    
    /**
     * Filters the $value for use in a template function.
     *
     * @date    28/09/13
     * @since    5.0.0
     *
     * @param    mixed $value The value to preview.
     * @param    string $post_id The post ID for this value.
     * @param    array $field The field array.
     */
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    
    // Update store.
    $store->set( "$post_id:$field_name:formatted", $value );
 
    // Return value.
    return $value;
}
 
// Register variation.
acf_add_filter_variations( 'acf/format_value', array('type', 'name', 'key'), 2 );
 
/**
 * acf_update_value
 *
 * Updates the value for a given field and post_id.
 *
 * @date    28/09/13
 * @since    5.0.0
 *
 * @param    mixed $value The new value.
            foreach( array_keys($field['sub_fields']) as $j ) {
                
                // get sub field
                $sub_field = $field['sub_fields'][ $j ];
                
                
                // bail ealry if no name (tab)
                if( acf_is_empty($sub_field['name']) ) continue;
                
                
                // extract value
                $sub_value = acf_extract_var( $value[ $i ], $sub_field['key'] );
                
                
                // update $sub_field name
                $sub_field['name'] = "{$field['name']}_{$i}_{$sub_field['name']}";
                
                
                // format value
                $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
                
                
                // append to $row
                $value[ $i ][ $sub_field['_name'] ] = $sub_value;
                
            }
            
        }
        
        
        // return
        return $value;
        
    }
    
    
    /*
    *  validate_value
    *
    *  description
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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.
    // Do 'all' actions first.
    if ( isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
        $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 $args[0];
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $args[0], $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Checks if any filter has been registered for a hook.
 *
 * When using the `$callback` argument, this function may return a non-boolean value
 * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
 *
 * @since 2.5.0
 *
 * @global WP_Hook[] $wp_filter Stores all of the filters and actions.
 *
 * @param string                      $hook_name The name of the filter hook.
 * @param callable|string|array|false $callback  Optional. The callback to check for.
 *                                               This function can be called unconditionally to speculatively check
 *                                               a callback that may or may not exist. Default false.
    
    // Find field in args using index.
    $field = $args[ $index ];
    
    // Loop over variations and apply filters.
    foreach( $variations as $variation ) {
        
        // Get value from field.
        // First look for "backup" value ("_name", "_key").
        if( isset($field[ "_$variation" ]) ) {
            $value = $field[ "_$variation" ];
        } elseif( isset($field[ $variation ]) ) {
            $value = $field[ $variation ];
        } else {
            continue;
        }
        
        // Apply filters.
        if( $type === 'filter' ) {
            $args[0] = apply_filters_ref_array( "$filter/$variation=$value", $args );
        
        // Or do action.
        } else {
            do_action_ref_array( "$filter/$variation=$value", $args );
        }
    }
    
    // Return first arg.
    return $args[0];
}
 
// Register store.
acf_register_store( 'deprecated-hooks' );
 
/**
 * acf_add_deprecated_filter
 *
 * Registers a deprecated filter to run during the replacement.
 *
 * @date    25/1/19
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 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`.
 * @return mixed The filtered value after all hooked functions are applied to it.
    // Get field name.
    $field_name = $field['name'];
    
    // Check store.
    $store = acf_get_store( 'values' );
    if( $store->has( "$post_id:$field_name:formatted" ) ) {
        return $store->get( "$post_id:$field_name:formatted" );
    }
    
    /**
     * Filters the $value for use in a template function.
     *
     * @date    28/09/13
     * @since    5.0.0
     *
     * @param    mixed $value The value to preview.
     * @param    string $post_id The post ID for this value.
     * @param    array $field The field array.
     */
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    
    // Update store.
    $store->set( "$post_id:$field_name:formatted", $value );
 
    // Return value.
    return $value;
}
 
// Register variation.
acf_add_filter_variations( 'acf/format_value', array('type', 'name', 'key'), 2 );
 
/**
 * acf_update_value
 *
 * Updates the value for a given field and post_id.
 *
 * @date    28/09/13
 * @since    5.0.0
 *
 * @param    mixed $value The new value.
            foreach( array_keys($layout) as $j ) {
                
                // get sub field
                $sub_field = $layout[ $j ];
                
                
                // bail ealry if no name (tab)
                if( acf_is_empty($sub_field['name']) ) continue;
                
                
                // extract value
                $sub_value = acf_extract_var( $value[ $i ], $sub_field['key'] );
                
                
                // update $sub_field name
                $sub_field['name'] = "{$field['name']}_{$i}_{$sub_field['name']}";
                    
                
                // format value
                $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
                
                
                // append to $row
                $value[ $i ][ $sub_field['_name'] ] = $sub_value;
                
            }
            
        }
        
        
        // return
        return $value;
    }
    
    
    /*
    *  validate_value
    *
    *  description
    *
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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.
    // Do 'all' actions first.
    if ( isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
        $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 $args[0];
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $args[0], $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Checks if any filter has been registered for a hook.
 *
 * When using the `$callback` argument, this function may return a non-boolean value
 * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
 *
 * @since 2.5.0
 *
 * @global WP_Hook[] $wp_filter Stores all of the filters and actions.
 *
 * @param string                      $hook_name The name of the filter hook.
 * @param callable|string|array|false $callback  Optional. The callback to check for.
 *                                               This function can be called unconditionally to speculatively check
 *                                               a callback that may or may not exist. Default false.
    
    // Find field in args using index.
    $field = $args[ $index ];
    
    // Loop over variations and apply filters.
    foreach( $variations as $variation ) {
        
        // Get value from field.
        // First look for "backup" value ("_name", "_key").
        if( isset($field[ "_$variation" ]) ) {
            $value = $field[ "_$variation" ];
        } elseif( isset($field[ $variation ]) ) {
            $value = $field[ $variation ];
        } else {
            continue;
        }
        
        // Apply filters.
        if( $type === 'filter' ) {
            $args[0] = apply_filters_ref_array( "$filter/$variation=$value", $args );
        
        // Or do action.
        } else {
            do_action_ref_array( "$filter/$variation=$value", $args );
        }
    }
    
    // Return first arg.
    return $args[0];
}
 
// Register store.
acf_register_store( 'deprecated-hooks' );
 
/**
 * acf_add_deprecated_filter
 *
 * Registers a deprecated filter to run during the replacement.
 *
 * @date    25/1/19
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 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`.
 * @return mixed The filtered value after all hooked functions are applied to it.
    // Get field name.
    $field_name = $field['name'];
    
    // Check store.
    $store = acf_get_store( 'values' );
    if( $store->has( "$post_id:$field_name:formatted" ) ) {
        return $store->get( "$post_id:$field_name:formatted" );
    }
    
    /**
     * Filters the $value for use in a template function.
     *
     * @date    28/09/13
     * @since    5.0.0
     *
     * @param    mixed $value The value to preview.
     * @param    string $post_id The post ID for this value.
     * @param    array $field The field array.
     */
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    
    // Update store.
    $store->set( "$post_id:$field_name:formatted", $value );
 
    // Return value.
    return $value;
}
 
// Register variation.
acf_add_filter_variations( 'acf/format_value', array('type', 'name', 'key'), 2 );
 
/**
 * acf_update_value
 *
 * Updates the value for a given field and post_id.
 *
 * @date    28/09/13
 * @since    5.0.0
 *
 * @param    mixed $value The new value.
            foreach( array_keys($field['sub_fields']) as $j ) {
                
                // get sub field
                $sub_field = $field['sub_fields'][ $j ];
                
                
                // bail ealry if no name (tab)
                if( acf_is_empty($sub_field['name']) ) continue;
                
                
                // extract value
                $sub_value = acf_extract_var( $value[ $i ], $sub_field['key'] );
                
                
                // update $sub_field name
                $sub_field['name'] = "{$field['name']}_{$i}_{$sub_field['name']}";
                
                
                // format value
                $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
                
                
                // append to $row
                $value[ $i ][ $sub_field['_name'] ] = $sub_value;
                
            }
            
        }
        
        
        // return
        return $value;
        
    }
    
    
    /*
    *  validate_value
    *
    *  description
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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.
    // Do 'all' actions first.
    if ( isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
        $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 $args[0];
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $args[0], $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Checks if any filter has been registered for a hook.
 *
 * When using the `$callback` argument, this function may return a non-boolean value
 * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
 *
 * @since 2.5.0
 *
 * @global WP_Hook[] $wp_filter Stores all of the filters and actions.
 *
 * @param string                      $hook_name The name of the filter hook.
 * @param callable|string|array|false $callback  Optional. The callback to check for.
 *                                               This function can be called unconditionally to speculatively check
 *                                               a callback that may or may not exist. Default false.
    
    // Find field in args using index.
    $field = $args[ $index ];
    
    // Loop over variations and apply filters.
    foreach( $variations as $variation ) {
        
        // Get value from field.
        // First look for "backup" value ("_name", "_key").
        if( isset($field[ "_$variation" ]) ) {
            $value = $field[ "_$variation" ];
        } elseif( isset($field[ $variation ]) ) {
            $value = $field[ $variation ];
        } else {
            continue;
        }
        
        // Apply filters.
        if( $type === 'filter' ) {
            $args[0] = apply_filters_ref_array( "$filter/$variation=$value", $args );
        
        // Or do action.
        } else {
            do_action_ref_array( "$filter/$variation=$value", $args );
        }
    }
    
    // Return first arg.
    return $args[0];
}
 
// Register store.
acf_register_store( 'deprecated-hooks' );
 
/**
 * acf_add_deprecated_filter
 *
 * Registers a deprecated filter to run during the replacement.
 *
 * @date    25/1/19
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 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`.
 * @return mixed The filtered value after all hooked functions are applied to it.
    // Get field name.
    $field_name = $field['name'];
    
    // Check store.
    $store = acf_get_store( 'values' );
    if( $store->has( "$post_id:$field_name:formatted" ) ) {
        return $store->get( "$post_id:$field_name:formatted" );
    }
    
    /**
     * Filters the $value for use in a template function.
     *
     * @date    28/09/13
     * @since    5.0.0
     *
     * @param    mixed $value The value to preview.
     * @param    string $post_id The post ID for this value.
     * @param    array $field The field array.
     */
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    
    // Update store.
    $store->set( "$post_id:$field_name:formatted", $value );
 
    // Return value.
    return $value;
}
 
// Register variation.
acf_add_filter_variations( 'acf/format_value', array('type', 'name', 'key'), 2 );
 
/**
 * acf_update_value
 *
 * Updates the value for a given field and post_id.
 *
 * @date    28/09/13
 * @since    5.0.0
 *
 * @param    mixed $value The new value.
            'key'    => '',
            'type'    => '',
        ));
        
        
        // prevent formatting
        $format_value = false;
        
    }
    
    
    // get value for field
    $value = acf_get_value( $post_id, $field );
    
    
    // format value
    if( $format_value ) {
        
        // get value for field
        $value = acf_format_value( $value, $post_id, $field );
        
    }
    
    
    // return
    return $value;
     
}
 
 
/*
*  the_field()
*
*  This function is the same as echo get_field().
*
*  @type    function
*  @since    1.0.3
*  @date    29/01/13
*
*  @param    $selector (string) the field name or key
<?php
 
namespace Syltaen;
 
abstract class Data
{
 
    /**
     * Get the value of an ACF field
     *
     * @param string $key
     * @param int|string $post_id
     * @param $default Default value if none found
     * @param $filter Auto filter the value
     * @return mixed A field value
     */
    public static function get($key, $post_id = null, $default = "", $filter = false)
    {
        // get the value
        $value = \get_field($key, $post_id);
 
        // filter the value if suggested
        if ($filter && $value) {
            $value = static::filter($value, $filter);
        }
 
        return $value ?: $default;
    }
 
    /**
     * Transform the value to get something specific
     *
     * @param mixed $value The value to filter
     * @param string $filter The filter to use
     * @return mixed The filtered value
     */
    public static function filter($value, $filter)
    {
        switch ($filter) {
            case "int":
class PageController extends BaseController
{
    /**
     * Populate $this->data
     *
     * @param bool $spacial_page
     */
    public function __construct($args = [])
    {
        parent::__construct($args);
 
        $this->addData([
            // intro
            "intro_content" => "",
            "intro_bg",
            "intro_grad" => false,
            "(img:url) intro_badge",
 
            // content
            "@sections" => (new SectionsProcessor($this))->processEach(Data::get("sections")),
 
            // permissions
            "login_required",
            "login_required_redirect",
            "role_required",
            "role_required_list",
            "role_required_redirect"
        ]);
 
        // Permissions check
        $this->redirectNotAllowed();
 
        // Bare content template
        if (Data::get("bare-content")) $this->setupBareContent();
    }
 
 
 
    /**
     * Setup data to be used in a bare-contnet template
        // Clear obsolete flash data
        if (!$same_session_page) {
            Data::goToNextSessionPage();
        }
 
        // Class method call
        if (is_string($resp)) {
 
            // Extracts method
            $method = false;
            if (preg_match('/(.*)::(.*)/', $resp, $keys)) {
                $resp = $keys[1];
                $method = $keys[2];
            }
 
            // Add namespace to class
            $classname = "Syltaen\\$resp";
 
            // Instanciate the class with the arguments
            $class = new $classname($args);
 
            // Lauch mehtod if any
            if ($method) {
                $class->$method();
            }
        }
 
        // Closure function call
        if (is_callable($resp)) {
            $resp($args);
        }
 
        exit;
    }
 
    // ==================================================
    // > RULES
    // ==================================================
    public static function any($resp, $args = [])
    {
     * @param boolean $resp
     * @param array $args
     * @return boolean
     */
    public static function is($condition, $resp = false, $args = null, $prefix = "is_")
    {
        $conditions = (array) $condition;
 
        foreach ($conditions as $condition) {
            $argument = null;
 
            if (preg_match('/(.*):(.*)/', $condition, $parts)) {
                $condition = $parts[1];
                $argument  = $parts[2];
            }
 
            $condition = $prefix . $condition;
            if ($condition($argument)) {
                if ($resp) {
                    static::respond($resp, $args);
                }
                return true;
            };
        }
        return false;
    }
 
 
    /**
     * Website is in maintenance mode
     *
     * @param boolean $resp
     * @return void
     */
    public static function maintenance($resp = false)
    {
        if (Data::get("maintenance_mode", "option") && !current_user_can("administrator")) {
            static::respond($resp);
        }
    }
// ==================================================
// > API
// ==================================================
Route::custom("api", "ApiController", ["method", "target", "mode"]);
 
// ==================================================
// > NINJA FORM PREVIEW
// ==================================================
Route::query("nf_preview_form", "SpecialPageController::ninjaFormPreview");
 
// ==================================================
// > HOMEPAGE
// ==================================================
Route::is(["home", "front_page"], "HomeController::render");
 
// ==================================================
// > PAGES
// ==================================================
Route::is("page:".DashboardController::SLUG, "DashboardController::render");
Route::is("page", "PageController::render");
 
 
// ==================================================
// > 404
// ==================================================
Route::is("404", "SpecialPageController::error404");
            }
 
            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;
}
 
Arguments
  1. "/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-content/themes/syltaen/index.php"
    
<?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';
 
}
 
Arguments
  1. "/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-includes/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';
 
Arguments
  1. "/var/www/vhosts/bewapp.hungryminds.host/httpdocs/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
Key Value
syltaen_current_page
[]
syltaen_messages
[]
Key Value
SERVER_SOFTWARE
"Apache"
REQUEST_URI
"/espace-personnel/je-communique-les-resultats/"
USER
"bewapp"
HOME
"/var/www/vhosts/bewapp.hungryminds.host"
SCRIPT_NAME
"/index.php"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/espace-personnel/je-communique-les-resultats/"
REMOTE_PORT
"37516"
SCRIPT_FILENAME
"/var/www/vhosts/bewapp.hungryminds.host/httpdocs/index.php"
SERVER_ADMIN
"[no address given]"
CONTEXT_DOCUMENT_ROOT
"/var/www/vhosts/bewapp.hungryminds.host/httpdocs"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"https"
DOCUMENT_ROOT
"/var/www/vhosts/bewapp.hungryminds.host/httpdocs"
REMOTE_ADDR
"3.238.250.73"
SERVER_PORT
"443"
SERVER_ADDR
"172.31.40.112"
SERVER_NAME
"bewapp.hungryminds.host"
SERVER_SIGNATURE
"<address>Apache Server at bewapp.hungryminds.host Port 443</address>\n"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
HTTP_ACCEPT_ENCODING
"br,gzip"
HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.5"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
HTTP_CONNECTION
"close"
HTTP_X_REAL_IP
"3.238.250.73"
HTTP_HOST
"bewapp.hungryminds.host"
proxy-nokeepalive
"1"
HTTPS
"on"
HTTP_AUTHORIZATION
""
UNIQUE_ID
"ZBuG5KwfKHAAAF2Ge-IAAAAH"
REDIRECT_STATUS
"200"
REDIRECT_HTTPS
"on"
REDIRECT_HTTP_AUTHORIZATION
""
REDIRECT_UNIQUE_ID
"ZBuG5KwfKHAAAF2Ge-IAAAAH"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1679525604.2585
REQUEST_TIME
1679525604
empty
0. Whoops\Handler\PrettyPageHandler