Closed hnla closed 8 years ago
No!!!!
Please revert your commit because doing what you're doing will break plugins using the forsaken hook that is under.
i guess the only option is to use :empty{display:none}
imath. http://profiles.wordpress.org/imath/
Le 4 juil. 2016 à 10:29, Hugo - hnla notifications@github.com a écrit :
Can we change up the e.g bp_nouveau_groups_loop_buttons() to echo bp_nouveau_get_groups_loop_buttons() as per the example commit.
This just makes it simpler to run a check and not output empty markup
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
NO! that is not a solution ;) I will revert but to render empty markup is wrong and there needs to be a proper solution here.
Thanks.
There are plenty of examples of empty markup in legacy :) This will be a lot easier when we will deprecate completely these actions.
I don't want to do another ob_start() dance to avoid some empty markup, i'm already doing this at various places so unless this is absolutely necessary, i'd rather we wait people use the new filter. And the way you were doing it was wrong, you'd need to cache the button to avoid getting it twice.
There are plenty of examples of empty markup in legacy
This does not make it right, there are examples of bad coding, standards ignorance everywhere. Part of my purpose is to bring some Standards and deal with these issues, else I have little point! :)
ok i'll take care of it and figure out a way. The way i deal with the action buttons is very specific. So i'd rather you let me do, and i'll promise you won't have any empty markup!
imath. http://profiles.wordpress.org/imath/
Le 4 juil. 2016 à 17:02, Hugo - hnla notifications@github.com a écrit :
There are plenty of examples of empty markup in legacy This does not make it right, there are examples of bad coding, standards ignorance everywhere. Part of my purpose is to bring some Standards and deal with these issues, else I have little point! :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
:) bullying into submission.
Options
Move markup into the function but provide like WP does sometimes to pass a param to set: wrapping element and class ( array('wrapper' => 'div', 'class' => 'item-action') )
sort of thing.
Just a thought, exploring options?
@hnla that's what i've done in the two previous commits ;)
oh cool, was that great minds thinking alike then?
I think that this approach as long as it covers the options a dev might require in the template i.e 'div', 'ul/li', class, id etc etc is an acceptable one all round?
Can we change up the e.g
bp_nouveau_groups_loop_buttons()
to echobp_nouveau_get_groups_loop_buttons()
as per the example commit.This just makes it simpler to run a check and not output empty markup
<div class="action"></div>