Skip to content

Instantly share code, notes, and snippets.

@svenl77
Created October 13, 2016 07:43
Show Gist options
  • Save svenl77/4421a5ce67f62707debdf7f17254f4d4 to your computer and use it in GitHub Desktop.
Save svenl77/4421a5ce67f62707debdf7f17254f4d4 to your computer and use it in GitHub Desktop.
<?php
/**
* Function we use to add a extra class to all BuddyForms related metaboxes.
*/
function buddyforms_metabox_class($classes) {
$classes[] = 'buddyforms-metabox';
return $classes;
}
/**
* Metabox show if form type is posts
*/
function buddyforms_metabox_show_if_form_type_post($classes) {
$classes[] = 'buddyforms-metabox-show-if-form-type-post';
return $classes;
}
/**
* Metabox show if form type is registration
*/
function buddyforms_metabox_show_if_form_type_registration($classes) {
$classes[] = 'buddyforms-metabox-show-if-form-type-registration';
return $classes;
}
/**
* Metabox show if attached page is selected
*/
function buddyforms_metabox_show_if_attached_page($classes) {
$classes[] = 'buddyforms-metabox-show-if-attached-page';
return $classes;
}
/**
* Metabox show if form post type is not none ( bf_submissions )
*/
function buddyforms_metabox_show_if_post_type_none($classes) {
$classes[] = 'buddyforms-metabox-show-if-post-type-none';
return $classes;
}
/**
* Metabox show if form post type is not none ( bf_submissions )
*/
function buddyforms_metabox_hide_if_form_type_register($classes) {
$classes[] = 'buddyforms-metabox-hide-if-form-type-register';
return $classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment