equal
deleted
inserted
replaced
29 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
29 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
30 $year = $attributes['year']; |
30 $year = $attributes['year']; |
31 } |
31 } |
32 } |
32 } |
33 |
33 |
34 $custom_class_name = empty( $attributes['className'] ) ? '' : ' ' . $attributes['className']; |
34 $wrapper_attributes = get_block_wrapper_attributes(); |
35 $align_class_name = empty( $attributes['align'] ) ? '' : ' ' . "align{$attributes['align']}"; |
35 $output = sprintf( |
36 |
36 '<div %1$s>%2$s</div>', |
37 $output = sprintf( |
37 $wrapper_attributes, |
38 '<div class="%1$s">%2$s</div>', |
|
39 esc_attr( 'wp-block-calendar' . $custom_class_name . $align_class_name ), |
|
40 get_calendar( true, false ) |
38 get_calendar( true, false ) |
41 ); |
39 ); |
42 |
40 |
43 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
41 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
44 $monthnum = $previous_monthnum; |
42 $monthnum = $previous_monthnum; |