NF_Database_PublishProcessing

The Ninja Forms NF Database PublishProcessing class.

Defined (1)

The class is defined in the following location(s).

/includes/Database/PublishProcessing.php  
  1. final class NF_Database_PublishProcessing extends WP_Background_Process 
  2. protected $action = 'ninja-forms-publish'; 
  3.  
  4. protected function task( $item ) 
  5. if( ! isset( $item[ 'id' ] ) ) return false; 
  6. if( ! isset( $item[ 'type' ] ) ) return false; 
  7. if( ! isset( $item[ 'settings' ] ) ) return false; 
  8.  
  9. switch ( $item[ 'type' ] ) { 
  10. case 'field': 
  11. $object = Ninja_Forms()->form()->get_field( $item[ 'id' ] ); 
  12. break; 
  13. default: 
  14. return false; 
  15.  
  16. $object->update_settings( $item[ 'settings' ] )->save(); 
  17.  
  18. return false;