'. __('RSS Feeds',THEME_NS) .''; } // ads function theme_advertisement($atts){ extract(shortcode_atts(array( 'code' => 1, 'align' => 'left', 'inline' => 0 ), $atts)); $ad = theme_get_option('theme_ad_code_'.$code); if(!empty($ad)): $ad = '
'.$ad.'
'; if(!$inline) $ad .= '
'; return $ad; else: return '

[ad] '.sprintf(__("Empty ad slot (#%s)!",THEME_NS),esc_attr($code)).'

'; endif; } function theme_go_to_top(){ return sprintf(''.__('Top',THEME_NS).''); } // login function theme_login_link(){ if (is_user_logged_in()) return sprintf('%2$s',admin_url(),__('Site Admin', THEME_NS)); else return sprintf('%2$s',wp_login_url(),__('Log in', THEME_NS)); } // blog title function theme_blog_title(){ return '' . get_bloginfo('name') . ''; } // validate xhtml function theme_validate_xhtml(){ return 'XHTML 1.1'; } // validate css function theme_validate_css(){ return 'CSS 3.0'; } // current year function theme_current_year(){ return date('Y'); } add_shortcode('year', 'theme_current_year'); add_shortcode('rss', 'theme_subscribe_rss'); add_shortcode('ad', 'theme_advertisement'); add_shortcode('top', 'theme_go_to_top'); add_shortcode('login-link', 'theme_login_link'); add_shortcode('blog-title', 'theme_blog_title'); add_shortcode('xhtml', 'theme_validate_xhtml'); add_shortcode('css', 'theme_validate_css'); add_filter('widget_text', 'do_shortcode'); // Allow [SHORTCODES] in Widgets ?>