origgami / CMB2-grid

A grid system for Wordpress CMB2 library that allows columns creation
88 stars 21 forks source link

Fix for https://github.com/origgami/CMB2-grid/issues/20#issuecomment-229628296 #24

Closed devnix closed 8 years ago

devnix commented 8 years ago

https://github.com/origgami/CMB2-grid/issues/20#issuecomment-229628296

jrfnl commented 8 years ago
devnix commented 8 years ago

Please pull against master - your PR now also contains a commit which is in another open PR.

Sorry!

Please consider using a filter instead of removing the is_admin() snippet.

What are the reasons for doing a spl_autoload_register conditional?

jrfnl commented 8 years ago

What are the reasons for doing a spl_autoload_register conditional?

The files were originally loading conditionally via includes. The implementation of spl_autoload.. only made the loading more stable, it did not change the conditions for loading.

So the real question is "why is this plugin only being loaded on the back-end ?"

jrfnl commented 8 years ago

Oh and before I forget - while allowing the autoloading on the front-end might prevent the fatal error you mentioned, it will not make the plugin work on the front-end as all the hook-ins are still being done on admin_... hooks. You may want to have a look at that too.

devnix commented 8 years ago

Maybe I will take a look. Right now I'm not going to try to imlpement the grid on a frontend, but it's an interesting concept!