| 1 |
<?php |
| 2 |
/** |
| 3 |
* Edit Term Fields template |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
<tr class="form-field"> |
| 11 |
<th scope="row"> |
| 12 |
<label for="wp-convertkit-form"><?php esc_html_e( 'ConvertKit Form', 'convertkit' ); ?></label> |
| 13 |
</th> |
| 14 |
<td> |
| 15 |
<div class="convertkit-select2-container convertkit-select2-container-grid"> |
| 16 |
<?php |
| 17 |
echo $convertkit_forms->get_select_field_all( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 18 |
'wp-convertkit[form]', |
| 19 |
'wp-convertkit-form', |
| 20 |
array( |
| 21 |
'convertkit-select2', |
| 22 |
), |
| 23 |
esc_attr( $convertkit_term->get_form() ), |
| 24 |
array( |
| 25 |
'0' => esc_html__( 'Default', 'convertkit' ), |
| 26 |
) |
| 27 |
); |
| 28 |
?> |
| 29 |
|
| 30 |
<button class="wp-convertkit-refresh-resources" class="button button-secondary" title="<?php esc_attr_e( 'Refresh Forms from ConvertKit account', 'convertkit' ); ?>" data-resource="forms" data-field="#wp-convertkit-form"> |
| 31 |
<span class="dashicons dashicons-update"></span> |
| 32 |
</button> |
| 33 |
<p class="description"> |
| 34 |
<code><?php esc_html_e( 'Default', 'convertkit' ); ?></code> |
| 35 |
<?php esc_html_e( ': Display a form based on the Post\'s settings.', 'convertkit' ); ?> |
| 36 |
<br /> |
| 37 |
<?php |
| 38 |
printf( |
| 39 |
/* translators: Taxonomy Name */ |
| 40 |
esc_html__( 'Any other option will display that form after the main content for Posts assigned to this %s.', 'convertkit' ), |
| 41 |
'category' |
| 42 |
); |
| 43 |
?> |
| 44 |
</p> |
| 45 |
</div> |
| 46 |
</td> |
| 47 |
</tr> |
| 48 |
<tr class="form-field"> |
| 49 |
<th scope="row"> |
| 50 |
<label for="wp-convertkit-form-position"><?php esc_html_e( 'Display ConvertKit Form on Archive?', 'convertkit' ); ?></label> |
| 51 |
</th> |
| 52 |
<td> |
| 53 |
<select name="wp-convertkit[form_position]" id="wp-convertkit-form-position" size="1"> |
| 54 |
<option value=""><?php esc_attr_e( 'No', 'convertkit' ); ?></option> |
| 55 |
<option value="before"<?php selected( 'before', $convertkit_term->get_form_position() ); ?>><?php esc_attr_e( 'Before Posts', 'convertkit' ); ?></option> |
| 56 |
<option value="after"<?php selected( 'after', $convertkit_term->get_form_position() ); ?>><?php esc_attr_e( 'After Posts', 'convertkit' ); ?></option> |
| 57 |
</select> |
| 58 |
<p class="description"> |
| 59 |
<?php |
| 60 |
esc_html_e( 'Whether to display the Form on this Category\'s archive page, above or below the main posts list.', 'convertkit' ); |
| 61 |
?> |
| 62 |
</p> |
| 63 |
|
| 64 |
<?php |
| 65 |
wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' ); |
| 66 |
?> |
| 67 |
</td> |
| 68 |
</tr> |
| 69 |
|