NF_Abstracts_SubmissionMetabox

The Ninja Forms NF Abstracts SubmissionMetabox class.

Defined (1)

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

/includes/Abstracts/SubmissionMetabox.php  
  1. abstract class NF_Abstracts_SubmissionMetabox extends NF_Abstracts_Metabox 
  2. /** 
  3. * @var array 
  4. */ 
  5. protected $_post_types = array( 'nf_sub' ); 
  6.  
  7. /** 
  8. * @var NF_Database_Models_Submission 
  9. */ 
  10. protected $sub; 
  11.  
  12. public function __construct() 
  13. parent::__construct(); 
  14.  
  15. if( ! isset( $_GET[ 'post' ] ) ) return; 
  16.  
  17. $this->_title = __( 'Submission Metabox', 'ninja-forms' ); 
  18.  
  19. $post_id = absint( $_GET[ 'post' ] ); 
  20.  
  21. $this->sub = Ninja_Forms()->form()->get_sub( $post_id ); 
  22.  
  23. add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); 
  24. add_action( 'save_post', array( $this, '_save_post' ) );