PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 1.8.1
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v1.8.1
3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 All 196 releases
convertkit / views / backend / meta-boxes / meta-box.php

meta-box.php in Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages 1.8.1, at views/backend/meta-boxes/meta-box.php

104 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * MetaBox template
4 *
5 * @package ConvertKit
6 * @author ConvertKit
7 */
8 ?>
9 <table class="form-table">
10 <tbody>
11 <?php if ( $post->ID == get_option( 'page_for_posts' ) ) : ?>
12 <tr valign="top">
13 <td>
14 <p class="description">
15 <?php _e( 'The ConvertKit plugin does not show forms on the blog archive page.',
16 'convertkit' ); ?>
17 </p>
18 </td>
19 </tr>
20 <?php else : ?>
21 <tr valign="top">
22 <th scope="row"><label for="wp-convertkit-form"><?php esc_html_e( 'Form', 'convertkit' ); ?></label>
23 </th>
24 <td>
25 <select name="wp-convertkit[form]" id="wp-convertkit-form">
26 <option <?php selected( - 1, $meta['form'] ); ?> value="-1"><?php esc_html_e( 'Default',
27 'convertkit' ); ?></option>
28 <option <?php selected( 0, $meta['form'] ); ?> value="0"><?php esc_html_e( 'None',
29 'convertkit' ); ?></option>
30 <?php foreach ( $forms as $form ) { ?>
31 <option <?php selected( $form['id'], $meta['form'] ); ?>
32 value="<?php echo $form['id']; // WPCS: XSS ok. ?>">
33 <?php echo $form['name']; // WPCS: XSS ok. ?></option>
34 <?php } ?>
35 </select>
36 <p class="description">
37 <?php
38 /* translators: 1: settings url */
39 printf( __( 'Choose <code>Default</code> to use the form specified on the <a href="%s" target="_blank">settings page</a>,',
40 'convertkit' ), esc_attr( esc_url( $settings_link ) ) ); // WPCS: XSS ok.
41 echo __( '<code>None</code> to not display a form, or any other option to specify a particular form for this piece of content.',
42 'convertkit' ); // WPCS: XSS ok.
43 ?>
44 </p>
45
46 <p class="description">
47 <?php esc_html_e( 'To make changes to your forms,', 'convertkit' ); ?>
48 <a href="https://app.convertkit.com/" target="_blank"><?php esc_html_e( 'sign in to ConvertKit',
49 'convertkit' ); ?></a>
50 </p>
51 </td>
52 </tr>
53 <?php if ( 'page' === $post->post_type ) { ?>
54 <tr valign="top">
55 <th scope="row"><label for=""><?php esc_html_e( 'Landing Page', 'convertkit' ); ?></label></th>
56 <td>
57 <select name="wp-convertkit[landing_page]" id="wp-convertkit-landing_page">
58 <option <?php selected( '', $meta['landing_page'] ); ?> value="0"><?php _e( 'None',
59 'convertkit' ); // WPCS: XSS ok. ?></option>
60 <?php foreach ( $landing_pages as $landing_page ) :
61 $name = sanitize_text_field( $landing_page['name'] );
62 if ( isset( $landing_page['url'] ) ) : ?>
63 <option <?php selected( $landing_page['url'], $meta['landing_page'] ); ?>
64 value="<?php echo esc_attr( $landing_page['url'],
65 'convertkit' ); ?>"><?php echo esc_attr( $name ); ?></option>
66 <?php else: ?>
67 <option <?php selected( $landing_page['id'], $meta['landing_page'] ); ?>
68 value="<?php echo esc_attr( $landing_page['id'],
69 'convertkit' ); ?>"><?php echo esc_attr( $name ); ?></option>
70 <?php endif;
71 endforeach; ?>
72 </select>
73 <p class="description"><?php esc_html_e( 'Select a landing page to make it appear in place of this page.',
74 'convertkit' ); ?></p>
75 </td>
76 </tr>
77 <?php } ?>
78 <?php // custom content mapping
79 $meta_tag = isset( $meta['tag'] ) ? $meta['tag'] : '';
80 ?>
81 <tr valign="top">
82 <th scope="row"><label for=""><?php esc_html_e( 'Add a Tag', 'convertkit' ); ?></label></th>
83 <td>
84 <select name="wp-convertkit[tag]" id="wp-convertkit-tag">
85 <option <?php selected( '', $meta_tag ); ?> value="0"><?php _e( 'None',
86 'convertkit' ); // WPCS: XSS ok. ?></option>
87 <?php
88 foreach ( $tags as $tag ) {
89 $name = sanitize_text_field( $tag['name'] );
90 ?>
91 <option <?php selected( $tag['id'], $meta_tag ); ?>value="<?php echo esc_attr( $tag['id'],
92 'convertkit' ); ?>"><?php echo esc_attr( $name ); ?></option>
93 <?php } ?>
94 </select>
95 <p class="description"><?php esc_html_e( 'Select a tag to apply to viewers of this page.',
96 'convertkit' ); ?></p>
97 </td>
98 </tr>
99 <?php endif; ?>
100 </tbody>
101 </table>
102
103 <?php wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' );
104