0, 'format' => 'mmmm', // Default format is 'mmmm' ), $atts); $offset = intval($atts['go']); // go the integer value of the months offset $format = strtolower($atts['format']); // Convert the format attribute to lowercase // Validate the 'format' attribute and set the date format accordingly if ($format === 'mm') { $date_format = 'm'; } elseif ($format === 'mmm') { $date_format = 'M'; } elseif ($format === 'mmmm') { $date_format = 'F'; } else { $date_format = 'F'; // Default to 'mmmm' (full month name) if an invalid format is provided } // If 'go' attribute is specified, calculate the month based on the offset if ($offset !== 0) { return gmdate($date_format, strtotime("{$offset} months")); } // If 'go' attribute is not specified, return the current month in the desired format return gmdate($date_format); } add_shortcode("aio_month", "aiosc_combined_shortcode_month"); // Change the shortcode name here