WebDevStudios / WDS-Simple-Page-Builder

Uses existing template parts in the currently-active theme to build a customized page with rearrangeable elements.
GNU General Public License v2.0
136 stars 25 forks source link

When registered areas have a symbol, those symbols appear in the dashboard #28

Open gregrickaby opened 9 years ago

gregrickaby commented 9 years ago

 When using a underscore, register_page_builder_area( 'after_content' );

The underscore appears in the dashboard: https://www.dropbox.com/s/qm35hf890m17826/Screenshot%202015-08-11%2010.45.46.png?dl=0

Maybe we could use something similar to register_nav_menu() or register_sidebar()

register_page_builder_area( array( 
    'hero'           => esc_html__( 'Hero Area', 'textdomain' ),
    'before_content' => esc_html__( 'Before Content', 'textdomain' ),
    'after_content'  => esc_html__( 'After Content', 'textdomain' ),
) );
dustyf commented 9 years ago

The difference is that the areas are stored to the options table. I guess we'd have to see if there is a reason that it needs to be saved as an option and not registered in the globals like WP does it with register_nav_menu. I like this proposed method as it would also jive along with what WordPress does and give a more flexible way to name areas.

gregrickaby commented 9 years ago

@dustyf Right, and that's causing it's own set of issues: https://github.com/WebDevStudios/WDS-Simple-Page-Builder/issues/27

dustyf commented 9 years ago

Should be fixed in branch feature/refactor-2. This will be merged to develop after more testing.

jazzsequence commented 9 years ago

Underscores in area names still displaying for areas in admin. This is an easy fix, just need to do it.

dustyf commented 9 years ago

You should just need to pass in the name as an argument when registering the area. Then it will display that instead with refactor-2

jazzsequence commented 9 years ago

oh that's how it works. well if that's not done we can still just strip out underscores and hyphens on output.

On Fri, Oct 2, 2015 at 7:35 PM Dustin Filippini notifications@github.com wrote:

You should just need to pass in the name as an argument when registering the area. Then it will display that instead with refactor-2

— Reply to this email directly or view it on GitHub https://github.com/WebDevStudios/WDS-Simple-Page-Builder/issues/28#issuecomment-145191932 .

~c

me@chrisreynolds.io

dustyf commented 9 years ago

It's done.

On Oct 2, 2015, at 9:09 PM, Chris Reynolds notifications@github.com wrote:

oh that's how it works. well if that's not done we can still just strip out underscores and hyphens on output.

On Fri, Oct 2, 2015 at 7:35 PM Dustin Filippini notifications@github.com wrote:

You should just need to pass in the name as an argument when registering the area. Then it will display that instead with refactor-2

— Reply to this email directly or view it on GitHub https://github.com/WebDevStudios/WDS-Simple-Page-Builder/issues/28#issuecomment-145191932 .

~c

me@chrisreynolds.io — Reply to this email directly or view it on GitHub.