Skip to content
Browse files

Reworking settings page

  • Loading branch information...
1 parent b5414b6 commit 0aab2adde186ffe813d9c105d1f2c97385de76d9 @randyhoyt randyhoyt committed Dec 1, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 openphoto-wordpress.php
View
7 openphoto-wordpress.php
@@ -38,6 +38,7 @@ function media_render_openphoto_tab() {
$openphoto = get_option('openphoto_wordpress_settings');
$client = new OpenPhotoOAuth(str_replace('http://','',$openphoto['host']),$openphoto["oauth_consumer_key"],$openphoto["oauth_consumer_secret"],$openphoto["oauth_token"],$openphoto["oauth_token_secret"]);
+ $client = new OpenPhotoOAuth(str_replace('http://','',$openphoto['host']));
// get photos
$sizes['thumbnail']['w'] = get_option('thumbnail_size_w');
@@ -138,7 +139,7 @@ function media_render_openphoto_tab() {
<div class="tablenav">
<?php
- if ( $photos ) {
+ if ( $photos ) { print_r($photos); die();
if ($total_pages > 1) {
echo '<div class="tablenav-pages">';
@@ -172,7 +173,9 @@ function media_render_openphoto_tab() {
$tag->id = trim($tag->id);
$selected = "";
if ( $tag->id==$m ) $selected = ' selected="selected"';
- if ($tag->count > 0) echo '<option value="'.$tag->id .'"' . $selected . '>' . $tag->id . ' (' . $tag->count . ')</option>';
+ echo '<option value="'.$tag->id .'"' . $selected . '>' . $tag->id;
+ if ( (int) $tag->count > 1) echo '(' . $tag->count . ')';
+ echo '</option>';
}
?>
</select>

0 comments on commit 0aab2ad

Please sign in to comment.
Something went wrong with that request. Please try again.