verygoodplugins

Untitled

Jun 25th, 2021
763
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function custom_format_checkbox( $value, $field_type, $field ) {
  2.  
  3.     if ( 'on' == $value ) {
  4.         $value = true;
  5.     } elseif ( 'off' == $value ) {
  6.         $value = null;
  7.     }
  8.  
  9.     return $value;
  10.  
  11. }
  12.  
  13. add_filter( 'wpf_format_field_value', 'custom_format_checkbox', 20, 3 );
RAW Paste Data