remove caption as an option

This commit is contained in:
John Bintz 2009-06-11 09:09:13 -04:00
parent 5d51287cb9
commit 3c3c7dffbc
3 changed files with 4 additions and 18 deletions

View File

@ -14,11 +14,10 @@ class DailyImageWidget {
$this->has_simplexml = class_exists('SimpleXMLElement'); $this->has_simplexml = class_exists('SimpleXMLElement');
$this->_valid_column_names = array('title', 'caption', 'date', 'image_url', 'gallery_url', 'credits'); $this->_valid_column_names = array('title', 'date', 'image_url', 'gallery_url', 'credits');
$this->_valid_options = array( $this->_valid_options = array(
"image" => __("Daily Image", "hubblesite-daily-image-widget"), "image" => __("Daily Image", "hubblesite-daily-image-widget"),
"title" => __("Image Title", "hubblesite-daily-image-widget"), "title" => __("Image Title", "hubblesite-daily-image-widget"),
"caption" => __("Image Caption", "hubblesite-daily-image-widget"),
"credits" => __("Credits", "hubblesite-daily-image-widget"), "credits" => __("Credits", "hubblesite-daily-image-widget"),
"styles" => __("HubbleSite Styles", "hubblesite-daily-image-widget"), "styles" => __("HubbleSite Styles", "hubblesite-daily-image-widget"),
); );
@ -113,7 +112,7 @@ class DailyImageWidget {
if (in_array("image", $options)) { if (in_array("image", $options)) {
echo '<a href="' . $this->data['gallery_url'] . '" title="' . $this->data['title'] . '">'; echo '<a href="' . $this->data['gallery_url'] . '" title="' . $this->data['title'] . '">';
echo '<img src="' . $this->data['image_url'] . '" alt="' . $this->data['title'] . '" />'; echo '<img src="' . $this->data['image_url'] . '" alt="' . $this->data['title'] . '" width="100%" />';
echo '</a>'; echo '</a>';
} }
@ -123,12 +122,6 @@ class DailyImageWidget {
echo '</a>'; echo '</a>';
} }
if (in_array("caption", $options)) {
echo '<div id="hubblesite-daily-image-caption">';
echo $this->data['caption'];
echo '</div>';
}
if (in_array("credits", $options)) { if (in_array("credits", $options)) {
echo '<div id="hubblesite-daily-image-credits">'; echo '<div id="hubblesite-daily-image-credits">';
echo $this->data['credits']; echo $this->data['credits'];

View File

@ -15,7 +15,6 @@ class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
$this->sample_data = array( $this->sample_data = array(
'title' => 'title', 'title' => 'title',
'caption' => 'caption',
'date' => '12345', 'date' => '12345',
'image_url' => 'image_url', 'image_url' => 'image_url',
'gallery_url' => 'gallery_url', 'gallery_url' => 'gallery_url',
@ -77,12 +76,6 @@ class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
'//style[@type="text/css"]' => true '//style[@type="text/css"]' => true
) )
), ),
array(
"caption",
array(
'//div/div[@id="hubblesite-daily-image-caption"]' => 'caption'
)
),
array( array(
"credits", "credits",
array( array(