PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 2.0.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v2.0.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 2.3.2 All 195 releases
convertkit / views / backend / post / meta-box.php

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

160 lines 6.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Metabox view
4 *
5 * @package ConvertKit
6 * @author ConvertKit
7 */
8
9 ?>
10 <table class="form-table">
11 <tbody>
12 <!-- Form -->
13 <tr valign="top">
14 <th scope="row">
15 <label for="wp-convertkit-form"><?php esc_html_e( 'Form', 'convertkit' ); ?></label>
16 </th>
17 <td>
18 <div class="convertkit-select2-container convertkit-select2-container-grid">
19 <select name="wp-convertkit[form]" id="wp-convertkit-form" class="convertkit-select2 widefat">
20 <option value="-1"<?php selected( - 1, $convertkit_post->get_form() ); ?> data-preserve-on-refresh="1">
21 <?php esc_html_e( 'Default', 'convertkit' ); ?>
22 </option>
23 <option value="0"<?php selected( 0, $convertkit_post->get_form() ); ?> data-preserve-on-refresh="1">
24 <?php esc_html_e( 'None', 'convertkit' ); ?>
25 </option>
26 <?php
27 if ( $convertkit_forms->exist() ) {
28 foreach ( $convertkit_forms->get() as $form ) {
29 ?>
30 <option value="<?php echo esc_attr( $form['id'] ); ?>"<?php selected( $form['id'], $convertkit_post->get_form() ); ?>>
31 <?php echo esc_attr( $form['name'] ); ?>
32 </option>
33 <?php
34 }
35 }
36 ?>
37 </select>
38 <button class="wp-convertkit-refresh-resources" class="button button-secondary hide-if-no-js" title="<?php esc_attr_e( 'Refresh Forms from ConvertKit account', 'convertkit' ); ?>" data-resource="forms" data-field="#wp-convertkit-form">
39 <span class="dashicons dashicons-update"></span>
40 </button>
41 <p class="description">
42 <?php
43 printf(
44 /* translators: settings url */
45 __( '<code>Default</code>: Uses the form specified on the <a href="%s" target="_blank">settings page</a>.', 'convertkit' ), /* phpcs:ignore */
46 esc_attr( esc_url( $settings_link ) )
47 );
48 ?>
49 <br />
50 <?php _e( '<code>None</code>: do not display a form.', 'convertkit' ); /* phpcs:ignore */ ?>
51 <br />
52 <?php esc_html_e( 'Any other option will display that form after the main content.', 'convertkit' ); ?>
53 <br />
54 <?php
55 echo sprintf(
56 /* translators: Link to sign in to ConvertKit */
57 esc_html__( 'To make changes to your forms, %s', 'convertkit' ),
58 '<a href="' . esc_url( convertkit_get_sign_in_url() ) . '" target="_blank">' . esc_html__( 'sign in to ConvertKit', 'convertkit' ) . '</a>'
59 );
60 ?>
61 </p>
62 </div>
63 </td>
64 </tr>
65
66 <!-- Landing Page -->
67 <?php
68 if ( 'page' === $post->post_type ) {
69 ?>
70 <tr valign="top">
71 <th scope="row">
72 <label for="wp-convertkit-landing_page"><?php esc_html_e( 'Landing Page', 'convertkit' ); ?></label>
73 </th>
74 <td>
75 <div class="convertkit-select2-container convertkit-select2-container-grid">
76 <select name="wp-convertkit[landing_page]" id="wp-convertkit-landing_page" class="convertkit-select2">
77 <option <?php selected( '', $convertkit_post->get_landing_page() ); ?> value="0" data-preserve-on-refresh="1">
78 <?php esc_html_e( 'None', 'convertkit' ); ?>
79 </option>
80 <?php
81 if ( $convertkit_landing_pages->exist() ) {
82 foreach ( $convertkit_landing_pages->get() as $landing_page ) {
83 if ( isset( $convertkit_landing_page['url'] ) ) {
84 ?>
85 <option value="<?php echo esc_attr( $landing_page['url'] ); ?>"<?php selected( $landing_page['url'], $convertkit_post->get_landing_page() ); ?>>
86 <?php echo esc_attr( $landing_page['name'] ); ?>
87 </option>
88 <?php
89 } else {
90 ?>
91 <option value="<?php echo esc_attr( $landing_page['id'] ); ?>"<?php selected( $landing_page['id'], $convertkit_post->get_landing_page() ); ?>>
92 <?php echo esc_attr( $landing_page['name'] ); ?>
93 </option>
94 <?php
95 }
96 }
97 }
98 ?>
99 </select>
100 <button class="wp-convertkit-refresh-resources" class="button button-secondary hide-if-no-js" title="<?php esc_attr_e( 'Refresh Landing Pages from ConvertKit account', 'convertkit' ); ?>" data-resource="landing_pages" data-field="#wp-convertkit-landing_page">
101 <span class="dashicons dashicons-update"></span>
102 </button>
103 <p class="description">
104 <?php esc_html_e( 'Select a landing page to make it appear in place of this page.', 'convertkit' ); ?>
105 <br />
106 <?php
107 echo sprintf(
108 /* translators: Link to sign in to ConvertKit */
109 esc_html__( 'To make changes to your landing pages, %s', 'convertkit' ),
110 '<a href="' . esc_url( convertkit_get_sign_in_url() ) . '" target="_blank">' . esc_html__( 'sign in to ConvertKit', 'convertkit' ) . '</a>'
111 );
112 ?>
113 </p>
114 </div>
115 </td>
116 </tr>
117 <?php
118 }
119 ?>
120
121 <!-- Tag -->
122 <tr valign="top">
123 <th scope="row">
124 <label for="wp-convertkit-tag"><?php esc_html_e( 'Add a Tag', 'convertkit' ); ?></label>
125 </th>
126 <td>
127 <div class="convertkit-select2-container convertkit-select2-container-grid">
128 <select name="wp-convertkit[tag]" id="wp-convertkit-tag" class="convertkit-select2">
129 <option value="0"<?php selected( '', $convertkit_post->get_tag() ); ?> data-preserve-on-refresh="1">
130 <?php esc_html_e( 'None', 'convertkit' ); ?>
131 </option>
132 <?php
133 if ( $convertkit_tags->exist() ) {
134 foreach ( $convertkit_tags->get() as $convertkit_tag ) {
135 ?>
136 <option value="<?php echo esc_attr( $convertkit_tag['id'] ); ?>"<?php selected( $convertkit_tag['id'], $convertkit_post->get_tag() ); ?>>
137 <?php echo esc_attr( $convertkit_tag['name'] ); ?>
138 </option>
139 <?php
140 }
141 }
142 ?>
143 </select>
144 <button class="wp-convertkit-refresh-resources" class="button button-secondary hide-if-no-js" title="<?php esc_attr_e( 'Refresh Tags from ConvertKit account', 'convertkit' ); ?>" data-resource="tags" data-field="#wp-convertkit-tag">
145 <span class="dashicons dashicons-update"></span>
146 </button>
147 <p class="description">
148 <?php esc_html_e( 'Select a tag to apply to visitors of this page who are subscribed.', 'convertkit' ); ?>
149 <br />
150 <?php esc_html_e( 'A visitor is deemed to be subscribed if they have clicked a link in an email to this site which includes their subscriber ID, or have entered their email address in a ConvertKit Form on this site.', 'convertkit' ); ?>
151 </p>
152 </div>
153 </td>
154 </tr>
155 </tbody>
156 </table>
157
158 <?php
159 wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' );
160