boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Move group admin/create markup to a theme template #640

Open boonebgorges opened 6 years ago

boonebgorges commented 6 years ago

It's not currently possible to modify the content built in BP_Docs_Group_Extension::admin_markup(). We should move it to a theme template that can be overridden in the BP theme-compat fashion.

We should be able to add the file at includes/templates/groups/single/admin/docs.php, which will follow the format of BP itself and other plugins. Used with bp_get_template_part(), this should automatically integrate with BP's theme compat. This change might break non-theme-compat themes, and so should probably be shimmed somehow.

The content of admin_markup() will also need some refactoring to work outside of the object context ($this->slug etc). We'll need to ensure that the template works in both edit and create contexts, which might mean wrapper functions for grabbing the current group's ID and slug.