remove caption as an option
This commit is contained in:
parent
5d51287cb9
commit
3c3c7dffbc
@ -14,11 +14,10 @@ class DailyImageWidget {
|
||||
|
||||
$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(
|
||||
"image" => __("Daily Image", "hubblesite-daily-image-widget"),
|
||||
"title" => __("Image Title", "hubblesite-daily-image-widget"),
|
||||
"caption" => __("Image Caption", "hubblesite-daily-image-widget"),
|
||||
"credits" => __("Credits", "hubblesite-daily-image-widget"),
|
||||
"styles" => __("HubbleSite Styles", "hubblesite-daily-image-widget"),
|
||||
);
|
||||
@ -113,7 +112,7 @@ class DailyImageWidget {
|
||||
|
||||
if (in_array("image", $options)) {
|
||||
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>';
|
||||
}
|
||||
|
||||
@ -123,12 +122,6 @@ class DailyImageWidget {
|
||||
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)) {
|
||||
echo '<div id="hubblesite-daily-image-credits">';
|
||||
echo $this->data['credits'];
|
||||
|
@ -15,7 +15,6 @@ class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
$this->sample_data = array(
|
||||
'title' => 'title',
|
||||
'caption' => 'caption',
|
||||
'date' => '12345',
|
||||
'image_url' => 'image_url',
|
||||
'gallery_url' => 'gallery_url',
|
||||
@ -77,12 +76,6 @@ class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
|
||||
'//style[@type="text/css"]' => true
|
||||
)
|
||||
),
|
||||
array(
|
||||
"caption",
|
||||
array(
|
||||
'//div/div[@id="hubblesite-daily-image-caption"]' => 'caption'
|
||||
)
|
||||
),
|
||||
array(
|
||||
"credits",
|
||||
array(
|
||||
|
Loading…
Reference in New Issue
Block a user