add_shortcode( 'icl', 'icl_wpcf7_shortcode_handler', true ); return $shortcode_manager->do_shortcode( $message ); } /* Warning message */ add_action( 'wpcf7_admin_before_subsubsub', 'icl_wpcf7_display_warning_message' ); function icl_wpcf7_display_warning_message( &$contact_form ) { if ( ! $contact_form ) return; $has_icl_tags = (bool) $contact_form->form_scan_shortcode( array( 'type' => array( 'icl' ) ) ); if ( ! $has_icl_tags ) { $messages = (array) $contact_form->messages; $shortcode_manager = new WPCF7_ShortcodeManager(); $shortcode_manager->add_shortcode( 'icl', create_function( '$tag', 'return null;' ), true ); foreach ( $messages as $message ) { if ( $shortcode_manager->scan_shortcode( $message ) ) { $has_icl_tags = true; break; } } } if ( ! $has_icl_tags ) return; $message = __( "This contact form contains [icl] tags, but they are obsolete and no longer functioning on this version of Contact Form 7. There is a simpler way for creating contact forms of other languages and you are recommended to use it.", 'wpcf7' ); echo '
' . $message . '