/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php
return $this->translate( $form );
}
public function translate_conditional_logic( $form ) {
$st_context = $this->get_st_context( $form['id'] );
return $this->get_conditional_logic()->translate_conditional_logic( $form, $st_context );
}
/**
* @return GFML_Conditional_Logic
*/
public function get_conditional_logic() {
return new GFML_Conditional_Logic();
}
private function get_global_strings( &$form, $st_context ) {
$snh = new GFML_String_Name_Helper();
if ( isset( $form['title'] ) ) {
$form['title'] = icl_t( $st_context, $snh->get_form_title(), $form['title'] );
}
if ( isset( $form['description'] ) ) {
$form['description'] = icl_t( $st_context, $snh->get_form_description(), $form['description'] );
}
if ( CustomIndicator::hasCustomRequiredIndicator( $form ) ) {
$form[ CustomIndicator::REQUIRED_INDICATOR_CUSTOM_VALUE ] = icl_t( $st_context, $snh->getFormCustomRequiredIndicator(), $form[ CustomIndicator::REQUIRED_INDICATOR_CUSTOM_VALUE ] );
}
if ( isset( $form['button']['text'] ) ) {
$form['button']['text'] = icl_t( $st_context, $snh->get_form_submit_button(), $form['button']['text'] );
}
if ( isset( $form['save']['button']['text'] ) ) {
$form['save']['button']['text'] = icl_t( $st_context, $snh->get_form_save_and_continue_later_text(), $form['save']['button']['text'] );
}
}
private function maybe_translate_placeholder( $field, $st_context, $form ) {
$snh = new GFML_String_Name_Helper();
$snh->field = $field;
$string_name = $snh->get_field_placeholder();
Arguments
"Call to undefined function icl_t()"
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php
*
* @param array $form
*
* @return array
*/
private function translate( $form ) {
global $sitepress;
// Cache.
$current_lang = $sitepress->get_current_language();
if ( isset( $this->current_forms[ $form['id'] ][ $current_lang ] ) ) {
return $this->current_forms[ $form['id'] ][ $current_lang ];
}
$st_context = $this->get_st_context( $form['id'] );
$snh = new GFML_String_Name_Helper();
$form = $this->populate_translated_values( $form, $st_context );
// Form settings.
$this->get_global_strings( $form, $st_context );
// Pagination.
if ( ! empty( $form['pagination'] ) ) {
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found
// Paging Page Names - $form["pagination"]["pages"][i].
if ( isset( $form['pagination']['pages'] ) && is_array( $form['pagination']['pages'] ) ) {
foreach ( $form['pagination']['pages'] as $page_index => $page_title ) {
$snh->page_index = $page_index;
$form['pagination']['pages'][ $page_index ] = icl_t( $st_context, $snh->get_form_pagination_page_title(), $page_title );
}
}
// Completion text.
if ( ! empty( $form['pagination']['progressbar_completion_text'] ) ) {
$form['pagination']['progressbar_completion_text'] = icl_t( $st_context, $snh->get_form_pagination_completion_text(), $form['pagination']['progressbar_completion_text'] );
}
// Last page button text.
// todo: not registered at my tests.
if ( ! empty( $form['lastPageButton']['text'] ) ) {
$form['lastPageButton']['text'] = icl_t( $st_context, $snh->get_form_pagination_last_page_button_text(), $form['lastPageButton']['text'] );
}
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php
*
* @since 1.6.0
*
* @param array $form The Gravity Form data after 'gform_pre_render'
* @param string $st_context The context
*/
return apply_filters( 'wpml_gf_translate_strings', $form, $st_context );
}
/**
* Front-end form rendering.
*
* @global object $sitepress
*
* @param array $form
*
* @return array
*/
public function gform_pre_render( $form ) {
return $this->translate( $form );
}
public function translate_conditional_logic( $form ) {
$st_context = $this->get_st_context( $form['id'] );
return $this->get_conditional_logic()->translate_conditional_logic( $form, $st_context );
}
/**
* @return GFML_Conditional_Logic
*/
public function get_conditional_logic() {
return new GFML_Conditional_Logic();
}
private function get_global_strings( &$form, $st_context ) {
$snh = new GFML_String_Name_Helper();
if ( isset( $form['title'] ) ) {
$form['title'] = icl_t( $st_context, $snh->get_form_title(), $form['title'] );
}
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/class-wp-hook.php
$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.
*/
public function do_action( $args ) {
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/plugin.php
$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`.
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms/gravityforms.php
$filter = $filter[0];
$args = array_slice( $args, 2 );
} else {
//_deprecated_argument( 'gf_apply_filters', '1.9.14.20', "Modifiers should no longer be passed as a separate parameter. Combine the filter name and modifier(s) into an array and pass that array as the first parameter of the function. Example: gf_apply_filters( array( 'action_name', 'mod1', 'mod2' ), \$value, \$arg1, \$arg2 );" );
// func parameters are: $filter, $modifier, $value
$modifiers = ! is_array( $value ) ? array( $value ) : $value;
$value = $args[2];
$args = array_slice( $args, 3 );
}
// Add an empty modifier so the base filter will be applied as well
array_unshift( $modifiers, '' );
$args = array_pad( $args, 10, null );
// Apply modified versions of filter
foreach ( $modifiers as $modifier ) {
$modifier = rgblank( $modifier ) ? '' : sprintf( '_%s', $modifier );
$filter .= $modifier;
$value = apply_filters( $filter, $value, $args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7], $args[8], $args[9] );
}
return $value;
}
}
if ( ! function_exists( 'gf_do_action' ) ) {
/**
* Gravity Forms pre-processing for do_action.
*
* Allows additional actions based on form and field ID to be defined easily.
*
* @since 1.9.14.20 Modifiers should no longer be passed as a separate parameter.
* @since 1.9.12
* @access public
*
* @param string|array $action The action.
*/
function gf_do_action( $action ) {
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms/form_display.php
*
* @return array Returns the form object after being filtered by the gform_pre_render filter.
*/
public static function gform_pre_render( $form, $context, $ajax = null, $field_values = null ) {
$form_id = rgar( $form, 'id' );
$cache_key = $form_id . '_' . $context;
if ( ! isset( self::$cached_forms[ $cache_key ] ) ) {
/**
* Fired right before the form rendering process. Allow users to manipulate the form object before it gets displayed in the front end.
*
* @since 2.9.0 Added the $context parameter.
*
* @param array $form The form object being filtered.
* @param bool|null $ajax Whether the form is being displayed via AJAX. Only used when $context is 'form_display'.
* @param array|null $field_values The field values to be used to populate the form. Only used when $context is 'form_display'.
* @param string $context The context that the method is being called in. Possible values are 'form_display' and 'form_config'.
*/
self::$cached_forms[ $cache_key ] = gf_apply_filters( array( 'gform_pre_render', $form_id ), $form, $ajax, $field_values, $context );
}
return self::$cached_forms[ $cache_key ];
}
/**
* Flushes the forms cached by the gform_pre_render method.
*
* @since 2.9.0
*
* @param string $cache_key The cache key to flush. The format is FORM-ID_CONTEXT. Defaults to null and if not provided, all cached forms will be flushed.
*
* @return void
*/
public static function flush_cached_forms( $cache_key = null ) {
if ( $cache_key ) {
unset( self::$cached_forms[ $cache_key ] );
} else {
self::$cached_forms = array();
}
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms/form_display.php
*/
gf_do_action( array( 'gform_post_submission', $form['id'] ), $lead, $form );
} else {
/**
* Fired after the page changes on a multi-page form
*
* @param array $form The Form object
* @param int $submission_info['source_page_number'] The page that was submitted
* @param int $submission_info['page_number'] The page that the user is being sent to
*/
gf_do_action( array( 'gform_post_paging', $form['id'] ), $form, $submission_info['source_page_number'], $submission_info['page_number'] );
}
}
} elseif ( ! current_user_can( 'administrator' ) && ! $view_counter_disabled ) {
RGFormsModel::insert_form_view( $form_id );
}
}
// Running $form through the gform_pre_render filter.
$form = self::gform_pre_render( $form, 'form_display', $ajax, $field_values );
if ( empty( $form ) ) {
return self::get_form_not_found_html( $form_id, $ajax );
}
$has_pages = self::has_pages( $form );
//calling tab index filter
GFCommon::$tab_index = gf_apply_filters( array( 'gform_tabindex', $form_id ), $tabindex, $form );
//Don't display inactive forms
if ( ! $force_display && ! $is_postback ) {
$form_info = RGFormsModel::get_form( $form_id );
if ( empty( $form_info ) || ! $form_info->is_active ) {
return '';
}
// If form requires login, check if user is logged in
if ( GFCommon::form_requires_login( $form ) ) {
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms/gravityforms.php
if ( defined( 'DOING_AJAX' ) && DOING_AJAX && ( ( isset( $_POST['form_id'] ) && rgpost( 'action' ) === 'rg_select_export_form' ) || ( isset( $_POST['export_form'] ) && rgpost( 'action' ) === 'gf_process_export' ) ) ) {
return 'export_entry_ajax';
}
return false;
}
/**
* Gets the form.
*
* @since Unknown
* @access public
*
* @uses GFFormDisplay::get_form()
* @uses GFCommon::get_base_path()
*/
public static function get_form( $form_id, $display_title = true, $display_description = true, $force_display = false, $field_values = null, $ajax = false, $tabindex = 0, $theme = null, $style_settings = null ) {
require_once( GFCommon::get_base_path() . '/form_display.php' );
return GFFormDisplay::get_form( $form_id, $display_title, $display_description, $force_display, $field_values, $ajax, $tabindex, $theme, $style_settings );
}
/**
* Runs when the Forms menu item is clicked.
*
* Checks to see if the installation wizard should be displayed instead.
*
* @since Unknown
* @access public
*/
public static function new_form() {
if ( self::maybe_display_wizard() ) {
return;
};
self::form_list_page();
}
/**
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/gravityforms/gravityforms.php
break;
}
//displaying form
$title = strtolower( $title ) == 'false' ? false : true;
$description = strtolower( $description ) == 'false' ? false : true;
$field_values = htmlspecialchars_decode( $field_values );
$field_values = str_replace( array( '&', '[', ']' ), array( '&', '[', ']' ), $field_values );
$ajax = strtolower( $ajax ) == 'true' ? true : false;
//using name to lookup form if id is not specified
if ( empty( $id ) ) {
$id = $name;
}
parse_str( $field_values, $field_value_array ); //parsing query string like string for field values and placing them into an associative array
$field_value_array = stripslashes_deep( $field_value_array );
$shortcode_string = self::get_form( $id, $title, $description, false, $field_value_array, $ajax, $tabindex, $theme, $styles );
}
/**
* Filters the shortcode.
*
* @since Unknown
*
* @param string $shortcode_string The full shortcode string.
* @param array $attributes The attributes within the shortcode.
* @param string $content The content of the shortcode, if available.
*/
$shortcode_string = apply_filters( "gform_shortcode_{$action}", $shortcode_string, $attributes, $content );
return $shortcode_string;
}
/**
* Includes the add-on framework.
*
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/shortcodes.php
*
* 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.
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/shortcodes.php
// 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
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/themes/wat-wp-theme/app/gutenberg/blocks/formulaire/formulaire.php
<div class="wp-block-acf-formulaire">
<div class="wrapper">
<?php
$type = get_field('type');
if ($type == "brevo") {
$script_brevo = get_field('script_brevo');
echo $script_brevo;
}else{
$form = get_field('formulaire');
if (!empty($form)) {
echo do_shortcode('[gravityform id="'.$form.'" title="false"]');
if (is_admin()) {
echo "Le formulaire s'affichera en front.";
}
?>
<p class="obligatoire"><?php _e('* Champs obligatoires', 'cve'); ?></p>
<?php
}
}
?>
</div>
</div>
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/advanced-custom-fields-pro/pro/blocks.php
/**
* Locate and include an ACF block's template.
*
* @since 6.0.4
*
* @param array $block The block props.
*/
function acf_block_render_template( $block, $content, $is_preview, $post_id, $wp_block, $context ) {
// Locate template.
if ( isset( $block['path'] ) && file_exists( $block['path'] . '/' . $block['render_template'] ) ) {
$path = $block['path'] . '/' . $block['render_template'];
} elseif ( file_exists( $block['render_template'] ) ) {
$path = $block['render_template'];
} else {
$path = locate_template( $block['render_template'] );
}
// Include template.
if ( file_exists( $path ) ) {
include $path;
} elseif ( $is_preview ) {
echo acf_esc_html( apply_filters( 'acf/blocks/template_not_found_message', '<p>' . __( 'The render template for this ACF Block was not found', 'acf' ) . '</p>' ) );
}
}
/**
* Returns an array of all fields for the given block.
*
* @date 24/10/18
* @since 5.8.0
*
* @param array $block The block props.
* @return array
*/
function acf_get_block_fields( $block ) {
$fields = array();
// We need at least a block name to check.
if ( empty( $block['name'] ) ) {
return $fields;
Arguments
"/var/www/cvegroup-dev.agence-wat.net/www/wp-content/themes/wat-wp-theme/app/gutenberg/blocks/formulaire/formulaire.php"
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/class-wp-hook.php
$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.
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/class-wp-hook.php
} 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.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/plugin.php
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() 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_actions Stores the number of times each action 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 action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/advanced-custom-fields-pro/pro/blocks.php
// Find post_id if not defined.
if ( ! $post_id ) {
$post_id = get_the_ID();
}
// Enqueue block type assets.
acf_enqueue_block_type_assets( $block );
$block = acf_add_block_meta_values( $block, $post_id );
// Setup postdata allowing get_field() to work.
acf_setup_meta( $block['data'], $block['id'], true );
// Call render_callback.
if ( is_callable( $block['render_callback'] ) ) {
call_user_func( $block['render_callback'], $block, $content, $is_preview, $post_id, $wp_block, $context );
// Or include template.
} elseif ( $block['render_template'] ) {
do_action( 'acf_block_render_template', $block, $content, $is_preview, $post_id, $wp_block, $context );
}
// Reset postdata.
acf_reset_meta( $block['id'] );
}
/**
* Locate and include an ACF block's template.
*
* @since 6.0.4
*
* @param array $block The block props.
*/
function acf_block_render_template( $block, $content, $is_preview, $post_id, $wp_block, $context ) {
// Locate template.
if ( isset( $block['path'] ) && file_exists( $block['path'] . '/' . $block['render_template'] ) ) {
$path = $block['path'] . '/' . $block['render_template'];
} elseif ( file_exists( $block['render_template'] ) ) {
$path = $block['render_template'];
} else {
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/advanced-custom-fields-pro/pro/blocks.php
$block = acf_add_block_meta_values( $block, $post_id );
acf_setup_meta( $block['data'], $block['id'], true );
if ( ! empty( $block['validate'] ) ) {
$validation = acf_get_block_validation_state( $block, false, false, true );
}
$fields = acf_get_block_fields( $block );
if ( $fields ) {
acf_prefix_fields( $fields, "acf-{$block['id']}" );
echo '<div class="acf-block-fields acf-fields" data-block-id="' . esc_attr( $block['id'] ) . '">';
acf_render_fields( $fields, acf_ensure_block_id_prefix( $block['id'] ), 'div', 'field' );
echo '</div>';
} else {
echo acf_get_empty_block_form_html( $attributes['name'] ); //phpcs:ignore -- escaped in function.
}
} else {
// Capture block render output.
acf_render_block( $attributes, $content, $is_preview, $post_id, $wp_block, $context );
if ( $is_preview && ! $is_ajax_render ) {
/**
* If we're in preloaded preview, we need to get the validation state for a preview too.
* Because the block render resets meta once it's finished to not pollute $post_id, we need to redo that process here.
*/
$block = acf_prepare_block( $attributes );
$block = acf_add_block_meta_values( $block, $post_id );
acf_setup_meta( $block['data'], $block['id'], true );
if ( ! empty( $block['validate'] ) ) {
$validation = acf_get_block_validation_state( $block, false, false, true );
}
}
}
$html = ob_get_clean();
$html = is_string( $html ) ? $html : '';
// Replace <InnerBlocks /> placeholder on front-end, or if we're rendering an ACF block inside another ACF block template.
if ( ! $is_preview || doing_action( 'acf_block_render_template' ) ) {
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/plugins/advanced-custom-fields-pro/pro/blocks.php
* @param WP_Block $wp_block The block instance (since WP 5.5).
* @return string The block HTML.
*/
function acf_render_block_callback( $attributes, $content = '', $wp_block = null ) {
$is_preview = false;
$post_id = get_the_ID();
// Set preview flag to true when rendering for the block editor.
if ( is_admin() && acf_is_block_editor() ) {
$is_preview = true;
}
// If ACF's block save method hasn't been called yet, try to initialize a default block.
if ( empty( $attributes['name'] ) && ! empty( $wp_block->name ) ) {
$attributes['name'] = $wp_block->name;
}
// Return rendered block HTML.
return acf_rendered_block( $attributes, $content, $is_preview, $post_id, $wp_block );
}
/**
* Returns the rendered block HTML.
*
* @date 28/2/19
* @since 5.7.13
*
* @param array $attributes The block attributes.
* @param string $content The block content.
* @param boolean $is_preview Whether or not the block is being rendered for editing preview.
* @param integer $post_id The current post being edited or viewed.
* @param WP_Block $wp_block The block instance (since WP 5.5).
* @param array $context The block context array.
* @param boolean $is_ajax_render Whether or not this is an ACF AJAX render.
* @return string The block HTML.
*/
function acf_rendered_block( $attributes, $content = '', $is_preview = false, $post_id = 0, $wp_block = null, $context = false, $is_ajax_render = false ) {
$mode = isset( $attributes['mode'] ) ? $attributes['mode'] : 'auto';
$form = ( 'edit' === $mode && $is_preview );
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/class-wp-block.php
}
++$index;
}
}
}
if ( ! empty( $computed_attributes ) && ! empty( $block_content ) ) {
foreach ( $computed_attributes as $attribute_name => $source_value ) {
$block_content = $this->replace_html( $block_content, $attribute_name, $source_value );
}
}
if ( $is_dynamic ) {
$global_post = $post;
$parent = WP_Block_Supports::$block_to_render;
WP_Block_Supports::$block_to_render = $this->parsed_block;
$block_content = (string) call_user_func( $this->block_type->render_callback, $this->attributes, $block_content, $this );
WP_Block_Supports::$block_to_render = $parent;
$post = $global_post;
}
if ( ( ! empty( $this->block_type->script_handles ) ) ) {
foreach ( $this->block_type->script_handles as $script_handle ) {
wp_enqueue_script( $script_handle );
}
}
if ( ! empty( $this->block_type->view_script_handles ) ) {
foreach ( $this->block_type->view_script_handles as $view_script_handle ) {
wp_enqueue_script( $view_script_handle );
}
}
if ( ! empty( $this->block_type->view_script_module_ids ) ) {
foreach ( $this->block_type->view_script_module_ids as $view_script_module_id ) {
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/class-wp-block.php
$block_content .= $chunk;
} else {
$inner_block = $this->inner_blocks[ $index ];
$parent_block = $this;
/** This filter is documented in wp-includes/blocks.php */
$pre_render = apply_filters( 'pre_render_block', null, $inner_block->parsed_block, $parent_block );
if ( ! is_null( $pre_render ) ) {
$block_content .= $pre_render;
} else {
$source_block = $inner_block->parsed_block;
/** This filter is documented in wp-includes/blocks.php */
$inner_block->parsed_block = apply_filters( 'render_block_data', $inner_block->parsed_block, $source_block, $parent_block );
/** This filter is documented in wp-includes/blocks.php */
$inner_block->context = apply_filters( 'render_block_context', $inner_block->context, $inner_block->parsed_block, $parent_block );
$block_content .= $inner_block->render();
}
++$index;
}
}
}
if ( ! empty( $computed_attributes ) && ! empty( $block_content ) ) {
foreach ( $computed_attributes as $attribute_name => $source_value ) {
$block_content = $this->replace_html( $block_content, $attribute_name, $source_value );
}
}
if ( $is_dynamic ) {
$global_post = $post;
$parent = WP_Block_Supports::$block_to_render;
WP_Block_Supports::$block_to_render = $this->parsed_block;
$block_content = (string) call_user_func( $this->block_type->render_callback, $this->attributes, $block_content, $this );
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/blocks.php
*
* @param array $context Default context.
* @param array $parsed_block {
* An associative array of the block being rendered. See WP_Block_Parser_Block.
*
* @type string $blockName Name of block.
* @type array $attrs Attributes from block comment delimiters.
* @type array[] $innerBlocks List of inner blocks. An array of arrays that
* have the same structure as this one.
* @type string $innerHTML HTML from inside block comment delimiters.
* @type array $innerContent List of string fragments and null markers where
* inner blocks were found.
* }
* @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block.
*/
$context = apply_filters( 'render_block_context', $context, $parsed_block, $parent_block );
$block = new WP_Block( $parsed_block, $context );
return $block->render();
}
/**
* Parses blocks out of a content string.
*
* @since 5.0.0
*
* @param string $content Post content.
* @return array[] {
* Array of block structures.
*
* @type array ...$0 {
* An associative array of a single parsed block object. See WP_Block_Parser_Block.
*
* @type string $blockName Name of block.
* @type array $attrs Attributes from block comment delimiters.
* @type array[] $innerBlocks List of inner blocks. An array of arrays that
* have the same structure as this one.
* @type string $innerHTML HTML from inside block comment delimiters.
* @type array $innerContent List of string fragments and null markers where
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/blocks.php
$parser_class = apply_filters( 'block_parser_class', 'WP_Block_Parser' );
$parser = new $parser_class();
return $parser->parse( $content );
}
/**
* Parses dynamic blocks out of `post_content` and re-renders them.
*
* @since 5.0.0
*
* @param string $content Post content.
* @return string Updated post content.
*/
function do_blocks( $content ) {
$blocks = parse_blocks( $content );
$output = '';
foreach ( $blocks as $block ) {
$output .= render_block( $block );
}
// If there are blocks in this content, we shouldn't run wpautop() on it later.
$priority = has_filter( 'the_content', 'wpautop' );
if ( false !== $priority && doing_filter( 'the_content' ) && has_blocks( $content ) ) {
remove_filter( 'the_content', 'wpautop', $priority );
add_filter( 'the_content', '_restore_wpautop_hook', $priority + 1 );
}
return $output;
}
/**
* If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards,
* for subsequent `the_content` usage.
*
* @since 5.0.0
* @access private
*
* @param string $content The post content running through this filter.
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/class-wp-hook.php
$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.
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/plugin.php
$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`.
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/post-template.php
/**
* Displays the post content.
*
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param bool $strip_teaser Optional. Strip teaser content before the more text. Default false.
*/
function the_content( $more_link_text = null, $strip_teaser = false ) {
$content = get_the_content( $more_link_text, $strip_teaser );
/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]>', $content );
echo $content;
}
/**
* Retrieves the post content.
*
* @since 0.71
* @since 5.2.0 Added the `$post` parameter.
*
* @global int $page Page number of a single post/page.
* @global int $more Boolean indicator for whether single post/page is being viewed.
* @global bool $preview Whether post/page is in preview mode.
* @global array $pages Array of all pages in post/page. Each array element contains
* part of the content separated by the `<!--nextpage-->` tag.
* @global int $multipage Boolean indicator for whether multiple pages are in play.
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param bool $strip_teaser Optional. Strip teaser content before the more text. Default false.
* @param WP_Post|object|int $post Optional. WP_Post instance or Post ID/object. Default null.
/var/www/cvegroup-dev.agence-wat.net/www/wp-content/themes/wat-wp-theme/template-partenaires-financiers-creation-compte.php
<?php /* Template Name: Partenaires financiers - Création de compte */ ?>
<?php get_header(); ?>
<div class="container_partenaires_financiers_creation_compte">
<?php the_content(); ?>
</div>
<?php get_footer(); ?>
/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/template-loader.php
}
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
"/var/www/cvegroup-dev.agence-wat.net/www/wp-content/themes/wat-wp-theme/template-partenaires-financiers-creation-compte.php"
/var/www/cvegroup-dev.agence-wat.net/www/wp-blog-header.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
"/var/www/cvegroup-dev.agence-wat.net/www/wp-includes/template-loader.php"
/var/www/cvegroup-dev.agence-wat.net/www/index.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
"/var/www/cvegroup-dev.agence-wat.net/www/wp-blog-header.php"