| 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="description"><?php esc_html_e( 'ConvertKit Form', 'convertkit' ); ?></label> |
| 13 |
</th> |
| 14 |
<td> |
| 15 |
<div class="convertkit-select2-container convertkit-select2-container-grid"> |
| 16 |
<select name="wp-convertkit[form]" id="wp-convertkit-form" class="convertkit-select2"> |
| 17 |
<option value="0"<?php selected( 0, $convertkit_term->get_form() ); ?> data-preserve-on-refresh="1"> |
| 18 |
<?php esc_html_e( 'Default', 'convertkit' ); ?> |
| 19 |
</option> |
| 20 |
<?php |
| 21 |
if ( $convertkit_forms->exist() ) { |
| 22 |
foreach ( $convertkit_forms->get() as $convertkit_form ) { |
| 23 |
?> |
| 24 |
<option value="<?php echo esc_attr( $convertkit_form['id'] ); ?>"<?php selected( $convertkit_form['id'], $convertkit_term->get_form() ); ?>> |
| 25 |
<?php echo esc_html( $convertkit_form['name'] ); ?> |
| 26 |
</option> |
| 27 |
<?php |
| 28 |
} |
| 29 |
} |
| 30 |
?> |
| 31 |
</select> |
| 32 |
<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"> |
| 33 |
<span class="dashicons dashicons-update"></span> |
| 34 |
</button> |
| 35 |
<p class="description"> |
| 36 |
<code><?php esc_html_e( 'Default', 'convertkit' ); ?></code> |
| 37 |
<?php esc_html_e( ': Display a form based on the Post\'s settings.', 'convertkit' ); ?> |
| 38 |
<br /> |
| 39 |
<?php |
| 40 |
printf( |
| 41 |
/* translators: Taxonomy Name */ |
| 42 |
esc_html__( 'Any other option will display that form after the main content for Posts assigned to this %s.', 'convertkit' ), |
| 43 |
'category' |
| 44 |
); |
| 45 |
?> |
| 46 |
</p> |
| 47 |
</div> |
| 48 |
<?php |
| 49 |
wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' ); |
| 50 |
?> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
|