admin_url( 'admin-ajax.php' ), 'home_url' => site_url(), 'plugin_path' => MAPP_MORTGAGE_APP_BASE_URL, 'post_meta' => $mortgage_application_form_fields, 'test_email_nonce' => wp_create_nonce( 'mapp_send_test_email' ), ); wp_localize_script( 'ma_js_admin', 'mortgage_application', $url_array ); wp_enqueue_script( 'ma_js_admin' ); wp_enqueue_style( 'wp-color-picker' ); // enqueue select to script wp_enqueue_style( 'ma_css_admin', MAPP_MORTGAGE_APP_BASE_URL . 'assets/css/admin-style.css', array(), true ); } /* add custom post type callback*/ function mapp_mortgage_application_create_posttype() { /*register mortgage application post type*/ register_post_type( 'mortgage_application', array( 'labels' => array( 'name' => __( 'Applications', '1003-mortgage-application' ), 'singular_name' => __( 'Mortgage Application', '1003-mortgage-application' ), 'add_new_item' => __( 'Add New Application', '1003-mortgage-application' ), 'new_item' => __( 'New Application', '1003-mortgage-application' ), 'edit_item' => __( 'Edit Application', '1003-mortgage-application' ), 'update_item' => __( 'Update Application', '1003-mortgage-application' ), 'view_item' => __( 'View Application', '1003-mortgage-application' ), 'not_found' => __( 'Application Not found', '1003-mortgage-application' ), ), 'public' => true, 'has_archive' => false, 'menu_icon' => \Mapp\Admin\Icon::data_uri(), 'rewrite' => array( 'slug' => 'mortgage_application' ), 'supports' => array( 'title', 'author', 'custom-fields' ), // 'supports' => array( 'title', 'author'), 'capability_type' => 'post', 'capabilities' => array( 'create_posts' => 'do_not_allow', // false < WP 4.5, credit @Ewout ), 'map_meta_cap' => true, // Set to `false`, if users are not allowed to edit/delete existing posts ) ); } /** * Add mortgage application status filtering * * @param string $post_type is show current post type **/ function mapp_mortgage_application_status_filtering( $post_type ) { if ( 'mortgage_application' !== $post_type ) { return; // filter your post } $selected = ''; $results = array( '80' => __( 'Incomplete Applications', '1003-mortgage-application' ), '100' => __( 'Completed Applications', '1003-mortgage-application' ), ); if ( isset( $_REQUEST['ma_status'] ) ) { $selected = sanitize_text_field( $_REQUEST['ma_status'] ); } // build a dropdown list of status to filter by echo ''; } function mapp_mortgage_application_filter_request_query( $query ) { // modify the query only if it is admin and main query. if ( ! ( is_admin() && $query->is_main_query() ) ) { return $query; } // checking current post type is mortgage_application. if ( 'mortgage_application' !== $query->query['post_type'] ) { return $query; } // checking ma_status filter is selected. if ( isset( $_REQUEST['ma_status'] ) && '' !== $_REQUEST['ma_status'] ) { $term = sanitize_text_field( $_REQUEST['ma_status'] ); // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query $query->query_vars['meta_query'] = array( array( 'key' => 'application_status', 'value' => $term, 'compare' => '=', ), ); } return $query; } /** * remove view link and change edit to view link * * @param $action show action list **/ function mapp_mortgage_application_remove_actions( $actions ) { if ( get_post_type() === 'mortgage_application' ) { unset( $actions['view'] ); unset( $actions['inline hide-if-no-js'] ); $urlQuery = array( 'post' => get_the_ID(), 'export_type' => 'csv', 'action' => 'mortgage_application_export_applications', ); $actions['edit'] = str_replace( 'Edit', 'View', $actions['edit'] ); $actions['edit'] = str_replace( 'Edit', 'View', $actions['edit'] ); $url = wp_nonce_url( admin_url( 'admin-post.php?' . http_build_query( $urlQuery, '', '&' ) ), 'mortgage_application_export_applications', 'mortgage_application_export_nonce' ); $actions['csv'] = '' . esc_html__( 'Export to CSV', '1003-mortgage-application' ) . ''; } return $actions; } /** * add actions in bulk dropdown * * @parma $actions array action list in array **/ function mapp_mortgage_application_bulk_actions( $actions ) { $actions['export_csv'] = __( 'Export to CSV', '1003-mortgage-application' ); unset( $actions['edit'] ); // remove edit action return $actions; } /** * register custom field metabox **/ function mapp_mortgage_application_register_meta_boxes() { // 3.0 shows the answers in Admin\ApplicationView; this box keeps the export buttons. add_meta_box( 'mortgage_application_action', __( 'Mortgage Application Action', '1003-mortgage-application' ), 'mapp_mortgage_application_action_template_callback', 'mortgage_application', 'side' ); } /** * Meta box display callback. * * @param WP_Post $post Current post object. */ function mapp_mortgage_application_action_template_callback( $post ) { // add action metabox template include_once MAPP_MORTGAGE_APP_BASE_PATH . 'inc/templates/mortgage_action_metabox.php'; } /** * add new field in post table list. * * @param columns $columns Current post columns array. */ function mapp_mortgage_application_filter_posts_columns( $columns ) { /*add new fields after title field*/ $keys = array_keys( $columns ); $index = array_search( 'title', $keys ); $pos = false === $index ? count( $columns ) : $index + 1; $columns = array_merge( array_slice( $columns, 0, $pos ), array( 'status' => __( 'Status', '1003-mortgage-application' ), 'loanType' => __( 'Loan Type', '1003-mortgage-application' ), ), array_slice( $columns, $pos ) ); return $columns; } /** * show new field value in post table columns list. * * @param columns $columns Current post columns array, * post_id $post_id to show post id */ function mapp_mortgage_application_show_posts_column_value( $column, $post_id ) { /*add new fields after title field*/ switch ( $column ) { case 'status': $status = esc_attr( get_post_meta( $post_id, 'application_status', true ) ); if ( isset( $status ) && ! empty( $status ) ) { echo '' . esc_html( $status ) . '% ' . esc_html__( 'Completed', '1003-mortgage-application' ) . ''; } break; case 'loanType': $purpose = esc_attr( get_post_meta( $post_id, 'purpose', true ) ); if ( isset( $purpose ) && ! empty( $purpose ) ) { echo esc_html( $purpose ); } break; } } /** * make a sortable columns in post listing table callback * * @param columns $columns Current post sortable columns array, */ function mapp_mortgage_application_sortable_columns( $columns ) { $columns['status'] = 'application_status'; return $columns; } /** * sort post listing data by custom sort field callback * * @param query $query Current post query object, **/ function mapp_mortgage_application_posts_orderby_status( $query ) { if ( ! is_admin() || ! $query->is_main_query() ) { return; } if ( 'application_status' === $query->get( 'orderby' ) ) { $query->set( 'orderby', 'meta_value' ); $query->set( 'meta_key', 'application_status' ); $query->set( 'meta_type', 'numeric' ); } } /** * Adds a submenu setting page under a Mortgage Application type. */ function mapp_mortgage_application_admin_menu() { if ( is_network_admin() ) { add_menu_page( __( 'Mortgage Applications', '1003-mortgage-application' ), __( 'MTG Application', '1003-mortgage-application' ), 'manage_options', 'ma_setting', 'mapp_mortgage_application_setting_callback', \Mapp\Admin\Icon::data_uri() ); } else { // retrieve the license from the database add_submenu_page( 'edit.php?post_type=mortgage_application', __( 'Bulk Export', '1003-mortgage-application' ), __( 'Bulk Export', '1003-mortgage-application' ), 'manage_options', 'ma_export', 'mapp_mortgage_application_export_callback' ); add_submenu_page( 'edit.php?post_type=mortgage_application', __( 'Settings', '1003-mortgage-application' ), __( 'Settings', '1003-mortgage-application' ), 'manage_options', 'ma_setting', 'mapp_mortgage_application_setting_callback' ); } } /** * Admin link that exports one application (signed-in administrators). * * @param int $post_id Application. * @param string $type csv, or a Pro format (fnm, mismo). * @return string */ function mapp_export_url( $post_id, $type ) { return wp_nonce_url( admin_url( 'admin-post.php?' . http_build_query( array( 'post' => (int) $post_id, 'export_type' => $type, 'action' => 'mortgage_application_export_applications' ), '', '&' ) ), 'mortgage_application_export_applications', 'mortgage_application_export_nonce' ); } /** * Settings page tabs, slug => label. The Pro module adds File Uploader and * Premium License; each added tab renders on mapp_settings_tab_{slug}. * * @return array */ function mapp_settings_tabs() { return (array) apply_filters( 'mapp_settings_tabs', array( 'general' => __( 'General Settings', '1003-mortgage-application' ), 'form' => __( 'Form Settings', '1003-mortgage-application' ), ) ); } /** * Display callback for the Mortgage Application setting page. */ function mapp_mortgage_application_setting_callback() { // get user network setting option $options = get_mortgage_application_option( 'mortgage_application_use_network_settings' ); $use_network_val = ( $options == '0' ) ? '0' : '1'; // get user network setting option $field_options = get_mortgage_application_option( 'mortgage_application_use_form_network_settings' ); $use_field_network_val = ( $field_options == '0' ) ? '0' : '1'; // get user network submissions setting option $submissions_options = get_mortgage_application_option( 'mortgage_submissions_use_form_network_settings' ); $use_submissions_network_val = ( $submissions_options == '0' ) ? '0' : '1'; // include setting template require MAPP_MORTGAGE_APP_BASE_PATH . 'inc/templates/mortgage_setting.php'; } /** * update Network site setting callback */ function mapp_mortgage_application_update_network_options() { // Check if current user is a site administrator if ( ! current_user_can( 'manage_network_options' ) ) { wp_die( 'You don\t have the privileges to do this operation (should be: site administrator).' ); } // $_POST[ 'option_page' ] below comes from a hidden input that WordPress automatically generates for admin forms. The value equals to the admin page slug. $page_slug = sanitize_text_field( $_POST['option_page'] ); // Check that the request is coming from the administration area check_admin_referer( $page_slug . '-options' ); // Cycle through the settings we're submitting. If there are any changes, update them. global $new_whitelist_options; $options = $new_whitelist_options[ $page_slug ]; // Email texts and the disclaimer keep their HTML; webhooks are URLs, one per line. $html_options = array( 'mortgage_application_user_mail_message', 'mortgage_application_reminder_mail_message', 'mortgage_application_submision_message', 'mortgage_application_submision_client_message', 'disclaimer_field_1' ); $resetting = ! empty( $_POST['mortgage_application_reset'] ); foreach ( $options as $option ) { // WordPress slashes $_POST; without this every save added backslashes (O\'Brien). $posted = isset( $_POST[ $option ] ) ? wp_unslash( $_POST[ $option ] ) : null; if ( null !== $posted && '' !== $posted && array() !== $posted && ! $resetting ) { if ( in_array( $option, $html_options, true ) ) { update_site_option( $option, wp_kses_post( $posted ) ); } elseif ( 'mortgage_application_webhooks' === $option ) { update_site_option( $option, sanitize_textarea_field( $posted ) ); } elseif ( is_array( $posted ) ) { update_site_option( $option, wp_json_encode( array_map( 'sanitize_text_field', $posted ) ) ); } else { update_site_option( $option, sanitize_text_field( $posted ) ); } } else { $default_value = mapp_default_option( $option ); update_site_option( $option, in_array( $option, $html_options, true ) ? wp_kses_post( $default_value ) : $default_value ); } } // Finally, after saving the settings, redirect to the settings page. () $query_args = array( 'page' => 'ma_setting' ); if ( $page_slug == 'ma_setting' ) { $query_args['action'] = 'general'; } elseif ( $page_slug == 'license' ) { $query_args['action'] = 'license'; } elseif ( $page_slug == 'ma_form_setting' ) { $query_args['action'] = 'form'; } elseif ( $page_slug == 'ma_submissions_uploaded' ) { if ( isset( mapp_settings_tabs()['ma_file_upload'] ) ) { $query_args['action'] = 'ma_file_upload'; } } $query_args['ma-settings-updated'] = 'true'; wp_redirect( add_query_arg( $query_args, network_admin_url( 'admin.php' ) ) ); exit(); } /** * admin init callback. */ function mapp_mortgage_application_admin_init() { // register a new section in the "ma_setting" section, inside the "ma_setting" page add_settings_section( 'ma_setting', __( 'General Settings', '1003-mortgage-application' ), 'mapp_mortgage_application_general_setting_callback', 'ma_setting' ); if ( is_multisite() && ! is_network_admin() ) { add_settings_field( 'mortgage_application_use_network_settings', __( 'Use Network Settings', '1003-mortgage-application' ), 'mapp_mortgage_application_checkbox', 'ma_setting', 'ma_setting', array( 'name' => 'mortgage_application_use_network_settings', ) ); register_setting( 'ma_setting', 'mortgage_application_use_network_settings' ); } // register a new fields in the "ma_setting" section, inside the "ma_setting" page $text = 'mapp_mortgage_application_general_display_text_element_with_toggle'; $toggle_input = 'mapp_mortgage_application_display_toggle_element'; $textarea = 'mapp_mortgage_application_textarea'; $text_editor = 'mapp_mortgage_application_text_editor'; $color_input = 'mapp_mortgage_application_color_input'; $select = 'mapp_mortgage_application_display_select_element'; $client_receipt_value = get_mortgage_application_option( 'mortgage_application_client_email_recipients' ); $client_email_recipients_show_cls = ' client_email_recipients_show'; // Never saved counts as on (the receipt is sent by default). if ( false !== $client_receipt_value && empty( $client_receipt_value ) ) { $client_email_recipients_show_cls = ' client_email_recipients_hide'; } $allfields = array( array( 'name' => 'mortgage_application_button_color', 'type' => 'mapp_mortgage_application_color_input', 'section_name' => 'ma_setting', 'label' => __( 'Button Color', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_button_color', 'class' => 'ma_setting', 'id' => 'mortgage_application_button_color', 'description' => __( 'Buttons, the progress bar and accents on the form and in emails.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_email_recipients', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'Email Recipient(s)', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_email_recipients', 'placeholder' => 'Enter Email Address (comma separated if multiple)', 'class' => 'ma_setting', 'description' => __( 'Get the alerts for applications with no loan officer. Copied on every loan officer alert when "Also copy the site recipients" is on (Form & CRM).', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_mail_from_name', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'From Name', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_mail_from_name', 'placeholder' => 'Name that your applicant will receive email from...', 'class' => 'ma_setting', 'description' => __( 'Sender name on every email the plugin sends.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_mail_from', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'From Email', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_mail_from', 'placeholder' => 'Email address your applicant will receive email from...', 'class' => 'ma_setting', 'description' => __( 'Sender address on every email. Use an address on your domain that your mail service may send from, or mail can land in spam.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_mail_reply_to', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'Reply-To Email', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_mail_reply_to', 'placeholder' => 'Email address your applicant will reply to...', 'class' => 'ma_setting', 'description' => __( 'Only used when nothing better applies: loan officer alerts reply to the borrower, and borrower emails reply to their loan officer.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_mail_subject', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'Loan Officer Alert Subject', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_mail_subject', 'placeholder' => 'New application: {first_name} {last_name}', 'class' => 'ma_setting', 'test' => 'admin', 'description' => __( 'Subject of the alert sent when a short application is submitted. The alert itself is built for you: who applied, how to reach them, what they want, every answer, and the export buttons. Placeholders: {first_name}, {last_name}, {email}.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_client_email_recipients', 'type' => $toggle_input, 'section_name' => 'ma_setting', 'label' => __( 'Client Email Send', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_client_email_recipients', 'class' => 'ma_setting', 'id' => 'mortgage_application_client_email_recipients_id', 'default_on' => true, 'description' => __( 'Send the borrower a receipt when they submit the short application.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_user_mail_subject', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'Receipt Subject', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_user_mail_subject', 'placeholder' => 'We received your application', 'class' => 'ma_setting mortgage_application_client_email_recipients_cls' . $client_email_recipients_show_cls, 'description' => __( 'Placeholders: {first_name}, {last_name}, {email}.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_user_mail_message', 'type' => $text_editor, 'section_name' => 'ma_setting', 'label' => __( 'Receipt Opening', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_user_mail_message', 'class' => 'ma_setting mortgage_application_client_email_recipients_cls' . $client_email_recipients_show_cls, 'description' => __( 'The top of the borrower receipt. After it come the confirmation, their numbers, next steps with the documents to send and the links, then their answers, all added for you. Placeholders: {first_name}, {last_name}, {email}. Spanish borrowers get built-in Spanish text.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_reminder_mail_subject', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'Reminder Subject', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_reminder_mail_subject', 'placeholder' => 'Your application is almost done', 'class' => 'ma_setting', 'description' => __( 'Placeholders: {first_name}, {last_name}, {email}.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_reminder_mail_message', 'type' => $text_editor, 'section_name' => 'ma_setting', 'label' => __( 'Reminder Message', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_reminder_mail_message', 'class' => 'ma_setting', 'description' => __( 'Sent 24 and 72 hours after a borrower saves their contact details without submitting. The "Finish my application" button is added below your text. Borrowers who start the full 1003 and leave it unfinished get built-in reminders after 2 and 5 days. Turn all reminders off in Form & CRM. Spanish borrowers get built-in Spanish text.', '1003-mortgage-application' ), ), ), array( 'name' => 'mortgage_application_google_map_api_key', 'type' => $text, 'section_name' => 'ma_setting', 'label' => __( 'Google Places API Key', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_google_map_api_key', 'placeholder' => 'Enter your Google Places API key for address autocomplete', 'class' => 'ma_setting', 'description' => __( 'Optional. Suggests addresses as borrowers type. Without it they type the address themselves.', '1003-mortgage-application' ), ), ), ); // The Pro module adds the webhook fields here. $allfields = (array) apply_filters( 'mapp_general_setting_fields', $allfields, $text, $textarea ); $allfields[] = array( 'name' => 'mortgage_application_reset', 'type' => 'mapp_mortgage_application_reset_checkbox', 'section_name' => 'ma_setting', 'label' => __( 'Restore Defaults', '1003-mortgage-application' ), 'group' => 'ma_setting', 'other' => array( 'name' => 'mortgage_application_reset', 'id' => 'mortgage_application_reset', 'class' => 'ma_setting', 'description' => __( 'Tick and save to put this tab back to the defaults: sender and recipients set to the site admin, and the default subjects and texts.', '1003-mortgage-application' ), ), ); foreach ( $allfields as $key => $val ) { add_settings_field( $val['name'], $val['label'], $val['type'], $val['section_name'], $val['group'], $val['other'] ); register_setting( $val['section_name'], $val['name'] ); } register_setting( 'ma_setting', 'mortgage_application_ma_setting' ); // register a new section in the "ma_form_setting" section, inside the "ma_setting" page add_settings_section( 'ma_form_setting', __( 'Form Settings', '1003-mortgage-application' ), 'mapp_mortgage_application_form_setting_callback', 'ma_form_setting' ); if ( is_multisite() && ! is_network_admin() ) { add_settings_field( 'mortgage_application_use_form_network_settings', __( 'Use Network Settings', '1003-mortgage-application' ), 'mapp_mortgage_application_checkbox', 'ma_form_setting', 'ma_form_setting', array( 'name' => 'mortgage_application_use_form_network_settings', ) ); register_setting( 'ma_form_setting', 'mortgage_application_use_form_network_settings' ); } // register a new fields in the "ma_form_setting" section, inside the "ma_setting" page $text = 'mapp_mortgage_application_display_text_element_with_toggle'; $textarea = 'mapp_mortgage_application_textarea'; $text_editor = 'mapp_mortgage_application_text_editor'; $allfields = array(); global $mortgage_application_form_fields, $mortgage_application_required_form_fields; if ( isset( $mortgage_application_form_fields ) && is_array( $mortgage_application_form_fields ) ) { foreach ( $mortgage_application_form_fields as $form_field_key => $form_field_label ) { $allfields[] = array( 'name' => 'mortgage_application_label_' . $form_field_key, 'type' => $text, 'section_name' => 'ma_form_setting', 'label' => $form_field_label, 'group' => 'ma_form_setting', 'other' => array( 'name' => 'mortgage_application_label_' . $form_field_key, 'class' => 'ma_form_setting', 'placeholder' => 'Default: ' . $form_field_label, 'field' => ( is_array( $mortgage_application_required_form_fields ) && in_array( $form_field_key, $mortgage_application_required_form_fields ) ? '' : $form_field_key ), ), ); } } /** * register all fields and call(add) all fields at setting page */ if ( isset( $allfields ) && is_array( $allfields ) ) { foreach ( $allfields as $key => $val ) { add_settings_field( $val['name'], $val['label'], $val['type'], $val['section_name'], $val['group'], $val['other'] ); register_setting( $val['section_name'], $val['name'] ); } } // register form fields register_setting( 'ma_form_setting', 'mortgage_application_form_fields' ); // Disclaimer fields add_settings_field( 'disclaimer_field_1', __( 'Application Disclaimer', '1003-mortgage-application' ), $text_editor, 'ma_form_setting', 'ma_form_setting', array( 'name' => 'disclaimer_field_1', 'class' => 'ma_form_setting', 'description' => __( 'Shown with the certification checkbox on the last step of the short application and on the full 1003\'s review, and saved with each borrower\'s consent record. Have compliance review it.', '1003-mortgage-application' ), ) ); register_setting( 'ma_form_setting', 'disclaimer_field_1' ); add_settings_field( 'mortgage_application_reset', __( 'Restore Defaults', '1003-mortgage-application' ), 'mapp_mortgage_application_reset_checkbox', 'ma_form_setting', 'ma_form_setting', array( 'name' => 'mortgage_application_reset', 'id' => 'mortgage_application_reset_form', 'class' => 'ma_form_setting', 'description' => __( 'Tick and save to put the question labels and the disclaimer back to their defaults.', '1003-mortgage-application' ), ) ); register_setting( 'ma_form_setting', 'mortgage_application_reset' ); } /** * Settings section to display Mortgage Application General Settings callback. * * @param array $args Display arguments. */ function mapp_mortgage_application_general_setting_callback( $args ) { } /** * Settings section to display Mortgage Application Form Settings callback. * * @param array $args Display arguments. */ function mapp_mortgage_application_form_setting_callback( $args ) { echo '
' . esc_html__( 'Type in a box to change how a question reads on the form (English; blank uses the built-in wording). Where a question has a switch, turn it off to leave that question out.', '1003-mortgage-application' ) . '
'; } /** * Settings section to display Mortgage Application Submissions Uploaded callback. */ /** * input text type callback * * @perm $args input attribute as name, class etc. **/ function mapp_mortgage_application_display_select_element( $args ) { $options = sanitize_text_field( get_mortgage_application_option( $args['name'] ) ); ?>' . esc_html__( 'To send a test, open a site that uses network settings and use Send Test on its Settings page.', '1003-mortgage-application' ) . '
'; return; } ?>