CMB2_Display_oEmbed

The Maps Builder CMB2 Display oEmbed class.

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/libraries/metabox/includes/CMB2_Field_Display.php  
  1. class CMB2_Display_oEmbed extends CMB2_Field_Display { 
  2. /** 
  3. * Display oembed value. 
  4. * @since 2.2.2 
  5. */ 
  6. protected function _display() { 
  7. if ( ! $this->value ) { 
  8. return; 
  9.  
  10. cmb2_do_oembed( array( 
  11. 'url' => $this->value,  
  12. 'object_id' => $this->field->object_id,  
  13. 'object_type' => $this->field->object_type,  
  14. 'oembed_args' => array( 'width' => '300' ),  
  15. 'field_id' => $this->field->id(),  
  16. ) );