PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.3
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
← All changes | views/backend/post/bulk-edit.php +76 -64 2.2.53.4.3 View file →
@@ -11,31 +11,29 @@
11 11 <!-- Form -->
12 12 <div>
13 13 <label for="wp-convertkit-bulk-edit-form">
14 14 <span class="title convertkit-icon-form"><?php esc_html_e( 'Form', 'convertkit' ); ?></span>
15 - <select name="wp-convertkit[form]" id="wp-convertkit-bulk-edit-form" size="1">
16 - <?php
17 - // For Bulk Edit, the 'No Change' value is -1. However, because this Plugin has historically used -1
18 - // to mean that the Default form for the Post Type should be displayed, using -1 as 'No Change' in Bulk Edit
19 - // would result in Posts/Pages having (or not having) the Form setting updated, when the user may/may not
20 - // have selected the 'Default' option.
21 - // Therefore, we use -2 to denote 'No Change'.
22 - ?>
23 - <option value="-2" data-preserve-on-refresh="1"><?php esc_html_e( '— No Change —', 'convertkit' ); ?></option>
24 - <option value="-1" data-preserve-on-refresh="1"><?php esc_html_e( 'Default', 'convertkit' ); ?></option>
25 - <option value="0" data-preserve-on-refresh="1"><?php esc_html_e( 'None', 'convertkit' ); ?></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 echo esc_attr( $form['name'] ); ?></option>
31 - <?php
32 - }
33 - }
34 - ?>
35 - </select>
15 +
16 + <?php
17 + // For Bulk Edit, the 'No Change' value is -1. However, because this Plugin has historically used -1
18 + // to mean that the Default form for the Post Type should be displayed, using -1 as 'No Change' in Bulk Edit
19 + // would result in Posts/Pages having (or not having) the Form setting updated, when the user may/may not
20 + // have selected the 'Default' option.
21 + // Therefore, we use -2 to denote 'No Change'.
22 + $convertkit_forms->output_select_field_all(
23 + 'wp-convertkit[form]',
24 + 'wp-convertkit-bulk-edit-form',
25 + false,
26 + false,
27 + array(
28 + '-2' => esc_html__( '— No Change —', 'convertkit' ),
29 + '-1' => esc_html__( 'Default', 'convertkit' ),
30 + '0' => esc_html__( 'None', 'convertkit' ),
31 + )
32 + );
33 + ?>
36 34 </label>
37 - <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-bulk-edit-form">
35 + <button class="wp-convertkit-refresh-resources" class="button button-secondary" title="<?php esc_attr_e( 'Refresh Forms from Kit account', 'convertkit' ); ?>" data-resource="forms" data-field="#wp-convertkit-bulk-edit-form">
38 36 <span class="dashicons dashicons-update"></span>
39 37 </button>
40 38 </div>
41 39
@@ -51,11 +49,9 @@
51 49 // have selected the 'Default' option.
52 50 // Therefore, we use -2 to denote 'No Change', even though this setting is for the Tag, so we're at least consistent.
53 51 ?>
54 52 <option value="-2" data-preserve-on-refresh="1"><?php esc_html_e( '— No Change —', 'convertkit' ); ?></option>
55 - <option value="0" data-preserve-on-refresh="1">
56 - <?php esc_html_e( 'None', 'convertkit' ); ?>
57 - </option>
53 + <option value="0" data-preserve-on-refresh="1"><?php esc_html_e( 'None', 'convertkit' ); ?></option>
58 54 <?php
59 55 if ( $convertkit_tags->exist() ) {
60 56 foreach ( $convertkit_tags->get() as $convertkit_tag ) {
61 57 ?>
@@ -65,59 +61,75 @@
65 61 }
66 62 ?>
67 63 </select>
68 64 </label>
69 - <button class="wp-convertkit-refresh-resources" class="button button-secondary" title="<?php esc_attr_e( 'Refresh Tags from ConvertKit account', 'convertkit' ); ?>" data-resource="tags" data-field="#wp-convertkit-bulk-edit-tag">
65 + <button class="wp-convertkit-refresh-resources" class="button button-secondary" title="<?php esc_attr_e( 'Refresh Tags from Kit account', 'convertkit' ); ?>" data-resource="tags" data-field="#wp-convertkit-bulk-edit-tag">
70 66 <span class="dashicons dashicons-update"></span>
71 67 </button>
72 68 </div>
73 69
74 - <?php
75 - if ( $restrict_content_settings->enabled() ) {
76 - ?>
77 - <!-- Restrict Content -->
78 - <div>
79 - <label for="wp-convertkit-bulk-edit-restrict_content">
80 - <span class="title convertkit-icon-restrict-content"><?php esc_html_e( 'Member', 'convertkit' ); ?></span>
81 - <select name="wp-convertkit[restrict_content]" id="wp-convertkit-bulk-edit-restrict_content" size="1">
70 + <!-- Restrict Content -->
71 + <div>
72 + <label for="wp-convertkit-bulk-edit-restrict_content">
73 + <span class="title convertkit-icon-restrict-content"><?php esc_html_e( 'Member', 'convertkit' ); ?></span>
74 + <select name="wp-convertkit[restrict_content]" id="wp-convertkit-bulk-edit-restrict_content" size="1">
75 + <?php
76 + // For Bulk Edit, the 'No Change' value is -1. However, because this Plugin has historically used -1
77 + // to mean that the Default form for the Post Type should be displayed, using -1 as 'No Change' in Bulk Edit
78 + // would result in Posts/Pages having (or not having) the Form setting updated, when the user may/may not
79 + // have selected the 'Default' option.
80 + // Therefore, we use -2 to denote 'No Change', even though this setting is for the Tag, so we're at least consistent.
81 + ?>
82 + <option value="-2" data-preserve-on-refresh="1"><?php esc_html_e( '— No Change —', 'convertkit' ); ?></option>
83 + <option value="0" data-preserve-on-refresh="1"><?php esc_html_e( 'Don\'t restrict content to member-only.', 'convertkit' ); ?></option>
84 +
85 + <optgroup label="<?php esc_attr_e( 'Forms', 'convertkit' ); ?>" data-resource="forms">
82 86 <?php
83 - // For Bulk Edit, the 'No Change' value is -1. However, because this Plugin has historically used -1
84 - // to mean that the Default form for the Post Type should be displayed, using -1 as 'No Change' in Bulk Edit
85 - // would result in Posts/Pages having (or not having) the Form setting updated, when the user may/may not
86 - // have selected the 'Default' option.
87 - // Therefore, we use -2 to denote 'No Change', even though this setting is for the Tag, so we're at least consistent.
87 + // Forms.
88 + if ( $convertkit_forms->inline_exist() ) {
89 + foreach ( $convertkit_forms->get_inline() as $convertkit_form ) {
90 + printf(
91 + '<option value="form_%s">%s [%s]</option>',
92 + esc_attr( $convertkit_form['id'] ),
93 + esc_attr( $convertkit_form['name'] ),
94 + ( ! empty( $convertkit_form['format'] ) ? esc_attr( $convertkit_form['format'] ) : 'inline' )
95 + );
96 + }
97 + }
88 98 ?>
89 - <option value="-2" data-preserve-on-refresh="1"><?php esc_html_e( '— No Change —', 'convertkit' ); ?></option>
90 - <option value="0" data-preserve-on-refresh="1">
91 - <?php esc_html_e( 'Don\'t restrict content to members only.', 'convertkit' ); ?>
92 - </option>
99 + </optgroup>
93 100
101 + <optgroup label="<?php esc_attr_e( 'Tags', 'convertkit' ); ?>" data-resource="tags">
94 102 <?php
103 + // Tags.
104 + if ( $convertkit_tags->exist() ) {
105 + foreach ( $convertkit_tags->get() as $convertkit_tag ) {
106 + ?>
107 + <option value="tag_<?php echo esc_attr( $convertkit_tag['id'] ); ?>"><?php echo esc_attr( $convertkit_tag['name'] ); ?></option>
108 + <?php
109 + }
110 + }
111 + ?>
112 + </optgroup>
113 +
114 + <optgroup label="<?php esc_attr_e( 'Products', 'convertkit' ); ?>" data-resource="products">
115 + <?php
95 116 // Products.
96 117 if ( $convertkit_products->exist() ) {
97 - ?>
98 - <optgroup label="<?php esc_attr_e( 'Products', 'convertkit' ); ?>">
118 + foreach ( $convertkit_products->get() as $product ) {
119 + ?>
120 + <option value="product_<?php echo esc_attr( $product['id'] ); ?>"><?php echo esc_attr( $product['name'] ); ?></option>
99 121 <?php
100 - foreach ( $convertkit_products->get() as $product ) {
101 - ?>
102 - <option value="product_<?php echo esc_attr( $product['id'] ); ?>">
103 - <?php echo esc_attr( $product['name'] ); ?>
104 - </option>
105 - <?php
106 - }
107 - ?>
108 - </optgroup>
109 - <?php
122 + }
110 123 }
111 124 ?>
112 - </select>
113 - </label>
114 - <button class="wp-convertkit-refresh-resources" class="button button-secondary" title="<?php esc_attr_e( 'Refresh Products from ConvertKit account', 'convertkit' ); ?>" data-resource="products" data-field="#wp-convertkit-bulk-edit-restrict_content">
115 - <span class="dashicons dashicons-update"></span>
116 - </button>
117 - </div>
118 - <?php
119 - }
120 -
125 + </optgroup>
126 + </select>
127 + </label>
128 + <button class="wp-convertkit-refresh-resources" class="button button-secondary" title="<?php esc_attr_e( 'Refresh Products and Tags from Kit account', 'convertkit' ); ?>" data-resource="restrict_content" data-field="#wp-convertkit-bulk-edit-restrict_content">
129 + <span class="dashicons dashicons-update"></span>
130 + </button>
131 + </div>
132 + <?php
121 133 wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' );
122 134 ?>
123 135 </div>