reasons = apply_filters('allaccessible_deactivate_feedback_form_reasons', $defaultReasons, $plugin); } // Send plugin data wp_localize_script('allaccessible-deactivate-feedback-form', 'allaccessible_deactivate_feedback_form_plugins', $plugins); }); function get_allaccessible_localized_strings() { return array( 'quick_feedback' => __('AllAccessible Deactivation', 'allaccessible'), 'foreword' => __('If you have a moment, please let us know why you are deactivating AllAccessible. All submissions are anonymous and we only use this feedback to improve this plugin.', 'allaccessible'), 'do_not_attach_email' => __('Do not send my e-mail address with this feedback', 'allaccessible'), 'brief_description' => __('Please give us any feedback that could help us improve', 'allaccessible'), 'cancel' => __('Cancel', 'allaccessible'), 'skip_and_deactivate' => __('Skip & Deactivate', 'allaccessible'), 'submit_and_deactivate' => __('Submit & Deactivate', 'allaccessible'), 'please_wait' => __('Please wait', 'allaccessible'), 'thank_you' => __('Thank you!', 'allaccessible') ); } function get_default_reasons() { return array( 'suddenly-stopped-working' => array( 'option'=> __('The plugin suddenly stopped working', 'allaccessible'), 'comment' => array( 'type' => 'textarea', 'text' => __('We\'re sorry to hear that, check AllAccessible Support. Can you describe the issue?', 'allaccessible') ) ), 'plugin-broke-site' => array( 'option'=> __('The plugin broke my site', 'allaccessible'), 'comment' => array( 'type' => 'textarea', 'text' => __('We\'re sorry to hear that, check AllAccessible Support. Can you describe the issue?', 'allaccessible') ) ), 'no-longer-needed' => array( 'option'=> __('I don\'t need this plugin any more', 'allaccessible'), 'comment' => null ), 'found-better-plugin' => array( 'option' => __('I found a better plugin', 'allaccessible'), 'comment' => array( 'type' => 'texta', 'text' => __('Can you please share the name of the other plugin?', 'allaccessible') ) ), 'temporary-deactivation' => array( 'option' => __('It\'s a temporary deactivation, I\'m troubleshooting', 'allaccessible'), 'comment' => null ), 'other' => array( 'option' => __('Other', 'allaccessible'), 'comment' => array( 'type' => 'textarea', 'text' => __('Can you describe the issue?', 'allaccessible') ) ) ); } /** * Hook for adding plugins, pass an array of objects in the following format: * 'slug' => 'plugin-slug' * 'version' => 'plugin-version' * @return array The plugins in the format described above */ add_filter('allaccessible_deactivate_feedback_form_plugins', function($plugins) { return $plugins; });