Skip to content

Commit

Permalink
- fix syntax error bug introduced w/ v0.9.13
Browse files Browse the repository at this point in the history
  • Loading branch information
R.Brown committed Apr 22, 2014
1 parent ea441bb commit 8533681
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion credit-tracker-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function credit_tracker_attachment_show_column($name)
break;
case 'credit-tracker-source':
$value = get_post_meta($post->ID, "credit-tracker-source", true);
echo ct_get_sources_names_array()[$value];
echo ct_get_source_caption($value);
break;
case 'credit-tracker-author':
$value = get_post_meta($post->ID, "credit-tracker-author", true);
Expand Down
13 changes: 13 additions & 0 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,19 @@ function ct_get_sources_names_array()
return $names;
}

/**
* Returns source caption
*/
function ct_get_source_caption($source)
{
$sources = ct_get_sources_array();
if (isset($sources[$source]) && !empty($sources[$source]['caption'])) {
return $sources[$source]['caption'];
} else {
return $source;
}
}

/**
* Returns source copyright format
*/
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ Yes you can! Join in on our [GitHub repository](https://github.com/Labs64/credit
== Changelog ==

= 0.9.14 =
* ...
* Fixed [bug](http://wordpress.org/support/topic/error-after-updating-to-0913) introduced with v0.9.13

= 0.9.13 =
= 0.9.13 (not-stable) =
* Test and approve plugin for WordPress 3.9
* Enable Flickr

Expand Down

0 comments on commit 8533681

Please sign in to comment.