Completed
Pull Request — master (#740)
by
unknown
04:10
created
includes/post-types.php 1 patch
Spacing   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -23,40 +23,40 @@  discard block
 block discarded – undo
23 23
 function give_setup_post_types() {
24 24
 
25 25
 	/** Give Forms Post Type */
26
-	$give_forms_singular = give_get_option( 'disable_forms_singular' ) !== 'on' ? true : false;
26
+	$give_forms_singular = give_get_option('disable_forms_singular') !== 'on' ? true : false;
27 27
 
28
-	$give_forms_archives = give_get_option( 'disable_forms_archives' ) !== 'on' ? true : false;
28
+	$give_forms_archives = give_get_option('disable_forms_archives') !== 'on' ? true : false;
29 29
 
30
-	$give_forms_slug = defined( 'GIVE_SLUG' ) ? GIVE_SLUG : 'donations';
30
+	$give_forms_slug = defined('GIVE_SLUG') ? GIVE_SLUG : 'donations';
31 31
 	//support for old 'GIVE_FORMS_SLUG' constant
32
-	if ( defined( 'GIVE_FORMS_SLUG' ) ) {
32
+	if (defined('GIVE_FORMS_SLUG')) {
33 33
 		$give_forms_slug = GIVE_FORMS_SLUG;
34 34
 	}
35 35
 
36
-	$give_forms_rewrite = defined( 'GIVE_DISABLE_FORMS_REWRITE' ) && GIVE_DISABLE_FORMS_REWRITE ? false : array(
36
+	$give_forms_rewrite = defined('GIVE_DISABLE_FORMS_REWRITE') && GIVE_DISABLE_FORMS_REWRITE ? false : array(
37 37
 		'slug'       => $give_forms_slug,
38 38
 		'with_front' => false
39 39
 	);
40 40
 
41
-	$give_forms_labels = apply_filters( 'give_forms_labels', array(
42
-		'name'               => __( 'Donation %2$s', 'give' ),
41
+	$give_forms_labels = apply_filters('give_forms_labels', array(
42
+		'name'               => __('Donation %2$s', 'give'),
43 43
 		'singular_name'      => '%1$s',
44
-		'add_new'            => __( 'Add %1$s', 'give' ),
45
-		'add_new_item'       => __( 'Add New Donation %1$s', 'give' ),
46
-		'edit_item'          => __( 'Edit Donation %1$s', 'give' ),
47
-		'new_item'           => __( 'New %1$s', 'give' ),
48
-		'all_items'          => __( 'All %2$s', 'give' ),
49
-		'view_item'          => __( 'View %1$s', 'give' ),
50
-		'search_items'       => __( 'Search %2$s', 'give' ),
51
-		'not_found'          => __( 'No %2$s found', 'give' ),
52
-		'not_found_in_trash' => __( 'No %2$s found in Trash', 'give' ),
44
+		'add_new'            => __('Add %1$s', 'give'),
45
+		'add_new_item'       => __('Add New Donation %1$s', 'give'),
46
+		'edit_item'          => __('Edit Donation %1$s', 'give'),
47
+		'new_item'           => __('New %1$s', 'give'),
48
+		'all_items'          => __('All %2$s', 'give'),
49
+		'view_item'          => __('View %1$s', 'give'),
50
+		'search_items'       => __('Search %2$s', 'give'),
51
+		'not_found'          => __('No %2$s found', 'give'),
52
+		'not_found_in_trash' => __('No %2$s found in Trash', 'give'),
53 53
 		'parent_item_colon'  => '',
54
-		'menu_name'          => apply_filters( 'give_menu_name', __( 'Donations', 'give' ) ),
55
-		'name_admin_bar'     => apply_filters( 'give_name_admin_bar_name', __( 'Donation Form', 'give' ) )
56
-	) );
54
+		'menu_name'          => apply_filters('give_menu_name', __('Donations', 'give')),
55
+		'name_admin_bar'     => apply_filters('give_name_admin_bar_name', __('Donation Form', 'give'))
56
+	));
57 57
 
58
-	foreach ( $give_forms_labels as $key => $value ) {
59
-		$give_forms_labels[ $key ] = sprintf( $value, give_get_forms_label_singular(), give_get_forms_label_plural() );
58
+	foreach ($give_forms_labels as $key => $value) {
59
+		$give_forms_labels[$key] = sprintf($value, give_get_forms_label_singular(), give_get_forms_label_plural());
60 60
 	}
61 61
 
62 62
 	//Default give_forms supports
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
 	);
70 70
 
71 71
 	//Has the user disabled the excerpt
72
-	if ( give_get_option( 'disable_forms_excerpt' ) === 'on' ) {
73
-		unset( $give_form_supports[2] );
72
+	if (give_get_option('disable_forms_excerpt') === 'on') {
73
+		unset($give_form_supports[2]);
74 74
 	}
75 75
 
76 76
 	//Has user disabled the featured image?
77
-	if ( give_get_option( 'disable_form_featured_img' ) === 'on' ) {
78
-		unset( $give_form_supports[1] );
79
-		remove_action( 'give_before_single_form_summary', 'give_show_form_images' );
77
+	if (give_get_option('disable_form_featured_img') === 'on') {
78
+		unset($give_form_supports[1]);
79
+		remove_action('give_before_single_form_summary', 'give_show_form_images');
80 80
 	}
81 81
 
82 82
 	$give_forms_args = array(
@@ -92,42 +92,42 @@  discard block
 block discarded – undo
92 92
 		'has_archive'        => $give_forms_archives,
93 93
 		'menu_icon'          => 'dashicons-give',
94 94
 		'hierarchical'       => false,
95
-		'supports'           => apply_filters( 'give_forms_supports', $give_form_supports ),
95
+		'supports'           => apply_filters('give_forms_supports', $give_form_supports),
96 96
 	);
97
-	register_post_type( 'give_forms', apply_filters( 'give_forms_post_type_args', $give_forms_args ) );
97
+	register_post_type('give_forms', apply_filters('give_forms_post_type_args', $give_forms_args));
98 98
 	
99 99
 	/** Payment Post Type */
100 100
 	$payment_labels = array(
101
-		'name'               => _x( 'Donations', 'post type general name', 'give' ),
102
-		'singular_name'      => _x( 'Donation', 'post type singular name', 'give' ),
103
-		'add_new'            => __( 'Add New', 'give' ),
104
-		'add_new_item'       => __( 'Add New Donation', 'give' ),
105
-		'edit_item'          => __( 'Edit Donation', 'give' ),
106
-		'new_item'           => __( 'New Donation', 'give' ),
107
-		'all_items'          => __( 'All Donations', 'give' ),
108
-		'view_item'          => __( 'View Donation', 'give' ),
109
-		'search_items'       => __( 'Search Donations', 'give' ),
110
-		'not_found'          => __( 'No Donations found', 'give' ),
111
-		'not_found_in_trash' => __( 'No Donations found in Trash', 'give' ),
101
+		'name'               => _x('Donations', 'post type general name', 'give'),
102
+		'singular_name'      => _x('Donation', 'post type singular name', 'give'),
103
+		'add_new'            => __('Add New', 'give'),
104
+		'add_new_item'       => __('Add New Donation', 'give'),
105
+		'edit_item'          => __('Edit Donation', 'give'),
106
+		'new_item'           => __('New Donation', 'give'),
107
+		'all_items'          => __('All Donations', 'give'),
108
+		'view_item'          => __('View Donation', 'give'),
109
+		'search_items'       => __('Search Donations', 'give'),
110
+		'not_found'          => __('No Donations found', 'give'),
111
+		'not_found_in_trash' => __('No Donations found in Trash', 'give'),
112 112
 		'parent_item_colon'  => '',
113
-		'menu_name'          => __( 'Transactions', 'give' )
113
+		'menu_name'          => __('Transactions', 'give')
114 114
 	);
115 115
 
116 116
 	$payment_args = array(
117
-		'labels'          => apply_filters( 'give_payment_labels', $payment_labels ),
117
+		'labels'          => apply_filters('give_payment_labels', $payment_labels),
118 118
 		'public'          => false,
119 119
 		'query_var'       => false,
120 120
 		'rewrite'         => false,
121 121
 		'map_meta_cap'    => true,
122 122
 		'capability_type' => 'give_payment',
123
-		'supports'        => array( 'title' ),
123
+		'supports'        => array('title'),
124 124
 		'can_export'      => true
125 125
 	);
126
-	register_post_type( 'give_payment', $payment_args );
126
+	register_post_type('give_payment', $payment_args);
127 127
 
128 128
 }
129 129
 
130
-add_action( 'init', 'give_setup_post_types', 1 );
130
+add_action('init', 'give_setup_post_types', 1);
131 131
 
132 132
 
133 133
 /**
@@ -140,30 +140,30 @@  discard block
 block discarded – undo
140 140
  */
141 141
 function give_setup_taxonomies() {
142 142
 
143
-	$slug = defined( 'GIVE_FORMS_SLUG' ) ? GIVE_FORMS_SLUG : 'donations';
143
+	$slug = defined('GIVE_FORMS_SLUG') ? GIVE_FORMS_SLUG : 'donations';
144 144
 
145 145
 	/** Categories */
146 146
 	$category_labels = array(
147
-		'name'              => sprintf( _x( '%s Categories', 'taxonomy general name', 'give' ), give_get_forms_label_singular() ),
148
-		'singular_name'     => _x( 'Category', 'taxonomy singular name', 'give' ),
149
-		'search_items'      => __( 'Search Categories', 'give' ),
150
-		'all_items'         => __( 'All Categories', 'give' ),
151
-		'parent_item'       => __( 'Parent Category', 'give' ),
152
-		'parent_item_colon' => __( 'Parent Category:', 'give' ),
153
-		'edit_item'         => __( 'Edit Category', 'give' ),
154
-		'update_item'       => __( 'Update Category', 'give' ),
155
-		'add_new_item'      => sprintf( __( 'Add New %s Category', 'give' ), give_get_forms_label_singular() ),
156
-		'new_item_name'     => __( 'New Category Name', 'give' ),
157
-		'menu_name'         => __( 'Categories', 'give' ),
147
+		'name'              => sprintf(_x('%s Categories', 'taxonomy general name', 'give'), give_get_forms_label_singular()),
148
+		'singular_name'     => _x('Category', 'taxonomy singular name', 'give'),
149
+		'search_items'      => __('Search Categories', 'give'),
150
+		'all_items'         => __('All Categories', 'give'),
151
+		'parent_item'       => __('Parent Category', 'give'),
152
+		'parent_item_colon' => __('Parent Category:', 'give'),
153
+		'edit_item'         => __('Edit Category', 'give'),
154
+		'update_item'       => __('Update Category', 'give'),
155
+		'add_new_item'      => sprintf(__('Add New %s Category', 'give'), give_get_forms_label_singular()),
156
+		'new_item_name'     => __('New Category Name', 'give'),
157
+		'menu_name'         => __('Categories', 'give'),
158 158
 	);
159 159
 
160
-	$category_args = apply_filters( 'give_forms_category_args', array(
160
+	$category_args = apply_filters('give_forms_category_args', array(
161 161
 			'hierarchical' => true,
162
-			'labels'       => apply_filters( 'give_forms_category_labels', $category_labels ),
162
+			'labels'       => apply_filters('give_forms_category_labels', $category_labels),
163 163
 			'show_ui'      => true,
164 164
 			'query_var'    => 'give_forms_category',
165 165
 			'rewrite'      => array(
166
-				'slug'         => $slug . '/category',
166
+				'slug'         => $slug.'/category',
167 167
 				'with_front'   => false,
168 168
 				'hierarchical' => true
169 169
 			),
@@ -177,34 +177,34 @@  discard block
 block discarded – undo
177 177
 	);
178 178
 
179 179
 	//Does the user want categories?
180
-	if ( give_get_option( 'enable_categories' ) == 'on' ) {
181
-		register_taxonomy( 'give_forms_category', array( 'give_forms' ), $category_args );
182
-		register_taxonomy_for_object_type( 'give_forms_category', 'give_forms' );
180
+	if (give_get_option('enable_categories') == 'on') {
181
+		register_taxonomy('give_forms_category', array('give_forms'), $category_args);
182
+		register_taxonomy_for_object_type('give_forms_category', 'give_forms');
183 183
 	}
184 184
 
185 185
 
186 186
 	/** Tags */
187 187
 	$tag_labels = array(
188
-		'name'                  => sprintf( _x( '%s Tags', 'taxonomy general name', 'give' ), give_get_forms_label_singular() ),
189
-		'singular_name'         => _x( 'Tag', 'taxonomy singular name', 'give' ),
190
-		'search_items'          => __( 'Search Tags', 'give' ),
191
-		'all_items'             => __( 'All Tags', 'give' ),
192
-		'parent_item'           => __( 'Parent Tag', 'give' ),
193
-		'parent_item_colon'     => __( 'Parent Tag:', 'give' ),
194
-		'edit_item'             => __( 'Edit Tag', 'give' ),
195
-		'update_item'           => __( 'Update Tag', 'give' ),
196
-		'add_new_item'          => __( 'Add New Tag', 'give' ),
197
-		'new_item_name'         => __( 'New Tag Name', 'give' ),
198
-		'menu_name'             => __( 'Tags', 'give' ),
199
-		'choose_from_most_used' => sprintf( __( 'Choose from most used %s tags.', 'give' ), give_get_forms_label_singular() ),
188
+		'name'                  => sprintf(_x('%s Tags', 'taxonomy general name', 'give'), give_get_forms_label_singular()),
189
+		'singular_name'         => _x('Tag', 'taxonomy singular name', 'give'),
190
+		'search_items'          => __('Search Tags', 'give'),
191
+		'all_items'             => __('All Tags', 'give'),
192
+		'parent_item'           => __('Parent Tag', 'give'),
193
+		'parent_item_colon'     => __('Parent Tag:', 'give'),
194
+		'edit_item'             => __('Edit Tag', 'give'),
195
+		'update_item'           => __('Update Tag', 'give'),
196
+		'add_new_item'          => __('Add New Tag', 'give'),
197
+		'new_item_name'         => __('New Tag Name', 'give'),
198
+		'menu_name'             => __('Tags', 'give'),
199
+		'choose_from_most_used' => sprintf(__('Choose from most used %s tags.', 'give'), give_get_forms_label_singular()),
200 200
 	);
201 201
 
202
-	$tag_args = apply_filters( 'give_forms_tag_args', array(
202
+	$tag_args = apply_filters('give_forms_tag_args', array(
203 203
 			'hierarchical' => false,
204
-			'labels'       => apply_filters( 'give_forms_tag_labels', $tag_labels ),
204
+			'labels'       => apply_filters('give_forms_tag_labels', $tag_labels),
205 205
 			'show_ui'      => true,
206 206
 			'query_var'    => 'give_forms_tag',
207
-			'rewrite'      => array( 'slug' => $slug . '/tag', 'with_front' => false, 'hierarchical' => true ),
207
+			'rewrite'      => array('slug' => $slug.'/tag', 'with_front' => false, 'hierarchical' => true),
208 208
 			'capabilities' => array(
209 209
 				'manage_terms' => 'manage_give_forms_terms',
210 210
 				'edit_terms'   => 'edit_give_forms_terms',
@@ -215,15 +215,15 @@  discard block
 block discarded – undo
215 215
 		)
216 216
 	);
217 217
 
218
-	if ( give_get_option( 'enable_tags' ) == 'on' ) {
219
-		register_taxonomy( 'give_forms_tag', array( 'give_forms' ), $tag_args );
220
-		register_taxonomy_for_object_type( 'give_forms_tag', 'give_forms' );
218
+	if (give_get_option('enable_tags') == 'on') {
219
+		register_taxonomy('give_forms_tag', array('give_forms'), $tag_args);
220
+		register_taxonomy_for_object_type('give_forms_tag', 'give_forms');
221 221
 	}
222 222
 
223 223
 
224 224
 }
225 225
 
226
-add_action( 'init', 'give_setup_taxonomies', 0 );
226
+add_action('init', 'give_setup_taxonomies', 0);
227 227
 
228 228
 
229 229
 /**
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
  */
235 235
 function give_get_default_form_labels() {
236 236
 	$defaults = array(
237
-		'singular' => __( 'Form', 'give' ),
238
-		'plural'   => __( 'Forms', 'give' )
237
+		'singular' => __('Form', 'give'),
238
+		'plural'   => __('Forms', 'give')
239 239
 	);
240 240
 
241
-	return apply_filters( 'give_default_form_name', $defaults );
241
+	return apply_filters('give_default_form_name', $defaults);
242 242
 }
243 243
 
244 244
 /**
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
  *
251 251
  * @return string $defaults['singular'] Singular label
252 252
  */
253
-function give_get_forms_label_singular( $lowercase = false ) {
253
+function give_get_forms_label_singular($lowercase = false) {
254 254
 	$defaults = give_get_default_form_labels();
255 255
 
256
-	return ( $lowercase ) ? strtolower( $defaults['singular'] ) : $defaults['singular'];
256
+	return ($lowercase) ? strtolower($defaults['singular']) : $defaults['singular'];
257 257
 }
258 258
 
259 259
 /**
@@ -262,10 +262,10 @@  discard block
 block discarded – undo
262 262
  * @since 1.0
263 263
  * @return string $defaults['plural'] Plural label
264 264
  */
265
-function give_get_forms_label_plural( $lowercase = false ) {
265
+function give_get_forms_label_plural($lowercase = false) {
266 266
 	$defaults = give_get_default_form_labels();
267 267
 
268
-	return ( $lowercase ) ? strtolower( $defaults['plural'] ) : $defaults['plural'];
268
+	return ($lowercase) ? strtolower($defaults['plural']) : $defaults['plural'];
269 269
 }
270 270
 
271 271
 /**
@@ -277,26 +277,26 @@  discard block
 block discarded – undo
277 277
  *
278 278
  * @return string $title New placeholder text
279 279
  */
280
-function give_change_default_title( $title ) {
280
+function give_change_default_title($title) {
281 281
 	// If a frontend plugin uses this filter (check extensions before changing this function)
282
-	if ( ! is_admin() ) {
282
+	if ( ! is_admin()) {
283 283
 		$label = give_get_forms_label_singular();
284
-		$title = sprintf( __( 'Enter %s title here', 'give' ), $label );
284
+		$title = sprintf(__('Enter %s title here', 'give'), $label);
285 285
 
286 286
 		return $title;
287 287
 	}
288 288
 
289 289
 	$screen = get_current_screen();
290 290
 
291
-	if ( 'give_forms' == $screen->post_type ) {
291
+	if ('give_forms' == $screen->post_type) {
292 292
 		$label = give_get_forms_label_singular();
293
-		$title = sprintf( __( 'Enter %s title here', 'give' ), $label );
293
+		$title = sprintf(__('Enter %s title here', 'give'), $label);
294 294
 	}
295 295
 
296 296
 	return $title;
297 297
 }
298 298
 
299
-add_filter( 'enter_title_here', 'give_change_default_title' );
299
+add_filter('enter_title_here', 'give_change_default_title');
300 300
 
301 301
 /**
302 302
  * Registers Custom Post Statuses which are used by the Payments
@@ -306,50 +306,50 @@  discard block
 block discarded – undo
306 306
  */
307 307
 function give_register_post_type_statuses() {
308 308
 	// Payment Statuses
309
-	register_post_status( 'refunded', array(
310
-		'label'                     => _x( 'Refunded', 'Refunded payment status', 'give' ),
309
+	register_post_status('refunded', array(
310
+		'label'                     => _x('Refunded', 'Refunded payment status', 'give'),
311 311
 		'public'                    => true,
312 312
 		'exclude_from_search'       => false,
313 313
 		'show_in_admin_all_list'    => true,
314 314
 		'show_in_admin_status_list' => true,
315
-		'label_count'               => _n_noop( 'Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give' )
316
-	) );
317
-	register_post_status( 'failed', array(
318
-		'label'                     => _x( 'Failed', 'Failed payment status', 'give' ),
315
+		'label_count'               => _n_noop('Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give')
316
+	));
317
+	register_post_status('failed', array(
318
+		'label'                     => _x('Failed', 'Failed payment status', 'give'),
319 319
 		'public'                    => true,
320 320
 		'exclude_from_search'       => false,
321 321
 		'show_in_admin_all_list'    => true,
322 322
 		'show_in_admin_status_list' => true,
323
-		'label_count'               => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give' )
324
-	) );
325
-	register_post_status( 'revoked', array(
326
-		'label'                     => _x( 'Revoked', 'Revoked payment status', 'give' ),
323
+		'label_count'               => _n_noop('Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give')
324
+	));
325
+	register_post_status('revoked', array(
326
+		'label'                     => _x('Revoked', 'Revoked payment status', 'give'),
327 327
 		'public'                    => true,
328 328
 		'exclude_from_search'       => false,
329 329
 		'show_in_admin_all_list'    => true,
330 330
 		'show_in_admin_status_list' => true,
331
-		'label_count'               => _n_noop( 'Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give' )
332
-	) );
333
-	register_post_status( 'cancelled', array(
334
-		'label'                     => _x( 'Cancelled', 'Cancelled payment status', 'give' ),
331
+		'label_count'               => _n_noop('Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give')
332
+	));
333
+	register_post_status('cancelled', array(
334
+		'label'                     => _x('Cancelled', 'Cancelled payment status', 'give'),
335 335
 		'public'                    => true,
336 336
 		'exclude_from_search'       => false,
337 337
 		'show_in_admin_all_list'    => true,
338 338
 		'show_in_admin_status_list' => true,
339
-		'label_count'               => _n_noop( 'Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give' )
340
-	) );
341
-	register_post_status( 'abandoned', array(
342
-		'label'                     => _x( 'Abandoned', 'Abandoned payment status', 'give' ),
339
+		'label_count'               => _n_noop('Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give')
340
+	));
341
+	register_post_status('abandoned', array(
342
+		'label'                     => _x('Abandoned', 'Abandoned payment status', 'give'),
343 343
 		'public'                    => true,
344 344
 		'exclude_from_search'       => false,
345 345
 		'show_in_admin_all_list'    => true,
346 346
 		'show_in_admin_status_list' => true,
347
-		'label_count'               => _n_noop( 'Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give' )
348
-	) );
347
+		'label_count'               => _n_noop('Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give')
348
+	));
349 349
 
350 350
 }
351 351
 
352
-add_action( 'init', 'give_register_post_type_statuses' );
352
+add_action('init', 'give_register_post_type_statuses');
353 353
 
354 354
 /**
355 355
  * Updated Messages
@@ -362,43 +362,43 @@  discard block
 block discarded – undo
362 362
  *
363 363
  * @return array $messages New post updated messages
364 364
  */
365
-function give_updated_messages( $messages ) {
365
+function give_updated_messages($messages) {
366 366
 	global $post, $post_ID;
367 367
 
368
-	$url1 = '<a href="' . get_permalink( $post_ID ) . '">';
368
+	$url1 = '<a href="'.get_permalink($post_ID).'">';
369 369
 	$url2 = give_get_forms_label_singular();
370 370
 	$url3 = '</a>';
371 371
 
372 372
 	$messages['give_forms'] = array(
373
-		1 => sprintf( __( '%2$s updated. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
374
-		4 => sprintf( __( '%2$s updated. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
375
-		6 => sprintf( __( '%2$s published. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
376
-		7 => sprintf( __( '%2$s saved. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 ),
377
-		8 => sprintf( __( '%2$s submitted. %1$sView %2$s%3$s.', 'give' ), $url1, $url2, $url3 )
373
+		1 => sprintf(__('%2$s updated. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
374
+		4 => sprintf(__('%2$s updated. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
375
+		6 => sprintf(__('%2$s published. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
376
+		7 => sprintf(__('%2$s saved. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3),
377
+		8 => sprintf(__('%2$s submitted. %1$sView %2$s%3$s.', 'give'), $url1, $url2, $url3)
378 378
 	);
379 379
 
380 380
 	return $messages;
381 381
 }
382 382
 
383
-add_filter( 'post_updated_messages', 'give_updated_messages' );
383
+add_filter('post_updated_messages', 'give_updated_messages');
384 384
 
385 385
 
386 386
 /**
387 387
  * Setup Post Type Images
388 388
  */
389
-add_action( 'after_setup_theme', 'give_add_thumbnail_support', 10 );
389
+add_action('after_setup_theme', 'give_add_thumbnail_support', 10);
390 390
 
391 391
 /**
392 392
  * Ensure post thumbnail support is turned on
393 393
  */
394 394
 function give_add_thumbnail_support() {
395
-	if ( give_get_option( 'disable_form_featured_img' ) === 'on' ) {
395
+	if (give_get_option('disable_form_featured_img') === 'on') {
396 396
 		return;
397 397
 	}
398
-	if ( ! current_theme_supports( 'post-thumbnails' ) ) {
399
-		add_theme_support( 'post-thumbnails' );
398
+	if ( ! current_theme_supports('post-thumbnails')) {
399
+		add_theme_support('post-thumbnails');
400 400
 	}
401
-	add_post_type_support( 'give_forms', 'thumbnail' );
401
+	add_post_type_support('give_forms', 'thumbnail');
402 402
 }
403 403
 
404 404
 /**
@@ -410,19 +410,19 @@  discard block
 block discarded – undo
410 410
 function give_widgets_init() {
411 411
 
412 412
 	//Single Give Forms (disabled if single turned off in settings)
413
-	if ( give_get_option( 'disable_forms_singular' ) !== 'on' && give_get_option( 'disable_form_sidebar' ) !== 'on' ) {
413
+	if (give_get_option('disable_forms_singular') !== 'on' && give_get_option('disable_form_sidebar') !== 'on') {
414 414
 
415
-		register_sidebar( apply_filters( 'give_forms_single_sidebar', array(
416
-			'name'          => __( 'Give Single Form Sidebar', 'give' ),
415
+		register_sidebar(apply_filters('give_forms_single_sidebar', array(
416
+			'name'          => __('Give Single Form Sidebar', 'give'),
417 417
 			'id'            => 'give-forms-sidebar',
418
-			'description'   => __( 'Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give' ),
418
+			'description'   => __('Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give'),
419 419
 			'before_widget' => '<div id="%1$s" class="widget %2$s">',
420 420
 			'after_widget'  => '</div>',
421 421
 			'before_title'  => '<h3 class="widgettitle widget-title">',
422 422
 			'after_title'   => '</h3>',
423
-		) ) );
423
+		)));
424 424
 
425 425
 	}
426 426
 }
427 427
 
428
-add_action( 'widgets_init', 'give_widgets_init', 999 );
428
+add_action('widgets_init', 'give_widgets_init', 999);
Please login to merge, or discard this patch.