Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Reformatting code/tabs=>whitespace

  • Loading branch information...
commit ba370f6f8c79ee4a6e5bb75d018bc050dc8b8508 1 parent 9e9bc8b
Sabrina Leandro authored December 24, 2011
24  songkick_artist_events.php
@@ -2,20 +2,20 @@
2 2
 require_once dirname(__FILE__) . '/songkick_events.php';
3 3
 
4 4
 class SongkickArtistEvents extends SongkickEvents {
5  
-	public $id;
6  
-	public $apikey;
  5
+    public $id;
  6
+    public $apikey;
7 7
 
8  
-	function SongkickArtistEvents($apikey, $id) {
9  
-		$this->SongkickEvents($apikey);
10  
-		$this->id = trim($id);
11  
-	}
  8
+    function SongkickArtistEvents($apikey, $id) {
  9
+        $this->SongkickEvents($apikey);
  10
+        $this->id = trim($id);
  11
+    }
12 12
 
13  
-	function profile_url() {
14  
-		return "http://www.songkick.com/artists/$this->id";
15  
-	}
  13
+    function profile_url() {
  14
+        return "http://www.songkick.com/artists/$this->id";
  15
+    }
16 16
 
17  
-	protected function url($per_page){
18  
-		return "$this->apiurl/artists/$this->id/calendar.json?apikey=$this->apikey&per_page=$per_page";
19  
-	}
  17
+    protected function url($per_page){
  18
+        return "$this->apiurl/artists/$this->id/calendar.json?apikey=$this->apikey&per_page=$per_page";
  19
+    }
20 20
 }
21 21
 ?>
28  songkick_concerts.css
... ...
@@ -1,33 +1,33 @@
1 1
 div.songkick-events .profile-title {
2  
-	margin-top: 8px; 
3  
-	margin-bottom: 10px; 
4  
-	float: right;
  2
+    margin-top: 8px; 
  3
+    margin-bottom: 10px; 
  4
+    float: right;
5 5
 }
6 6
 
7 7
 div.songkick-events .powered-by {
8  
-	margin: 0px;
  8
+    margin: 0px;
9 9
 }
10 10
 
11 11
 div.songkick-events .powered-by img {
12  
-	margin: 0px;
13  
-	border: 0px;
  12
+    margin: 0px;
  13
+    border: 0px;
14 14
 }
15 15
 
16 16
 div.songkick-events .event-name {
17  
-	display:block;
18  
-	margin-left:44px;
  17
+    display:block;
  18
+    margin-left:44px;
19 19
 }
20 20
 
21 21
 div.songkick-events ul {
22  
-	border-bottom:1px solid #CCCCCC;
23  
-	margin-bottom:5px;
24  
-	margin-top: 10px;
25  
-	margin-left: 0px;
26  
-	list-style:none outside none;
  22
+    border-bottom:1px solid #CCCCCC;
  23
+    margin-bottom:5px;
  24
+    margin-top: 10px;
  25
+    margin-left: 0px;
  26
+    list-style:none outside none;
27 27
 }
28 28
 
29 29
 div.songkick-events li {
30  
-	margin-bottom: 10px;
  30
+    margin-bottom: 10px;
31 31
 }
32 32
 
33 33
 
134  songkick_concerts_and_festivals.php
@@ -32,13 +32,13 @@
32 32
 */
33 33
 
34 34
 // For debugging: 
35  
-// error_reporting(E_ALL);
36  
-// if ( !defined('WP_DEBUG') )
37  
-//     define('WP_DEBUG', true);
38  
-// @ini_set('display_errors','On');
  35
+error_reporting(E_ALL);
  36
+if ( !defined('WP_DEBUG') )
  37
+    define('WP_DEBUG', true);
  38
+@ini_set('display_errors','On');
39 39
 
40 40
 if (!class_exists('WP_Http'))
41  
-	include_once(ABSPATH . WPINC . '/class-http.php');
  41
+    include_once(ABSPATH . WPINC . '/class-http.php');
42 42
 
43 43
 define('SONGKICK_OPTIONS',       'songkick-concerts');
44 44
 define('SONGKICK_TEXT_DOMAIN',   'songkick-concerts-and-festivals');
@@ -53,83 +53,83 @@
53 53
  * Global Initialization of the Songkick Plugin
54 54
  */
