Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
* origin/develop:
  Don't reference the array index directly to avoid an error when using PHP 5.3
  removing old comment
  • Loading branch information
Josh Angell committed Jan 29, 2015
2 parents 7fffb47 + 1582a52 commit 650ec1c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion buttonbox/ButtonBoxPlugin.php
Expand Up @@ -20,7 +20,7 @@ public function getName()

public function getVersion()
{
return '1.3.1';
return '1.3.2';
}

public function getDeveloper()
Expand Down
6 changes: 4 additions & 2 deletions buttonbox/fieldtypes/ButtonBox_ColoursFieldType.php
Expand Up @@ -145,7 +145,9 @@ protected function defineSettings()
protected function getDefaultValue()
{

foreach ($this->getOptions() as $option)
$options = $this->getOptions();

foreach ($options as $option)
{

if ( !empty($option['default']) )
Expand All @@ -155,7 +157,7 @@ protected function getDefaultValue()

}

return $this->getOptions()[0]['value'];
return $options[0]['value'];

}

Expand Down
6 changes: 4 additions & 2 deletions buttonbox/fieldtypes/ButtonBox_TextSizeFieldType.php
Expand Up @@ -144,7 +144,9 @@ protected function defineSettings()
protected function getDefaultValue()
{

foreach ($this->getOptions() as $option)
$options = $this->getOptions();

foreach ($options as $option)
{

if ( !empty($option['default']) )
Expand All @@ -154,7 +156,7 @@ protected function getDefaultValue()

}

return $this->getOptions()[0]['value'];
return $options[0]['value'];

}

Expand Down
9 changes: 0 additions & 9 deletions buttonbox/fieldtypes/ButtonBox_WidthFieldType.php
Expand Up @@ -74,15 +74,6 @@ public function getSettingsHtml()
'label' => '',
'value' => ''
)
// array(
// 'label' => 'Two Thirds',
// 'value' => 'two-thirds',
// 'default' => true
// ),
// array(
// 'label' => 'Full Width',
// 'value' => 'one-whole'
// )
);
}

Expand Down
10 changes: 10 additions & 0 deletions release-notes.json
@@ -1,4 +1,14 @@
[
{
"version" : "1.3.2",
"date" : "29-1-2015",
"notes" : [
{
"type" : "added",
"message" : "Added support for PHP 5.3 to fancy options fields (text size and colours)."
}
]
},
{
"version" : "1.3.1",
"date" : "9-1-2015",
Expand Down

0 comments on commit 650ec1c

Please sign in to comment.