slug => label */ function get_deactivation_reasons(): array { return array( 'temporary' => __( 'Only switching it off for a moment', 'double-opt-in' ), 'not_sending' => __( 'Confirmation emails did not arrive', 'double-opt-in' ), 'complicated' => __( 'I could not get it configured', 'double-opt-in' ), 'conflict' => __( 'It clashed with another plugin or my theme', 'double-opt-in' ), 'form_plugin' => __( 'It did not work with my form plugin', 'double-opt-in' ), 'other_plugin' => __( 'I switched to something else', 'double-opt-in' ), ); } /** * Print the dialog on the plugins screen. */ function render_deactivation_survey(): void { if ( ! current_user_can( 'activate_plugins' ) ) { return; } if ( (int) get_option( 'f12_doi_survey_done', 0 ) === 1 ) { return; } $reasons = get_deactivation_reasons(); $feedback = get_feedback_url( 'deactivation' ); $nonce = wp_create_nonce( 'f12_doi_survey' ); ?>