Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 3 years ago

#2752 closed enhancement (fixed)

Add id and description to default widget block

Reported by: karmatosed Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Templates Keywords:
Cc: wp@…

Description

Just like the new footer widgets I suggest the default ones have id and description added to them.

Currently they read like this:

register_sidebar( array(
	'name'          => 'Sidebar',
	'before_widget' => '<div id="%1$s" class="widget %2$s">',
	'after_widget'  => '</div>',
	'before_title'  => '<h3 class="widgettitle">',
	'after_title'   => '</h3>'
) );

My suggestions would be to end up with something like this:

register_sidebar( array(
	'name'          => 'Sidebar',
	'id' => 'sidebar',
	'description' => __( 'The sidebar widget area', 'buddypress' ),
	'before_widget' => '<div id="%1$s" class="widget %2$s">',
	'after_widget'  => '</div>',
	'before_title'  => '<h3 class="widgettitle">',
	'after_title'   => '</h3>'
) );

Change History (9)

#1 @karmatosed
9 years ago

  • Summary changed from Add id and desription to default widget block to Add id and description to default widget block

#2 @DJPaul
9 years ago

I'm about to commit this, but I have left out the ID as that breaks the style, plus we already have a div id="sidebar" in the theme.

#3 @djpaul
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3462]) Add description property to sidebar widget area. Fixes #2752, props karmatosed

#4 @nacin
9 years ago

  • Cc wp@… added

Not having an ID can be dangerous, and is basically deprecated in core. Core then numbers them based on order registered, and if a child theme registers more, all hell can go loose.

#5 @karmatosed
9 years ago

Maybe id=sidebar-default then?

#6 @nacin
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 @DJPaul
9 years ago

It seems if I add an ID to the old sidebar, WP thinks it is a different sidebar block (due to the different id) and therefore doesn't load the old widgets into it. I don't want to "break" people sidebars when they upgrade to 1.3. Anyone familiar with this behaviour or a workaround?

#8 @djpaul
9 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [3689]) Add ID to main sidebar. Fixes #2752

#9 @DJPaul
3 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.