boonebgorges / buddypress-docs

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

Add context parameter to bp_docs_toggleable_open_or_closed_class(). #611

Closed dcavins closed 6 years ago

dcavins commented 6 years ago

Add a context argument that is passed to the bp_docs_toggleable_open_or_closed_class filter, helping the dev to know which situation is being calculated. This is useful if you want one of the meta boxes to be closed by default on the edit screen, for instance.

dcavins commented 6 years ago

See https://wordpress.org/support/topic/hide-toggle/ for the question that spurred this change.

dcavins commented 6 years ago

Cool! Who wants to use this JS if there's any other way? ;)