Skip to content

Commit

Permalink
Add custom class parameter to shortcode.
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 20, 2025
1 parent 26624ad commit 8bd3165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/my-calendar-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,7 @@ function my_calendar( $args ) {
$source = isset( $args['source'] ) ? $args['source'] : 'shortcode';
$site = ( isset( $args['site'] ) && '' !== trim( $args['site'] ) ) ? $args['site'] : false;
$months = isset( $args['months'] ) ? $args['months'] : false;
$custom = isset( $args['class'] ) ? $args['class'] : '';

$list_js = mc_get_option( 'list_javascript' );
$grid_js = mc_get_option( 'calendar_javascript' );
Expand Down Expand Up @@ -1800,6 +1801,7 @@ function my_calendar( $args ) {
$params['time'],
$main_class,
$has_modal,
$custom,
);
/**
* Filter classes used on the main My Calendar wrapper element.
Expand Down
1 change: 1 addition & 0 deletions src/my-calendar-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function my_calendar_insert( $atts, $content = null ) {
'weekends' => mc_get_option( 'show_weekends' ),
'hide_groups' => '', // Hide grouped events after first.
'hide_recurring' => 'card', // Hide recurring events after first. Comma-separated list of formats.
'class' => '',
),
$atts,
'my_calendar'
Expand Down

0 comments on commit 8bd3165

Please sign in to comment.