web/wp-content/themes/thematic/library/extensions/shortcodes.php
changeset 1 0d28b7c10758
equal deleted inserted replaced
0:0d9a58d2c515 1:0d28b7c10758
       
     1 <?php
       
     2 
       
     3 function thmfooter_wp_link() {
       
     4     return '<a class="wp-link" href="http://WordPress.org/" title="WordPress" rel="generator">WordPress</a>';
       
     5 }
       
     6 add_shortcode('wp-link', 'thmfooter_wp_link');		  
       
     7 		  
       
     8 function thmfooter_theme_link() {
       
     9     $themelink = '<a class="theme-link" href="http://themeshaper.com/thematic/" title="Thematic Theme Framework" rel="designer">Thematic Theme Framework</a>';
       
    10     return apply_filters('thematic_theme_link',$themelink);
       
    11 }
       
    12 add_shortcode('theme-link', 'thmfooter_theme_link');	
       
    13 
       
    14 function thmfooter_login_link() {
       
    15     if ( ! is_user_logged_in() )
       
    16         $link = '<a href="' . get_option('siteurl') . '/wp-login.php">' . __('Login','thematic') . '</a>';
       
    17     else
       
    18     $link = '<a href="' . wp_logout_url($redirect) . '">' . __('Logout','thematic') . '</a>';
       
    19     return apply_filters('loginout', $link);
       
    20 }
       
    21 add_shortcode('loginout-link', 'thmfooter_login_link');		  	  
       
    22 
       
    23 function thmfooter_blog_title() {
       
    24 	return '<span class="blog-title">' . get_bloginfo('name') . '</span>';
       
    25 }
       
    26 add_shortcode('blog-title', 'thmfooter_blog_title');
       
    27 
       
    28 function thmfooter_blog_link() {
       
    29 	return '<a href="' . get_option('siteurl') . '" title="' . get_option('blogname') . '" >' . get_option('blogname') . "</a>";
       
    30 }
       
    31 add_shortcode('blog-link', 'thmfooter_blog_link');
       
    32 
       
    33 function thmfooter_year() {   
       
    34     return '<span class="the-year">' . date('Y') . '</span>';
       
    35 }
       
    36 add_shortcode('the-year', 'thmfooter_year');
       
    37 
       
    38 // Providing information about Thematic
       
    39 
       
    40 function theme_name() {
       
    41     return THEMENAME;
       
    42 }
       
    43 add_shortcode('theme-name', 'theme_name');
       
    44 
       
    45 function theme_author() {
       
    46     return THEMEAUTHOR;
       
    47 }
       
    48 add_shortcode('theme-author', 'theme_author');
       
    49 
       
    50 function theme_uri() {
       
    51     return THEMEURI;
       
    52 }
       
    53 add_shortcode('theme-uri', 'theme_uri');
       
    54 
       
    55 function theme_version() {
       
    56     return THEMATICVERSION;
       
    57 }
       
    58 add_shortcode('theme-version', 'theme_version');
       
    59 
       
    60 // Providing information about the child theme
       
    61 
       
    62 function child_name() {
       
    63     return TEMPLATENAME;
       
    64 }
       
    65 add_shortcode('child-name', 'child_name');
       
    66 
       
    67 function child_author() {
       
    68     return TEMPLATEAUTHOR;
       
    69 }
       
    70 add_shortcode('child-author', 'child_author');
       
    71 
       
    72 function child_uri() {
       
    73     return TEMPLATEURI;
       
    74 }
       
    75 add_shortcode('child-uri', 'child_uri');
       
    76 
       
    77 function child_version() {
       
    78     return TEMPLATEVERSION;
       
    79 }
       
    80 add_shortcode('child-version', 'child_version');
       
    81 
       
    82 ?>