From 71f5a3673bfa4346a4adf0b15b16fd7a4190f159 Mon Sep 17 00:00:00 2001 From: Antoine Greuzard Date: Fri, 21 Jul 2023 16:29:02 +0200 Subject: [PATCH] FIX description --- modal-form-brochure.php | 342 +++++++++++++++++++--------------------- 1 file changed, 164 insertions(+), 178 deletions(-) diff --git a/modal-form-brochure.php b/modal-form-brochure.php index ae46fb6..73a41fd 100644 --- a/modal-form-brochure.php +++ b/modal-form-brochure.php @@ -1,7 +1,7 @@ + function influactive_forms_error(): void { + ?>
-

+

- + ?> - + // Start output buffering + ob_start(); + ?>
-

+

- +
- +function modal_form_fields_callback(): void { + $form_title = get_option( 'modal_form_title', __( 'Do you want to download this product sheet?', 'influactive-modal-form-brochure' ) ); + $form_description = get_option( 'modal_form_description', __( 'In order to receive your product sheet, please fill in your information below, we will send you a link by email to download it.', 'influactive-modal-form-brochure' ) ); + $form_submit_text = get_option( 'modal_form_submit_text', __( 'Submit', 'influactive-modal-form-brochure' ) ); + $file = get_option( 'modal_form_file_select', false ); + $form_select = get_option( 'modal_form_select', false ); + ?>
- + - - 'modal_form_description', - 'media_buttons' => false, - 'textarea_rows' => 6, - 'tinymce' => true, - ) - ); - ?> + value=""> + + 'modal_form_description', + 'media_buttons' => false, + 'textarea_rows' => 6, + 'tinymce' => true, + ) ); + ?> - + + value="">
- + + id="upload-button">
- - [ - 0 => 0, - ], - ]; - // Query for all posts - $args = array( - 'post_type' => 'any', - 'post_status' => 'publish', - 'nopaging' => true, - ); - $posts_query = new WP_Query($args); - if (empty($selected_posts)) { - $selected_posts['modal_form_posts'] = array(); - } - ?> + + [ + 0 => 0, + ], + ]; + // Query for all posts + $args = array( + 'post_type' => 'any', + 'post_status' => 'publish', + 'nopaging' => true, + ); + $posts_query = new WP_Query( $args ); + if ( empty( $selected_posts ) ) { + $selected_posts['modal_form_posts'] = array(); + } + ?>
- ' . __("Settings", "influactive-modal-form-brochure") . '', - ); +function add_action_links( $links ): array { + $mylinks = array( + '' . __( "Settings", "influactive-modal-form-brochure" ) . '', + ); - return array_merge($links, $mylinks); + return array_merge( $links, $mylinks ); } -add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'add_action_links'); +add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'add_action_links' ); -add_action('plugins_loaded', 'load_modal_form_textdomain'); -function load_modal_form_textdomain(): void -{ - load_plugin_textdomain('influactive-modal-form-brochure', false, dirname(plugin_basename(__FILE__)) . '/languages/'); +add_action( 'plugins_loaded', 'load_modal_form_textdomain' ); +function load_modal_form_textdomain(): void { + load_plugin_textdomain( 'influactive-modal-form-brochure', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); }