Skip to content

Instantly share code, notes, and snippets.

@xnau
Created February 14, 2022 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xnau/6038ab58af074dee71306ab721585ba2 to your computer and use it in GitHub Desktop.
Save xnau/6038ab58af074dee71306ab721585ba2 to your computer and use it in GitHub Desktop.
Shows how to enable showing heading fields in the Participants Database admin edit participant page
<?php
/**
* Plugin Name: PDB Show Heading Fields in Admin
* Description: enabled showing the heading type field on the admin edit participant page
*/
add_filter( 'pdb-omit_backend_edit_form_element_type', 'xnau_enable_heading_field_display' );
/**
* remove the heading field from the backend omit types array
*
* @param type $omit_types
* @return type
*/
function xnau_enable_heading_field_display( $omit_types )
{
unset( $omit_types[ array_search( 'heading', $omit_types ) ] );
return $omit_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment