admin-after.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | $position_options = array( |
| 4 | 'checkout_billing' => __( "After billing details", 'mailchimp-for-wp' ), |
| 5 | 'checkout_shipping' => __( 'After shipping details', 'mailchimp-for-wp' ), |
| 6 | 'checkout_after_customer_details' => __( 'After customer details', 'mailchimp-for-wp' ), |
| 7 | 'review_order_before_submit' => __( 'Before submit button', 'mailchimp-for-wp' ), |
| 8 | ); |
| 9 | |
| 10 | |
| 11 | /** @var MC4WP_Integration $integration */ |
| 12 | |
| 13 | ?> |
| 14 | <table class="form-table"> |
| 15 | <?php $config = array( 'element' => 'mc4wp_integrations['. $integration->slug .'][implicit]', 'value' => '0' ); ?> |
| 16 | <tr valign="top" data-showif="<?php echo esc_attr( json_encode( $config ) ); ?>"> |
| 17 | <th scope="row"> |
| 18 | <?php _e( 'Position', 'mailchimp-for-wp' ); ?> |
| 19 | </th> |
| 20 | <td> |
| 21 | <select name="mc4wp_integrations[<?php echo $integration->slug; ?>][position]"> |
| 22 | <?php |
| 23 | |
| 24 | foreach( $position_options as $value => $label ) { |
| 25 | printf( '<option value="%s" %s>%s</option>', esc_attr( $value ), selected( $value, $opts['position'], false ), esc_html( $label ) ); |
| 26 | } |
| 27 | ?> |
| 28 | |
| 29 | </select> |
| 30 | </td> |
| 31 | </tr> |
| 32 | </table> |
| 33 |