buddypress / next-template-packs

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

Load Customizer code conditionally #144

Closed r-a-y closed 7 years ago

r-a-y commented 7 years ago

Previously, the Customizer code ran on all pages. The majority of users will never need to load the Customizer code since they do not have access to it.

This PR only loads the Customizer code if a user has the customize capability.

Let me know what you think.

hnla commented 7 years ago

Ok good point, most of the settings are of or for an elevated user type, but we still load the settings and then check I guess we're saying here rather than simply check first then load?

sounds like sensible enhancement, lets merge it - I'll try and run branch later and see if any issues or merge and we'll deal with issue if/when they occur.