wp/wp-includes/theme-compat/sidebar.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
     1 <?php
     1 <?php
     2 /**
     2 /**
     3  * @package WordPress
     3  * @package WordPress
     4  * @subpackage Theme_Compat
     4  * @subpackage Theme_Compat
     5  * @deprecated 3.0
     5  * @deprecated 3.0.0
     6  *
     6  *
     7  * This file is here for Backwards compatibility with old themes and will be removed in a future version
     7  * This file is here for backward compatibility with old themes and will be removed in a future version.
     8  *
       
     9  */
     8  */
    10 _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
     9 _deprecated_file(
       
    10 	/* translators: %s: template name */
       
    11 	sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
       
    12 	'3.0.0',
       
    13 	null,
       
    14 	/* translators: %s: template name */
       
    15 	sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )
       
    16 );
    11 ?>
    17 ?>
    12 	<div id="sidebar" role="complementary">
    18 	<div id="sidebar" role="complementary">
    13 		<ul>
    19 		<ul>
    14 			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    20 			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    15 					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    21 					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    22 			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
    28 			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
    23 			</li>
    29 			</li>
    24 			-->
    30 			-->
    25 
    31 
    26 			<?php if ( is_404() || is_category() || is_day() || is_month() ||
    32 			<?php if ( is_404() || is_category() || is_day() || is_month() ||
    27 						is_year() || is_search() || is_paged() ) {
    33 						is_year() || is_search() || is_paged() ) :
    28 			?> <li>
    34 			?> <li>
    29 
    35 
    30 			<?php /* If this is a 404 page */ if (is_404()) { ?>
    36 			<?php if ( is_404() ) : /* If this is a 404 page */ ?>
    31 			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
    37 			<?php elseif ( is_category() ) : /* If this is a category archive */ ?>
    32 			<p><?php printf(__('You are currently browsing the archives for the %s category.'), single_cat_title('', false)); ?></p>
    38 				<p><?php /* translators: %s: category name */
       
    39 					printf( __( 'You are currently browsing the archives for the %s category.' ),
       
    40 						single_cat_title( '', false )
       
    41 					);
       
    42 				?></p>
    33 
    43 
    34 			<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    44 			<?php elseif ( is_day() ) : /* If this is a daily archive */ ?>
    35 			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the day %3$s.'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('l, F jS, Y'))); ?></p>
    45 				<p><?php /* translators: 1: site link, 2: archive date */
       
    46 					printf( __( 'You are currently browsing the %1$s blog archives for the day %2$s.' ),
       
    47 						sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) ),
       
    48 						get_the_time( __( 'l, F jS, Y' ) )
       
    49 					);
       
    50 				?></p>
    36 
    51 
    37 			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    52 			<?php elseif ( is_month() ) : /* If this is a monthly archive */ ?>
    38 			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for %3$s.'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('F, Y'))); ?></p>
    53 				<p><?php /* translators: 1: site link, 2: archive month */
       
    54 					printf( __( 'You are currently browsing the %1$s blog archives for %2$s.' ),
       
    55 						sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) ),
       
    56 						get_the_time( __( 'F, Y' ) )
       
    57 					);
       
    58 				?></p>
    39 
    59 
    40 			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    60 			<?php elseif ( is_year() ) : /* If this is a yearly archive */ ?>
    41 			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the year %3$s.'), get_bloginfo('url'), get_bloginfo('name'), get_the_time('Y')); ?></p>
    61 				<p><?php /* translators: 1: site link, 2: archive year */
       
    62 					printf( __( 'You are currently browsing the %1$s blog archives for the year %2$s.' ),
       
    63 						sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) ),
       
    64 						get_the_time( 'Y' )
       
    65 					);
       
    66 				?></p>
    42 
    67 
    43 			<?php /* If this is a search result */ } elseif (is_search()) { ?>
    68 			<?php elseif ( is_search() ) : /* If this is a search result */ ?>
    44 			<p><?php printf(__('You have searched the <a href="%1$s/">%2$s</a> blog archives for <strong>&#8216;%3$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links.'), get_bloginfo('url'), get_bloginfo('name'), esc_html( get_search_query() ) ); ?></p>
    69 				<p><?php /* translators: 1: site link, 2: search query */
       
    70 					printf( __( 'You have searched the %1$s blog archives for <strong>&#8216;%2$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links.' ),
       
    71 						sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) ),
       
    72 						esc_html( get_search_query() )
       
    73 					);
       
    74 				?></p>
    45 
    75 
    46 			<?php /* If this set is paginated */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    76 			<?php elseif ( isset( $_GET['paged'] ) && ! empty( $_GET['paged'] ) ) : /* If this set is paginated */ ?>
    47 			<p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives.'), get_bloginfo('url'), get_bloginfo('name')); ?></p>
    77 				<p><?php /* translators: %s: site link */
       
    78 					printf( __( 'You are currently browsing the %s blog archives.' ),
       
    79 						sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) )
       
    80 					);
       
    81 				?></p>
    48 
    82 
    49 			<?php } ?>
    83 			<?php endif; ?>
    50 
    84 
    51 			</li>
    85 			</li>
    52 		<?php }?>
    86 		<?php endif; ?>
    53 		</ul>
    87 		</ul>
    54 		<ul role="navigation">
    88 		<ul role="navigation">
    55 			<?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>
    89 			<?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>
    56 
    90 
    57 			<li><h2><?php _e('Archives'); ?></h2>
    91 			<li><h2><?php _e('Archives'); ?></h2>
    61 			</li>
    95 			</li>
    62 
    96 
    63 			<?php wp_list_categories(array('show_count' => 1, 'title_li' => '<h2>' . __('Categories') . '</h2>')); ?>
    97 			<?php wp_list_categories(array('show_count' => 1, 'title_li' => '<h2>' . __('Categories') . '</h2>')); ?>
    64 		</ul>
    98 		</ul>
    65 		<ul>
    99 		<ul>
    66 			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
   100 			<?php if ( is_home() || is_page() ) { /* If this is the frontpage */ ?>
    67 				<?php wp_list_bookmarks(); ?>
   101 				<?php wp_list_bookmarks(); ?>
    68 
   102 
    69 				<li><h2><?php _e('Meta'); ?></h2>
   103 				<li><h2><?php _e('Meta'); ?></h2>
    70 				<ul>
   104 				<ul>
    71 					<?php wp_register(); ?>
   105 					<?php wp_register(); ?>
    72 					<li><?php wp_loginout(); ?></li>
   106 					<li><?php wp_loginout(); ?></li>
    73 					<li><a href="http://validator.w3.org/check/referer" title="<?php esc_attr_e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
       
    74 					<li><a href="http://gmpg.org/xfn/"><abbr title="<?php esc_attr_e('XHTML Friends Network'); ?>"><?php _e('XFN'); ?></abbr></a></li>
       
    75 					<li><a href="https://wordpress.org/" title="<?php esc_attr_e('Powered by WordPress, state-of-the-art semantic personal publishing platform.'); ?>">WordPress</a></li>
       
    76 					<?php wp_meta(); ?>
   107 					<?php wp_meta(); ?>
    77 				</ul>
   108 				</ul>
    78 				</li>
   109 				</li>
    79 			<?php } ?>
   110 			<?php } ?>
    80 
   111 
    81 			<?php endif; ?>
   112 			<?php endif; /* ! dynamic_sidebar() */ ?>
    82 		</ul>
   113 		</ul>
    83 	</div>
   114 	</div>