@@ -211,8 +211,9 @@ public function checkbox_was_checked()
211
211
*/
212
212
protected function get_wrapper_attributes ()
213
213
{
214
+ $ classes = join (' ' , $ this ->wrapper_classes );
214
215
$ html_attrs = [
215
- 'class ' => sprintf ( ' mc4wp-checkbox mc4wp-checkbox-%s %s ' , $ this ->slug , join ( ' ' , $ this -> wrapper_classes )) ,
216
+ 'class ' => " mc4wp-checkbox mc4wp-checkbox- { $ this ->slug } $ classes " ,
216
217
];
217
218
return $ this ->array_to_attr_string ($ html_attrs );
218
219
}
@@ -291,7 +292,7 @@ public function get_checkbox_html()
291
292
292
293
ob_start ();
293
294
294
- echo sprintf ( '<!-- Mailchimp for WordPress v%s - https://www.mc4wp.com/ --> ' , MC4WP_VERSION ) ;
295
+ echo '<!-- Mailchimp for WordPress v ' , MC4WP_VERSION , ' - https://www.mc4wp.com/ --> ' ;
295
296
296
297
/** @ignore */
297
298
do_action ('mc4wp_integration_before_checkbox_wrapper ' , $ this );
@@ -303,13 +304,13 @@ public function get_checkbox_html()
303
304
$ wrapper_attrs = $ this ->get_wrapper_attributes ();
304
305
305
306
// Hidden field to make sure "0" is sent to server
306
- echo sprintf ( '<input type="hidden" name="%s" value="0" /> ' , esc_attr ($ this ->checkbox_name )) ;
307
- echo sprintf ( ' <%s %s> ' , $ wrapper_tag, $ wrapper_attrs) ;
307
+ echo '<input type="hidden" name=" ' , esc_attr ($ this ->checkbox_name ), ' " value="0" /> ' ;
308
+ echo " < $ wrapper_tag $ wrapper_attrs> " ;
308
309
echo '<label> ' ;
309
- echo sprintf ( '<input type="checkbox" name="%s" value="1" %s /> ' , esc_attr ($ this ->checkbox_name ), $ this ->get_checkbox_attributes ()) ;
310
- echo sprintf ( '<span>%s</span> ' , $ this ->get_label_text ()) ;
310
+ echo '<input type="checkbox" name=" ' , esc_attr ($ this ->checkbox_name ), ' " value="1" ' , $ this ->get_checkbox_attributes (), ' > ' ;
311
+ echo '<span> ' , $ this ->get_label_text (), ' </span> ' ;
311
312
echo '</label> ' ;
312
- echo sprintf ( ' </%s> ' , $ wrapper_tag) ;
313
+ echo " </ $ wrapper_tag> " ;
313
314
314
315
/** @ignore */
315
316
do_action ('mc4wp_integration_after_checkbox_wrapper ' , $ this );
@@ -572,7 +573,10 @@ protected function array_to_attr_string(array $attrs)
572
573
{
573
574
$ str = '' ;
574
575
foreach ($ attrs as $ key => $ value ) {
575
- $ str .= sprintf ('%s="%s" ' , $ key , esc_attr ($ value ));
576
+ $ str .= $ key ;
577
+ $ str .= '=" ' ;
578
+ $ str .= esc_attr ($ value );
579
+ $ str .= '" ' ;
576
580
}
577
581
return $ str ;
578
582
}
0 commit comments