PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / trunk
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages vtrunk
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 / bulk-edit.php

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

136 lines 5.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Bulk Edit view
4 *
5 * @package ConvertKit
6 * @author ConvertKit
7 */
8
9 ?>
10 <div id="convertkit-bulk-edit" class="convertkit-bulk-quick-edit" style="display:none;">
11 <!-- Form -->
12 <div>
13 <label for="wp-convertkit-bulk-edit-form">
14 <span class="title convertkit-icon-form"><?php esc_html_e( 'Form', 'convertkit' ); ?></span>
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 ?>
34 </label>
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">
36 <span class="dashicons dashicons-update"></span>
37 </button>
38 </div>
39
40 <!-- Tag -->
41 <div>
42 <label for="wp-convertkit-bulk-edit-tag">
43 <span class="title convertkit-icon-tag"><?php esc_html_e( 'Tag', 'convertkit' ); ?></span>
44 <select name="wp-convertkit[tag]" id="wp-convertkit-bulk-edit-tag" size="1">
45 <?php
46 // For Bulk Edit, the 'No Change' value is -1. However, because this Plugin has historically used -1
47 // to mean that the Default form for the Post Type should be displayed, using -1 as 'No Change' in Bulk Edit
48 // would result in Posts/Pages having (or not having) the Form setting updated, when the user may/may not
49 // have selected the 'Default' option.
50 // Therefore, we use -2 to denote 'No Change', even though this setting is for the Tag, so we're at least consistent.
51 ?>
52 <option value="-2" data-preserve-on-refresh="1"><?php esc_html_e( '— No Change —', 'convertkit' ); ?></option>
53 <option value="0" data-preserve-on-refresh="1"><?php esc_html_e( 'None', 'convertkit' ); ?></option>
54 <?php
55 if ( $convertkit_tags->exist() ) {
56 foreach ( $convertkit_tags->get() as $convertkit_tag ) {
57 ?>
58 <option value="<?php echo esc_attr( $convertkit_tag['id'] ); ?>"><?php echo esc_attr( $convertkit_tag['name'] ); ?></option>
59 <?php
60 }
61 }
62 ?>
63 </select>
64 </label>
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">
66 <span class="dashicons dashicons-update"></span>
67 </button>
68 </div>
69
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">
86 <?php
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 }
98 ?>
99 </optgroup>
100
101 <optgroup label="<?php esc_attr_e( 'Tags', 'convertkit' ); ?>" data-resource="tags">
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
116 // Products.
117 if ( $convertkit_products->exist() ) {
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>
121 <?php
122 }
123 }
124 ?>
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
133 wp_nonce_field( 'wp-convertkit-save-meta', 'wp-convertkit-save-meta-nonce' );
134 ?>
135 </div>
136