mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
aaf99e6913
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. Built from https://develop.svn.wordpress.org/trunk@42343 git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
60 lines
1.5 KiB
PHP
60 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Sidebar template containing the primary and secondary widget areas
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Twenty_Ten
|
|
* @since Twenty Ten 1.0
|
|
*/
|
|
?>
|
|
|
|
<div id="primary" class="widget-area" role="complementary">
|
|
<ul class="xoxo">
|
|
|
|
<?php
|
|
/*
|
|
* When we call the dynamic_sidebar() function, it'll spit out
|
|
* the widgets for that widget area. If it instead returns false,
|
|
* then the sidebar simply doesn't exist, so we'll hard-code in
|
|
* some default sidebar stuff just in case.
|
|
*/
|
|
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) :
|
|
?>
|
|
|
|
<li id="search" class="widget-container widget_search">
|
|
<?php get_search_form(); ?>
|
|
</li>
|
|
|
|
<li id="archives" class="widget-container">
|
|
<h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
|
|
<ul>
|
|
<?php wp_get_archives( 'type=monthly' ); ?>
|
|
</ul>
|
|
</li>
|
|
|
|
<li id="meta" class="widget-container">
|
|
<h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
|
|
<ul>
|
|
<?php wp_register(); ?>
|
|
<li><?php wp_loginout(); ?></li>
|
|
<?php wp_meta(); ?>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php endif; // end primary widget area ?>
|
|
</ul>
|
|
</div><!-- #primary .widget-area -->
|
|
|
|
<?php
|
|
// A second sidebar for widgets, just because.
|
|
if ( is_active_sidebar( 'secondary-widget-area' ) ) :
|
|
?>
|
|
|
|
<div id="secondary" class="widget-area" role="complementary">
|
|
<ul class="xoxo">
|
|
<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
|
|
</ul>
|
|
</div><!-- #secondary .widget-area -->
|
|
|
|
<?php endif; ?>
|