first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace WPML\CF7;
class Shortcodes implements \IWPML_Frontend_Action {
public function add_hooks() {
add_filter( 'shortcode_atts_wpcf7', [ $this, 'translate_shortcode_form_id' ] );
}
/**
* Translate the `id` in the shortcode attributes on-the-fly.
*
* @param array $out Shortcode attributes to be filtered.
*
* @return array
*/
public function translate_shortcode_form_id( $out ) {
$out['id'] = apply_filters( 'wpml_object_id', $out['id'], Constants::POST_TYPE, true );
return $out;
}
}