' . get_bloginfo( 'name' ) . '';
}
/**
* Shortcode to display a link to WordPress.org.
* @since 0.6
*/
function hybrid_wp_link_shortcode() {
return '' . __('WordPress', 'hybrid') . '';
}
/**
* Shortcode to display a link to the Hybrid theme page.
* @uses get_theme_data() to retrieve theme info.
*
* @since 0.6
*/
function hybrid_theme_link_shortcode() {
$data = get_theme_data( TEMPLATEPATH . '/style.css' );
return '' . __('Hybrid', 'hybrid') . '';
}
/**
* Shortcode to display a link to the child theme's page.
* @uses get_theme_data() to retrieve theme info.
*
* @since 0.6
*/
function hybrid_child_link_shortcode() {
$data = get_theme_data( STYLESHEETPATH . '/style.css' );
return '' . $data['Name'] . '';
}
/**
* Shortcode to display a login link or logout link.
* @since 0.6
*/
function hybrid_loginout_link_shortcode() {
if ( is_singular() )
$redirect = get_permalink();
if ( is_user_logged_in() )
$out = '' . __('Log out', 'hybrid') . '';
else
$out = '' . __('Log in', 'hybrid') . '';
return $out;
}
/**
* Displays query count and load time.
* @uses current_user_can() to check for a user that can switch
* themes. Only those users can see the query count.
*
* @since 0.6
*/
function hybrid_query_counter_shortcode() {
if ( current_user_can( 'switch_themes' ) )
$out = sprintf( __('This page loaded in %1$s seconds with %2$s database queries.', 'hybrid'), timer_stop( 0, 3 ), get_num_queries() );
return $out;
}
?>