PageRenderTime 23ms CodeModel.GetById 9ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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

https://bitbucket.org/metrobee/tr.deconord.eu
PHP | 686 lines | 390 code | 142 blank | 154 comment | 60 complexity | d0b09e14daa39a90d8effae59033b290 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 * Filter 'get_comments_number'
246 * 
247 * Filter 'get_comments_number' to display correct 
248 * number of comments (count only comments, not 
249 * trackbacks/pingbacks)
250 *
251 * Chip Bennett Contribution
252 */
253function responsive_comment_count( $count ) {  
254	if ( ! is_admin() ) {
255		global $id;
256		$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
257		return count($comments_by_type['comment']);
258	} else {
259		return $count;
260	}
261}
262add_filter('get_comments_number', 'responsive_comment_count', 0);
263
264/**
265 * wp_list_comments() Pings Callback
266 * 
267 * wp_list_comments() Callback function for 
268 * Pings (Trackbacks/Pingbacks)
269 */
270function responsive_comment_list_pings( $comment ) {
271	$GLOBALS['comment'] = $comment;
272?>
273	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"><?php echo comment_author_link(); ?></li>
274<?php }
275
276/**
277 * Sets the post excerpt length to 40 words.
278 * Adopted from Coraline
279 */
280function responsive_excerpt_length($length) {
281    return 40;
282}
283
284add_filter('excerpt_length', 'responsive_excerpt_length');
285
286/**
287 * Returns a "Read more" link for excerpts
288 */
289function responsive_read_more() {
290    return '<div class="read-more"><a href="' . get_permalink() . '">' . __('Read more &#8250;', 'responsive') . '</a></div><!-- end of .read-more -->';
291}
292
293/**
294 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and responsive_read_more_link().
295 */
296function responsive_auto_excerpt_more($more) {
297    return '<span class="ellipsis">&hellip;</span>' . responsive_read_more();
298}
299
300add_filter('excerpt_more', 'responsive_auto_excerpt_more');
301
302/**
303 * Adds a pretty "Read more" link to custom post excerpts.
304 */
305function responsive_custom_excerpt_more($output) {
306    if (has_excerpt() && !is_attachment()) {
307        $output .= responsive_read_more();
308    }
309    return $output;
310}
311
312add_filter('get_the_excerpt', 'responsive_custom_excerpt_more');
313
314
315/**
316 * This function removes inline styles set by WordPress gallery.
317 */
318function responsive_remove_gallery_css($css) {
319    return preg_replace("#<style type='text/css'>(.*?)</style>#s", '', $css);
320}
321
322add_filter('gallery_style', 'responsive_remove_gallery_css');
323
324/**
325 * This function removes default styles set by WordPress recent comments widget.
326 */
327function responsive_remove_recent_comments_style() {
328	global $wp_widget_factory;
329	remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
330}
331add_action( 'widgets_init', 'responsive_remove_recent_comments_style' );
332
333/**
334 * This function prints post meta data.
335 *
336 * Ulrich Pogson Contribution 
337 *
338 */
339if (!function_exists('responsive_post_meta_data')) :
340
341function responsive_post_meta_data() {
342	printf( __( '<span class="%1$s">Posted on </span>%2$s<span class="%3$s"> by </span>%4$s', 'responsive' ),
343	'meta-prep meta-prep-author posted', 
344	sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="timestamp">%3$s</span></a>',
345		get_permalink(),
346		esc_attr( get_the_time() ),
347		get_the_date()
348	),
349	'byline',
350	sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
351		get_author_posts_url( get_the_author_meta( 'ID' ) ),
352		sprintf( esc_attr__( 'View all posts by %s', 'responsive' ), get_the_author() ),
353		get_the_author()
354	    )
355	);
356}
357endif;
358
359/**
360 * This function removes WordPress generated category and tag atributes.
361 * For W3C validation purposes only.
362 * 
363 */
364function responsive_category_rel_removal ($output) {
365    $output = str_replace(' rel="category tag"', '', $output);
366    return $output;
367}
368
369add_filter('wp_list_categories', 'responsive_category_rel_removal');
370add_filter('the_category', 'responsive_category_rel_removal');
371
372/**
373 * Breadcrumb Lists
374 * Allows visitors to quickly navigate back to a previous section or the root page.
375 *
376 * Adopted from Dimox
377 *
378 */
379if (!function_exists('responsive_breadcrumb_lists')) :
380    
381    function responsive_breadcrumb_lists() {
382  
383    $chevron = '<span class="chevron">&#8250;</span>';
384    $home = __('Home','responsive'); // text for the 'Home' link
385    $before = '<span class="breadcrumb-current">'; // tag before the current crumb
386    $after = '</span>'; // tag after the current crumb
387 
388        if ( !is_home() && !is_front_page() || is_paged() ) {
389 
390            echo '<div class="breadcrumb-list">';
391 
392            global $post;
393            $homeLink = home_url();
394            
395			echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $chevron . ' ';
396 
397        if ( is_category() ) {
398            global $wp_query;
399			
400            $cat_obj = $wp_query->get_queried_object();
401            $thisCat = $cat_obj->term_id;
402            $thisCat = get_category($thisCat);
403            $parentCat = get_category($thisCat->parent);
404      
405	  if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $chevron . ' '));
406      
407	      echo $before; printf( __( 'Archive for %s', 'responsive' ), single_cat_title('', false) ); $after;
408 
409      } elseif ( is_day() ) {
410      
411	      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $chevron . ' ';
412          echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $chevron . ' ';
413          echo $before . get_the_time('d') . $after;
414 
415      } elseif ( is_month() ) {
416     
417	      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $chevron . ' ';
418          echo $before . get_the_time('F') . $after;
419 
420      } elseif ( is_year() ) {
421		  
422          echo $before . get_the_time('Y') . $after;
423 
424      } elseif ( is_single() && !is_attachment() ) {
425      
426	  if ( get_post_type() != 'post' ) {
427          $post_type = get_post_type_object(get_post_type());
428          $slug = $post_type->rewrite;
429        
430		  echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $chevron . ' ';
431          echo $before . get_the_title() . $after;
432		  
433      } else {
434		  
435          $cat = get_the_category(); $cat = $cat[0];
436          
437		  echo get_category_parents($cat, TRUE, ' ' . $chevron . ' ');
438          echo $before . get_the_title() . $after;
439      }
440 
441      } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {
442      
443	      $post_type = get_post_type_object(get_post_type());
444          
445		  echo $before . $post_type->labels->singular_name . $after;
446 
447      } elseif ( is_attachment() ) {
448      
449	      $parent = get_post($post->post_parent);
450          $cat = get_the_category($parent->ID); $cat = $cat[0];
451      
452	      echo get_category_parents($cat, TRUE, ' ' . $chevron . ' ');
453          echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> ' . $chevron . ' ';
454          echo $before . get_the_title() . $after;
455 
456      } elseif ( is_page() && !$post->post_parent ) {
457          
458		  echo $before . get_the_title() . $after;
459 
460      } elseif ( is_page() && $post->post_parent ) {
461      
462	      $parent_id  = $post->post_parent;
463          $breadcrumbs = array();
464      
465	  while ($parent_id) {
466          $page = get_page($parent_id);
467          $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
468          $parent_id  = $page->post_parent;
469      }
470	  
471          $breadcrumbs = array_reverse($breadcrumbs);
472      
473	  foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $chevron . ' ';
474	  
475          echo $before . get_the_title() . $after;
476 
477      } elseif ( is_search() ) {
478          
479		  echo $before; printf( __( 'Search results for: %s', 'responsive' ), get_search_query() ); $after;
480 
481      } elseif ( is_tag() ) {
482          
483		  echo $before; printf( __( 'Posts tagged %s', 'responsive' ), single_tag_title('', false) ); $after;
484 
485      } elseif ( is_author() ) {
486          
487		  global $author;
488      
489	      $userdata = get_userdata($author);
490          
491		  echo $before; printf( __( 'View all posts by %s', 'responsive' ), $userdata->display_name ); $after;
492 
493      } elseif ( is_404() ) {
494          echo $before . __('Error 404 ','responsive') . $after;
495      }
496 
497      if ( get_query_var('paged') ) {
498      if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
499      
500	      echo __('Page','responsive') . ' ' . get_query_var('paged');
501      
502	  if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
503      }
504 
505        echo '</div>';
506 
507      }
508    }
509
510endif;
511
512    /**
513     * A safe way of adding JavaScripts to a WordPress generated page.
514     */
515    if (!is_admin())
516        add_action('wp_enqueue_scripts', 'responsive_js');
517
518    if (!function_exists('responsive_js')) {
519
520        function responsive_js() {
521			// JS at the bottom for fast page loading. 
522			// except for Modernizr which enables HTML5 elements & feature detects.
523			wp_enqueue_script('modernizr', get_template_directory_uri() . '/js/responsive-modernizr.js', array('jquery'), '2.6.1', false);
524            wp_enqueue_script('responsive-scripts', get_template_directory_uri() . '/js/responsive-scripts.js', array('jquery'), '1.2.2', true);
525			wp_enqueue_script('responsive-plugins', get_template_directory_uri() . '/js/responsive-plugins.js', array('jquery'), '1.2.2', true);
526        }
527
528    }
529
530    /**
531     * A comment reply.
532     */
533        function responsive_enqueue_comment_reply() {
534    if ( is_singular() && comments_open() && get_option('thread_comments')) { 
535            wp_enqueue_script('comment-reply'); 
536        }
537    }
538
539    add_action( 'wp_enqueue_scripts', 'responsive_enqueue_comment_reply' );
540
541    /**
542     * Theme Options Support and Information
543     */	
544    function responsive_theme_support () {
545    ?>
546    
547    <div id="info-box-wrapper" class="grid col-940">
548        <div class="info-box notice">
549            <a class="blue button" href="<?php echo esc_url(__('http://themeid.com/support/','responsive')); ?>" title="<?php esc_attr_e('Theme Support', 'responsive'); ?>" target="_blank">
550            <?php printf(__('Theme Support','responsive')); ?></a>
551            
552            <a class="gray button" href="<?php echo esc_url(__('http://themeid.com/themes/','responsive')); ?>" title="<?php esc_attr_e('More Themes', 'responsive'); ?>" target="_blank">
553            <?php printf(__('More Themes','responsive')); ?></a>
554            
555            <a class="gray button" href="<?php echo esc_url(__('http://themeid.com/showcase/','responsive')); ?>" title="<?php esc_attr_e('Showcase', 'responsive'); ?>" target="_blank">
556            <?php printf(__('Showcase','responsive')); ?></a>
557            
558            <a class="gold button" href="<?php echo esc_url(__('http://themeid.com/donate/','responsive')); ?>" title="<?php esc_attr_e('Donate Now', 'responsive'); ?>" target="_blank">
559            <?php printf(__('Donate Now','responsive')); ?></a>
560        </div>
561    </div>
562
563    <?php }
564 
565    add_action('responsive_theme_options','responsive_theme_support');
566
567	 
568    /**
569     * WordPress Widgets start right here.
570     */
571    function responsive_widgets_init() {
572
573        register_sidebar(array(
574            'name' => __('Main Sidebar', 'responsive'),
575            'description' => __('Area 1 - sidebar.php', 'responsive'),
576            'id' => 'main-sidebar',
577            'before_title' => '<div class="widget-title">',
578            'after_title' => '</div>',
579            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
580            'after_widget' => '</div>'
581        ));
582
583        register_sidebar(array(
584            'name' => __('Right Sidebar', 'responsive'),
585            'description' => __('Area 2 - sidebar-right.php', 'responsive'),
586            'id' => 'right-sidebar',
587            'before_title' => '<div class="widget-title">',
588            'after_title' => '</div>',
589            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
590            'after_widget' => '</div>'
591        ));
592				
593        register_sidebar(array(
594            'name' => __('Left Sidebar', 'responsive'),
595            'description' => __('Area 3 - sidebar-left.php', 'responsive'),
596            'id' => 'left-sidebar',
597            'before_title' => '<div class="widget-title">',
598            'after_title' => '</div>',
599            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
600            'after_widget' => '</div>'
601        ));
602		
603        register_sidebar(array(
604            'name' => __('Left Sidebar Half Page', 'responsive'),
605            'description' => __('Area 4 - sidebar-left-half.php', 'responsive'),
606            'id' => 'left-sidebar-half',
607            'before_title' => '<div class="widget-title">',
608            'after_title' => '</div>',
609            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
610            'after_widget' => '</div>'
611        ));
612		
613        register_sidebar(array(
614            'name' => __('Right Sidebar Half Page', 'responsive'),
615            'description' => __('Area 5 - sidebar-right-half.php', 'responsive'),
616            'id' => 'right-sidebar-half',
617            'before_title' => '<div class="widget-title">',
618            'after_title' => '</div>',
619            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
620            'after_widget' => '</div>'
621        ));
622
623        register_sidebar(array(
624            'name' => __('Home Widget 1', 'responsive'),
625            'description' => __('Area 6 - sidebar-home.php', 'responsive'),
626            'id' => 'home-widget-1',
627            'before_title' => '<div id="widget-title-one" class="widget-title-home"><h3>',
628            'after_title' => '</h3></div>',
629            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
630            'after_widget' => '</div>'
631        ));
632
633        register_sidebar(array(
634            'name' => __('Home Widget 2', 'responsive'),
635            'description' => __('Area 7 - sidebar-home.php', 'responsive'),
636            'id' => 'home-widget-2',
637            'before_title' => '<div id="widget-title-two" class="widget-title-home"><h3>',
638            'after_title' => '</h3></div>',
639            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
640            'after_widget' => '</div>'
641        ));
642
643        register_sidebar(array(
644            'name' => __('Home Widget 3', 'responsive'),
645            'description' => __('Area 8 - sidebar-home.php', 'responsive'),
646            'id' => 'home-widget-3',
647            'before_title' => '<div id="widget-title-three" class="widget-title-home"><h3>',
648            'after_title' => '</h3></div>',
649            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
650            'after_widget' => '</div>'
651        ));
652
653        register_sidebar(array(
654            'name' => __('Gallery Sidebar', 'responsive'),
655            'description' => __('Area 9 - sidebar-gallery.php', 'responsive'),
656            'id' => 'gallery-widget',
657            'before_title' => '<div class="widget-title">',
658            'after_title' => '</div>',
659            'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
660            'after_widget' => '</div>'
661        ));
662		
663        register_sidebar(array(
664            'name' => __('Colophon Widget', 'responsive'),
665            'description' => __('Area 10 - sidebar-colophon.php', 'responsive'),
666            'id' => 'colophon-widget',
667            'before_title' => '<div class="widget-title">',
668            'after_title' => '</div>',
669            'before_widget' => '<div id="%1$s" class="colophon-widget widget-wrapper %2$s">',
670            'after_widget' => '</div>'
671        ));
672		
673        register_sidebar(array(
674            'name' => __('Top Widget', 'responsive'),
675            'description' => __('Area 11 - sidebar-top.php', 'responsive'),
676            'id' => 'top-widget',
677            'before_title' => '<div class="widget-title">',
678            'after_title' => '</div>',
679            'before_widget' => '<div id="%1$s" class="%2$s">',
680            'after_widget' => '</div>'
681        ));
682    }
683	
684    add_action('widgets_init', 'responsive_widgets_init');
685
686?>