Skip to content

Commit

Permalink
Rename $args to $l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Jun 16, 2024
1 parent 1887964 commit c23f47d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
array( 'in_footer' => true )
);

$args = array(
$l10n = array(
'apiSettings' => array(
'root' => sanitize_url( rest_url( 'contact-form-7/v1' ) ),
'namespace' => 'contact-form-7/v1',
Expand Down Expand Up @@ -164,11 +164,11 @@ function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
and wpcf7_validate_configuration() ) {
$config_validator = new WPCF7_ConfigValidator( $post );
$config_validator->restore();
$args['configValidator']['errors'] =
$l10n['configValidator']['errors'] =
$config_validator->collect_error_messages();
}

wp_localize_script( 'wpcf7-admin', 'wpcf7', $args );
wp_localize_script( 'wpcf7-admin', 'wpcf7', $l10n );

add_thickbox();

Expand Down

0 comments on commit c23f47d

Please sign in to comment.