public
Description: Personal blog
Homepage: http://blog.alexgirard.com
Clone URL: git://github.com/alx/alexgirard.com-blog.git
Update tarski to 2.3
alx (author)
Thu Aug 14 09:51:33 -0700 2008
commit  be9c8d14be7cc9c366b23be0c9ecc94fe52f016e
tree    e1347d5d496cb557632ce6a21a1718d350f3af55
parent  53016768969f4ecad1fec54b790f93c794595071
...
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
8
9
10
 
11
12
13
14
 
15
16
17
18
 
19
20
21
22
 
23
24
25
26
27
28
29
 
 
 
30
31
 
32
33
34
35
36
 
 
 
37
38
39
...
1
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 
78
79
 
80
 
81
82
83
84
 
85
86
 
87
 
88
89
90
 
 
 
91
 
92
93
94
95
 
96
97
98
99
 
 
100
101
102
103
104
105
0
@@ -1,39 +1,105 @@
0
 # Changelog
0
 
0
-### Version 2.1.4 [&sect](http://tarskitheme.com/2008/07/13/214-release/)
0
 
0
+### Version 2.3 [§](http://tarskitheme.com/)
0
+
0
+#### New features
0
0
+ * Options page now compatible with <abbr title="Secure Sockets Layer">SSL</abbr> admin (r731)
0
0
+#### Tweaks
0
+  
0
+  * Don't serialise the data passed to `update_option` (r763)
0
+  * Show version cache notice when _file_, not directory, isn't writable (r760)
0
+  * Clean up `cache_is_writable` function (r759, r761)
0
+  * Add `js.css` to the list of disallowed custom styles (r755)
0
+  * Hide the search form label faster (r754)
0
+  * `multiple_tag_titles` function refactored (r751)
0
+  * Upgrade functionality refactored (r746)
0
+  * Author count check only runs when posts are saved or deleted (r745, r748)
0
+  * Author count checks how many authors have published posts (r744)
0
+  * `wpdb->prepare()` method used for author count query (r742)
0
+  * Deprecated `version_to_integer` and `version_newer_than` functions (r739)
0
+  * Switched to native <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> `version_compare` function (r737)
0
+  * Options page access granted only to users with `edit_themes` capability (r736)
0
+  * Stylesheets for the admin section enqueued, not printed (r734)
0
0
 #### Bug fixes
0
+
0
+  * Added more checks to upgrade functionality (r746)
0
+  * Made navbar selector work better in Internet Explorer (r735)
0
+  * Excluded navbar links category from the links page (r733)
0
+
0
+
0
+### Version 2.2.2 [&sect;](http://tarskitheme.com/2008/07/19/22-release/)
0
+
0
+#### Bug fixes
0
+
0
+  * Replace defunct function reference in Links template (r724)
0
+
0
+
0
+### Version 2.2.1 [&sect;](http://tarskitheme.com/2008/07/19/22-release/)
0
+
0
+#### Bug fixes
0
+  
0
+  * Always show authors if Tarski options haven't been saved (r715)
0
+
0
+
0
+### Version 2.2 [&sect;](http://tarskitheme.com/2008/07/19/22-release/)
0
+  
0
+#### New features
0
+
0
+  * Navbar selector: sub-page lists are collapsible (r606)
0
+  * Navbar selector: sub-pages are listed as such (r599)
0
   
0
+#### Tweaks
0
+
0
+  * Better handling of attachments (r697, r698)
0
+  * Tweaked gallery styling to better fit Tarski (r695)
0
+  * Add <abbr title="WordPress">WP</abbr> standard alignment classes (r694)
0
+  * Added inline hooks documentation (r657, r658, r661, r665, r666, r667)
0
+  * Deprecated `tarski_excerpt` function (r664)
0
+  * Deprecated `tarski_date` function in favour of a <abbr title="WordPress">WP</abbr> core function (r662)
0
+  * Removed filter from `implode_proper` function (r660)
0
+  * Removed functions deprecated two major releases ago (r659)
0
+  * Removed defunct Tarski search widget (r656)
0
+  * Paginate index pages by default (r652)
0
+  * Remove pagination from index pages more elegantly and efficiently (r651)
0
+  * Replaced Tarski links widget with a filter (r642)
0
+
0
+
0
+### Version 2.1.4 [&sect;](http://tarskitheme.com/2008/07/13/214-release/)
0
+
0
+#### Bug fixes
0
+
0
   * Correct overzealous calendar widget <abbr title="Cascading Stylesheets">CSS</abbr> (r687)
0
   * Sidebar upgrade routine only runs for older versions (r684)
0
   * Smarter unserialisation for Tarski options (r645)
0
-  * Fix Archives template layout for Janus style (r643)
0
+  * Fix Archives template layout for Janus style (r644)
0
 
0
-### Version 2.1.3 [&sect][39]
0
 
0
-  [38]: http://tarskitheme.com/2008/05/20/21-release/
0
+### Version 2.1.3 [&sect;](http://tarskitheme.com/2008/05/20/21-release/)
0
 
0
 #### Bug fixes
0
 
0
-  * Revert to using `curl_setopt()` for <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> 4 compatibility (r630)
0
+  * Revert to using `curl_setopt()` for <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> 4 compatibility (r629)
0
 
0
-### Version 2.1.2 [&sect;][38]
0
 
0
-  [38]: http://tarskitheme.com/2008/05/20/21-release/
0
+### Version 2.1.2 [&sect;](http://tarskitheme.com/2008/05/20/21-release/)
0
 
0
 #### Bug fixes
0
-  
0
-  * Fix version check timeout issues (r620, r625)
0
-  * Add missing textdomain to forum link (r615)
0
 
0
-### Version 2.1.1 [&sect;][37]
0
+  * Fix version check timeout issues (r620)
0
+  * Add missing textdomain to forum link (r614)
0
+
0
 
0
-  [37]: http://tarskitheme.com/2008/05/20/21-release/
0
+### Version 2.1.1 [&sect;](http://tarskitheme.com/2008/05/20/21-release/)
0
   
0
 #### Bug fixes
0
 
0
-  * Fixed navbar character encoding problem (r597)
0
-  * Corrected Janus feed icon position (r593)
0
+  * Fixed navbar character encoding problem (r595)
0
+  * Corrected Janus feed icon position (r592)
0
+
0
 
0
 ### Version 2.1 [&sect;][36]
0
 
...
24
25
26
27
 
28
29
30
...
43
44
45
46
 
47
48
49
 
50
51
52
...
24
25
26
 
27
28
29
30
...
43
44
45
 
46
47
48
 
49
50
51
52
0
@@ -24,7 +24,7 @@
0
           <h1 class="title"><?php echo multiple_tag_titles(); ?></h1>
0
         </div>
0
         <div class="content">
0
-          <p><?php printf( __('You are currently browsing articles tagged %s.','tarski'), multiple_tag_titles('strong') ); ?></p>
0
+          <p><?php printf( __('You are currently browsing articles tagged %s.','tarski'), multiple_tag_titles('<strong>%s</strong>') ); ?></p>
0
         </div>
0
           
