CMB2_Type_Title

CMB title field type.

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/libraries/metabox/includes/types/CMB2_Type_Title.php  
  1. class CMB2_Type_Title extends CMB2_Type_Base { 
  2.  
  3. /** 
  4. * Handles outputting an 'title' element 
  5. * @return string Heading element 
  6. */ 
  7. public function render() { 
  8. $a = $this->parse_args( 'title', array( 
  9. 'tag' => $this->field->object_type == 'post' ? 'h5' : 'h3',  
  10. 'class' => 'cmb2-metabox-title',  
  11. 'name' => $this->field->args( 'name' ),  
  12. 'desc' => $this->_desc( true ),  
  13. ) ); 
  14.  
  15. return $this->rendered( 
  16. sprintf( '<%1$s %2$s>%3$s</%1$s>%4$s', $a['tag'], $this->concat_attrs( $a, array( 'tag', 'name', 'desc' ) ), $a['name'], $a['desc'] ) 
  17. ); 
  18.