55 55
 function songkick_plugin_init() {
56  
-	// Load Plugin Text Domain for i18n
57  
-	load_plugin_textdomain(SONGKICK_TEXT_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
  56
+    // Load Plugin Text Domain for i18n
  57
+    load_plugin_textdomain(SONGKICK_TEXT_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
58 58
 }
59 59
 
60 60
 add_action('init', 'songkick_plugin_init');
61 61
 
62 62
 function songkick_concerts_and_festivals_shortcode_handler($options = null) {
63  
-	try {
64  
-		wp_enqueue_style('songkick_concerts', '/wp-content/plugins/songkick-concerts-and-festivals/songkick_concerts.css') ;
65  
-
66  
-		$default_options = get_option(SONGKICK_OPTIONS);
67  
-		if (is_array($options)) {
68  
-			$options = array_merge($default_options, $options);
69  
-		} else {
70  
-			$options = $default_options;
71  
-		}
72  
-		$options['logo']             = $options['shortcode_logo'];
73  
-		$options['date_color']       = $options['shortcode_date_color'];
74  
-		$options['number_of_events'] = $options['shortcode_number_of_events'];
75  
-
76  
-		$sk = new SongkickPresentableEvents($options);
77  
-		$str = '<div class="songkick-events">';
78  
-		$str .= $sk->to_html();
79  
-		$str .= '</div>';
80  
-		return $str;
81  
-	} catch (Exception $e) {
82  
-		$msg = 'Error on '.get_bloginfo('url').' while trying to display Songkick Concerts plugin: '. $e->getMessage();
83  
-		error_log($msg, 0); 
84  
-	}
  63
+    try {
  64
+        wp_enqueue_style('songkick_concerts', '/wp-content/plugins/songkick-concerts-and-festivals/songkick_concerts.css') ;
  65
+
  66
+        $default_options = get_option(SONGKICK_OPTIONS);
  67
+        if (is_array($options)) {
  68
+            $options = array_merge($default_options, $options);
  69
+        } else {
  70
+            $options = $default_options;
  71
+        }
  72
+        $options['logo']             = $options['shortcode_logo'];
  73
+        $options['date_color']       = $options['shortcode_date_color'];
  74
+        $options['number_of_events'] = $options['shortcode_number_of_events'];
  75
+
  76
+        $sk = new SongkickPresentableEvents($options);
  77
+        $str = '<div class="songkick-events">';
  78
+        $str .= $sk->to_html();
  79
+        $str .= '</div>';
  80
+        return $str;
  81
+    } catch (Exception $e) {
  82
+        $msg = 'Error on '.get_bloginfo('url').' while trying to display Songkick Concerts plugin: '. $e->getMessage();
  83
+        error_log($msg, 0); 
  84
+    }
85 85
 }
86 86
 
87 87
 /**
88 88
  * Global Initialization of the Songkick Sidebar Widget
89 89
  */
90 90
 function songkick_widget_init() {
91  
-	if (!function_exists('register_sidebar_widget'))
92  
-		return;
93  
-
94  
-	wp_enqueue_style('songkick_concerts', '/wp-content/plugins/songkick-concerts-and-festivals/songkick_concerts.css') ;
95  
-
96  
-	function songkick_widget($args) {
97  
-		try {
98  
-			extract($args);
99  
-
100  
-			$options       = get_option(SONGKICK_OPTIONS);
101  
-			$hide_if_empty = $options['hide_if_empty'];
102  
-
103  
-			$sk = new SongkickPresentableEvents($options);
104  
-
105  
-			if ($hide_if_empty && $sk->no_events()) return;
106  
-
107  
-			$options = get_option(SONGKICK_OPTIONS);
108  
-			$title = $options['title'];
109  
-			if (!$title || $title == '') {
110  
-				$title = __('Concerts', SONGKICK_TEXT_DOMAIN);
111  
-			}
112  
-			$title = htmlentities($title, ENT_QUOTES, SONGKICK_I18N_ENCODING);
113  
-
114  
-			echo $before_widget;
115  
-			echo '<div class="songkick-events">';
116  
-	 		echo $before_title . $title . $after_title;
117  
-			echo $sk->to_html();
118  
-			echo '</div>';
119  
-			echo $after_widget;
120  
-		} catch (Exception $e) {
121  
-			$msg = 'Error on '.get_bloginfo('url').' while trying to display Songkick Concerts plugin: '. $e->getMessage();
122  
-			error_log($msg, 0); 
123  
-		}
124  
-	}
125  
-
126  
-	register_sidebar_widget(array('Songkick Concerts and Festivals', 'widgets'), 'songkick_widget');
127  
-	register_widget_control(array('Songkick Concerts and Festivals', 'widgets'), 'songkick_widget_settings');
  91
+    if (!function_exists('register_sidebar_widget'))
  92
+        return;
  93
+
  94
+    wp_enqueue_style('songkick_concerts', '/wp-content/plugins/songkick-concerts-and-festivals/songkick_concerts.css') ;
  95
+
  96
+    function songkick_widget($args) {
  97
+        try {
  98
+            extract($args);
  99
+
  100
+            $options       = get_option(SONGKICK_OPTIONS);
  101
+            $hide_if_empty = $options['hide_if_empty'];
  102
+
  103
+            $sk = new SongkickPresentableEvents($options);
  104
+
  105
+            if ($hide_if_empty && $sk->no_events()) return;
  106
+
  107
+            $options = get_option(SONGKICK_OPTIONS);
  108
+            $title = $options['title'];
  109
+            if (!$title || $title == '') {
  110
+                $title = __('Concerts', SONGKICK_TEXT_DOMAIN);
  111
+            }
  112
+            $title = htmlentities($title, ENT_QUOTES, SONGKICK_I18N_ENCODING);
  113
+
  114
+            echo $before_widget;
  115
+            echo '<div class="songkick-events">';
  116
+            echo $before_title . $title . $after_title;
  117
+            echo $sk->to_html();
  118
+            echo '</div>';
  119
+            echo $after_widget;
  120
+        } catch (Exception $e) {
  121
+            $msg = 'Error on '.get_bloginfo('url').' while trying to display Songkick Concerts plugin: '. $e->getMessage();
  122
+            error_log($msg, 0); 
  123
+        }
  124
+    }
  125
+
  126
+    register_sidebar_widget(array('Songkick Concerts and Festivals', 'widgets'), 'songkick_widget');
  127
+    register_widget_control(array('Songkick Concerts and Festivals', 'widgets'), 'songkick_widget_settings');
128 128
 }
129 129
 
130 130
 add_action('admin_menu', 'songkick_admin_menu');
131 131
 function songkick_admin_menu() {
132  
-	add_options_page('Songkick Concerts and Festivals', 'Songkick', 'administrator', 'songkick-concerts-and-festivals', 'songkick_admin_settings');
  132
+    add_options_page('Songkick Concerts and Festivals', 'Songkick', 'administrator', 'songkick-concerts-and-festivals', 'songkick_admin_settings');
133 133
 }
134 134
 
135 135
 add_shortcode("songkick_concerts_and_festivals", "songkick_concerts_and_festivals_shortcode_handler");
128  songkick_events.php
... ...
@@ -1,75 +1,75 @@
1 1
 <?php
2 2
 
3 3
 class SongkickEvents {
4  
-	public $apikey;
5  
-	public $upcoming_events = array();
  4
+    public $apikey;
  5
+    public $upcoming_events = array();
6 6
 
7  
-	function SongkickEvents($apikey) {
8  
-		$this->apikey = trim($apikey);
9  
-		$this->apiurl = 'http://api.songkick.com/api/3.0';
10  
-	}
  7
+    function SongkickEvents($apikey) {
  8
+        $this->apikey = trim($apikey);
  9
+        $this->apiurl = 'http://api.songkick.com/api/3.0';
  10
+    }
11 11
 
12  
-	function get_upcoming_events($per_page=10) {
13  
-		$cached_results = $this->get_cached_results($this->url($per_page));
14  
-		if ($this->cache_expired($cached_results)) {
15  
-			$events = $this->get_uncached_upcoming_events($per_page);
16  
-			$cached_results = array('events' => $events, 'timestamp'=> time());
17  
-			$this->set_cached_results($this->url($per_page), $cached_results);
18  
-		} else {
19  
-			$events = $cached_results['events'];
20  
-		}
21  
-		return $events;
22  
-	}
23  
-	
24  
-	protected function get_cached_results($key) {
25  
-		$all_cache = get_option(SONGKICK_CACHE);
26  
-		if (isset($all_cache[$key]) && $all_cache[$key]) {
27  
-			return $all_cache[$key];
28  
-		} else {
29  
-			return NULL;
30  
-		}
31  
-	}
32  
-	
33  
-	protected function get_uncached_upcoming_events($per_page) {
34  
-		$response = $this->fetch($this->url($per_page));
35  
-		return $this->events_from_json($response);
36  
-	}
  12
+    function get_upcoming_events($per_page=10) {
  13
+        $cached_results = $this->get_cached_results($this->url($per_page));
  14
+        if ($this->cache_expired($cached_results)) {
  15
+            $events = $this->get_uncached_upcoming_events($per_page);
  16
+            $cached_results = array('events' => $events, 'timestamp'=> time());
  17
+            $this->set_cached_results($this->url($per_page), $cached_results);
  18
+        } else {
  19
+            $events = $cached_results['events'];
  20
+        }
  21
+        return $events;
  22
+    }
  23
+    
  24
+    protected function get_cached_results($key) {
  25
+        $all_cache = get_option(SONGKICK_CACHE);
  26
+        if (isset($all_cache[$key]) && $all_cache[$key]) {
  27
+            return $all_cache[$key];
  28
+        } else {
  29
+            return NULL;
  30
+        }
  31
+    }
  32
+    
  33
+    protected function get_uncached_upcoming_events($per_page) {
  34
+        $response = $this->fetch($this->url($per_page));
  35
+        return $this->events_from_json($response);
  36
+    }
37 37
 
38  
-	protected function set_cached_results($key, $value) {
39  
-		$all_cache = get_option(SONGKICK_CACHE);
40  
-		if (!$all_cache) {
41  
-			$all_cache = array();
42  
-		}
43  
-		$all_cache[$key] = $value;
44  
-		update_option(SONGKICK_CACHE, $all_cache);
45  
-	}
46  
-	
47  
-	protected function cache_expired($cached_results) {
48  
-		if (!$cached_results || $cached_results == null) return true;
49  
-		return (bool) ((time() - $cached_results['timestamp'] ) > SONGKICK_REFRESH_CACHE);
50  
-	}
  38
+    protected function set_cached_results($key, $value) {
  39
+        $all_cache = get_option(SONGKICK_CACHE);
  40
+        if (!$all_cache) {
  41
+            $all_cache = array();
  42
+        }
  43
+        $all_cache[$key] = $value;
  44
+        update_option(SONGKICK_CACHE, $all_cache);
  45
+    }
  46
+    
  47
+    protected function cache_expired($cached_results) {
  48
+        if (!$cached_results || $cached_results == null) return true;
  49
+        return (bool) ((time() - $cached_results['timestamp'] ) > SONGKICK_REFRESH_CACHE);
  50
+    }
51 51
 
52  
-	protected function fetch($url) {
53  
-		$http     = new WP_Http;
54  
-		$response =  $http->request($url);
55  
-		if (is_wp_error($response)) {
56  
-			throw new Exception('WP_Http/WP_Error message: '.$response->get_error_message());
57  
-		} elseif (!is_array($response)) {
58  
-			throw new Exception('WP_Http/Invalid response');
59  
-		} elseif  ($response['response']['code'] != 200) {
60  
-			throw new Exception('WP_Http error response: '.$response['response']['code']);
61  
-		}
62  
-		return $response['body'];
63  
-	}
  52
+    protected function fetch($url) {
  53
+        $http     = new WP_Http;
  54
+        $response =  $http->request($url);
  55
+        if (is_wp_error($response)) {
  56
+            throw new Exception('WP_Http/WP_Error message: '.$response->get_error_message());
  57
+        } elseif (!is_array($response)) {
  58
+            throw new Exception('WP_Http/Invalid response');
  59
+        } elseif  ($response['response']['code'] != 200) {
  60
+            throw new Exception('WP_Http error response: '.$response['response']['code']);
  61
+        }
  62
+        return $response['body'];
  63
+    }
64 64
 
65  
-	protected function events_from_json($json) {
66  
-		$json_docs = json_decode($json);
67  
-		if ($json_docs->resultsPage->totalEntries === 0) {
68  
-			return array();
69  
-		} else {
70  
-			return $json_docs->resultsPage->results->event;
71  
-		}
72  
-	}
  65
+    protected function events_from_json($json) {
  66
+        $json_docs = json_decode($json);
  67
+        if ($json_docs->resultsPage->totalEntries === 0) {
  68
+            return array();
  69
+        } else {
  70
+            return $json_docs->resultsPage->results->event;
  71
+        }
  72
+    }
73 73
 }
74 74
 
75 75
 ?>
24  songkick_metro_area_events.php
@@ -2,20 +2,20 @@
2 2
 require_once dirname(__FILE__) . '/songkick_events.php';
3 3
 
4 4
 class SongkickMetroAreaEvents extends SongkickEvents {
5  
-	public $id;
6  
-	public $apikey;
  5
+    public $id;
  6
+    public $apikey;
7 7
 
8  
-	function SongkickMetroAreaEvents($apikey, $id) {
9  
-		$this->SongkickEvents($apikey);
10  
-		$this->id = trim($id);
11  
-	}
  8
+    function SongkickMetroAreaEvents($apikey, $id) {
  9
+        $this->SongkickEvents($apikey);
  10
+        $this->id = trim($id);
  11
+    }
12 12
 
13  
-	function profile_url() {
14  
-		return "http://www.songkick.com/metro_areas/$this->id";
15  
-	}
  13
+    function profile_url() {
  14
+        return "http://www.songkick.com/metro_areas/$this->id";
  15
+    }
16 16
 
17  
-	protected function url($per_page){
18  
-		return "$this->apiurl/metro_areas/$this->id/calendar.json?apikey=$this->apikey&per_page=$per_page";
19  
-	}
  17
+    protected function url($per_page){
  18
+        return "$this->apiurl/metro_areas/$this->id/calendar.json?apikey=$this->apikey&per_page=$per_page";
  19
+    }
20 20
 }
21 21
 ?>
131  songkick_presentable_events.php
@@ -7,76 +7,75 @@
7 7
 require_once dirname(__FILE__) . '/songkick_venue_events.php';
8 8
 
9 9
 class SongkickPresentableEvents {
10  
-	
11  
-	function SongkickPresentableEvents($options) {
12  
-		if ($options['username']) {
13  
-			$songkick_id      = $options['username'];
14  
-			$songkick_id_type = 'user';
15  
-		} else {
16  
-			$songkick_id      = $options['songkick_id'];
17  
-			$songkick_id_type = $options['songkick_id_type'];
18  
-		}
19  
-		$apikey           = $options['apikey'];
20  
-		$attendance       = $options['attendance'];
21  
-		$number_of_events = $options['number_of_events'];
22  
-		
23  
-		switch ($songkick_id_type) {
24  
-			case 'user':
25  
-				$this->songkick_events = new SongkickUserEvents($apikey, $songkick_id, $attendance);
26  
-				break;
27  
-			case 'artist':
28  
-				$this->songkick_events = new SongkickArtistEvents($apikey, $songkick_id);
29  
-				break;
30  
-			case 'metro_area':
31  
-				$this->songkick_events = new SongkickMetroAreaEvents($apikey, $songkick_id);
32  
-				break;
33  
-			case 'venue':
34  
-				$this->songkick_events = new SongkickVenueEvents($apikey, $songkick_id);
35  
-				break;
36  
-			default:
37  
-				throw new Exception("Unknown songkick id type: $songkick_id_type");
38  
-		}
39 10
 
40  
-		$this->events     = $this->songkick_events->get_upcoming_events($number_of_events);
41  
-		$this->date_color = $options['date_color'];
42  
-		$this->logo       = $options['logo'];
43  
-		$this->no_calendar_style = false;
44  
-		if (isset($options['no_calendar_style'])) {
45  
-			$this->no_calendar_style = $options['no_calendar_style'];
46  
-		}
47  
-	}
  11
+    function SongkickPresentableEvents($options) {
  12
+        if ($options['username']) {
  13
+            $songkick_id      = $options['username'];
  14
+            $songkick_id_type = 'user';
  15
+        } else {
  16
+            $songkick_id      = $options['songkick_id'];
  17
+            $songkick_id_type = $options['songkick_id_type'];
  18
+        }
  19
+        $apikey           = $options['apikey'];
  20
+        $attendance       = $options['attendance'];
  21
+        $number_of_events = $options['number_of_events'];
48 22
 
49  
-	function to_html() {
50  
-		$profile_title = __('See all concerts', SONGKICK_TEXT_DOMAIN);
  23
+        switch ($songkick_id_type) {
  24
+            case 'user':
  25
+                $this->songkick_events = new SongkickUserEvents($apikey, $songkick_id, $attendance);
  26
+                break;
  27
+            case 'artist':
  28
+                $this->songkick_events = new SongkickArtistEvents($apikey, $songkick_id);
  29
+                break;
  30
+            case 'metro_area':
  31
+                $this->songkick_events = new SongkickMetroAreaEvents($apikey, $songkick_id);
  32
+                break;
  33
+            case 'venue':
  34
+                $this->songkick_events = new SongkickVenueEvents($apikey, $songkick_id);
  35
+                break;
  36
+            default:
  37
+                throw new Exception("Unknown songkick id type: $songkick_id_type");
  38
+        }
51 39
 
52  
-		$str = '';
53  
-		if (empty($this->events)) {
54  
-			$str .= '<p>'. htmlentities(__('No events...'), ENT_QUOTES, SONGKICK_I18N_ENCODING). '</p>';
55  
-		} else {
56  
-			$str .= '<ul class="songkick-events">';
57  
-			foreach($this->events as $event) {
58  
-				$presentable_event = new SongkickPresentableEvent($event);
59  
-				$str .= '<li>'.$presentable_event->to_html($this->no_calendar_style, $this->date_color).'</li>';
60  
-			}
61  
-			$str .= '</ul>';
62  
-		}
63  
-		$str .= '<p class="profile-title"><a href="'.$this->songkick_events->profile_url().'">';
64  
-		$str .= htmlentities($profile_title, ENT_QUOTES, SONGKICK_I18N_ENCODING)."</a></p>";
65  
-		$str .= $this->powered_by_songkick($this->logo);
66  
-		return $str;
67  
-	}
68  
-	
69  
-	function no_events() {
70  
-		return empty($this->events);
71  
-	}
72  
-	
73  
-	private function powered_by_songkick($logo) {
74  
-		$text = __('Concerts by Songkick', SONGKICK_TEXT_DOMAIN);
75  
-		$html  = "<a class='powered-by' href='http://www.songkick.com/'>";
76  
-		$html .= "<img src='".site_url('/wp-content/plugins/songkick-concerts-and-festivals/'.$logo)."' title='".htmlentities($text, ENT_QUOTES, SONGKICK_I18N_ENCODING)."' alt='".htmlentities($text, ENT_QUOTES, SONGKICK_I18N_ENCODING)."' /></a>";
77  
-		return $html;
78  
-	}
  40
+        $this->events     = $this->songkick_events->get_upcoming_events($number_of_events);
  41
+        $this->date_color = $options['date_color'];
  42
+        $this->logo       = $options['logo'];
  43
+        $this->no_calendar_style = false;
  44
+        if (isset($options['no_calendar_style'])) {
  45
+            $this->no_calendar_style = $options['no_calendar_style'];
  46
+        }
  47
+    }
79 48
 
  49
+    function to_html() {
  50
+        $profile_title = __('See all concerts', SONGKICK_TEXT_DOMAIN);
  51
+
  52
+        $str = '';
  53
+        if (empty($this->events)) {
  54
+            $str .= '<p>'. htmlentities(__('No events...'), ENT_QUOTES, SONGKICK_I18N_ENCODING). '</p>';
  55
+        } else {
  56
+            $str .= '<ul class="songkick-events">';
  57
+            foreach($this->events as $event) {
  58
+                $presentable_event = new SongkickPresentableEvent($event);
  59
+                $str .= '<li>'.$presentable_event->to_html($this->no_calendar_style, $this->date_color).'</li>';
  60
+            }
  61
+            $str .= '</ul>';
  62
+        }
  63
+        $str .= '<p class="profile-title"><a href="'.$this->songkick_events->profile_url().'">';
  64
+        $str .= htmlentities($profile_title, ENT_QUOTES, SONGKICK_I18N_ENCODING)."</a></p>";
  65
+        $str .= $this->powered_by_songkick($this->logo);
  66
+        return $str;
  67
+    }
  68
+
  69
+    function no_events() {
  70
+        return empty($this->events);
  71
+    }
  72
+
  73
+    private function powered_by_songkick($logo) {
  74
+        $text = __('Concerts by Songkick', SONGKICK_TEXT_DOMAIN);
  75
+        $html  = "<a class='powered-by' href='http://www.songkick.com/'>";
  76
+        $html .= "<img src='".site_url('/wp-content/plugins/songkick-concerts-and-festivals/'.$logo)."' title='".htmlentities($text, ENT_QUOTES, SONGKICK_I18N_ENCODING)."' alt='".htmlentities($text, ENT_QUOTES, SONGKICK_I18N_ENCODING)."' /></a>";
  77
+        return $html;
  78
+    }
80 79
 
81 80
 }
82 81
 ?>
322  songkick_settings.php
... ...
@@ -1,171 +1,171 @@
1 1
 <?php
2 2
 
3 3
 function songkick_widget_settings() {
4  
-	echo '<a href="options-general.php?page=songkick-concerts-and-festivals">Please go to the plugin\'s settings page.</a>';
  4
+    echo '<a href="options-general.php?page=songkick-concerts-and-festivals">Please go to the plugin\'s settings page.</a>';
5 5
 }
6 6
 
7 7
 function songkick_admin_settings() {
8 8
   $max_number_events = 100;
9  
-	$options = get_option(SONGKICK_OPTIONS);
10  
-	if (!is_array($options)) {
11  
-		$options = array(
12  
-			'title'         => '',
13  
-			'songkick_id'   => '',
14  
-			'songkick_id_type' => 'user',
15  
-			'apikey'        => '',
16  
-			'attendance'    => 'all',
17  
-			'hide_if_empty' => false,
18  
-			'number_of_events' => 10,
19  
-			'logo'          => 'songkick-logo.png',
20  
-			'date_color'    => '#303030',
21  
-		    'shortcode_number_of_events' => 50,
22  
-		    'shortcode_logo'          => 'songkick-logo.png',
23  
-    		'shortcode_date_color'    => '#303030'
24  
-		);
25  
-	}
26  
-
27  
-	if (current_user_can('manage_options') && isset($_POST['songkick_submit']) && $_POST['songkick_submit']) {
28  
-		$options['username']         = null;
29  
-		$options['songkick_id']      = trim(strip_tags(stripslashes($_POST['songkick_id'])));
30  
-		$options['songkick_id_type'] = strip_tags(stripslashes($_POST['songkick_id_type']));
31  
-		$options['attendance']       = strip_tags(stripslashes($_POST['songkick_attendance']));
32  
-		$options['apikey']           = trim(strip_tags(stripslashes($_POST['songkick_apikey'])));
33  
-
34  
-		$options['title']          = strip_tags(stripslashes($_POST['songkick_title']));
35  
-		$options['hide_if_empty']  = ($_POST['songkick_hide_if_empty'] === 'on');
36  
-		$options['logo']           = strip_tags(stripslashes($_POST['songkick_logo']));
37  
-		$options['date_color']     = strip_tags(stripslashes($_POST['songkick_date_color']));
38  
-		$limit = (int)$_POST['songkick_number_of_events'];
39  
-		if ($limit > $max_number_events) $limit = $max_number_events;
40  
-		$options['number_of_events'] = $limit;
41  
-
42  
-		$options['shortcode_logo']           = strip_tags(stripslashes($_POST['shortcode_songkick_logo']));
43  
-		$options['shortcode_date_color']     = strip_tags(stripslashes($_POST['shortcode_songkick_date_color']));
44  
-		$limit = (int)$_POST['songkick_shortcode_number_of_events'];
45  
-		if ($limit > $max_number_events) $limit = $max_number_events;
46  
-		$options['shortcode_number_of_events'] = $limit;
47  
-
48  
-		update_option(SONGKICK_CACHE,   null);
49  
-		update_option(SONGKICK_OPTIONS, $options);
50  
-	}
51  
-
52  
-	if ($options['username']) {
53  
-		$songkick_id_type = 'user';
54  
-		$songkick_id      = htmlspecialchars($options['username'], ENT_QUOTES);
55  
-	} else {
56  
-		$songkick_id_type = htmlspecialchars($options['songkick_id_type'], ENT_QUOTES);
57  
-		$songkick_id      = htmlspecialchars($options['songkick_id'], ENT_QUOTES);
58  
-	}
59  
-	$title            = htmlspecialchars($options['title'], ENT_QUOTES);
60  
-	$apikey           = htmlspecialchars($options['apikey'], ENT_QUOTES);
61  
-
62  
-	$attendance       = htmlspecialchars($options['attendance']);
63  
-	$hide_if_empty    = ($options['hide_if_empty']) ? 'checked="checked"' : '';
64  
-	$songkick_logo    = htmlspecialchars($options['logo'], ENT_QUOTES);
65  
-	$date_color       = htmlspecialchars($options['date_color'], ENT_QUOTES);
66  
-	$number_of_events = htmlspecialchars($options['number_of_events']);
67  
-
68  
-	$shortcode_songkick_logo    = htmlspecialchars($options['shortcode_logo'], ENT_QUOTES);
69  
-	$shortcode_date_color       = htmlspecialchars($options['shortcode_date_color'], ENT_QUOTES);
70  
-	$shortcode_number_of_events = htmlspecialchars($options['shortcode_number_of_events']);
71  
-
72  
-	echo '<div class="wrap" id="songkick_concerts_and_festivals_settings">
73  
-		     <div id="icon-options-general" class="icon32"></div>
74  
-   		     <h2>Songkick Concerts and Festivals Settings</h2>';
75  
-
76  
-	echo '<p class="description">Add [songkick_concerts_and_festivals] anywhere in a content to get your list of events.</p>';
77  
-	echo '<p class="description">You can also add the Songkick widget to your template.</p>';
78  
-
79  
-	echo '<form method="post">';
80  
-	echo '<h3>Main settings</h3>';
81  
-
82  
-	echo '<table class="form-table">';
83  
-	echo '<tr><th><label for="songkick_apikey">' . 'Songkick API Key' . '</label></th>';
84  
-	echo '<td><input id="songkick_apikey" name="songkick_apikey" type="text" value="'.$apikey.'" />';
85  
-	echo '<span class="description">Required &ndash; <a href="http://developer.songkick.com">Request one from Songkick</a></span>';
86  
-	echo '</td></tr>';
87  
-
88  
-	echo '<tr><th><label for="songkick_id_type">' . 'Songkick ID' . '</label></th>';
89  
-	echo '<td><select id="songkick_id_type" name="songkick_id_type">';
90  
-	echo '    <option value="user" '.(($songkick_id_type == 'user') ? ' selected' : '').'>username</option>';
91  
-	echo '    <option value="artist" '.(($songkick_id_type == 'artist') ? ' selected' : '').'>artist id</option>';
92  
-	echo '    <option value="venue" '.(($songkick_id_type == 'venue') ? ' selected' : '').'>venue id</option>';
93  
-	echo '    <option value="metro_area" '.(($songkick_id_type == 'metro_area') ? ' selected' : '').'>metro area id</option>';
94  
-	echo '  </select>';
95  
-	echo '  <input size="15" id="songkick_id" name="songkick_id" type="text" value="'.$songkick_id.'" />';
96  
-	echo '<span class="description">Required</span>';
97  
-	echo '</td></tr>';
98  
-
99  
-	echo '<tr><th><label for="songkick_attendance">' . 'Attendance' . '</label></th>';
100  
-	echo '<td><select id="songkick_attendance" name="songkick_attendance">';
101  
-	echo '    <option value="all" '.(($attendance == 'all') ? ' selected' : '').'>all</option>';
102  
-	echo '    <option value="im_going" '.(($attendance == 'im_going') ? ' selected' : '').'>I’m going</option>';
103  
-	echo '    <option value="i_might_go" '.(($attendance == 'i_might_go') ? ' selected' : '').'>I might go</option>';
104  
-	echo '  </select>';
105  
-	echo '<span class="description">For users only</span>';
106  
-	echo '</td></tr>';
107  
-
108  
-	echo '<tr><td colspan="2">You can also specify different user, artist, venue, or metro area ids when using the shortcode function. ';
109  
-	echo ' <br>For users:&nbsp;&nbsp;<code>[songkick_concerts_and_festivals songkick_id=your_username &nbsp;songkick_id_type=user]</code>';
110  
-	echo ' <br>For artists: <code>[songkick_concerts_and_festivals songkick_id=your_artist_id songkick_id_type=artist]</code>';
111  
-	echo ' <br>For venues: <code>[songkick_concerts_and_festivals songkick_id=your_venue_id songkick_id_type=venue]</code>';
112  
-	echo ' <br>For metro areas: <code>[songkick_concerts_and_festivals songkick_id=your_metro_area_id songkick_id_type=metro_area]</code>';
113  
-	echo '</td></tr>';
114  
-
115  
-	echo '</table>';
116  
-
117  
-	echo '<br><h3>Shortcode settings</h3>';
118  
-	echo '<table class="form-table">';
119  
-	echo '<tr><th><label for="songkick_shortcode_number_of_events">Number of events to show</label></th>';
120  
-	echo '<td><input id="songkick_shortcode_number_of_events" name="songkick_shortcode_number_of_events" type="text" value="'.$shortcode_number_of_events.'" /> ';
121  
-	echo '<span class="description"> Max. 100</span>';
122  
-	echo '</td></tr>';
123  
-	echo '<tr><th><label for="shortcode_songkick_logo">' . 'Songkick logo' . '</label></th>';
124  
-	echo '<td><select id="shortcode_songkick_logo" name="shortcode_songkick_logo">';
125  
-	echo '    <option value="songkick-logo.png" '.(($shortcode_songkick_logo == 'songkick-logo.png') ? ' selected' : '').'>' .
126  
-					'white background' . '</option>';
127  
-	echo '    <option value="songkick-logo-black.png" '.(($shortcode_songkick_logo == 'songkick-logo-black.png') ? ' selected' : '').'>' .
128  
-					'black background' . '</option>';
129  
-	echo '  </select>';
130  
-	echo '</td></tr>';
131  
-	echo '<tr><th><label for="shortcode_songkick_date_color">' . 'Background color for date:' . '</label></th>';
132  
-	echo '<td><input id="shortcode_songkick_date_color" name="shortcode_songkick_date_color" type="text" value="'.$shortcode_date_color.'" />';
133  
-	echo '</td></tr>';
134  
-	echo '</table>';
135  
-
136  
-	echo '<br><h3>Widget settings</h3>';
137  
-
138  
-	echo '<table class="form-table">';
139  
-	echo '<tr><th><label for="songkick_title">' . 'Title:' . '</label></th>';
140  
-	echo '<td><input id="songkick_title" name="songkick_title" type="text" value="'.$title.'" />';
141  
-	echo '</td></tr>';
142  
-
143  
-	echo '<tr><th><label for="songkick_number_of_events">Number of events to show</label></th>';
144  
-	echo '<td><input id="songkick_number_of_events" name="songkick_number_of_events" type="text" value="'.$number_of_events.'" /> ';
145  
-	echo '<span class="description"> Max. 100</span>';
146  
-	echo '</td></tr>';
147  
-
148  
-	echo '<tr><th><label for="songkick_hide_if_empty">Hide if there are no events?</label></th>';
149  
-	echo '<td><input id="songkick_hide_if_empty" name="songkick_hide_if_empty" type="checkbox" '.$hide_if_empty.' /> ';
150  
-	echo '</td></tr>';
151  
-
152  
-	echo '<tr><th><label for="songkick_logo">' . 'Songkick logo' . '</label></th>';
153  
-	echo '<td><select id="songkick_logo" name="songkick_logo">';
154  
-	echo '    <option value="songkick-logo.png" '.(($songkick_logo == 'songkick-logo.png') ? ' selected' : '').'>' .
155  
-					'white background' . '</option>';
156  
-	echo '    <option value="songkick-logo-black.png" '.(($songkick_logo == 'songkick-logo-black.png') ? ' selected' : '').'>' .
157  
-					'black background' . '</option>';
158  
-	echo '  </select>';
159  
-	echo '</td></tr>';
160  
-
161  
-	echo '<tr><th><label for="songkick_date_color">' . 'Background color for date:' . '</label></th>';
162  
-	echo '<td><input id="songkick_date_color" name="songkick_date_color" type="text" value="'.$date_color.'" />';
163  
-	echo '</td></tr>';
164  
-
165  
-	echo '</table>';
166  
-
167  
-	echo '<p class="submit"><input type="submit" class="button-primary" name="songkick_submit" value="Save Changes" /></p>';
168  
-	echo '</form></div>';
  9
+    $options = get_option(SONGKICK_OPTIONS);
  10
+    if (!is_array($options)) {
  11
+        $options = array(
  12
+            'title'         => '',
  13
+            'songkick_id'   => '',
  14
+            'songkick_id_type' => 'user',
  15
+            'apikey'        => '',
  16
+            'attendance'    => 'all',
  17
+            'hide_if_empty' => false,
  18
+            'number_of_events' => 10,
  19
+            'logo'          => 'songkick-logo.png',
  20
+            'date_color'    => '#303030',
  21
+            'shortcode_number_of_events' => 50,
  22
+            'shortcode_logo'          => 'songkick-logo.png',
  23
+            'shortcode_date_color'    => '#303030'
  24
+        );
  25
+    }
  26
+
  27
+    if (current_user_can('manage_options') && isset($_POST['songkick_submit']) && $_POST['songkick_submit']) {
  28
+        $options['username']         = null;
  29
+        $options['songkick_id']      = trim(strip_tags(stripslashes($_POST['songkick_id'])));
  30
+        $options['songkick_id_type'] = strip_tags(stripslashes($_POST['songkick_id_type']));
  31
+        $options['attendance']       = strip_tags(stripslashes($_POST['songkick_attendance']));
  32
+        $options['apikey']           = trim(strip_tags(stripslashes($_POST['songkick_apikey'])));
  33
+
  34
+        $options['title']          = strip_tags(stripslashes($_POST['songkick_title']));
  35
+        $options['hide_if_empty']  = ($_POST['songkick_hide_if_empty'] === 'on');
  36
+        $options['logo']           = strip_tags(stripslashes($_POST['songkick_logo']));
  37
+        $options['date_color']     = strip_tags(stripslashes($_POST['songkick_date_color']));
  38
+        $limit = (int)$_POST['songkick_number_of_events'];
  39
+        if ($limit > $max_number_events) $limit = $max_number_events;
  40
+        $options['number_of_events'] = $limit;
  41
+
  42
+        $options['shortcode_logo']           = strip_tags(stripslashes($_POST['shortcode_songkick_logo']));
  43
+        $options['shortcode_date_color']     = strip_tags(stripslashes($_POST['shortcode_songkick_date_color']));
  44
+        $limit = (int)$_POST['songkick_shortcode_number_of_events'];
  45
+        if ($limit > $max_number_events) $limit = $max_number_events;
  46
+        $options['shortcode_number_of_events'] = $limit;
  47
+
  48
+        update_option(SONGKICK_CACHE,   null);
  49
+        update_option(SONGKICK_OPTIONS, $options);
  50
+    }
  51
+
  52
+    if ($options['username']) {
  53
+        $songkick_id_type = 'user';
  54
+        $songkick_id      = htmlspecialchars($options['username'], ENT_QUOTES);
  55
+    } else {
  56
+        $songkick_id_type = htmlspecialchars($options['songkick_id_type'], ENT_QUOTES);
  57
+        $songkick_id      = htmlspecialchars($options['songkick_id'], ENT_QUOTES);
  58
+    }
  59
+    $title            = htmlspecialchars($options['title'], ENT_QUOTES);
  60
+    $apikey           = htmlspecialchars($options['apikey'], ENT_QUOTES);
  61
+
  62
+    $attendance       = htmlspecialchars($options['attendance']);
  63
+    $hide_if_empty    = ($options['hide_if_empty']) ? 'checked="checked"' : '';
  64
+    $songkick_logo    = htmlspecialchars($options['logo'], ENT_QUOTES);
  65
+    $date_color       = htmlspecialchars($options['date_color'], ENT_QUOTES);
  66
+    $number_of_events = htmlspecialchars($options['number_of_events']);
  67
+
  68
+    $shortcode_songkick_logo    = htmlspecialchars($options['shortcode_logo'], ENT_QUOTES);
  69
+    $shortcode_date_color       = htmlspecialchars($options['shortcode_date_color'], ENT_QUOTES);
  70
+    $shortcode_number_of_events = htmlspecialchars($options['shortcode_number_of_events']);
  71
+
  72
+    echo '<div class="wrap" id="songkick_concerts_and_festivals_settings">
  73
+             <div id="icon-options-general" class="icon32"></div>
  74
+             <h2>Songkick Concerts and Festivals Settings</h2>';
  75
+
  76
+    echo '<p class="description">Add [songkick_concerts_and_festivals] anywhere in a content to get your list of events.</p>';
  77
+    echo '<p class="description">You can also add the Songkick widget to your template.</p>';
  78
+
  79
+    echo '<form method="post">';
  80
+    echo '<h3>Main settings</h3>';
  81
+
  82
+    echo '<table class="form-table">';
  83
+    echo '<tr><th><label for="songkick_apikey">' . 'Songkick API Key' . '</label></th>';
  84
+    echo '<td><input id="songkick_apikey" name="songkick_apikey" type="text" value="'.$apikey.'" />';
  85
+    echo '<span class="description">Required &ndash; <a href="http://developer.songkick.com">Request one from Songkick</a></span>';
  86
+    echo '</td></tr>';
  87
+
  88
+    echo '<tr><th><label for="songkick_id_type">' . 'Songkick ID' . '</label></th>';
  89
+    echo '<td><select id="songkick_id_type" name="songkick_id_type">';
  90
+    echo '    <option value="user" '.(($songkick_id_type == 'user') ? ' selected' : '').'>username</option>';
  91
+    echo '    <option value="artist" '.(($songkick_id_type == 'artist') ? ' selected' : '').'>artist id</option>';
  92
+    echo '    <option value="venue" '.(($songkick_id_type == 'venue') ? ' selected' : '').'>venue id</option>';
  93
+    echo '    <option value="metro_area" '.(($songkick_id_type == 'metro_area') ? ' selected' : '').'>metro area id</option>';
  94
+    echo '  </select>';
  95
+    echo '  <input size="15" id="songkick_id" name="songkick_id" type="text" value="'.$songkick_id.'" />';
  96
+    echo '<span class="description">Required</span>';
  97
+    echo '</td></tr>';
  98
+
  99
+    echo '<tr><th><label for="songkick_attendance">' . 'Attendance' . '</label></th>';
  100
+    echo '<td><select id="songkick_attendance" name="songkick_attendance">';
  101
+    echo '    <option value="all" '.(($attendance == 'all') ? ' selected' : '').'>all</option>';
  102
+    echo '    <option value="im_going" '.(($attendance == 'im_going') ? ' selected' : '').'>I’m going</option>';
  103
+    echo '    <option value="i_might_go" '.(($attendance == 'i_might_go') ? ' selected' : '').'>I might go</option>';
  104
+    echo '  </select>';
  105
+    echo '<span class="description">For users only</span>';
  106
+    echo '</td></tr>';
  107
+
  108
+    echo '<tr><td colspan="2">You can also specify different user, artist, venue, or metro area ids when using the shortcode function. ';
  109
+    echo ' <br>For users:&nbsp;&nbsp;<code>[songkick_concerts_and_festivals songkick_id=your_username &nbsp;songkick_id_type=user]</code>';
  110
+    echo ' <br>For artists: <code>[songkick_concerts_and_festivals songkick_id=your_artist_id songkick_id_type=artist]</code>';
  111
+    echo ' <br>For venues: <code>[songkick_concerts_and_festivals songkick_id=your_venue_id songkick_id_type=venue]</code>';
  112
+    echo ' <br>For metro areas: <code>[songkick_concerts_and_festivals songkick_id=your_metro_area_id songkick_id_type=metro_area]</code>';
  113
+    echo '</td></tr>';
  114
+
  115
+    echo '</table>';
  116
+
  117
+    echo '<br><h3>Shortcode settings</h3>';
  118
+    echo '<table class="form-table">';
  119
+    echo '<tr><th><label for="songkick_shortcode_number_of_events">Number of events to show</label></th>';
  120
+    echo '<td><input id="songkick_shortcode_number_of_events" name="songkick_shortcode_number_of_events" type="text" value="'.$shortcode_number_of_events.'" /> ';
  121
+    echo '<span class="description"> Max. 100</span>';
  122
+    echo '</td></tr>';
  123
+    echo '<tr><th><label for="shortcode_songkick_logo">' . 'Songkick logo' . '</label></th>';
  124
+    echo '<td><select id="shortcode_songkick_logo" name="shortcode_songkick_logo">';
  125
+    echo '    <option value="songkick-logo.png" '.(($shortcode_songkick_logo == 'songkick-logo.png') ? ' selected' : '').'>' .
  126
+                    'white background' . '</option>';
  127
+    echo '    <option value="songkick-logo-black.png" '.(($shortcode_songkick_logo == 'songkick-logo-black.png') ? ' selected' : '').'>' .
  128
+                    'black background' . '</option>';
  129
+    echo '  </select>';
  130
+    echo '</td></tr>';
  131
+    echo '<tr><th><label for="shortcode_songkick_date_color">' . 'Background color for date:' . '</label></th>';
  132
+    echo '<td><input id="shortcode_songkick_date_color" name="shortcode_songkick_date_color" type="text" value="'.$shortcode_date_color.'" />';
  133
+    echo '</td></tr>';
  134
+    echo '</table>';
  135
+
  136
+    echo '<br><h3>Widget settings</h3>';
  137
+
  138
+    echo '<table class="form-table">';
  139
+    echo '<tr><th><label for="songkick_title">' . 'Title:' . '</label></th>';
  140
+    echo '<td><input id="songkick_title" name="songkick_title" type="text" value="'.$title.'" />';
  141
+    echo '</td></tr>';
  142
+
  143
+    echo '<tr><th><label for="songkick_number_of_events">Number of events to show</label></th>';
  144
+    echo '<td><input id="songkick_number_of_events" name="songkick_number_of_events" type="text" value="'.$number_of_events.'" /> ';
  145
+    echo '<span class="description"> Max. 100</span>';
  146
+    echo '</td></tr>';
  147
+
  148
+    echo '<tr><th><label for="songkick_hide_if_empty">Hide if there are no events?</label></th>';
  149
+    echo '<td><input id="songkick_hide_if_empty" name="songkick_hide_if_empty" type="checkbox" '.$hide_if_empty.' /> ';
  150
+    echo '</td></tr>';
  151
+
  152
+    echo '<tr><th><label for="songkick_logo">' . 'Songkick logo' . '</label></th>';
  153
+    echo '<td><select id="songkick_logo" name="songkick_logo">';
  154
+    echo '    <option value="songkick-logo.png" '.(($songkick_logo == 'songkick-logo.png') ? ' selected' : '').'>' .
  155
+                    'white background' . '</option>';
  156
+    echo '    <option value="songkick-logo-black.png" '.(($songkick_logo == 'songkick-logo-black.png') ? ' selected' : '').'>' .
  157
+                    'black background' . '</option>';
  158
+    echo '  </select>';
  159
+    echo '</td></tr>';
  160
+
  161
+    echo '<tr><th><label for="songkick_date_color">' . 'Background color for date:' . '</label></th>';
  162
+    echo '<td><input id="songkick_date_color" name="songkick_date_color" type="text" value="'.$date_color.'" />';
  163
+    echo '</td></tr>';
  164
+
  165
+    echo '</table>';
  166
+
  167
+    echo '<p class="submit"><input type="submit" class="button-primary" name="songkick_submit" value="Save Changes" /></p>';
  168
+    echo '</form></div>';
169 169
 }
170 170
 
171 171
 ?>
26  songkick_user_events.php
@@ -2,21 +2,21 @@
2 2
 require_once dirname(__FILE__) . '/songkick_events.php';
3 3
 
4 4
 class SongkickUserEvents extends SongkickEvents {
5  
-	public $username;
6  
-	public $apikey;
  5
+    public $username;
  6
+    public $apikey;
7 7
 
8  
-	function SongkickUserEvents($apikey, $username, $attendance='all') {
9  
-		$this->SongkickEvents($apikey);
10  
-		$this->attendance = $attendance;
11  
-		$this->username = trim($username);
12  
-	}
  8
+    function SongkickUserEvents($apikey, $username, $attendance='all') {
  9
+        $this->SongkickEvents($apikey);
  10
+        $this->attendance = $attendance;
  11
+        $this->username = trim($username);
  12
+    }
13 13
 
14  
-	function profile_url() {
15  
-		return "http://www.songkick.com/users/$this->username";
16  
-	}
  14
+    function profile_url() {
  15
+        return "http://www.songkick.com/users/$this->username";
  16
+    }
17 17
 
18  
-	protected function url($per_page) {
19  
-		return "$this->apiurl/users/$this->username/events.json?apikey=$this->apikey&per_page=$per_page&attendance=$this->attendance";
20  
-	}
  18
+    protected function url($per_page) {
  19
+        return "$this->apiurl/users/$this->username/events.json?apikey=$this->apikey&per_page=$per_page&attendance=$this->attendance";
  20
+    }
21 21
 }
22 22
 ?>
24  songkick_venue_events.php
@@ -2,20 +2,20 @@
2 2
 require_once dirname(__FILE__) . '/songkick_events.php';
3 3
 
4 4
 class SongkickVenueEvents extends SongkickEvents {
5  
-	public $id;
6  
-	public $apikey;
  5
+    public $id;
  6
+    public $apikey;
7 7
 
8  
-	function SongkickVenueEvents($apikey, $id) {
9  
-		$this->SongkickEvents($apikey);
10  
-		$this->id = trim($id);
11  
-	}
  8
+    function SongkickVenueEvents($apikey, $id) {
  9
+        $this->SongkickEvents($apikey);
  10
+        $this->id = trim($id);
  11
+    }
12 12
 
13  
-	function profile_url() {
14  
-		return "http://www.songkick.com/venues/$this->id";
15  
-	}
  13
+    function profile_url() {
  14
+        return "http://www.songkick.com/venues/$this->id";
  15
+    }
16 16
 
17  
-	protected function url($per_page){
18  
-		return "$this->apiurl/venues/$this->id/calendar.json?apikey=$this->apikey&per_page=$per_page";
19  
-	}
  17
+    protected function url($per_page){
  18
+        return "$this->apiurl/venues/$this->id/calendar.json?apikey=$this->apikey&per_page=$per_page";
  19
+    }
20 20
 }
21 21
 ?>
4  uninstall.php
... ...
@@ -1,8 +1,8 @@
1 1
 <?php
2 2
 
3 3
 if (!defined( 'ABSPATH') && !defined('WP_UNINSTALL_PLUGIN'))
4  
-	exit();
5  
-	
  4
+    exit();
  5
+
6 6
 delete_option('songkick-concerts');
7 7
 delete_option('songkick-concerts-cache');
8 8
 

0 notes on commit ba370f6

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