Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/wp-includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,13 @@

return $m[1] . $m[6];
}

/**
* Displays the current year.
*
* Example: [current_year]
*/
function wp_shortcode_current_year( $atts ) {
return date_i18n( 'Y' );

Check failure on line 772 in src/wp-includes/shortcodes.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Tabs must be used to indent lines; spaces are not allowed
}
add_shortcode( 'current_year', 'wp_shortcode_current_year' );
Loading