[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/options/oembed/providers/ -> SmugMug.php (source)

   1  <?php
   2  class MP_oembed_provider_SmugMug extends MP_oembed_provider_
   3  {
   4      public $id = 'SmugMug';
   5  
   6  	function data2html( $html, $data, $url )
   7      {
   8          switch ( $data->type )
   9          {
  10              case 'photo' :
  11                  $html  = '<a target="_blank" href="' . esc_url( $data->url ) . '"';
  12                  if ( isset( $data->title ) )           $html .= ' title="' . esc_attr( $data->title ) . '"';
  13                  $html .= '>';
  14  
  15                  $html .= '<img';
  16                  if ( isset( $data->width ) )  $html .= ' width="' . $data->width . 'px"';
  17                  if ( isset( $data->height ) ) $html .= ' height="' . $data->height . 'px"';
  18                  if ( isset( $data->url ) )    $html .= ' src="' . $data->url . '"';
  19                  if ( isset( $data->title ) )  $html .= ' title="' . esc_attr( $data->title ) . '" alt="' . esc_attr( $data->title ) . '"';
  20                  $html .= ' />';
  21  
  22                  $html .= '</a>';
  23              break;
  24          }
  25          return $html;
  26      }
  27  }
  28  new MP_oembed_provider_SmugMug();


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1