To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 4471

Show
Ignore:
Timestamp:
01/13/12 17:18:05 (4 months ago)
Author:
tboutell
Message:

* aMediaItemTable::getEmbedCode now accepts an 'alt' option that overrides the use of the media item's title as the alt attribute
* Button slots use it

Location:
plugins/apostrophePlugin/branches/1.5/lib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.5/lib/action/BaseaButtonSlotComponents.class.php

    r4470 r4471  
    4444          "height" => $this->options['flexHeight'] ? false : $this->options['height'], 
    4545          "resizeType" => $this->options['resizeType'])); 
    46       $this->embed = $this->item->getEmbedCode($this->dimensions['width'], $this->dimensions['height'], $this->dimensions['resizeType'], $this->dimensions['format'], false); 
     46      $this->embed = $this->item->getEmbedCode($this->dimensions['width'], $this->dimensions['height'], $this->dimensions['resizeType'], $this->dimensions['format'], false, 'opaque', false, array('alt' => strlen($this->options['title']) ? $this->options['title'] : '')); 
    4747    } 
    4848  } 
  • plugins/apostrophePlugin/branches/1.5/lib/model/doctrine/PluginaMediaItem.class.php

    r4355 r4471  
    303303 
    304304    // Accessible alt title 
    305     $title = htmlentities($this->getTitle(), ENT_COMPAT, 'UTF-8'); 
     305    if (isset($options['alt'])) 
     306    { 
     307      $title = aHtml::entities($options['alt']); 
     308    } 
     309    else 
     310    { 
     311      $title = aHtml::entities($this->getTitle()); 
     312    } 
    306313    if ($this->getEmbeddable()) 
    307314    {