diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-content/plugins/portfolio/bws_menu/deactivation-form.php --- a/wp/wp-content/plugins/portfolio/bws_menu/deactivation-form.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-content/plugins/portfolio/bws_menu/deactivation-form.php Tue Dec 15 13:49:49 2020 +0100 @@ -17,147 +17,152 @@ function bws_add_deactivation_feedback_dialog_box() { global $bstwbsftwppdtplgns_active_plugins; if ( empty( $bstwbsftwppdtplgns_active_plugins ) ) - return; + return; + + $contact_support_template = __( 'Need help? We are ready to answer your questions.', 'bestwebsoft' ) . ' ' . __( 'Contact Support', 'bestwebsoft' ) . ''; + + $reasons = array( + array( + 'id' => 'NOT_WORKING', + 'text' => __( 'The plugin is not working', 'bestwebsoft' ), + 'input_type' => 'textarea', + 'input_placeholder' => esc_attr__( "Kindly share what didn't work so we can fix it in future updates...", 'bestwebsoft' ) + ), + array( + 'id' => 'DIDNT_WORK_AS_EXPECTED', + 'text' => __( "The plugin didn't work as expected", 'bestwebsoft' ), + 'input_type' => 'textarea', + 'input_placeholder' => esc_attr__( 'What did you expect?', 'bestwebsoft' ) + ), + array( + 'id' => 'SUDDENLY_STOPPED_WORKING', + 'text' => __( 'The plugin suddenly stopped working', 'bestwebsoft' ), + 'input_type' => '', + 'input_placeholder' => '', + 'internal_message' => $contact_support_template + ), + array( + 'id' => 'BROKE_MY_SITE', + 'text' => __( 'The plugin broke my site', 'bestwebsoft' ), + 'input_type' => '', + 'input_placeholder' => '', + 'internal_message' => $contact_support_template + ), + array( + 'id' => 'COULDNT_MAKE_IT_WORK', + 'text' => __( "I couldn't understand how to get it work", 'bestwebsoft' ), + 'input_type' => '', + 'input_placeholder' => '', + 'internal_message' => $contact_support_template + ), + array( + 'id' => 'FOUND_A_BETTER_PLUGIN', + 'text' => __( 'I found a better plugin', 'bestwebsoft' ), + 'input_type' => 'textfield', + 'input_placeholder' => esc_attr__( "What's the plugin name?", 'bestwebsoft' ) + ), + array( + 'id' => 'GREAT_BUT_NEED_SPECIFIC_FEATURE', + 'text' => __( "The plugin is great, but I need specific feature that you don't support", 'bestwebsoft' ), + 'input_type' => 'textarea', + 'input_placeholder' => esc_attr__( 'What feature?', 'bestwebsoft' ) + ), + array( + 'id' => 'NO_LONGER_NEEDED', + 'text' => __( 'I no longer need the plugin', 'bestwebsoft' ), + 'input_type' => '', + 'input_placeholder' => '' + ), + array( + 'id' => 'TEMPORARY_DEACTIVATION', + 'text' => __( "It's a temporary deactivation, I'm just debugging an issue", 'bestwebsoft' ), + 'input_type' => '', + 'input_placeholder' => '' + ), + array( + 'id' => 'OTHER', + 'text' => __( 'Other', 'bestwebsoft' ), + 'input_type' => 'textfield', + 'input_placeholder' => '' + ) + ); + + $modal_html = '
+
+
+

' . __( 'Quick Feedback', 'bestwebsoft' ) . '

+
+

' . __( 'If you have a moment, please let us know why you are deactivating', 'bestwebsoft' ) . ":

    "; + + foreach ( $reasons as $reason ) { + $list_item_classes = 'bws-modal-reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' ); + + if ( ! empty( $reason['internal_message'] ) ) { + $list_item_classes .= ' has-internal-message'; + $reason_internal_message = $reason['internal_message']; + } else { + $reason_internal_message = ''; + } + + $modal_html .= '
  • + +
    ' . $reason_internal_message . '
    +
  • '; + } + $modal_html .= '
+ +
+
+ +
+
'; + + $script = ''; foreach ( $bstwbsftwppdtplgns_active_plugins as $basename => $plugin_data ) { $slug = dirname( $basename ); $plugin_id = sanitize_title( $plugin_data['Name'] ); - $contact_support_template = __( 'Need help? We are ready to answer your questions.', 'bestwebsoft' ) . ' ' . __( 'Contact Support', 'bestwebsoft' ) . ''; - - $reasons = array( - array( - 'id' => 'NOT_WORKING', - 'text' => __( 'The plugin is not working', 'bestwebsoft' ), - 'input_type' => 'textarea', - 'input_placeholder' => __( "Kindly share what didn't work so we can fix it in future updates...", 'bestwebsoft' ) - ), - array( - 'id' => 'DIDNT_WORK_AS_EXPECTED', - 'text' => __( "The plugin didn't work as expected", 'bestwebsoft' ), - 'input_type' => 'textarea', - 'input_placeholder' => __( 'What did you expect?', 'bestwebsoft' ) - ), - array( - 'id' => 'SUDDENLY_STOPPED_WORKING', - 'text' => __( 'The plugin suddenly stopped working', 'bestwebsoft' ), - 'input_type' => '', - 'input_placeholder' => '', - 'internal_message' => $contact_support_template - ), - array( - 'id' => 'BROKE_MY_SITE', - 'text' => __( 'The plugin broke my site', 'bestwebsoft' ), - 'input_type' => '', - 'input_placeholder' => '', - 'internal_message' => $contact_support_template - ), - array( - 'id' => 'COULDNT_MAKE_IT_WORK', - 'text' => __( "I couldn't understand how to get it work", 'bestwebsoft' ), - 'input_type' => '', - 'input_placeholder' => '', - 'internal_message' => $contact_support_template - ), - array( - 'id' => 'FOUND_A_BETTER_PLUGIN', - 'text' => __( 'I found a better plugin', 'bestwebsoft' ), - 'input_type' => 'textfield', - 'input_placeholder' => __( "What's the plugin name?", 'bestwebsoft' ) - ), - array( - 'id' => 'GREAT_BUT_NEED_SPECIFIC_FEATURE', - 'text' => __( "The plugin is great, but I need specific feature that you don't support", 'bestwebsoft' ), - 'input_type' => 'textarea', - 'input_placeholder' => __( 'What feature?', 'bestwebsoft' ) - ), - array( - 'id' => 'NO_LONGER_NEEDED', - 'text' => __( 'I no longer need the plugin', 'bestwebsoft' ), - 'input_type' => '', - 'input_placeholder' => '' - ), - array( - 'id' => 'TEMPORARY_DEACTIVATION', - 'text' => __( "It's a temporary deactivation, I'm just debugging an issue", 'bestwebsoft' ), - 'input_type' => '', - 'input_placeholder' => '' - ), - array( - 'id' => 'OTHER', - 'text' => __( 'Other', 'bestwebsoft' ), - 'input_type' => 'textfield', - 'input_placeholder' => '' - ) - ); - - $reasons_list_items_html = ''; - - foreach ( $reasons as $reason ) { - $list_item_classes = 'bws-modal-reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' ); - - if ( ! empty( $reason['internal_message'] ) ) { - $list_item_classes .= ' has-internal-message'; - $reason_internal_message = $reason['internal_message']; - } else { - $reason_internal_message = ''; - } - - $reasons_list_items_html .= '
  • - -
    ' . $reason_internal_message . '
    -
  • '; - } ?> - - 'POST', 'body' => $options, 'timeout' => 15,