CMB2_Display_File_List

The CMB2 CMB2 Display File List class.

Defined (1)

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

/includes/CMB2_Field_Display.php  
  1. class CMB2_Display_File_List extends CMB2_Display_File { 
  2. /** 
  3. * Display file_list value. 
  4. * @since 2.2.2 
  5. */ 
  6. protected function _display() { 
  7. if ( empty( $this->value ) || ! is_array( $this->value ) ) { 
  8. return; 
  9.  
  10. $field_type = new CMB2_Type_File_Base( new CMB2_Types( $this->field ) ); 
  11.  
  12. echo '<ul class="cmb2-display-file-list">'; 
  13. foreach ( $this->value as $id => $fullurl ) { 
  14. echo '<li>', $this->file_output( esc_url_raw( $fullurl ), $id, $field_type ), '</li>'; 
  15. echo '</ul>';