PageRenderTime 51ms CodeModel.GetById 28ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/wordpress/wp-content/themes/responsive/includes/functions.php

https://bitbucket.org/mpizza/aws-pizza
PHP | 696 lines | 396 code | 142 blank | 158 comment | 61 complexity | 622f1791c95292d50d0de12b61de38ca MD5 | raw file
  1<?php
  2
  3// Exit if accessed directly
  4if ( !defined('ABSPATH')) exit;
  5
  6/**
  7 * Theme's Functions and Definitions
  8 *
  9 *
 10 * @file           functions.php
 11 * @package        Responsive 
 12 * @author         Emil Uzelac 
 13 * @copyright      2003 - 2013 ThemeID
 14 * @license        license.txt
 15 * @version        Release: 1.2.1
 16 * @filesource     wp-content/themes/responsive/includes/functions.php
 17 * @link           http://codex.wordpress.org/Theme_Development#Functions_File
 18 * @since          available since Release 1.0
 19 */
 20?>
 21<?php
 22/**
 23 * Fire up the engines boys and girls let's start theme setup.
 24 */
 25add_action('after_setup_theme', 'responsive_setup');
 26
 27if (!function_exists('responsive_setup')):
 28
 29    function responsive_setup() {
 30
 31        global $content_width;
 32
 33        /**
 34         * Global content width.
 35         */
 36        if (!isset($content_width))
 37            $content_width = 550;
 38
 39        /**
 40         * Responsive is now available for translations.
 41         * Add your files into /languages/ directory.
 42		 * @see http://codex.wordpress.org/Function_Reference/load_theme_textdomain
 43         */
 44	    load_theme_textdomain('responsive', get_template_directory().'/languages');
 45
 46            $locale = get_locale();
 47            $locale_file = get_template_directory().'/languages/$locale.php';
 48            if (is_readable( $locale_file))
 49	            require_once( $locale_file);
 50						
 51        /**
 52         * Add callback for custom TinyMCE editor stylesheets. (editor-style.css)
 53         * @see http://codex.wordpress.org/Function_Reference/add_editor_style
 54         */
 55        add_editor_style();
 56
 57        /**
 58         * This feature enables post and comment RSS feed links to head.
 59         * @see http://codex.wordpress.org/Function_Reference/add_theme_support#Feed_Links
 60         */
 61        add_theme_support('automatic-feed-links');
 62
 63        /**
 64         * This feature enables post-thumbnail support for a theme.
 65         * @see http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
 66         */
 67        add_theme_support('post-thumbnails');
 68
 69        /**
 70         * This feature enables custom-menus support for a theme.
 71         * @see http://codex.wordpress.org/Function_Reference/register_nav_menus
 72         */	
 73        register_nav_menus(array(
 74			'top-menu'         => __('Top Menu', 'responsive'),
 75	        'header-menu'      => __('Header Menu', 'responsive'),
 76	        'sub-header-menu'  => __('Sub-Header Menu', 'responsive'),
 77			'footer-menu'      => __('Footer Menu', 'responsive')
 78		    )
 79	    );
 80
 81		if ( function_exists('get_custom_header')) {
 82			
 83        add_theme_support('custom-background');
 84		
 85		} else {
 86		
 87		// < 3.4 Backward Compatibility
 88		
 89		/**
 90         * This feature allows users to use custom background for a theme.
 91         * @see http://codex.wordpress.org/Function_Reference/add_custom_background
 92         */
 93		
 94        add_custom_background();
 95		
 96		}
 97
 98		// WordPress 3.4 >
 99		if (function_exists('get_custom_header')) {
100			
101		add_theme_support('custom-header', array (
102	        // Header image default
103	       'default-image'			=> get_template_directory_uri() . '/images/default-logo.png',
104	        // Header text display default
105	       'header-text'			=> false,
106	        // Header image flex width
107		   'flex-width'             => true,
108	        // Header image width (in pixels)
109	       'width'				    => 300,
110		    // Header image flex height
111		   'flex-height'            => true,
112	        // Header image height (in pixels)
113	       'height'			        => 100,
114	        // Admin header style callback
115	       'admin-head-callback'	=> 'responsive_admin_header_style'));
116		   
117		// gets included in the admin header
118        function responsive_admin_header_style() {
119            ?><style type="text/css">
120                .appearance_page_custom-header #headimg {
121					background-repeat:no-repeat;
122					border:none;
123				}
124             </style><?php
125        }		  
126	   
127	    } else {
128		   
129        // Backward Compatibility
130		
131		/**
132         * This feature adds a callbacks for image header display.
133		 * In our case we are using this to display logo.
134         * @see http://codex.wordpress.org/Function_Reference/add_custom_image_header
135         */
136        define('HEADER_TEXTCOLOR', '');
137        define('HEADER_IMAGE', '%s/images/default-logo.png'); // %s is the template dir uri
138        define('HEADER_IMAGE_WIDTH', 300); // use width and height appropriate for your theme
139        define('HEADER_IMAGE_HEIGHT', 100);
140        define('NO_HEADER_TEXT', true);
141		
142		
143		// gets included in the admin header
144        function responsive_admin_header_style() {
145            ?><style type="text/css">
146                #headimg {
147	                background-repeat:no-repeat;
148                    border:none !important;
149                    width:<?php echo HEADER_IMAGE_WIDTH; ?>px;
150                    height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;
151                }
152             </style><?php
153         }
154         
155		 add_custom_image_header('', 'responsive_admin_header_style');
156		
157	    }
158    }
159
160endif;
161
162/**
163 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
164 */
165function responsive_page_menu_args( $args ) {
166	$args['show_home'] = true;
167	return $args;
168}
169add_filter( 'wp_page_menu_args', 'responsive_page_menu_args' );
170
171/**
172 * This function removes .menu class from custom menus
173 * in widgets only and fallback's on default widget lists
174 * and assigns new unique class called .menu-widget
175 * 
176 * Marko Heijnen Contribution
177 *
178 */
179class responsive_widget_menu_class {
180	public function __construct() {
181		add_action( 'widget_display_callback', array( $this, 'menu_different_class' ), 10, 2 );
182	}
183 
184	public function menu_different_class( $settings, $widget ) {
185		if( $widget instanceof WP_Nav_Menu_Widget )
186			add_filter( 'wp_nav_menu_args', array( $this, 'wp_nav_menu_args' ) );
187 
188		return $settings;
189	}
190 
191	public function wp_nav_menu_args( $args ) {
192		remove_filter( 'wp_nav_menu_args', array( $this, 'wp_nav_menu_args' ) );
193 
194		if( 'menu' == $args['menu_class'] )
195			$args['menu_class'] = 'menu-widget';
196 
197		return $args;
198	}
199}
200new responsive_widget_menu_class();
201
202/**
203 * Removes div from wp_page_menu() and replace with ul.
204 */
205function responsive_wp_page_menu ($page_markup) {
206    preg_match('/^<div class=\"([a-z0-9-_]+)\">/i', $page_markup, $matches);
207        $divclass = $matches[1];
208        $replace = array('<div class="'.$divclass.'">', '</div>');
209        $new_markup = str_replace($replace, '', $page_markup);
210        $new_markup = preg_replace('/^<ul>/i', '<ul class="'.$divclass.'">', $new_markup);
211        return $new_markup; }
212
213add_filter('wp_page_menu', 'responsive_wp_page_menu');
214
215/**
216 * wp_title() Filter for better SEO.
217 *
218 * Adopted from Twenty Twelve
219 * @see http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_title
220 *
221 */
222function responsive_wp_title( $title, $sep ) {
223	global $paged, $page;
224
225	if ( is_feed() )
226		return $title;
227
228	// Add the site name.
229	$title .= get_bloginfo( 'name' );
230
231	// Add the site description for the home/front page.
232	$site_description = get_bloginfo( 'description', 'display' );
233	if ( $site_description && ( is_home() || is_front_page() ) )
234		$title = "$title $sep $site_description";
235
236	// Add a page number if necessary.
237	if ( $paged >= 2 || $page >= 2 )
238		$title = "$title $sep " . sprintf( __( 'Page %s', 'responsive' ), max( $paged, $page ) );
239
240	return $title;
241}
242add_filter( 'wp_title', 'responsive_wp_title', 10, 2 );
243
244/**
245 * wp_title() Filter removal for the sake of SEO plugins
246 *
247 */
248function responsive_wp_title_check() {
249	if ( defined( 'AIOSEOP_VERSION' ) ) {
250		remove_filter( 'wp_title', 'responsive_wp_title', 10, 2 );
251	}
252}
253add_action( 'after_setup_theme', 'responsive_wp_title_check', 5 );
254
255/**
256 * Filter 'get_comments_number'
257 * 
258 * Filter 'get_comments_number' to display correct 
259 * number of comments (count only comments, not 
260 * trackbacks/pingbacks)
261 *
262 * Chip Bennett Contribution
263 */
264function responsive_comment_count( $count ) {  
265	if ( ! is_admin() ) {
266		global $id;
267		$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
268		return count($comments_by_type['comment']);
269	} else {
270		return $count;
271	}
272}
273add_filter('get_comments_number', 'responsive_comment_count', 0);
274
275/**
276 * wp_list_comments() Pings Callback
277 * 
278 * wp_list_comments() Callback function for 
279 * Pings (Trackbacks/Pingbacks)
280 */
281function responsive_comment_list_pings( $comment ) {
282	$GLOBALS['comment'] = $comment;
283?>
284	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"><?php echo comment_author_link(); ?></li>
285<?php }
286
287/**
288 * Sets the post excerpt length to 40 words.
289 * Adopted from Coraline
290 */
291function responsive_excerpt_length($length) {
292    return 40;
293}
294
295add_filter('excerpt_length', 'responsive_excerpt_length');
296
297/**
298 * Returns a "Read more" link for excerpts
299 */
300function responsive_read_more() {
301    return '<div class="read-more"><a href="' . get_permalink() . '">' . __('Read more &#8250;', 'responsive') . '</a></div><!-- end of .read-more -->';
302}
303
304/**
305 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and responsive_read_more_link().
306 */
307function responsive_auto_excerpt_more($more) {
308    return '<span class="ellipsis">&hellip;</span>' . responsive_read_more();
309}
310
311add_filter('excerpt_more', 'responsive_auto_excerpt_more');
312
313/**
314 * Adds a pretty "Read more" link to custom post excerpts.
315 */
316function responsive_custom_excerpt_more($output) {
317    if (has_excerpt() && !is_attachment()) {
318        $output .= responsive_read_more();
319    }
320    return $output;
321}
322
323add_filter('get_the_excerpt', 'responsive_custom_excerpt_more');
324
325
326/**
327 * This function removes inline styles set by WordPress gallery.
328 */
329function responsive_remove_gallery_css($css) {
330    return preg_replace("#<style type='text/css'>(.*?)</style>#s", '', $css);
331}
332
333add_filter('gallery_style', 'responsive_remove_gallery_css');
334
335/**
336 * This function removes default styles set by WordPress recent comments widget.
337 */
338function responsive_remove_recent_comments_style() {
339	global $wp_widget_factory;
340	remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
341}
342add_action( 'widgets_init', 'responsive_remove_recent_comments_style' );
343
344/**
345 * This function prints post meta data.
346 *
347 * Ulrich Pogson Contribution 
348 *
349 */
350if (!function_exists('responsive_post_meta_data')) :
351
352function responsive_post_meta_data() {
353	printf( __( '<span class="%1$s">Posted on </span>%2$s<span class="%3$s"> by </span>%4$s', 'responsive' ),
354	'meta-prep meta-prep-author posted', 
355	sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="timestamp">%3$s</span></a>',
356		get_permalink(),
357		esc_attr( get_the_time() ),
358		get_the_date()
359	),
360	'byline',
361	sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
362		get_author_posts_url( get_the_author_meta( 'ID' ) ),
363		sprintf( esc_attr__( 'View all posts by %s', 'responsive' ), get_the_author() ),
364		get_the_author()
365	    )
366	);
367}
368endif;
369
370/**
371 * This function removes WordPress generated category and tag atributes.
372 * For W3C validation purposes only.
373 * 
374 */
375function responsive_category_rel_removal ($output) {
376    $output = str_replace(' rel="category tag"', '', $output);
377    return $output;
378}
379
380add_filter('wp_list_categories', 'responsive_category_rel_removal');
381add_filter('the_category', 'responsive_category_rel_removal');
382
383/**
384 * Breadcrumb Lists
385 * Allows visitors to quickly navigate back to a previous section or the root page.
386 *
387 * Adopted from Dimox
388 *
389 */
390if (!function_exists('responsive_breadcrumb_lists')) :
391    
392    function responsive_breadcrumb_lists() {
393  
394    $chevron = '<span class="chevron">&#8250;</span>';
395    $home = __('Home','responsive'); // text for the 'Home' link
396    $before = '<span class="breadcrumb-current">'; // tag before the current crumb
397    $after = '</span>'; // tag after the current crumb
398 
399        if ( !is_home() && !is_front_page() || is_paged() ) {
400 
401            echo '<div class="breadcrumb-list">';
402 
403            global $post;
404            $homeLink = home_url();
405            
406			echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $chevron . ' ';
407 
408        if ( is_category() ) {
409            global $wp_query;
410			
411            $cat_obj = $wp_query->get_queried_object();
412            $thisCat = $cat_obj->term_id;
413            $thisCat = get_category($thisCat);
414            $parentCat = get_category($thisCat->parent);
415      
416	  if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $chevron . ' '));
417      
418	      echo $before; printf( __( 'Archive for %s', 'responsive' ), single_cat_title('', false) ); $after;
419 
420      } elseif ( is_day() ) {
421      
422	      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $chevron . ' ';
423          echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $chevron . ' ';
424          echo $before . get_the_time('d') . $after;
425 
426      } elseif ( is_month() ) {
427     
428	      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $chevron . ' ';
429          echo $before . get_the_time('F') . $after;
430 
431      } elseif ( is_year() ) {
432		  
433          echo $before . get_the_time('Y') . $after;
434 
435      } elseif ( is_single() && !is_attachment() ) {
436      
437	  if ( get_post_type() != 'post' ) {
438          $post_type = get_post_type_object(get_post_type());
439          $slug = $post_type->rewrite;
440        
441		  echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $chevron . ' ';
442          echo $before . get_the_title() . $after;
443		  
444      } else {
445		  
446          $cat = get_the_category(); $cat = $cat[0];
447          
448		  echo get_category_parents($cat, TRUE, ' ' . $chevron . ' ');
449          echo $before . get_the_title() . $after;
450      }
451 
452      } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {
453      
454	      $post_type = get_post_type_object(get_post_type());
455          
456		  echo $before . $post_type->labels->singular_name . $after;
457 
458      } elseif ( is_attachment() ) {
459      
460	      $parent = get_post($post->post_parent);
461          $cat = get_the_category($parent->ID); $cat = $cat[0];
462      
463	      echo get_category_parents($cat, TRUE, ' ' . $chevron . ' ');
464          echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> ' . $chevron . ' ';
465          echo $before . get_the_title() . $after;
466 
467      } elseif ( is_page() && !$post->post_parent ) {
468          
469		  echo $before . get_the_title() . $after;
470 
471      } elseif ( is_page() && $post->post_parent ) {
472      
473	      $parent_id  = $post->post_parent;
474          $breadcrumbs = array();
475      
476	  while ($parent_id) {
477          $page = get_page($parent_id);
478          $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
479          $parent_id  = $page->post_parent;
480      }
481	  
482          $breadcrumbs = array_reverse($breadcrumbs);
483      
484	  foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $chevron . ' ';
485	  
486          echo $before . get_the_title() . $after;
487 
488      } elseif ( is_search() ) {
489          
490		  echo $before; printf( __( 'Search results for: %s', 'responsive' ), get_search_query() ); $after;
491 
492      } elseif ( is_tag() ) {
493          
494		  echo $before; printf( __( 'Posts tagged %s', 'responsive' ), single_tag_title('', false) ); $after;
495 
496      } elseif ( is_author() ) {
497          
498		  global $author;
499      
500	      $userdata = get_userdata($author);
501          
502		  echo $before; printf( __( 'View all posts by %s', 'responsive' ), $userdata->display_name ); $after;
503 
504      } elseif ( is_404() ) {
505          echo $before . __('Error 404 ','responsive') . $after;
506      }
507 
508      if ( get_query_var('paged') ) {
509      if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
510      
511	      echo __('Page','responsive') . ' ' . get_query_var('paged');
512      
513	  if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
514      }
515 
516        echo '</div>';
517 
518      }
519    }
520
521endif;
522
523    /**
524     * A safe way of adding JavaScripts to a WordPress generated page.
525     */
526    if (!is_admin())
527        add_action('wp_enqueue_scripts', 'responsive_js');
528
529    if (!function_exists('responsive_js')) {
530
531        function responsive_js() {
532			// JS at the bottom for fast page loading. 
533			// except for Modernizr which enables HTML5 elements & feature detects.
534			wp_enqueue_script('modernizr', get_template_directory_uri() . '/js/responsive-modernizr.js', array('jquery'), '2.6.1', false);
535            wp_enqueue_script('responsive-scripts', get_template_directory_uri() . '/js/responsive-scripts.js', array('jquery'), '1.2.3', true);
536			wp_enqueue_script('responsive-plugins', get_template_directory_uri() . '/js/responsive-plugins.js', array('jquery'), '1.2.2', true);
537        }
538
539    }
540
541    /**
542     * A comment reply.
543     */
544        function responsive_enqueue_comment_reply() {
545    if ( is_singular() && comments_open() && get_option('thread_comments')) { 
546            wp_enqueue_script('comment-reply'); 
547        }
548    }
549
550    add_action( 'wp_enqueue_scripts', 'responsive_enqueue_comment_reply' );
551
552    /**
553     * Theme Options Support and Information
554     */	
555    function responsive_theme_support () {
556    ?>
557    
558    <div id="info-box-wrapper" class="grid col-940">
559        <div class="info-box notice">
560            <a class="button" href="<?php echo esc_url(__('http://themeid.com/support/','responsive')); ?>" title="<?php esc_attr_e('Theme Support', 'responsive'); ?>" target="_blank">
561            <?php printf(__('Theme Support','responsive')); ?></a>
562            
563            <a class="button" href="<?php echo esc_url(__('http://themeid.com/themes/','responsive')); ?>" title="<?php esc_attr_e('More Themes', 'responsive'); ?>" target="_blank">
564            <?php printf(__('More Themes','responsive')); ?></a>
565            
566            <a class="button" href="<?php echo esc_url(__('http://themeid.com/showcase/','responsive')); ?>" title="<?php esc_attr_e('Showcase', 'responsive'); ?>" target="_blank">
567            <?php printf(__('Showcase','responsive')); ?></a>
568            
569            <a class="button-primary" href="<?php echo esc_url(__('http://themeid.com/donate/','responsive')); ?>" title="<?php esc_attr_e('Donate Now', 'responsive'); ?>" target="_blank">
570            <?php printf(__('Donate Now','responsive')); ?></a>
571        </div>
572    </div>
573
574    <?php }
575 
576    add_action('responsive_theme_options','responsive_theme_support');
577
578	 
579    /**
580     * WordPress Widgets start right here.
581     */
582    function responsive_widgets_init() {
583
584        register_sidebar(array(
585            'name' => __('Main Sidebar', 'responsive'),
586            'description' => __('Area 1 - sidebar.php', 'responsive'),
587            'id' => 'main-sidebar',
588            'before_title' => '<div class="widget-title">',
589            'after_title' => '</div>',
590            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
591            'after_widget' => '</div>'
592        ));
593
594        register_sidebar(array(
595            'name' => __('Right Sidebar', 'responsive'),
596            'description' => __('Area 2 - sidebar-right.php', 'responsive'),
597            'id' => 'right-sidebar',
598            'before_title' => '<div class="widget-title">',
599            'after_title' => '</div>',
600            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
601            'after_widget' => '</div>'
602        ));
603				
604        register_sidebar(array(
605            'name' => __('Left Sidebar', 'responsive'),
606            'description' => __('Area 3 - sidebar-left.php', 'responsive'),
607            'id' => 'left-sidebar',
608            'before_title' => '<div class="widget-title">',
609            'after_title' => '</div>',
610            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
611            'after_widget' => '</div>'
612        ));
613		
614        register_sidebar(array(
615            'name' => __('Left Sidebar Half Page', 'responsive'),
616            'description' => __('Area 4 - sidebar-left-half.php', 'responsive'),
617            'id' => 'left-sidebar-half',
618            'before_title' => '<div class="widget-title">',
619            'after_title' => '</div>',
620            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
621            'after_widget' => '</div>'
622        ));
623		
624        register_sidebar(array(
625            'name' => __('Right Sidebar Half Page', 'responsive'),
626            'description' => __('Area 5 - sidebar-right-half.php', 'responsive'),
627            'id' => 'right-sidebar-half',
628            'before_title' => '<div class="widget-title">',
629            'after_title' => '</div>',
630            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
631            'after_widget' => '</div>'
632        ));
633
634        register_sidebar(array(
635            'name' => __('Home Widget 1', 'responsive'),
636            'description' => __('Area 6 - sidebar-home.php', 'responsive'),
637            'id' => 'home-widget-1',
638            'before_title' => '<div id="widget-title-one" class="widget-title-home"><h3>',
639            'after_title' => '</h3></div>',
640            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
641            'after_widget' => '</div>'
642        ));
643
644        register_sidebar(array(
645            'name' => __('Home Widget 2', 'responsive'),
646            'description' => __('Area 7 - sidebar-home.php', 'responsive'),
647            'id' => 'home-widget-2',
648            'before_title' => '<div id="widget-title-two" class="widget-title-home"><h3>',
649            'after_title' => '</h3></div>',
650            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
651            'after_widget' => '</div>'
652        ));
653
654        register_sidebar(array(
655            'name' => __('Home Widget 3', 'responsive'),
656            'description' => __('Area 8 - sidebar-home.php', 'responsive'),
657            'id' => 'home-widget-3',
658            'before_title' => '<div id="widget-title-three" class="widget-title-home"><h3>',
659            'after_title' => '</h3></div>',
660            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
661            'after_widget' => '</div>'
662        ));
663
664        register_sidebar(array(
665            'name' => __('Gallery Sidebar', 'responsive'),
666            'description' => __('Area 9 - sidebar-gallery.php', 'responsive'),
667            'id' => 'gallery-widget',
668            'before_title' => '<div class="widget-title">',
669            'after_title' => '</div>',
670            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
671            'after_widget' => '</div>'
672        ));
673		
674        register_sidebar(array(
675            'name' => __('Colophon Widget', 'responsive'),
676            'description' => __('Area 10 - sidebar-colophon.php', 'responsive'),
677            'id' => 'colophon-widget',
678            'before_title' => '<div class="widget-title">',
679            'after_title' => '</div>',
680            'before_widget' => '<div id="%1$s" class="colophon-widget widget-wrapper %2$s">',
681            'after_widget' => '</div>'
682        ));
683		
684        register_sidebar(array(
685            'name' => __('Top Widget', 'responsive'),
686            'description' => __('Area 11 - sidebar-top.php', 'responsive'),
687            'id' => 'top-widget',
688            'before_title' => '<div class="widget-title">',
689            'after_title' => '</div>',
690            'before_widget' => '<div id="%1$s" class="%2$s">',
691            'after_widget' => '</div>'
692        ));
693    }
694	
695    add_action('widgets_init', 'responsive_widgets_init');
696?>