PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 1.9.7.7
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v1.9.7.7
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 1.9.7.7, at views/backend/post/meta-box.php

173 lines 5.6 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 <?php
19 if ( ! $convertkit_forms->exist() ) {
20 esc_html_e( 'No Forms exist in ConvertKit.', 'convertkit' );
21 } else {
22 ?>
23 <div class="convertkit-select2-container">
24 <select name="wp-convertkit[form]" id="wp-convertkit-form" class="convertkit-select2">
25 <option value="-1"<?php selected( - 1, $convertkit_post->get_form() ); ?>>
26 <?php esc_html_e( 'Default', 'convertkit' ); ?>
27 </option>
28 <option value="0"<?php selected( 0, $convertkit_post->get_form() ); ?>>
29 <?php esc_html_e( 'None', 'convertkit' ); ?>
30 </option>
31 <?php
32 foreach ( $convertkit_forms->get() as $form ) {
33 ?>
34 <option value="<?php echo esc_attr( $form['id'] ); ?>"<?php selected( $form['id'], $convertkit_post->get_form() ); ?>>
35 <?php echo esc_attr( $form['name'] ); ?>
36 </option>
37 <?php
38 }
39 ?>
40 </select>
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 </p>
54 </div>
55 <?php
56 }
57 ?>
58
59 <p class="description">
60 <?php
61 echo sprintf(
62 /* translators: Link to sign in to ConvertKit */
63 esc_html__( 'To make changes to your forms, %s', 'convertkit' ),
64 '<a href="' . esc_url( convertkit_get_sign_in_url() ) . '" target="_blank">' . esc_html__( 'sign in to ConvertKit', 'convertkit' ) . '</a>'
65 );
66 ?>
67 </p>
68 </td>
69 </tr>
70
71 <!-- Landing Page -->
72 <?php
73 if ( 'page' === $post->post_type ) {
74 ?>
75 <tr valign="top">
76 <th scope="row">
77 <label for="wp-convertkit-landing_page"><?php esc_html_e( 'Landing Page', 'convertkit' ); ?></label>
78 </th>
79 <td>
80 <?php
81 if ( ! $convertkit_landing_pages->exist() ) {
82 esc_html_e( 'No Landing Pages exist in ConvertKit.', 'convertkit' );
83 } else {
84 ?>
85 <div class="convertkit-select2-container">
86 <select name="wp-convertkit[landing_page]" id="wp-convertkit-landing_page" class="convertkit-select2">
87 <option <?php selected( '', $convertkit_post->get_landing_page() ); ?> value="0">
88 <?php esc_html_e( 'None', 'convertkit' ); ?>
89 </option>
90 <?php
91 foreach ( $convertkit_landing_pages->get() as $landing_page ) {
92 if ( isset( $convertkit_landing_page['url'] ) ) {
93 ?>
94 <option value="<?php echo esc_attr( $landing_page['url'] ); ?>"<?php selected( $landing_page['url'], $convertkit_post->get_landing_page() ); ?>>
95 <?php echo esc_attr( $landing_page['name'] ); ?>
96 </option>
97 <?php
98 } else {
99 ?>
100 <option value="<?php echo esc_attr( $landing_page['id'] ); ?>"<?php selected( $landing_page['id'], $convertkit_post->get_landing_page() ); ?>>
101 <?php echo esc_attr( $landing_page['name'] ); ?>
102 </option>
103 <?php
104 }
105 }
106 ?>
107 </select>
108 <p class="description">
109 <?php esc_html_e( 'Select a landing page to make it appear in place of this page.', 'convertkit' ); ?>
110 </p>
111 </div>
112 <?php
113 }
114 ?>
115
116 <p class="description">
117 <?php
118 echo sprintf(
119 /* translators: Link to sign in to ConvertKit */
120 esc_html__( 'To make changes to your landing pages, %s', 'convertkit' ),
121 '<a href="' . esc_url( convertkit_get_sign_in_url() ) . '" target="_blank">' . esc_html__( 'sign in to ConvertKit', 'convertkit' ) . '</a>'
122 );
123 ?>
124 </p>
125 </td>
126 </tr>
127 <?php
128 }
129 ?>
130
131 <!-- Tag -->
132 <tr valign="top">
133 <th scope="row">
134 <label for="wp-convertkit-tag"><?php esc_html_e( 'Add a Tag', 'convertkit' ); ?></label>
135 </th>
136 <td>
137 <div class="convertkit-select2-container">
138 <?php
139 if ( ! $convertkit_tags->exist() ) {
140 esc_html_e( 'No Tags exist in ConvertKit.', 'convertkit' );
141 } else {
142 ?>
143 <select name="wp-convertkit[tag]" id="wp-convertkit-tag" class="convertkit-select2">
144 <option value="0"<?php selected( '', $convertkit_post->get_tag() ); ?>>
145 <?php esc_html_e( 'None', 'convertkit' ); ?>
146 </option>
147 <?php
148 foreach ( $convertkit_tags->get() as $convertkit_tag ) {
149 ?>
150 <option value="<?php echo esc_attr( $convertkit_tag['id'] ); ?>"<?php selected( $convertkit_tag['id'], $convertkit_post->get_tag() ); ?>>
151 <?php echo esc_attr( $convertkit_tag['name'] ); ?>
152 </option>
153 <?php
154 }
155 ?>
156 </select>
157 <?php
158 }
159 ?>
160 <p class="description">
161 <?php esc_html_e( 'Select a tag to apply to visitors of this page who are subscribed.', 'convertkit' ); ?>
162 <br />
163 <?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' ); ?>
164 </p>
165 </div>
166 </td>
167 </tr>
168 </tbody>
169 </table>
170
171 <?php
172 wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' );
173