buddypress / next-template-packs

is this the next BuddyPress template pack?
35 stars 9 forks source link

Update Customizer section 'Directories Layout' #75

Closed hnla closed 7 years ago

hnla commented 8 years ago

Perhaps we would be better naming this section something more like: 'loop layouts'.

Prompted by the fact that we have members loops that appear under Groups and it would be nice to add a switch to change those to grid or not but these aren't directories.

Change section name and we can have members dir selection, groups members selection, blogs dir, is_user blogs etc.

Thoughts?

hnla commented 8 years ago

I have taken the liberty of changing the section name, updating the customizer controls to add a new one for groups members, and hacked around bp_nouveau_loop_classes() to allow for a new faux $component and added conditional checks for bp_is_group() & actions so we can run checks and build the classes out for groups members idependently of the directory members loop.

@imath Please shout at me if this is horrible, obviously please feel free to change anything you're not happy with!

imath commented 8 years ago

It's looking pretty good! Will test it asap ;)

hnla commented 8 years ago

@imath it's all changeable and I realise that the majority of the loop_class function is slightly ugly hacking but too tired to figure it out better at the moment - certainly checking bp dir, bp user and bp groups is pointless as that's everything :) so I should have checked current_action really or just removed the checks. :)

imath commented 8 years ago

Hi @hnla i've just tested and it works pretty well. Great job! The commit above only makes sure a default value is set for the 2 new options.

hnla commented 8 years ago

@imath ah yep thanks, thought about the empty initial values then went and forgot about them, probably because I'd set values for testing... rushing and not testing sufficiently :)