0
       <?php } elseif(is_author()) { // Author header ?>
0
@@ -43,10 +43,10 @@
0
       <?php } elseif(is_day()) { // Daily archive header ?>
0
 
0
         <div class="meta">
0
-          <h1 class="title"><?php echo tarski_date(); ?></h1>
0
+          <h1 class="title"><?php the_time(get_option('date_format')); ?></h1>
0
         </div>
0
         <div class="content">
0
-          <p><?php printf( __('You are currently browsing the daily archive for %s.','tarski'), '<strong>' . tarski_date() . '</strong>' ); ?></p>
0
+          <p><?php printf( __('You are currently browsing the daily archive for %s.','tarski'), '<strong>' . get_the_time(get_option('date_format')) . '</strong>' ); ?></p>
0
         </div>
0
 
0
       <?php } elseif(is_month()) { // Monthly archive header ?>
...
96
97
98
99
 
100
101
102
...
96
97
98
 
99
100
101
102
0
@@ -96,7 +96,7 @@ if($comments || comments_open()) { ?>
0
   <?php if($user_ID) { // if user is logged in ?>
0
     
0
     <div id="info-input" class="secondary content">
0
-      <p class="userinfo"><?php _e('You are logged in as ','tarski'); ?><a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.</p>
0
+      <p class="userinfo"><?php _e('You are logged in as ','tarski'); ?><a href="<?php echo admin_url('profile.php'); ?>"><?php echo $user_identity; ?></a>.</p>
0
       <p><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account','tarski') ?>"><?php _e('Logout &raquo;','tarski'); ?></a></p>
0
     </div> <!-- /info fields -->
0
 
...
1
2
3
4
5
6
7
8
9
 
 
 
 
10
11
12
 
 
13
14
15
16
17
18
19
 
 
 
 
 
 
 
 
20
21
22
23
24
25
26
27
28
29
30
 
 
 
 
31
32
33
 
34
35
36
...
1
2
3
 
 
 
 
 
 
4
5
6
7
8
9
 
10
11
12
 
13
14
 
 
 
15
16
17
18
19
20
21
22
23
24
25
26
 
 
27
28
 
 
 
29
30
31
32
33
34
 
35
36
37
38
0
@@ -1,35 +1,37 @@
0
 <?php
0
 
0
 // Path constants
0
-define('TARSKILIB', TEMPLATEPATH . '/library');
0
-define('TARSKICLASSES', TARSKILIB . '/classes');
0
-define('TARSKIHELPERS', TARSKILIB . '/helpers');
0
-define('TARSKIDISPLAY', TARSKILIB . '/display');
0
-define('TARSKIWIDGETS', TARSKILIB . '/widgets');
0
-define('TARSKICACHE', TARSKILIB . '/cache');
0
+define('TARSKICLASSES', TEMPLATEPATH . '/library/classes');
0
+define('TARSKIHELPERS', TEMPLATEPATH . '/library/helpers');
0
+define('TARSKIDISPLAY', TEMPLATEPATH . '/app/display');
0
+define('TARSKICACHE', TEMPLATEPATH . '/app/cache');
0
 define('TARSKIVERSIONFILE', 'http://tarskitheme.com/version.atom');
0
 
0
-// Classes
0
+// Core library files
0
+require_once(TEMPLATEPATH . '/library/core.php');
0
 require_once(TARSKICLASSES . '/options.php');
0
-require_once(TARSKICLASSES . '/version.php');
0
 require_once(TARSKICLASSES . '/asset.php');
0
 
0
-// Helpers
0
-require_once(TARSKIHELPERS . '/hooks.php');
0
-require_once(TARSKIHELPERS . '/admin_helper.php');
0
+// Admin library files
0
+if (is_admin()) {
0
+  require_once(TARSKICLASSES . '/version.php');
0
+  require_once(TARSKICLASSES . '/page_select.php');
0
+  require_once(TARSKIHELPERS . '/admin_helper.php');
0
+}
0
+
0
+// Various helper libraries
0
 require_once(TARSKIHELPERS . '/template_helper.php');
0
 require_once(TARSKIHELPERS . '/content_helper.php');
0
 require_once(TARSKIHELPERS . '/author_helper.php');
0
 require_once(TARSKIHELPERS . '/tag_helper.php');
0
-
0
-// Widgets
0
 require_once(TARSKIHELPERS . '/widgets.php');
0
 
0
-// Deprecated
0
-require_once(TARSKIHELPERS . '/constants_helper.php');
0
-include_once(TARSKIHELPERS . '/deprecated.php');
0
+// API files
0
+require_once(TEMPLATEPATH . '/app/api/hooks.php');
0
+require_once(TEMPLATEPATH . '/app/api/constants_helper.php');
0
+include_once(TEMPLATEPATH . '/app/api/deprecated.php');
0
 
0
 // Launch
0
-require_once(TARSKILIB . '/launcher.php');
0
+require_once(TEMPLATEPATH . '/app/launcher.php');
0
 
0
 ?>
0
\ No newline at end of file
...
13
14
15
16
17
18
19
20
21
 
 
 
 
 
 
 
 
 
 
 
 
 
22
23
24
...
65
66
67
68
 
69
70
71
...
13
14
15
 
 
 
 
 
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
...
72
73
74
 
75
76
77
78
0
@@ -13,12 +13,19 @@
0
           
0
           <div class="meta">
0
             <h1 class="title entry-title"><?php the_title(); ?></h1>
0
-            <?php if(is_single()) { ?>
0
-              <p class="metadata"><?php echo '<span class="date updated">' . tarski_date() . '</span>';
0
-              tarski_post_categories_link();
0
-              tarski_author_posts_link();
0
-              tarski_comments_link();
0
-              edit_post_link(__('edit','tarski'),' <span class="edit">(',')</span>'); ?></p>
0
+            <?php if(is_attachment()) { ?>
0
+              <p class="metadata"><?php
0
+                echo '<span class="date updated">' . get_the_time(get_option('date_format')) . '</span>';
0
+                edit_post_link(__('edit','tarski'),' <span class="edit">(',')</span>');
0
+              ?></p>
0
+            <?php } elseif(is_single()) { ?>
0
+              <p class="metadata"><?php
0
+                echo '<span class="date updated">' . get_the_time(get_option('date_format')) . '</span>';
0
+                tarski_post_categories_link();
0
+                tarski_author_posts_link();
0
+                tarski_comments_link();
0
+                edit_post_link(__('edit','tarski'),' <span class="edit">(',')</span>');
0
+              ?></p>
0
             <?php } else { ?>
0
               <?php edit_post_link(__('edit page','tarski'), '<p class="metadata"><span class="edit">(', ')</span></p>'); ?>
0
             <?php } ?>
0
@@ -65,7 +72,7 @@
0
 
0
 
0
 
0
-<?php if(is_single() || is_page()) { comments_template(); } ?>
0
+<?php if(!is_attachment() && (is_single() || is_page())) { comments_template(); } ?>
0
 
0
 
0
 
...
7
8
9
 
 
 
10
11
12
...
18
19
20
 
 
 
 
 
 
21
22
23
24
25
26
27
28
29
...
35
36
37
38
39
40
41
42
43
44
 
 
 
 
 
 
 
 
 
 
 
45
46
47
48
49
...
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
88
89
90
 
 
 
 
 
 
91
92
93
 
94
95
96
...
100
101
102
 
 
 
 
 
 
 
103
104
105
...
122
123
124
125
 
126
127
128
...
158
159
160
 
 
 
 
 
 
 
161
162
163
164
165
166
167
...
7
8
9
10
11
12
13
14
15
...
21
22
23
24
25
26
27
28
29
30
 
31
32
33
 
34
35
36
...
42
43
44
 
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 
63
64
65
...
74
75
76
 
77
78
79
80
81
82
 
83
84
 
85
86
 
87
88
89
...
100
101
102
103
104
105
106
107
108
109
110
 
111
112
113
114
...
118
119
120
121
122
123
124
125
126
127
128
129
130
...
147
148
149
 
150
151
152
153
...
183
184
185
186
187
188
189
190
191
192
193
194
195
 
196
197
198
0
@@ -7,6 +7,9 @@
0
  */
0
 class Asset {
0
   
0
+  /**
0
+   * Initialisation method which calls all other methods in turn.
0
+   */
0
   function init() {
0
     $assets = new Asset;
0
     
0
@@ -18,12 +21,16 @@ class Asset {
0
     $assets->output();
0
   }
0
   
0
+  /**
0
+   * Generate meta elements pertaining to Tarski and the site.
0
+   * 
0
+   * @hook filter tarski_asset_meta
0
+   * Filters the metadata generated by the Asset wrapper.
0
+   */
0
   function meta() {
0
-    // Theme name and version
0
     $themeversion = theme_version();
0
     $meta = array("<meta name=\"wp_theme\" content=\"Tarski $themeversion\" />");
0
     
0
-    // Description
0
     global $wp_query;
0
     $excerpt = trim(strip_tags(wp_specialchars($wp_query->post->post_excerpt)));
0
 
0
@@ -35,15 +42,24 @@ class Asset {
0
     if ( strlen($description) )
0
       $meta[] = "<meta name=\"description\" content=\"$description\" />";
0
     
0
-    // Robots
0
     if(get_option('blog_public') != '0')
0
       $meta[] = '<meta name="robots" content="all" />';
0
       
0
     $this->meta = apply_filters('tarski_asset_meta', $meta);
0
   }
0
   
0
+  /**
0
+   * Generate links to the various Tarski stylesheets.
0
+   * 
0
+   * @hook filter tarski_style_array
0
+   * Filter the array of stylesheet attributes from which the stylesheet
0
+   * links are generated.
0
+   * 
0
+   * @hook filter tarski_stylesheets
0
+   * Filter the raw stylesheet link elements before they're printed to
0
+   * the document.
0
+   */
0
   function stylesheets() {
0
-    // Default stylesheets
0
     $style_array = array(
0
       'main' => array(
0
         'url' => get_bloginfo('stylesheet_url'),
0
@@ -58,20 +74,16 @@ class Asset {
0
       )
0
     );
0
 
0
-    // Adds the alternate style, if one is selected
0
     if(get_tarski_option('style')) {
0
       $style_array['alternate'] = array(
0
         'url' => get_bloginfo('template_directory') . '/styles/' . get_tarski_option('style')
0
       );
0
     }
0
 
0
-    // The more complex array can be filtered if desired
0
     $style_array = apply_filters('tarski_style_array', $style_array);
0
 
0
-    // The business end of the function
0
     if(is_array($style_array)) {
0
       foreach($style_array as $type => $values) {
0
-        // URL is required
0
         if(is_array($values) && $values['url']) {
0
           if(empty($values['media'])) {
0
             $values['media'] = 'all';
0
@@ -88,9 +100,15 @@ class Asset {
0
     $this->stylesheets = apply_filters('tarski_stylesheets', $stylesheets);
0
   }
0
   
0
+  /**
0
+   * Generate script elements linking to Tarski's JavaScript.
0
+   * 
0
+   * @hook filter tarski_javascript
0
+   * Filter script elements before they're printed to the document.
0
+   */
0
   function javascript() {
0
     $scripts = array(
0
-      'tarski-js' => get_bloginfo('template_directory') . '/library/js/tarski.js'
0
+      'tarski-js' => get_bloginfo('template_directory') . '/app/js/tarski.js'
0
     );
0
 
0
     foreach($scripts as $name => $url) {
0
@@ -100,6 +118,13 @@ class Asset {
0
     $this->javascript = apply_filters('tarski_javascript', $javascript);
0
   }
0
   
0
+  /**
0
+   * Generate RSS or Atom feed link elements appropriate to the context.
0
+   * 
0
+   * @hook filter tarski_feeds
0
+   * Filter the RSS or Atam feed link elements before they're printed to the
0
+   * document.
0
+   */
0
   function feeds() {
0
     global $comments;
0
     if(is_single() || (is_page() && ($comments || comments_open()))) {
0
@@ -122,7 +147,7 @@ class Asset {
0
         $source = 'author';
0
       } elseif(is_date()) {
0
         if(is_day()) {
0
-          $title = sprintf( __('Daily archive feed for %s','tarski'), tarski_date());
0
+          $title = sprintf( __('Daily archive feed for %s','tarski'), get_the_time(get_option('date_format')));
0
           $link = get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d'));
0
           $source = 'day';
0
         } elseif(is_month()) {
0
@@ -158,10 +183,16 @@ class Asset {
0
     $this->feeds = apply_filters('tarski_feeds', $feeds);
0
   }
0
   
0
+  /**
0
+   * Print generated HTML to the document.
0
+   * 
0
+   * @hook filter tarski_assets
0
+   * A more generalised filter for all assets generated by this class and
0
+   * printed by this method.
0
+   */
0
   function output() {
0
     $assets_collapsed = array();
0
     
0
-    // Implode each array with carriage returns, two between asset groups
0
     foreach ( $this as $asset ) {
0
       $assets_collapsed[] = implode("\n", $asset);
0
     }
...
22
23
24
 
25
26
27
...
46
47
48
 
49
50
51
...
55
56
57
58
59
 
 
60
61
62
...
107
108
109
 
 
 
 
 
 
 
110
111
112
...
124
125
126
127
128
129
130
...
160
161
162
163
 
164
165
166
...
210
211
212
213
 
214
215
216
...
230
231
232
233
 
234
...
22
23
24
25
26
27
28
...
47
48
49
50
51
52
53
...
57
58
59
 
 
60
61
62
63
64
...
109
110
111
112
113
114
115
116
117
118
119
120
121
...
133
134
135
 
136
137
138
...
168
169
170
 
171
172
173
174
...
218
219
220
 
221
222
223
224
...
238
239
240
 
241
242
0
@@ -22,6 +22,7 @@ class Options {
0
   var $display_title;
0
   var $display_tagline;
0
   var $nav_pages;
0
+  var $collapsed_pages;
0
   var $home_link_name;
0
   var $nav_extlinkcat;
0
   var $style;
0
@@ -46,6 +47,7 @@ class Options {
0
     $this->display_title = true;
0
     $this->display_tagline = true;
0
     $this->nav_pages = false;
0
+    $this->collapsed_pages = '';
0
     $this->home_link_name = __('Home','tarski');
0
     $this->nav_extlinkcat = 0;
0
     $this->style = false;
0
@@ -55,8 +57,8 @@ class Options {
0
     $this->swap_title_order = false;
0
     $this->tags_everywhere = false;
0
     $this->show_categories = true;
0
-    $this->show_authors = tarski_should_show_authors();
0
-    $this->use_pages = false;
0
+    $this->show_authors = true;
0
+    $this->use_pages = true;
0
   }
0
   
0
   /**
0
@@ -107,6 +109,13 @@ class Options {
0
         $this->nav_pages = false;
0
       }
0
       
0
+      $collapsed_pages = $_POST['collapsed_pages'];
0
+      if(isset($collapsed_pages)) {
0
+        $this->collapsed_pages = $collapsed_pages;
0
+      } else {
0
+        $this->collapsed_pages = '';
0
+      }
0
+      
0
       $stylefile = $_POST['alternate_style'];
0
       if(is_valid_tarski_style($stylefile))
0
         $this->style = $stylefile;
0
@@ -124,7 +133,6 @@ class Options {
0
       $this->asidescategory = $_POST['asides_category'];
0
       $this->nav_extlinkcat = $_POST['nav_extlinkcat'];
0
       $this->home_link_name = $_POST['home_link_name'];
0
-      $this->sidebar_type = $_POST['sidebar_type'];
0
       $this->sidebar_pp_type = $_POST['sidebar_pp_type'];      
0
       $this->show_authors = tarski_should_show_authors();
0
       unset($this->deleted);
0
@@ -160,7 +168,7 @@ function save_tarski_options() {
0
   
0
   if(isset($_POST['submit'])) {
0
     $tarski_options->tarski_options_update();
0
-    update_option('tarski_options', serialize($tarski_options));
0
+    update_option('tarski_options', $tarski_options);
0
   }
0
   
0
   flush_tarski_options();
0
@@ -210,7 +218,7 @@ function update_tarski_option($option, $value) {
0
   else
0
     $tarski_options->$option = $value;
0
     
0
-  update_option('tarski_options', serialize($tarski_options));
0
+  update_option('tarski_options', $tarski_options);
0
   flush_tarski_options();
0
 }
0
 
0
@@ -230,4 +238,4 @@ function get_tarski_option($name) {
0
   return $tarski_options->$name;
0
 }
0
 
0
-?>
0
+?>
0
\ No newline at end of file
...
76
77
78
79
80
 
 
81
82
83
...
144
145
146
147
148
 
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
 
 
 
 
 
 
 
 
 
246
247
248
249
250
251
 
 
252
253
254
255
256
257
258
259
...
76
77
78
 
 
79
80
81
82
83
...
144
145
146
 
 
147
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
150
151
152
153
154
155
156
157
158
 
 
 
 
 
159
160
161
162
163
 
164
165
166
167
0
@@ -76,8 +76,8 @@ class Version {
0
     } else {
0
       if(function_exists('curl_init')) { // If libcurl is installed, use that
0
         $ch = curl_init(TARSKIVERSIONFILE);
0
-        curl_setopt($ch, CURLOPT_FAILONERROR, 1);
0
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
0
+                curl_setopt($ch, CURLOPT_FAILONERROR, 1);
0
+                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
0
                 curl_setopt($ch, CURLOPT_HEADER, 0);
0
                 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
0
                 curl_setopt($ch, CURLOPT_TIMEOUT, 1);
0
@@ -144,115 +144,23 @@ class Version {
0
     $this->current_version_number();
0
     $this->latest_version_number();
0
     
0
-    $current_version = version_to_integer($this->current);
0
-    $latest_version = version_to_integer($this->latest);
0
+    $status = version_compare($this->latest, $this->current);
0
     
0
-    if($latest_version) {
0
-      if($current_version === $latest_version)
0
-        $version_status = 'current';
0
-      elseif($current_version < $latest_version)
0
-        $version_status = 'older';
0
-      elseif($current_version > $latest_version)
0
-          $version_status = 'newer';
0
-    } else {
0
-      $version_status = 'no_connection';
0
-    }
0
-    
0
-    $this->status = $version_status;
0
-  }
0
-  
0
-}
0
-
0
-/**
0
- * theme_version() - Returns either the current or the latest theme version.
0
- * 
0
- * Creates a new Version object, if {@param string $version} is
0
- * set to "current" then it will return the current version, if
0
- * set to "latest" it will return the latest version.
0
- * @since 2.0
0
- * @param string $version
0
- * @return string
0
- */
0
-function theme_version($version = 'current') {
0
-  $tarski_version = new Version;
0
-  if($version == 'latest') {
0
-    $tarski_version->latest_version_number();
0
-    return $tarski_version->latest;
0
-  } else {
0
-    $tarski_version->current_version_number();
0
-    return $tarski_version->current;
0
-  }
0
-}
0
-
0
-/**
0
- * tarski_update_notifier() - Performs version checks and outputs the update notifier.
0
- * 
0
- * Creates a new Version object, checks the latest and current
0
- * versions, and lets the user know whether or not their version
0
- * of Tarski needs updating. The way it displays varies slightly
0
- * between the WordPress Dashboard and the Tarski Options page.
0
- * @since 2.0
0
- * @param string $location
0
- * @return string
0
- */
0
-function tarski_update_notifier($messages) {
0
-  global $plugin_page;
0
-  
0
-  if ( !is_array($messages) )
0
-    $messages = array();
0
-  
0
-  $version = new Version;
0
-  $version->current_version_number();
0
-  $svn_link = 'http://tarskitheme.com/help/updates/svn/';
0
-  
0
-  // Update checking only performed when remote files can be accessed
0
-  if ( can_get_remote() ) {
0
-    
0
-    // Only performs the update check when notification is enabled
0
-    if ( get_tarski_option('update_notification') ) {
0
-      $version->latest_version_number();
0
-      $version->latest_version_link();
0
-      $version->version_status();
0
-      
0
-      if ( $version->status == 'older' ) {
0
-        $messages[] = sprintf(
0
-          __('A new version of the Tarski theme, version %1$s %2$s. Your installed version is %3$s.','tarski'),
0
-          "<strong>$version->latest</strong>",
0
-          '<a href="' . $version->latest_link . '">' . __('is now available','tarski') . '</a>',
0
-          "<strong>$version->current</strong>"
0
-        );
0
-      } elseif ( $plugin_page == 'tarski-options' ) {
0
-        switch($version->status) {
0
-          case 'current':
0
-            $messages[] = sprintf(
0
-              __('Your version of Tarski (%s) is up to date.','tarski'),
0
-              "<strong>$version->current</strong>"
0
-            );
0
-          break;
0
-          case 'newer':
0
-            $messages[] = sprintf(
0
-              __('You appear to be running a development version of Tarski (%1$s). Please ensure you %2$s.','tarski'),
0
-              "<strong>$version->current</strong>",
0
-              "<a href=\"$svn_link\">" . __('stay updated','tarski') . '</a>'
0
-            );
0
-          break;
0
-          case 'no_connection':
0
-            $messages[] = sprintf(
0
-              __('No connection to update server. Your installed version is %s.','tarski'),
0
-              "<strong>$version->current</strong>"
0
-            );
0
-          break;
0
-        }
0
+    if ($this->latest) {
0
+      if ($status === 0) {
0
+        $this->status = 'current';
0
+      } elseif ($status === 1) {
0
+        $this->status = 'older';
0
+      } elseif ($status === -1) {
0
+        $this->status = 'newer';
0
+      } else {
0
+        $this->status = 'error';
0
       }
0
-    } elseif ( $plugin_page == 'tarski-options' ) {
0
-      $messages[] = sprintf(
0
-        __('Update notification for Tarski is disabled. Your installed version is %s.','tarski'),
0
-        "<strong>$version->current</strong>"
0
-      );
0
+    } else {
0
+      $this->status = 'no_connection';
0
     }
0
   }
0
   
0
-  return $messages;
0
 }
0
 
0
 ?>
0
\ No newline at end of file
...
13
14
15
16
17
 
 
18
19
20
...
30
31
32
 
33
34
35
...
41
42
43
44
 
45
46
47
...
50
51
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
54
55
...
13
14
15
 
 
16
17
18
19
20
...
30
31
32
33
34
35
36
...
42
43
44
 
45
46
47
48
...
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
0
@@ -13,8 +13,8 @@
0
  * background grey, puts the page title in its place, and sorts out other
0
  * header and footer elements.
0
  */
0
-#tarski-options { overflow: auto; }
0
-#tarski-options-header { clear: both; overflow: auto; margin: 0.4em 0 0.8em 0; border-bottom: 1px solid #dadada; padding: 0.4em; }
0
+#tarski-options {}
0
+#tarski-options-header { clear: both; margin: 0.4em 0 0.8em 0; border-bottom: 1px solid #dadada; padding: 0.4em; }
0
 #tarski-options-header h2 { float: left; margin: 0 0.8em 0 0; border: none; padding: 0; }
0
 #tarski-save-options, #tarski-info { display: block; padding: 0; }
0
 #tarski-save-options { float: left; margin: 0; }
0
@@ -30,6 +30,7 @@
0
  * allowing for fairly flexible layouts.
0
  */
0
 .span { clear: both; }
0
+.clearer { display: block; clear: both; height: 0; visibility: hidden; }
0
 .primary, .secondary { width: 49.5%; }
0
 .primary, .rtl .secondary { float: left; clear: left; }
0
 .secondary, .rtl .primary { float: right; clear: right; }
0
@@ -41,7 +42,7 @@
0
  * precisely than the WordPress defaults do how things should appear.
0
  */
0
 .section label, .section select, #opt-nav-homename { display: block; margin: 0.8em 0; }
0
-.section { margin: 0 0 0.8em 0; padding: 0.8em 0.8em 0.4em 0.8em; background: #eaf3fa; }
0
+.section { margin: 0 0 0.8em 0; padding: 0.8em 0.8em 0.4em 0.8em; background: #eaf3fa; position: relative; *zoom: 1; }
0
 .section h3, .section p { margin: 0 0 0.8em 0; }
0
 .tip { margin: 0.8em 0; border: 1px solid #c6d9e9; border-left-width: 3px; padding: 0.4em; background: #f7fafd; }
0
 #tarski-options .highlight { background: none; color: #d54e21; }
0
@@ -50,6 +51,28 @@
0
 #tarski-headers label img { background: #fff; margin: 5px; font-weight: bold; }
0
 
0
 /**
0
+ * Navbar selection node tree
0
+ * 
0
+ * The navbar selection tool is an ordered list of pages, whose list elements
0
+ * may also contain child lists of sub-pages.
0
+ */
0
+#navbar-select { clear: both; margin: 0 0 1em 0; padding: 0; }
0
+#navbar-select ol { margin: 0; padding: 0; }
0
+#navbar-select li { margin: 0; padding: 0; list-style-type: none; }
0
+#navbar-select li ol li { padding-left: 1.5em; }
0
+#navbar-select .nav-page { position: relative; margin: 0 0 0.5em 0; padding: 4px 20px 3px 5px; background-color: #cedeeb; background-repeat:no-repeat; background-position: 5px 6px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
0
+#navbar-select .nav-page a { text-decoration: none; }
0
+#navbar-select.js .nav-page { padding-left: 28px; background-image: url('../../images/page_select.png'); }
0
+#navbar-select .nav-page label { display: inline; margin: 0 0 0.7em 0; }
0
+#navbar-select .nav-page input { display: block; position: absolute; top: 4px; right: 5px; width: 1em; height: 1em; }
0
+#navbar-select .nav-page .toggle { display: block; position: absolute; top: 0; left: 0; width: 23px; height: 23px; background: url('../../images/page_select.png') no-repeat 5px -194px; text-indent: -9999em; cursor: pointer; }
0
+#navbar-select.js .collapsed .nav-page .collapsed-toggle { background-position: 5px -94px; }
0
+#navbar-select.js li.collapsed ol { display: none; }
0
+/* Some hacks to work around Internet Explorer bugs */
0
+#navbar-select, #navbar-select ol, #navbar-select li, #navbar-select .nav-page, #navbar-select .nav-page input { *zoom: 1; }
0
+#navbar-select .nav-page input { _top: 5px; }
0
+
0
+/**
0
  * Checkboxes and radio buttons
0
  * 
0
  * The Tarski options page uses JavaScript to allow the styling of input
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
...
69
70
71
72
 
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
 
 
 
 
138
139
140
...
166
167
168
169
170
171
 
 
172
173
174
...
188
189
190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
192
193
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
 
 
293
294
295
296
 
 
297
298
299
...
311
312
313
314
315
316
317
318
319
320
321
 
 
322
323
324
325
326
327
 
 
328
329
330
...
349
350
351
352
353
354
355
356
 
 
 
 
 
 
 
357
358
359
...
379
380
381
382
 
 
 
 
 
383
384
385
...
388
389
390
391
 
 
 
 
 
392
393
394
...
397
398
399
400
401
 
 
 
402
403
404
405
 
406
407
408
 
409
410
411
412
413
414
415
416
 
 
 
417
418
419
...
423
424
425
 
 
426
427
428
...
443
444
445
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
447
...
1
2
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
5
6
...
35
36
37
 
38
39
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
42
43
44
45
46
47
...
73
74
75
 
 
 
76
77
78
79
80
...
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
191
192
193
 
 
194
 
195
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
198
199
 
 
 
200
201
202
203
204
...
216
217
218
 
 
 
 
 
 
219
 
220
221
222
223
224
225
226
227
228
229
230
231
232
...
251
252
253
 
 
 
 
 
254
255
256
257
258
259
260
261
262
263
...
283
284
285
 
286
287
288
289
290
291
292
293
...
296
297
298
 
299
300
301
302
303
304
305
306
...
309
310
311
 
 
312
313
314
315
316
317
 
318
319
 
 
320
321
322
323
324
325
326
 
 
327
328
329
330
331
332
...
336
337
338
339
340
341
342
343
...
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
0
@@ -1,40 +1,6 @@
0
 <?php
0
 
0
 /**
0
- * check_input() - Checks input is of correct type
0
- * 
0
- * Always returns true when WP_DEBUG is true, to allow for easier debugging
0
- * in the development environment while handling erroneous input more
0
- * robustly in the production environment.
0
- * @see http://uk3.php.net/manual/en/function.gettype.php
0
- * @since 2.1
0
- * @param mixed $input
0
- * @param string $type
0
- * @param string $name
0
- * @return boolean
0
- *
0
- */
0
-function check_input($input, $type, $name = '') {
0
-  if ( WP_DEBUG === true )
0
-    return true;
0
-
0
-  if ( $type == 'object' && strlen($name) > 0 )
0
-    return is_a($input, $name);
0
-  else
0
-    return call_user_func("is_$type", $input);
0
-}
0
-
0
-/**
0
- * detectWPMU() - Detects whether WordPress Multi-User is in use.
0
- * 
0
- * @since 1.4
0
- * @return boolean
0
- */
0
-function detectWPMU() {
0
-  return function_exists('is_site_admin');
0
-}
0
-
0
-/**
0
  * detectWPMUadmin() - Detect whether the current user is a WPMU site administrator.
0
  * 
0
  * @since 2.0
0
@@ -69,72 +35,13 @@ function can_get_remote() {
0
  * @return boolean
0
  */
0
 function cache_is_writable($file = false) {
0
-  if($file)
0
+  if ( $file )
0
     $cachefile = TARSKICACHE . '/' . $file;
0
   
0
-  if(is_writable($cachefile) || (is_writable(TARSKICACHE) && !file_exists($cachefile)))
0
-    return true;
0
-}
0
-
0
-/**
0
- * version_to_integer() - Turns Tarski version numbers into integers.
0
- * 
0
- * @since 2.0.3
0
- * @param string $version
0
- * @return integer
0
- */
0
-function version_to_integer($version) {
0
-  // Remove all non-numeric characters
0
-  $version = preg_replace('/\D/', '', $version);
0
-  
0
-  if($version && strlen($version) >= 1) {
0
-    // Make the string exactly three characters (numerals) long
0
-    if(strlen($version) < 2) {
0
-      $version_int = $version . '00';
0
-    } elseif(strlen($version) < 3) {
0
-      $version_int = $version . '0';
0
-    } elseif(strlen($version) == 3) {
0
-      $version_int = $version;
0
-    } elseif(strlen($version) > 3) {
0
-      $version_int = substr($version, 0, 3);
0
-    }
0
-    
0
-    // Return an integer
0
-    return (int) $version_int;
0
-  }
0
-}
0
-
0
-/**
0
- * version_newer_than() - Returns true if current version is greater than given version.
0
- *
0
- * @since 2.0.3
0
- * @param mixed $version
0
- * @return boolean
0
- */
0
-function version_newer_than($version) {
0
-  $version = version_to_integer($version);
0
-  $current = version_to_integer(theme_version('current'));
0
-  
0
-  if($version && $current) {
0
-    return (bool) ($current > $version);
0
-  }
0
-}
0
-
0
-/**
0
- * is_valid_tarski_style() - Checks whether a given file name is a valid Tarski stylesheet name.
0
- * 
0
- * It must be a valid CSS identifier, followed by the .css file extension,
0
- * and it cannot have a name that is already taken by Tarski's CSS namepsace.
0
- * @since 2.0
0
- * @param string $file
0
- * @return boolean
0
- */
0
-function is_valid_tarski_style($file) {
0
-  return (bool) (
0
-    !preg_match('/^\.+$/', $file)
0
-    && preg_match('/^[A-Za-z][A-Za-z0-9\-]*.css$/', $file)
0
-    && !preg_match('/^janus.css$|^centre.css$|^rtl.css$/', $file)
0
-  );
0
+  if ( file_exists($cachefile) )
0
+    return is_writable($cachefile);
0
+  else
0
+    return is_writable(TARSKICACHE);
0
 }
0
 
0
 /**
0
@@ -166,9 +73,8 @@ function ready_to_delete_options($del_time) {
0
  */
0
 function tarski_upgrade_needed() {
0
   if ( get_option('tarski_options') ) {
0
-    $version = get_tarski_option('installed');
0
-    $current = theme_version('current');
0
-    return (bool) empty($version) || (version_to_integer($version) < version_to_integer($current));
0
+    $installed = get_tarski_option('installed');
0
+    return empty($installed) || version_compare($installed, theme_version('current')) === -1;
0
   }
0
 }
0
 
0
@@ -188,6 +94,86 @@ function tarski_upgrade_and_flush_options() {
0
 }
0
 
0
 /**
0
+ * tarski_upgrade_special() - Upgrades Tarski options special cases.
0
+ * 
0
+ * @since 2.3
0
+ * @see tarski_upgrade()
0
+ * @param object $options
0
+ * @param object $defaults
0
+ */
0
+function tarski_upgrade_special($options, $defaults) {
0
+  if ( tarski_should_show_authors() )
0
+    $options->show_authors = true;
0
+  
0
+  if ( empty($options->centred_theme) && isset($options->centered_theme) )
0
+    $options->centred_theme = true;
0
+  
0
+  if ( empty($options->show_categories) && isset($options->hide_categories) && ($options->hide_categories == 1) )
0
+    $options->show_categories = false;
0
+  
0
+}
0
+
0
+/**
0
+ * tarski_upgrade_widgets() - Upgrades old Tarski sidebar options to use widgets.
0
+ * 
0
+ * @since 2.3
0
+ * @see tarski_upgrade()
0
+ * @param object $options
0
+ * @param object $defaults
0
+ */
0
+function tarski_upgrade_widgets($options, $defaults) {
0
+  $widgets = wp_get_sidebars_widgets(false);
0
+  $widget_text = get_option('widget_text');
0
+  
0
+  // Change sidebar names and initialise new sidebars
0
+  if ( empty($widgets['sidebar-main']) && !empty($widgets['sidebar-1']) )
0
+    $widgets['sidebar-main'] = $widgets['sidebar-1'];
0
+  
0
+  if ( empty($widgets['footer-sidebar']) && !empty($widgets['sidebar-2']) )
0
+    $widgets['footer-sidebar'] = $widgets['sidebar-2'];
0
+  
0
+  // Main footer widgets
0
+  if ( empty($widgets['footer-main']) ) {
0
+    $widgets['footer-main'] = array();
0
+    
0
+    // Footer blurb
0
+    if ( strlen(trim($options->blurb)) ) {
0
+      $widget_text[] = array( 'title' => '', 'text' => $options->blurb );
0
+      $wt_num = (int) end(array_keys($widget_text));
0
+      $widgets['footer-main'][] = "text-$wt_num";
0
+    }
0
+    
0
+    // Recent articles
0
+    if ( $options->footer_recent )
0
+      $widgets['footer-main'][] = 'recent-articles';
0
+  }
0
+  
0
+  // Main sidebar
0
+  if ( empty($widgets['sidebar-main']) && $options->sidebar_type == 'tarski' ) {
0
+    $widgets['sidebar-main'] = array();
0
+  
0
+    // Custom text -> text widget
0
+    if( strlen(trim($options->sidebar_custom)) ) {
0
+      $widget_text[] = array( 'title' => '', 'text' => $options->sidebar_custom );
0
+      $wt_num = (int) end(array_keys($widget_text));
0
+      $widgets['sidebar-main'][] = "text-$wt_num";
0
+    }
0
+  
0
+    // Pages list -> pages widget
0
+    if($options->sidebar_pages)
0
+      $widgets['sidebar-main'][] = 'pages';
0
+  
0
+    // Links list -> links widget
0
+    if($options->sidebar_links)
0
+      $widgets['sidebar-main'][] = 'links';
0
+  }
0
+  
0
+  // Update options
0
+  update_option('widget_text', $widget_text);
0
+  wp_set_sidebars_widgets($widgets);  
0
+}
0
+
0
+/**
0
  * function tarski_upgrade() - Upgrades Tarski's options where appropriate.
0
  * 
0
  * Tarski preferences sometimes change between versions, and need to
0
@@ -205,95 +191,14 @@ function tarski_upgrade() {
0
   $defaults = new Options;
0
   $defaults->tarski_options_defaults();
0
 
0
-  // Handle special cases first
0
-  
0
   // Update the options version so we don't run this code more than once
0
-  $old_version = $options->installed;
0
   $options->installed = theme_version('current');
0
   
0
-  if (version_to_integer($old_version) < 210) {
0
-    // If they had hidden the sidebar previously for non-index pages, preserve that setting
0
-    if (
0
-      empty($options->sidebar_pp_type)
0
-      && isset($options->sidebar_onlyhome)
0
-      && $options->sidebar_onlyhome == 1
0
-    ) {
0
-      $options->sidebar_pp_type = 'none';
0
-    }
0
-  
0
-    // If there's more than one author, show authors
0
-    if(tarski_should_show_authors()) {
0
-      $options->show_authors = true;
0
-    }
0
-  
0
-    // If categories are hidden, respect that option
0
-    if (
0
-      empty($options->show_categories)
0
-      && isset($options->hide_categories)
0
-      && ($options->hide_categories == 1)
0
-    ) {
0
-      $options->show_categories = false;
0
-    }
0
-  
0
-    // Change American English to British English, sorry Chris
0
-    if(empty($options->centred_theme) && isset($options->centered_theme)) {
0
-      $options->centred_theme = true;
0
-    }
0
-  
0
-    // Upgrade old display options to use widgets instead
0
-  
0
-    // Get current widgets settings
0
-    $widgets = wp_get_sidebars_widgets();
0
-    $widget_text = get_option('widget_text');
0
-  
0
-    // Change sidebar names and initialise new sidebars
0
-    $widgets['sidebar-main'] = $widgets['sidebar-1'];
0
-    $widgets['footer-sidebar'] = $widgets['sidebar-2'];
0
-    $widgets['footer-main'] = array();
0
-  
0
-    // Footer blurb
0
-    if ( strlen(trim($options->blurb)) ) {
0
-      $widget_text[] = array( 'title' => '', 'text' => $options->blurb );
0
-      $wt_num = (int) end(array_keys($widget_text));
0
-      $widgets['footer-main'][] = "text-$wt_num";
0
-    }
0
-  
0
-    // Recent articles
0
-    if ( $options->footer_recent ) {
0
-      $widgets['footer-main'][] = 'recent-articles';
0
-    }
0
-  
0
-    // Footer sidebar default
0
-    if ( empty($widgets['footer-sidebar']) ) {
0
-      $widgets['footer-sidebar'] = array('search');
0
-    }
0
-    
0
-    // Main sidebar
0
-    if ( $options->sidebar_type == 'tarski' ) {
0
-      if ( empty($widgets['sidebar-main']) )
0
-        $widgets['sidebar-main'] = array();
0
-    
0
-      // Custom text -> text widget
0
-      if( strlen(trim($options->sidebar_custom)) ) {
0
-        $widget_text[] = array( 'title' => '', 'text' => $options->sidebar_custom );
0
-        $wt_num = (int) end(array_keys($widget_text));
0
-        $widgets['sidebar-main'][] = "text-$wt_num";
0
-      }
0
-    
0
-      // Pages list -> pages widget
0
-      if($options->sidebar_pages) {
0
-        $widgets['sidebar-main'][] = 'pages';
0
-      }
0
-    
0
-      // Links list -> links widget
0
-      if($options->sidebar_links) {
0
-        $widgets['sidebar-main'][] = 'links';
0
-      }
0
-    }
0
+  // Handle special cases first
0
+  tarski_upgrade_special($options, $defaults);
0
     
0
-    // Unset defunct values
0
-    unset($widgets['sidebar-1'], $widgets['sidebar-2']);
0
-  }
0
+  // Upgrade old display options to use widgets instead
0
+  tarski_upgrade_widgets($options, $defaults);
0
   
0
   // Conform our options to the expected values, types, and defaults
0
   foreach($options as $name => $value) {
0
@@ -311,20 +216,17 @@ function tarski_upgrade() {
0
       $options->$name = array($options->$name);
0
     }
0
   }
0
-
0
-  // Save our upgraded options
0
-  if (version_to_integer($old_version) < 210) {
0
-    update_option('widget_text', $widget_text);
0
-    wp_set_sidebars_widgets($widgets);
0
-  }
0
   
0
-  update_option('tarski_options', serialize($options));
0
+  // Save our upgraded options
0
+  update_option('tarski_options', $options);
0
 }
0
 
0
 /**
0
  * tarski_messages() - Adds messages about Tarski to the WordPress admin panel.
0
  * 
0
  * @since 2.1
0
+ * @hook filter tarski_messages
0
+ * Filter the messages Tarski prints to the WordPress admin panel.
0
  */
0
 function tarski_messages() {
0
   $messages = apply_filters('tarski_messages', array());
0
@@ -349,11 +251,13 @@ function tarski_addmenu() {
0
  * @since 1.0
0
  */
0
 function tarski_admin() {
0
-  save_tarski_options();
0
-  tarski_update_notifier('options_page');
0
-  $widgets_link = get_bloginfo('wpurl') . '/wp-admin/widgets.php';
0
-  $tarski_options_link = get_bloginfo('wpurl') . '/wp-admin/themes.php?page=tarski-options';
0
-  include(TARSKIDISPLAY . '/options_page.php');
0
+  if (current_user_can('edit_themes')) {
0
+    save_tarski_options();
0
+    tarski_update_notifier('options_page');
0
+    $widgets_link = admin_url('widgets.php');
0
+    $tarski_options_link = admin_url('themes.php?page=tarski-options');
0
+    include(TARSKIDISPLAY . '/options_page.php');
0
+  }
0
 }
0
 
0
 /**
0
@@ -379,7 +283,11 @@ function tarski_admin_header_style() { ?>
0
  * @since 2.1
0
 */
0
 function tarski_admin_style() {
0
-  echo '<link rel="stylesheet" href="' . get_bloginfo('template_directory'). '/library/css/admin.css" type="text/css" media="all" />';
0
+  wp_enqueue_style(
0
+    'tarski_admin',
0
+    get_bloginfo('template_directory') . '/library/css/admin.css',
0
+    array(), false, 'screen'
0
+  );
0
 }
0
 
0
 /**
0
@@ -388,7 +296,11 @@ function tarski_admin_style() {
0
  * @since 2.1
0
 */
0
 function tarski_inject_styles() {
0
-  echo '<link rel="stylesheet" href="' . get_bloginfo('template_directory'). '/library/css/options.css" type="text/css" media="screen" />';
0
+  wp_enqueue_style(
0
+    'tarski_options',
0
+    get_bloginfo('template_directory') . '/library/css/options.css',
0
+    array(), false, 'screen'
0
+  );
0
 }
0
 
0
 /**
0
@@ -397,23 +309,24 @@ function tarski_inject_styles() {
0
  * @since 1.4
0
 */
0
 function tarski_inject_scripts() {
0
-  $js_dir = get_bloginfo('template_directory') . '/library/js';
0
-  wp_enqueue_script('crir', $js_dir . '/crir.js');
0
+  $js_dir = get_bloginfo('template_directory') . '/app/js';
0
+  wp_enqueue_script('page_select', "$js_dir/page_select.js");
0
+  wp_enqueue_script('crir', "$js_dir/crir.js");
0
 }
0
 
0
 /**
0
- * tarski_count_authors() - Returns the number of authors on a site.
0
+ * tarski_count_authors() - Returns the number of authors who have published posts.
0
  * 
0
- * This function returns the number of users on a site with a user
0
- * level of greater than 1, i.e. Authors, Editors and Administrators.
0
+ * This function returns the number of author ids associated with published posts.
0
  * @since 2.0.3
0
  * @global object $wpdb
0
  * @return integer
0
  */
0
 function tarski_count_authors() {
0
   global $wpdb;
0
-  $count_users = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->usermeta WHERE `meta_key` = '" . $wpdb->prefix . "user_level' AND `meta_value` > 1");
0
-  return (int) $count_users;
0
+  return count($wpdb->get_col($wpdb->prepare(
0
+    "SELECT post_author, COUNT(DISTINCT post_author) FROM $wpdb->posts WHERE post_status = 'publish' GROUP BY post_author"
0
+  ), 1));
0
 }
0
 
0
 /**
0
@@ -423,6 +336,8 @@ function tarski_count_authors() {
0
  * @see tarski_count_authors()
0
  * @global object $wpdb
0
  * @return boolean
0
+ * @hook filter tarski_show_authors
0
+ * Allows other components to decide whether or not Tarski should show authors.
0
  */
0
 function tarski_should_show_authors() {
0
   $show_authors = tarski_count_authors() > 1;
0
@@ -443,4 +358,98 @@ function tarski_resave_show_authors() {
0
   }
0
 }
0
 
0
+/**
0
+ * tarski_navbar_select() - Generates a list of checkboxes for the site's pages.
0
+ * 
0
+ * Walks the tree of pages and generates nested ordered lists of pages, with
0
+ * corresponding checkboxes to allow the selection of pages for the navbar.
0
+ * @since 2.2
0
+ * @param array $pages
0
+ * @param array $selected
0
+ */
0
+function tarski_navbar_select($pages) {
0
+  $nav_pages = explode(',', get_tarski_option('nav_pages'));
0
+  $collapsed_pages = explode(',', get_tarski_option('collapsed_pages'));
0
+  $walker = new WalkerPageSelect($nav_pages, $collapsed_pages);
0
+  $return = '';
0
+  
0
+  if ( !empty($pages) ) {  
0
+    $return = "<ol id=\"navbar-select\">\n" . $walker->walk($pages, 0, 0, array()) . "\n</ol>\n\n";
0
+  }
0
+  
0
+  return $return;
0
+}
0
+
0
+/**
0
+ * tarski_update_notifier() - Performs version checks and outputs the update notifier.
0
+ * 
0
+ * Creates a new Version object, checks the latest and current
0
+ * versions, and lets the user know whether or not their version
0
+ * of Tarski needs updating. The way it displays varies slightly
0
+ * between the WordPress Dashboard and the Tarski Options page.
0
+ * @since 2.0
0
+ * @param string $location
0
+ * @return string
0
+ */
0
+function tarski_update_notifier($messages) {
0
+  global $plugin_page;
0
+  
0
+  if ( !is_array($messages) )
0
+    $messages = array();
0
+  
0
+  $version = new Version;
0
+  $version->current_version_number();
0
+  $svn_link = 'http://tarskitheme.com/help/updates/svn/';
0
+  
0
+  // Update checking only performed when remote files can be accessed
0
+  if ( can_get_remote() ) {
0
+    
0
+    // Only performs the update check when notification is enabled
0
+    if ( get_tarski_option('update_notification') ) {
0
+      $version->latest_version_number();
0
+      $version->latest_version_link();
0
+      $version->version_status();
0
+      
0
+      if ( $version->status == 'older' ) {
0
+        $messages[] = sprintf(
0
+          __('A new version of the Tarski theme, version %1$s %2$s. Your installed version is %3$s.','tarski'),
0
+          "<strong>$version->latest</strong>",
0
+          '<a href="' . $version->latest_link . '">' . __('is now available','tarski') . '</a>',
0
+          "<strong>$version->current</strong>"
0
+        );
0
+      } elseif ( $plugin_page == 'tarski-options' ) {
0
+        switch($version->status) {
0
+          case 'current':
0
+            $messages[] = sprintf(
0
+              __('Your version of Tarski (%s) is up to date.','tarski'),
0
+              "<strong>$version->current</strong>"
0
+            );
0
+          break;
0
+          case 'newer':
0
+            $messages[] = sprintf(
0
+              __('You appear to be running a development version of Tarski (%1$s). Please ensure you %2$s.','tarski'),
0
+              "<strong>$version->current</strong>",
0
+              "<a href=\"$svn_link\">" . __('stay updated','tarski') . '</a>'
0
+            );
0
+          break;
0
+          case 'no_connection':
0
+          case 'error':
0
+            $messages[] = sprintf(
0
+              __('No connection to update server. Your installed version is %s.','tarski'),
0
+              "<strong>$version->current</strong>"
0
+            );
0
+          break;
0
+        }
0
+      }
0
+    } elseif ( $plugin_page == 'tarski-options' ) {
0
+      $messages[] = sprintf(
0
+        __('Update notification for Tarski is disabled. Your installed version is %s.','tarski'),
0
+        "<strong>$version->current</strong>"
0
+      );
0
+    }
0
+  }
0
+  
0
+  return $messages;
0
+}
0
+
0
 ?>
0
\ No newline at end of file
...
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
...
171
172
173
 
 
174
175
176
...
215
216
217
218
 
 
 
 
219
220
221
...
229
230
231
232
 
 
 
 
 
 
233
234
235
...
240
241
242
 
 
 
 
 
 
 
 
 
 
 
 
 
243
244
245
...
247
248
249
 
 
 
 
250
251
252
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
 
 
336
337
338
...
98
99
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
102
103
...
155
156
157
158
159
160
161
162
...
201
202
203
 
204
205
206
207
208
209
210
...
218
219
220
 
221
222
223
224
225
226
227
228
229
...
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
254
255
256
257
258
259
260
261
262
263
...
283
284
285
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
287
288
289
290
291
292
293
294
0
@@ -98,22 +98,6 @@ function tarski_posts_nav_link() {
0
 }
0
 
0
 /**
0
- * tarski_date() - Tweaked WordPress date function that shows up on every post.
0
- * 
0
- * The WP function the_date only shows up on the first post
0
- * of that day. This one displays on every post, regardless
0
- * of how many posts are made that day.
0
- * @since 1.2.2
0
- * @global object $post
0
- * @return string
0
- */
0
-function tarski_date() {
0
-  global $post;
0
-  $date = mysql2date(get_option('date_format'), $post->post_date);
0
-  return apply_filters('tarski_date', $date);
0
-}
0
-
0
-/**
0
  * tarski_post_categories_link() - Outputs post categories
0
  * 
0
  * Categories list is nicely wrapped for potential DOM interactions
0
@@ -171,6 +155,8 @@ function tarski_asides_permalink_text() {
0
  * Makes the comment date and time output more translateable.
0
  * @since 2.0
0
  * @return string
0
+ * @hook filter tarski_comment_datetime
0
+ * Filters the date and time printed with a comment.
0
  */
0
 function tarski_comment_datetime() {
0
   $datetime = sprintf(
0
@@ -215,7 +201,10 @@ function tidy_avatars($avatar, $id_or_email, $size, $default) {
0
   $url = get_comment_author_url();
0
   $author_alt = sprintf( __('%s&#8217;s avatar'), get_comment_author() );
0
   $avatar = preg_replace("/height='[\d]+' width='[\d]+'/", '', $avatar);
0
-  $avatar = preg_replace("/'/", '"', $avatar);
0
+  
0
+  if ( !is_admin() )
0
+    $avatar = preg_replace("/'/", '"', $avatar);
0
+  
0
   $avatar = preg_replace('/alt=""/', "alt=\"$author_alt\"", $avatar);
0
   
0
   return $avatar;
0
@@ -229,7 +218,12 @@ function tidy_avatars($avatar, $id_or_email, $size, $default) {
0
  * @return string
0
  */
0
 function tarski_avatar() {
0
-  $avatar = get_avatar(get_comment_author_email(), '50', apply_filters('tarski_avatar', get_bloginfo('template_directory') . '/images/avatar.png'));
0
+  if ( get_option('avatar_default') == '' )
0
+    $default = get_bloginfo('template_directory') . '/images/avatar.png';
0
+  else
0
+    $default = '';
0
+  
0
+  $avatar = get_avatar(get_comment_author_email(), '50', $default);
0
   $url = get_comment_author_url();
0
   
0
   if ( empty($url) || preg_match('/^\s*http:\/\/\s*$/', $url) ) {
0
@@ -240,6 +234,19 @@ function tarski_avatar() {
0
 }
0
 
0
 /**
0
+ * tarski_default_avatar() - Make Tarski avatar selectable.
0
+ * 
0
+ * Adds the Tarski avatar to the Discussion options page, allowing it to be selected
0
+ * but also allowing users to choose other avatars.
0
+ * @return string
0
+ */
0
+function tarski_default_avatar($avatar_defaults) {
0
+  $tarski_avatar = get_bloginfo('template_directory') . '/images/avatar.png';
0
+  $avatar_defaults[$tarski_avatar] = 'Tarski';
0
+  return $avatar_defaults;
0
+}
0
+
0
+/**
0
  * tarski_comment_author_link() - Returns a comment author's name, wrapped in a link if present.
0
  * 
0
  * It also includes hCard microformat markup.
0
@@ -247,6 +254,10 @@ function tarski_avatar() {
0
  * @since 2.0
0
  * @global object $comment
0
  * @return string
0
+ * @hook filter get_comment_author_link
0
+ * Native WordPress filter on comment author links.
0
+ * @hook filter tarski_comment_author_link
0
+ * Tarski-specific filter on comment author links.
0
  */
0
 function tarski_comment_author_link() {
0
   global $comment;
0
@@ -272,67 +283,12 @@ function tarski_comment_author_link() {
0
 }
0
 
0
 /**
0
- * tarski_excerpt() - Excerpts a la Tarski.
0
- * 
0
- * Code shamelessly borrowed from Kaf Oseo's 'the_excerpt Reloaded' plugin.
0
- * @link http://guff.szub.net/2005/02/26/the-excerpt-reloaded/
0
- * @since 1.2.1
0
- * @param $return boolean
0
- * @param string $excerpt_length
0
- * @return string
0
- */
0
-function tarski_excerpt($return = false, $excerpt_length = 35) {
0
-  global $post;
0
-
0
-  if(!empty($post->post_password)) { // if there's a password
0
-    if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match cookie
0
-      $output = get_the_password_form();
0
-    }
0
-    if($return) {
0
-      return $output;
0
-    } else {
0
-      echo $output;
0
-      return;
0
-    }
0
-  }
0
-  
0
-  if(!($text = $post->post_excerpt))
0
-    $text = $post->post_content;
0
-
0
-  if($excerpt_length < 0) {
0
-    $output = $text;
0
-  } else {
0
-    str_replace('<!--more-->', '', $text);
0
-    $text = explode(' ', $text);
0
-    if(count($text) > $excerpt_length) {
0
-      $l = $excerpt_length;
0
-      $ellipsis = '&hellip;';
0
-    } else {
0
-      $l = count($text);
0
-      $ellipsis = false;
0
-    }
0
-    for ($i = 0; $i < $l; $i++)
0
-      $output .= $text[$i] . ' ';
0
-  }
0
-
0
-  $output = rtrim($output, " \n\t\r\0\x0B");
0
-  $output = strip_tags($output);
0
-  $output .= $ellipsis;
0
-  $output = apply_filters('get_the_excerpt', $output);
0
-  $output = apply_filters('the_excerpt', $output);
0
-  $output = apply_filters('tarski_excerpt', $output);
0
-  
0
-  if($return)
0
-    return $output;
0
-  else
0
-    echo $output;
0
-}
0
-
0
-/**
0
  * tarski_404_content() - Outputs default text for 404 error pages.
0
  *
0
  * @since 1.5
0
  * @return string
0
+ * @hook filter th_404_content
0
+ * Allows users to change their 404 page messages via a plugin.
0
  */
0
 function tarski_404_content() {
0
   $content = sprintf(
...
22
23
24
25
 
26
27
28
...
32
33
34
35
36
 
 
37
38
 
 
 
 
 
 
39
40
41
 
42
43
44
45
46
47
48
49
...
52
53
54
 
 
 
55
56
57
 
58
 
 
 
59
60
 
 
61
62
63
64
65
 
 
 
 
 
 
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
 
 
 
 
 
 
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 
 
 
 
106
107
 
 
108
109
110
111
112
113
 
 
 
 
 
 
114
115
116
117
 
118
119
120
...
123
124
125
126
 
127
128
129
...
22
23
24
 
25
26
27
28
...
32
33
34
 
 
35
36
37
38
39
40
41
42
43
44
45
46
 
47
48
49
50
51
 
52
53
54
...
57
58
59
60
61
62
63
64
 
65
66
67
68
69
70
 
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
86
87
88
89
90
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
93
94
95
96
97
98
99
100
101
 
 
 
 
102
103
104
105
106
107
108
 
109
110
111
112
113
114
...
117
118
119
 
120
121
122
123
0
@@ -22,7 +22,7 @@ function wrap_values_in_element($array, $element) {
0
 }
0
 
0
 /**
0
- * implode_proper() - Implodes an array and provides a proper final connective
0
+ * implode_proper() - Implodes an array and adds a final conjuction.
0
  * 
0
  * Given the array <code>array('John', 'Paul', 'George', 'Ringo')</code> it will
0
  * return the string <code>'John, Paul, George and Ringo'</code>.
0
@@ -32,18 +32,23 @@ function wrap_values_in_element($array, $element) {
0
  * @param $last_connective string
0
  * @return string
0
  */
0
-function implode_proper($array, $glue = ', ', $last_connective = 'and') {
0
-  if( !check_input($array, 'array') || count($array) == 0 )
0
+function implode_proper($array, $glue = NULL, $last_connective = NULL) {
0
+  if ( !check_input($array, 'array') || count($array) == 0 )
0
     return;
0
   
0
+  if ($glue == NULL)
0
+    $glue = __(', ', 'tarski');
0
+  
0
+  if ($last_connective == NULL)
0
+    $last_connective = __('and', 'tarski');
0
+  
0
   $last_value = array_pop($array);
0
   
0
-  if( count($array) )
0
+  if ( count($array) )
0
     $output = implode($glue, $array) . " $last_connective $last_value";
0
   else
0
     $output = $last_value;
0
   
0
-  $output = apply_filters('implode_proper', $output);
0
   return $output;
0
 }
0
 
0
@@ -52,69 +57,58 @@ function implode_proper($array, $glue = ', ', $last_connective = 'and') {
0
  * 
0
  * Tag intersections and unions currently don't have a simple, single template
0
  * function. This provides one.
0
+ * 
0
+ * @example multiple_tag_titles('<em>%s</em>') will wrap every printed tag in
0
+ * an HTML emphasis element.
0
  * @since 2.0
0
  * @global $wpdb object
0
- * @param $tag_wrapper string
0
+ * @param $format string
0
  * @return string
0
+ * @hook filter multiple_tag_titles
0
+ * Filter the value returned when generating the title of multiple (union or
0
+ * intersection) tag archive page.
0
  */
0
-function multiple_tag_titles($tag_wrapper = '') {
0
+if ( !function_exists('multiple_tag_titles') ) {
0
+function multiple_tag_titles($format = '') {
0
   global $wpdb;
0
   
0
   if ( !is_tag() )
0
     return;
0
   
0
+  if ( $tag_slugs = get_query_var('tag_slug__and') )
0
+    $connective = __('and');
0
+  elseif ( $tag_slugs = get_query_var('tag_slug__in') )
0
+    $connective = __('or');
0
+  else
0
+    $single_tag = intval( get_query_var('tag_id') );
0
   
0
-  // Start horrible hack
0
-  $tag_slugs = array();
0
-  if( $tag_slugs = get_query_var('tag_slug__and') ) {
0
-    $connective = __('and','tarski');
0
-  } elseif( $tag_slugs = get_query_var('tag_slug__in') ) {
0
-    $connective = __('or','tarski');
0
-  } elseif( $single_tag = get_query_var('tag_id') ) {
0
-    $tag_ids = array($single_tag);
0
-  } else {
0
-    return;
0
-  }
0
-  
0
-  if($tag_slugs) {
0
-    foreach ($tag_slugs as $tag_slug) {
0
-      $tag_ids[] = $wpdb->get_var("SELECT term_id FROM $wpdb->terms WHERE slug = \"$tag_slug\"");
0
+  $tags = array();
0
+  if ( $tag_slugs ) {
0
+    foreach ( $tag_slugs as $tag_slug ) {
0
+      $tag = get_term_by('slug', $tag_slug, 'post_tag', OBJECT, 'display');
0
+      if ( !is_wp_error($tag) && !empty($tag->name) )
0
+        $tags[] = $tag->name;
0
     }
0
-  }
0
-  // End horrible hack
0
-  
0
-  
0
-  /*
0
-  // This doesn't work; tag__and and tag__in are empty for tag intersections and unions
0
-  $tag_ids = array();
0
-  
0
-  if( $tag_ids = get_query_var('tag__and') ) {
0
-    $connective = __('and','tarski');
0
-  } elseif( $tag_ids = get_query_var('tag__in') ) {
0
-    $connective = __('or','tarski');
0
-  } elseif( $single_tag = get_query_var('tag_id') ) {
0
-    $tag_ids = array($single_tag);
0
-  } else {
0
-    return;
0
-  }
0
-  */
0
-
0
-  foreach ( $tag_ids as $tag_id ) {
0
-    $tag = &get_term($tag_id, 'post_tag', OBJECT, 'display');
0
-    if ( empty($tag) || is_wp_error($tag) )
0
-      continue;
0
+  } elseif ( $single_tag ) {
0
+    $tag = &get_term($single_tag, 'post_tag', OBJECT, 'display');
0
+    if ( is_wp_error($tag) || empty($tag->name) )
0
+      return false;
0
     else
0
       $tags[] = $tag->name;
0
+  } else {
0
+    return;
0
   }
0
   
0
-  if ( $tag_wrapper )
0
-    $tags = wrap_values_in_element($tags, $tag_wrapper);
0
-
0
-  $tags = implode_proper($tags, ', ', $connective);
0
+  if ( strlen($format) > 0 ) {
0
+    foreach ( $tags as $index => $tag )
0
+      $tags[$index] = sprintf($format, $tag);
0
+  }
0
+      
0
+  $tags = implode_proper($tags, __(', ', 'tarski'), $connective);
0
   $tags = apply_filters('multiple_tag_titles', $tags);
0
-
0
   return $tags;
0
 }
0
+}
0
 
0
 /**
0
  * add_post_tags() - Appends tags to posts.
0
@@ -123,7 +117,7 @@ function multiple_tag_titles($tag_wrapper = '') {
0
  * @return string
0
  */
0
 function add_post_tags() {
0
-  if(is_single() || (get_tarski_option('tags_everywhere')) && !in_category(get_tarski_option('asidescategory'))) {
0
+  if (is_single() || (get_tarski_option('tags_everywhere') && !in_category(get_tarski_option('asidescategory')))) {
0
     the_tags('<p class="tagdata"><strong>'. __('Tags','tarski'). ':</strong> ', ', ', '</p>'."\n");
0
   }
0
 }
...
16
17
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
20
21
...
25
26
27
 
 
28
29
30
...
173
174
175
 
 
176
177
178
...
203
204
205
 
 
206
207
208
...
262
263
264
 
 
265
266
267
...
374
375
376
377
 
378
379
380
...
419
420
421
 
 
422
423
424
...
459
460
461
 
 
462
463
464
...
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
39
40
41
42
43
44
45
46
...
189
190
191
192
193
194
195
196
...
221
222
223
224
225
226
227
228
...
282
283
284
285
286
287
288
289
...
396
397
398
 
399
400
401
402
...
441
442
443
444
445
446
447
448
...
483
484
485
486
487
488
489
490
0
@@ -16,6 +16,20 @@ function is_wp_front_page() {
0
 }
0
 
0
 /**
0
+ * only_paginate_home() - Turns off paging for everything except feeds and the home page.
0
+ * 
0
+ * @since 2.2
0
+ * @param object $query
0
+ */
0
+function only_paginate_home($query) {
0
+  if ( !get_tarski_option('use_pages') && !is_admin() ) {
0
+    if ( !is_home() && !is_feed() && '' === $query->get('nopaging') ) {
0
+      $query->set('nopaging', 1);
0
+    }
0
+  }
0
+}
0
+
0
+/**
0
  * tarski_doctitle() - Returns the document title.
0
  * 
0
  * The order (site name first or last) can be set on the Tarski Options page.
0
@@ -25,6 +39,8 @@ function is_wp_front_page() {
0
  * @since 1.5
0
  * @param string $sep
0
  * @return string $doctitle
0
+ * @hook filter tarski_doctitle
0
+ * Filter document titles.
0
  */
0
 function tarski_doctitle($sep = '&middot;') {
0
   $site_name = get_bloginfo('name');
0
@@ -173,6 +189,8 @@ function tarski_headerimage() {
0
  * wrapped in a p (paragraph) element.
0
  * @since 1.5
0
  * @return string
0
+ * @hook filter tarski_sitetitle
0
+ * Filter site title.
0
  */
0
 function tarski_sitetitle() {
0
   if(get_tarski_option('display_title')) {
0
@@ -203,6 +221,8 @@ function tarski_sitetitle() {
0
  * 
0
  * @since 1.5
0
  * @return string
0
+ * @hook filter tarski_tagline
0
+ * Filter site tagline.
0
  */
0
 function tarski_tagline() {
0
   if((get_tarski_option('display_tagline') && get_bloginfo('description')))
0
@@ -262,6 +282,8 @@ function home_link_name() {
0
  * @param boolean $return
0
  * @global object $wpdb
0
  * @return string $navbar
0
+ * @hook filter tarski_navbar
0
+ * Filter the HTML generated for the navbar.
0
  */
0
 function tarski_navbar($return = false) {
0
   global $wpdb;
0
@@ -374,7 +396,7 @@ function add_admin_link($navbar) {
0
   if(is_user_logged_in())
0
     $navbar['admin'] = sprintf(
0
       '<li><a id="nav-admin" href="%1$s">%2$s</a></li>',
0
-       get_option('siteurl') . '/wp-admin/',
0
+       admin_url(),
0
       __('Site Admin','tarski')
0
     );  
0
   
0
@@ -419,6 +441,8 @@ function tarski_feedlink() {
0
  * @since 1.2
0
  * @param boolean $return
0
  * @return string $classes
0
+ * @hook filter tarski_bodyclass
0
+ * Filter the classes applied to the document body by Tarski.
0
  */
0
 function tarski_bodyclass($return = false) {
0
   if(get_tarski_option('centred_theme')) { // Centred or not
0
@@ -459,6 +483,8 @@ function tarski_bodyclass($return = false) {
0
  * @global object $post
0
  * @global object $wp_query
0
  * @return string $body_id
0
+ * @hook filter tarski_bodyid
0
+ * Filter the document id value.
0
  */
0
 function tarski_bodyid($return = false) {
0
   global $post, $wp_query;
...
58
59
60
61
 
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
 
122
123
124
125
126
127
128
129
130
131
132
 
 
 
133
134
135
...
176
177
178
179
 
180
181
182
183
 
184
185
186
...
58
59
60
 
61
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
66
 
 
 
 
 
 
 
 
 
 
67
68
69
70
71
72
...
113
114
115
 
116
117
118
119
 
120
121
122
123
0
@@ -58,78 +58,15 @@ function tarski_widget_text_wrapper($text) {
0
 }
0
 
0
 /**
0
- * tarski_sidebar_links() - Returns an array for use with wp_list_bookmarks().
0
+ * tarski_widget_links_args() - Removes navbar links from the links widget.
0
  * 
0
- * If a link category has been selected as external links in the navbar,
0
- * it will be excluded from this array. Because wp_list_bookmarks() has no way
0
- * to exclude categories, this function is inefficient. This core patch
0
- * {@link http://trac.wordpress.org/ticket/6808} would allow a substantially
0
- * simpler function with one less database call.
0
- * @link http://trac.wordpress.org/ticket/6808
0
- * @since 2.0
0
- * @return array $options
0
- */
0
-function tarski_sidebar_links() {
0
-  $link_cat_args = array(
0
-    'orderby' => 'term_id',
0
-    'exclude' => get_tarski_option('nav_extlinkcat'),
0
-    'hierarchical'=> 0
0
-  );
0
-  
0
-  $link_categories = &get_terms('link_category', $link_cat_args);
0
-  
0
-  foreach($link_categories as $link_cat)
0
-    $link_cats[] = $link_cat->term_id;
0
-  
0
-  $link_cats = implode(',', $link_cats);
0
-  
0
-  $options = array(
0
-    'category' => $link_cats,
0
-    'category_before' => '',
0
-    'category_after' => '',
0
-    'title_before' => '<h3>',
0
-    'title_after' => '</h3>',
0
-    'show_images' => 0,
0
-    'show_description' => 0,
0
-  );
0
-  
0
-  $options = apply_filters('tarski_sidebar_links', $options);
0
-  return $options;
0
-}
0
-
0
-/**
0
- * tarski_widget_links() - Tarski links widget.
0
- *
0
- * Doesn't display links from the category being used in the navbar,
0
- * if one is set.
0
- * @since 2.1
0
- * @see wp_widget_links()
0
+ * @since 2.2
0
  * @param array $args
0
- * @return string
0
- */
0
-function tarski_widget_links($args) {
0
-  extract($args, EXTR_SKIP);
0
-  wp_list_bookmarks(array_merge(tarski_sidebar_links(), array('category_before' => $before_widget, 'category_after' => $after_widget)));
0
-}
0
-
0
-/**
0
- * tarski_widget_search() - Replaces the default search widget.
0
- *
0
- * Hopefully temporary, a patch has been proposed for WP 2.6
0
- * which does the same thing.
0
- * @since 2.1
0
- * @link http://trac.wordpress.org/ticket/5567
0
+ * @return array
0
  */
0
-function tarski_widget_search($args) {
0
-  extract($args, EXTR_SKIP);
0
-  $searchform_template = get_template_directory() . '/searchform.php';
0
-
0
-  if ( !file_exists($searchform_template) )
0
-    $searchform_template = get_theme_root() . '/default/searchform.php';
0
-
0
-  echo $before_widget;
0
-  include_once($searchform_template);
0
-  echo $after_widget;
0
+function tarski_widget_links_args($args) {
0
+  $args['exclude_category'] = get_tarski_option('nav_extlinkcat');
0
+  return $args;
0
 }
0
 
0
 /**
0
@@ -176,11 +113,11 @@ function tarski_recent_entries($args) {
0
     <li>
0
       <h4 class="recent-title"><a title="<?php _e('View this post', 'tarski'); ?>" href="<?php the_permalink(); ?>"><?php the_title() ?></a></h4>
0
       <p class="recent-metadata"><?php
0
-      echo tarski_date();
0
+      echo the_time(get_option('date_format'));
0
       if(!get_tarski_option('hide_categories')) {
0
         _e(' in ', 'tarski'); the_category(', ');
0
       } ?></p>
0
-      <div class="recent-excerpt content"><?php tarski_excerpt(); ?></div>
0
+      <div class="recent-excerpt content"><?php the_excerpt(); ?></div>
0
     </li>
0
     <?php endwhile; ?>
0
   </ul>
...
21
22
23
24
 
 
 
 
 
 
 
 
 
25
26
27
...
21
22
23
 
24
25
26
27
28
29
30
31
32
33
34
35
0
@@ -21,7 +21,15 @@ get_header(); ?>
0
       </div> <!-- /content -->
0
     <?php } ?>
0
     <div class="bookmarks">
0
-      <?php wp_list_bookmarks(tarski_sidebar_links()); ?>
0
+      <?php wp_list_bookmarks(array(
0
+        'exclude_category' => get_tarski_option('nav_extlinkcat'),
0
+        'category_before' => '',
0
+        'category_after' => '',
0
+        'title_before' => '<h3>',
0
+        'title_after' => '</h3>',
0
+        'show_images' => 0,
0
+        'show_description' => 0
0
+      )); ?>
0
     </div> <!-- /bookmarks -->
0
 
0
     <?php th_postend(); ?>
...
1
2
3
4
5
...
8
9
10
11
 
12
13
14
...
22
23
24
25
 
26
27
28
...
 
 
1
2
3
...
6
7
8
 
9
10
11
12
...
20
21
22
 
23
24
25
26
0
@@ -1,5 +1,3 @@
0
-<?php if(!is_home() && !get_tarski_option('use_pages')) { $posts = query_posts($query_string . '&nopaging=1'); } ?>
0
-
0
 <?php while(have_posts()) { the_post(); ?>
0
   
0
   <?php if(get_tarski_option('asidescategory') && in_category(get_tarski_option('asidescategory'))) { // Aside loop ?>
0
@@ -8,7 +6,7 @@
0
       
0
       <div class="content entry-content"><?php the_content(__('Read the rest of this entry &raquo;','tarski')); ?></div>
0
       
0
-      <p class="meta"><span class="date updated"><?php echo tarski_date(); ?></span><?php tarski_author_posts_link(); ?> | <a class="comments-link" rel="bookmark" href="<?php the_permalink(); ?>"><?php tarski_asides_permalink_text(); ?></a><?php edit_post_link(__('edit','tarski'), ' (', ')'); ?></p>
0
+      <p class="meta"><span class="date updated"><?php the_time(get_option('date_format')); ?></span><?php tarski_author_posts_link(); ?> | <a class="comments-link" rel="bookmark" href="<?php the_permalink(); ?>"><?php tarski_asides_permalink_text(); ?></a><?php edit_post_link(__('edit','tarski'), ' (', ')'); ?></p>
0
       
0
       <?php th_postend(); ?>
0
       
0
@@ -22,7 +20,7 @@
0
       
0
       <div class="meta">
0
         <h2 class="title entry-title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent link to ','tarski'); the_title(); ?>"><?php the_title(); ?></a></h2>
0
-        <p class="metadata"><?php echo '<span class="date updated">'. tarski_date(). '</span>';
0
+        <p class="metadata"><?php echo '<span class="date updated">'. get_the_time(get_option('date_format')) . '</span>';
0
         tarski_post_categories_link();
0
         tarski_author_posts_link();
0
         tarski_comments_link();
...
3
4
5
6
 
7
8
 
9
10
11
...
89
90
91
92
 
93
94
95
...
151
152
153
154
155
 
 
156
157
 
 
 
 
 
 
 
 
 
158
159
160
...
233
234
235
 
236
237
238
...
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
...
3
4
5
 
6
7
 
8
9
10
11
...
89
90
91
 
92
93
94
95
...
151
152
153
 
 
154
155
156
 
157
158
159
160
161
162
163
164
165
166
167
168
...
241
242
243
244
245
246
247
...
296
297
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
0
@@ -3,9 +3,9 @@ Theme Name: Tarski
0
 Theme URI: http://tarskitheme.com/
0
 Description: An elegant, flexible theme developed by <a href="http://extralogical.net/">Ben Eastaugh</a> and <a href="http://ceejayoz.com/">Chris Sternal-Johnson</a>.
0
 Author: Benedict Eastaugh and Chris Sternal-Johnson
0
-Author URI: http://tarskitheme.com/
0
+Author URI: http://tarskitheme.com/about/
0
 Tags: white, custom header, fixed width, two columns, widgets, API, options page, update notifier
0
-Version: 2.1.4
0
+Version: 2.3
0
 .
0
 Released under the <a href="http://www.opensource.org/licenses/gpl-license.php">GPL</a>.
0
 .
0
@@ -89,7 +89,7 @@ body.rtl #navigation ul.primary { direction: ltr; }
0
     sub { vertical-align: sub; }
0
     hr { width: 100%; height: 1px; background: #ccc; color: #ccc; margin: 1em 0; border: none; padding: 0; }
0
   pre, code { font-family: Courier, "Courier New", monospace; font-size: 1em; }
0
-    pre { overflow: scroll; margin: 0 0 1em 0; padding: 0 0 0.5em 0; }
0
+    pre { overflow: scroll; margin: 0 0 1em 0; padding: 0 0 0.5em 0; white-space: pre-wrap; }
0
     body .primary pre { width: 500px; }
0
     body .secondary pre { width: 200px; }
0
     code { color: #7ca653; }
0
@@ -151,10 +151,18 @@ body.rtl #navigation ul.primary { direction: ltr; }
0
   a img { border: 1px solid #006a80; }
0
   a:hover img, body .comment a:hover .avatar { border: 1px solid #a8001c; }
0
     #wrapper .gallery a:link, #wrapper .gallery-item a:visited, #wrapper .gallery-item a:hover, #wrapper .gallery-item a:active, #wrapper a.imagelink2 img, #wrapper a.imagelink2:hover img, #wrapper a.imagelink:link, #wrapper a.imagelink:visited, #wrapper a.imagelink:hover, #wrapper a.imagelink:active, #wrapper a.imagelink2:link, #wrapper a.imagelink2:visited, #wrapper a.imagelink2:hover, #wrapper a.imagelink2:active { border: none; }
0
-    body .imageleft { float: left; margin: 0 10px 10px 0; }
0
-    body .imageright { float: right; margin: 0 0 10px 10px; }
0
+    body .imageleft, body .alignleft { float: left; margin: 0 10px 10px 0; }
0
+    body .imageright, body .alignright { float: right; margin: 0 0 10px 10px; }
0
     body .imageblock { display: block; margin: 0 0 1em 0; }
0
-    body .imagecentre, body .imagecenter { display: block; text-align: center; margin: 0 auto 1em auto; }
0
+    body .imagecentre, body .imagecenter, body .centered, body .aligncenter { display: block; text-align: center; margin: 0 auto 1em auto; }
0
+    
0
+  body .gallery { margin: 0 auto 1em 0; }
0
+  body .gallery-item { float: left; margin-top: 10px; text-align: center; }
0
+  body #wrapper .content .gallery-item a, body #wrapper .content .attachment a { border-bottom:none; }
0
+  body .gallery-caption { margin-left: 0; }
0
+  
0
+  
0
+  
0
 
0
   /* Tags & Tags page
0
   --------------------------------------- */
0
@@ -233,6 +241,7 @@ input, select, textarea { font-family: Verdana, Helvetica, Arial, sans-serif; fo
0
   body .searchbox { width: 200px; margin: 0 0 1em 0; }
0
     #s { display: block; width: 194px; margin: 0 0 0.6em 0; border: 1px solid #ccc; padding: 2px; background: #fafafa; color: #404040; }
0
     #s:focus { background: #fff; }
0
+    body.js #searchlabel { display: none; }
0
 
0
   /* Comment form
0
   --------------------------------------- */
0
@@ -287,30 +296,3 @@ body .widget { margin: 0 0 2em 0; }
0
     body .widget_calendar tfoot td { font-family: 'Times New Roman', Times, Georgia, serif; font-size: 1.5em; }
0
     body .widget_calendar #prev { text-align: left; }
0
     body .widget_calendar #next { text-align: right; }
0
-    
0
-/*Add default wordpress align*/
0
-    img.centered {
0
-      display: block;
0
-      margin-left: auto;
0
-      margin-right: auto;
0
-      }
0
-
0
-    img.alignright {
0
-      padding: 4px;
0
-      margin: 0 0 2px 7px;
0
-      display: inline;
0
-      }
0
-
0
-    img.alignleft {
0
-      padding: 4px;
0
-      margin: 0 7px 2px 0;
0
-      display: inline;
0
-      }
0
-
0
-    .alignright {
0
-      float: right;
0
-      }
0
-
0
-    .alignleft {
0
-      float: left
0
-      }
0
\ No newline at end of file
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
0
@@ -1,53 +1,54 @@
0
-/*
0
-polar.css
0
-'Polar' style for the Tarski theme - http://tarskitheme.com/
0
-Designed by Benedict Eastaugh, http://extralogical.net/
0
-*/
0
-
0
-
0
-/* Navigation
0
------------------------------------------------ */
0
-body.polar #wrapper .nav-current:link, body.polar #wrapper .nav-current:visited, body.polar #wrapper .nav-current:active { color: #a8a8a8; }
0
-body.polar #wrapper .nav-current:hover { color: #000; }
0
-  
0
-/* Content
0
------------------------------------------------ */
0
-body.polar code { color: #8fafbf; }
0
-body.polar abbr, body.polar acronym { border-bottom: 1px solid #5c8499; }
0
-    
0
-    /* Headers
0
-    --------------------------------------- */
0
-    body.polar h3 { color: #a8a8a8; }
0
-    
0
-    /* Post content
0
-    --------------------------------------- */
0
-    body.polar .articlenav { background: #fff; }
0
-    
0
-    /* Inserts
0
-    --------------------------------------- */
0
-    body.polar .insert { background: #fff; margin: 0 0 1em 0; border: 1px solid #cfdee5; padding: 9px; }
0
-      body.polar .insert h3 { border-bottom: 1px solid #cfdee5; }
0
-    
0
-    /* Downloads
0
-    --------------------------------------- */
0
-    body.polar .content a.download:link, body.polar .content a.download:visited, body.polar .content a.download:active { background-color: #fafcfc; border: 1px solid #cfdee5; }
0
-    
0
-    /* Images
0
-    --------------------------------------- */
0
-    body.polar img { border: 0px; }
0
-    
0
-/* Links
0
------------------------------------------------ */
0
-body.polar a:link, body.polar a:active, body.polar a:visited { color: #4c8099; }
0
-body.polar a:hover { color: #000; }
0
-
0
-body.polar .content a:link, body.polar .content a:active, body.polar .content a:visited, body.polar .link-pages a:link, body .link-pages a:active, body .link-pages a:visited, body .tagdata a:link, body.polar .tagdata a:active, body.polar .tagdata a:visited, body.polar .widget_tag_cloud a:link, body.polar .widget_tag_cloud a:active, body.polar .widget_tag_cloud a:visited { border-bottom: 1px solid #ccc; }
0
-body.polar .content a:hover, body.polar .link-pages a:hover, body.polar .tagdata a:hover, body.polar .widget_tag_cloud a:hover { border-bottom: 1px solid #000; }
0
-
0
-/* Widgets
0
------------------------------------------------ */
0
-
0
-  /* Calendar widget
0
-  ------------------------------------------- */
0
-  body.polar .widget_calendar tbody td a { color: #fff; background: #8bb6cc; }
0
-  body.polar .widget_calendar tbody td a:hover { color: #fff; background: #404040; }
0
+/*
0
+polar.css
0
+'Polar' style for the Tarski theme - http://tarskitheme.com/
0
+Designed by Benedict Eastaugh, http://extralogical.net/
0
+*/
0
+
0
+
0
+/* Navigation
0
+----------------------------------------------- */
0
+body.polar #wrapper .nav-current:link, body.polar #wrapper .nav-current:visited, body.polar #wrapper .nav-current:active { color: #a8a8a8; }
0
+body.polar #wrapper .nav-current:hover { color: #000; }
0
+  
0
+/* Content
0
+----------------------------------------------- */
0
+body.polar code { color: #8fafbf; }
0
+body.polar abbr, body.polar acronym { border-bottom: 1px solid #5c8499; }
0
+    
0
+    /* Headers
0
+    --------------------------------------- */
0
+    body.polar h3 { color: #a8a8a8; }
0
+    
0
+    /* Post content
0
+    --------------------------------------- */
0
+    body.polar .articlenav { background: #fff; }
0
+    
0
+    /* Inserts
0
+    --------------------------------------- */
0
+    body.polar .insert { background: #fff; margin: 0 0 1em 0; border: 1px solid #cfdee5; padding: 9px; }
0
+      body.polar .insert h3 { border-bottom: 1px solid #cfdee5; }
0
+    
0
+    /* Downloads
0
+    --------------------------------------- */
0
+    body.polar .content a.download:link, body.polar .content a.download:visited, body.polar .content a.download:active { background-color: #fafcfc; border: 1px solid #cfdee5; }
0
+    
0
+    /* Images
0
+    --------------------------------------- */
0
+    body.polar a img { border: 1px solid #4c8099; }
0
+    body.polar a:hover img, body.polar .comment a:hover .avatar { border: 1px solid #000; }
0
+    
0
+/* Links
0
+----------------------------------------------- */
0
+body.polar a:link, body.polar a:active, body.polar a:visited { color: #4c8099; }
0
+body.polar a:hover { color: #000; }
0
+
0
+body.polar .content a:link, body.polar .content a:active, body.polar .content a:visited, body.polar .link-pages a:link, body .link-pages a:active, body .link-pages a:visited, body .tagdata a:link, body.polar .tagdata a:active, body.polar .tagdata a:visited, body.polar .widget_tag_cloud a:link, body.polar .widget_tag_cloud a:active, body.polar .widget_tag_cloud a:visited { border-bottom: 1px solid #ccc; }
0
+body.polar .content a:hover, body.polar .link-pages a:hover, body.polar .tagdata a:hover, body.polar .widget_tag_cloud a:hover { border-bottom: 1px solid #000; }
0
+
0
+/* Widgets
0
+----------------------------------------------- */
0
+
0
+  /* Calendar widget
0
+  ------------------------------------------- */
0
+  body.polar .widget_calendar tbody td a { color: #fff; background: #8bb6cc; }
0
+  body.polar .widget_calendar tbody td a:hover { color: #fff; background: #404040; }

Comments