You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
532 B

  1. <?php
  2. /**
  3. * Plugin oEmbed
  4. * Licence GPL3
  5. *
  6. */
  7. if (!defined('_ECRIRE_INC_VERSION')) {
  8. return;
  9. }
  10. function oembed_input_posttraite_soundcloud_rich_dist($data) {
  11. $data['media'] = 'audio';
  12. $data['html'] = preg_replace(",width=['\"][0-9]+['\"],i", 'width="100%"', $data['html']);
  13. if (!isset($data['thumbnail_url'])) {
  14. $data['thumbnail_url'] = find_in_path('oembed/input/vignettes/soundcloud.png');
  15. } else {
  16. $data['thumbnail_url'] = preg_replace(',^http://,Uims', 'https://', $data['thumbnail_url']);
  17. }
  18. return $data;
  19. }