hyunsupul / aesop-core

Open-sourced suite of components that empower interactive storytelling in WordPress.
http://aesopstoryengine.com
GNU General Public License v2.0
244 stars 56 forks source link

Chapter navigation is missing a wrapper #203

Closed garand closed 9 years ago

garand commented 9 years ago

I noticed that the timeline and chapter navigation components use the same markup, but the timeline navigation includes a wrapper around it for styling, whereas the chapter navigation does not, which doesn't allow me to style the chapter navigation independently.

michaelbeil commented 9 years ago

You could filter it (docs here: http://aesopstoryengine.com/developers), using the aesop_COMPONENTNAME_component_classes filter.

This filter can add custom CSS classes to any component. Here’s an example of how to add two classes, red and blue, to the chapter component.

add_filter("aesop_chapter_component_classes","myaddclasses");
function myaddclasses(){
return "red blue";
}
bearded-avenger commented 9 years ago

Chapter menu has plenty of wrappers http://cl.ly/image/0t0e1R0e1M26

garand commented 9 years ago

@bearded-avenger Hmm... I'm not seeing that. Let me see if there is something else overriding that somehow or if I'm not using the latest version. I'll follow up later.

bearded-avenger commented 9 years ago

Yeah I think we made this stuff automatic back in 1.3.2. It adds a #aesop-chapter-menu div who's markup is also filterable. https://github.com/bearded-avenger/aesop-core/blob/master/public/includes/components/component-heading.php#L164

chriswallace commented 9 years ago

I HAVE AN IDEA MORE DIVS

bearded-avenger commented 9 years ago

LOL this guy

garand commented 9 years ago

😐