Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create [year] shortcodes in text widgets
- function year_shortcode() {
- $year = date('Y');
- return $year;
- }
- add_shortcode('year', 'year_shortcode');
- // Enable shortcodes in text widgets
- add_filter('widget_text', 'do_shortcode');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement