|
1 <h2>What's new in Thematic 0.9.6.2</h2> |
|
2 |
|
3 <ul> |
|
4 |
|
5 <li><h3>Fixed:</h3> |
|
6 <ul> |
|
7 <li>Fixed a bug in page.php not loading <code>thematic_comments_template()</code></li> |
|
8 |
|
9 <li>Fixed missing gettext in comments-extensions.php</li> |
|
10 |
|
11 <li>Fixed French, German, Italian, Romanian, and Spanish language files</li> |
|
12 </ul> |
|
13 </li> |
|
14 </ul> |
|
15 |
|
16 <h2>What's new in Thematic 0.9.6.1</h2> |
|
17 |
|
18 |
|
19 <ul> |
|
20 |
|
21 <li><p>Added two new hooks:</p> |
|
22 <ul> |
|
23 |
|
24 <li><code>thematic_abovecontainer()</code></li> |
|
25 <li><code>thematic_belowcontainer()</code></li> |
|
26 </ul> |
|
27 </li> |
|
28 |
|
29 <li><p>Thematic prevents the creation of the WordPress Generator. This can be filtered using a filter for <code>thematic_hide_generators</code>. Return <code>TRUE</code> and the WordPress Generator will be created.</p></li> |
|
30 |
|
31 <li><p>Added some filters to <code>comments.php</code>:</p> |
|
32 <ul> |
|
33 |
|
34 <li>The standard text 'One Comment' can be filtered using <code>thematic_singlecomment_text</code>.</li> |
|
35 |
|
36 <li>The standard text 'n Comments' can be filtered using <code>thematic_multiplecomments_text</code>.</li> |
|
37 |
|
38 <li>The standard text 'Post a Comment' can be filtered using <code>thematic_postcomment_text</code>.</li> |
|
39 |
|
40 <li>The standard text 'Post a Reply to %s' can be filtered using <code>thematic_postreply_text</code>.</li> |
|
41 |
|
42 <li>The standard text 'Comment' for the text box can be filtered using <code>thematic_commentbox_text</code>.</li> |
|
43 |
|
44 <li>The standard text 'Post Comment' for the send button can be filtered using <code>thematic_commentbutton_text</code>.</li> |
|
45 |
|
46 </ul> |
|
47 </li> |
|
48 |
|
49 <li><p>Split up <code>thematic_postheader()</code> and <code>thematic_postfooter()</code> into sub-functions. With these new functions it is easier to rearrange the displayed data.</p> |
|
50 |
|
51 <ul> |
|
52 <li><code>thematic_postheader()</code></li> |
|
53 |
|
54 <li><code>thematic_postheader_posttitle()</code></li> |
|
55 |
|
56 <li><code>thematic_postheader_postmeta()</code></li> |
|
57 </ul> |
|
58 |
|
59 <ul> |
|
60 <li><code>thematic_postmeta_authorlink()</code></li> |
|
61 |
|
62 <li><code>thematic_postmeta_entrydate()</code></li> |
|
63 |
|
64 <li><code>thematic_postmeta_editlink()</code></li> |
|
65 </ul> |
|
66 |
|
67 <ul> |
|
68 <li><code>thematic_postfooter()</code></li> |
|
69 |
|
70 <li><code>thematic_postfooter_posteditlink()</code></li> |
|
71 |
|
72 <li><code>thematic_postfooter_postcategory()</code></li> |
|
73 |
|
74 <li><code>thematic_postfooter_posttags()</code></li> |
|
75 |
|
76 <li><code>thematic_postfooter_postconnect()</code></li> |
|
77 |
|
78 <li><code>thematic_postfooter_postcomments()</code></li> |
|
79 </ul> |
|
80 </li> |
|
81 |
|
82 <li><p>The several parts of the body class can be switched off using the following filters:</p> |
|
83 <ul> |
|
84 <li><code>thematic_show_bodyclass</code> (master switch)</li> |
|
85 |
|
86 <li><code>thematic_show_bc_wordpress</code></li> |
|
87 |
|
88 <li><code>thematic_show_bc_datetime</code></li> |
|
89 |
|
90 <li><code>thematic_show_bc_contenttype</code></li> |
|
91 |
|
92 <li><code>thematic_show_bc_singular</code></li> |
|
93 |
|
94 <li><code>thematic_show_bc_singlepost</code></li> |
|
95 |
|
96 <li><code>thematic_show_bc_authorarchives</code></li> |
|
97 |
|
98 <li><code>thematic_show_bc_categoryarchives</code></li> |
|
99 |
|
100 <li><code>thematic_show_bc_tagarchives</code></li> |
|
101 |
|
102 <li><code>thematic_show_bc_pages</code></li> |
|
103 |
|
104 <li><code>thematic_show_bc_search</code></li> |
|
105 |
|
106 <li><code>thematic_show_bc_loggedin</code></li> |
|
107 |
|
108 <li><code>thematic_show_bc_browser</code></li> |
|
109 </ul> |
|
110 |
|
111 </li> |
|
112 |
|
113 |
|
114 <li><p><code><head profile="http://gmpg.org/xfn/11"></code> can be filtered using <code>thematic_head_profile</code>.</p></li> |
|
115 |
|
116 |
|
117 <li><p>Complete rewrite of the widget areas:</p> |
|
118 |
|
119 <p>The widget areas are now controlled by the <code>$thematic_widgetized_areas</code> array. This is the basic layout:</p> |
|
120 <pre lang="php"> |
|
121 $thematic_widgetized_areas = array( |
|
122 |
|
123 'Primary Aside' => array( |
|
124 |
|
125 'admin_menu_order' => 100, |
|
126 |
|
127 'args' => array ( |
|
128 |
|
129 'name' => 'Primary Aside', |
|
130 |
|
131 'id' => 'primary-aside', |
|
132 |
|
133 'description' => __('The primary widget area, most often used as a sidebar.', 'thematic'), |
|
134 |
|
135 'before_widget' => thematic_before_widget(), |
|
136 |
|
137 'after_widget' => thematic_after_widget(), |
|
138 |
|
139 'before_title' => thematic_before_title(), |
|
140 |
|
141 'after_title' => thematic_after_title(), |
|
142 |
|
143 ), |
|
144 |
|
145 'action_hook' => 'widget_area_primary_aside', |
|
146 |
|
147 'function' => 'thematic_primary_aside', |
|
148 |
|
149 'priority' => 10, |
|
150 |
|
151 ), |
|
152 |
|
153 ) |
|
154 </pre> |
|
155 |
|
156 <p>Using this array you can remove unnecessary widget areas with a filter before these are created:</p> |
|
157 <pre lang="php"> |
|
158 function remove_widget_area($content) { |
|
159 |
|
160 unset($content['Primary Aside']); |
|
161 |
|
162 return $content; |
|
163 |
|
164 } |
|
165 |
|
166 add_filter('thematic_widgetized_areas', 'remove_widget_area'); |
|
167 </pre> |
|
168 |
|
169 <p><strong>Note:</strong> This will completely remove a widget area. Do not use this functionality with conditional tags to remove a widget area from a certain page / post.</p> |
|
170 |
|
171 <p>A widget area can be renamed:</p> |
|
172 |
|
173 <pre lang="php"> |
|
174 function rename_widget_area($content) { |
|
175 |
|
176 $content['Primary Aside']['args']['name'] = 'My first Sidebar'; |
|
177 |
|
178 return $content; |
|
179 |
|
180 } |
|
181 |
|
182 add_filter('thematic_widgetized_areas', 'rename_widget_area'); |
|
183 </pre> |
|
184 |
|
185 <p>Display a widget area based on a conditional tag:</p> |
|
186 <pre lang="php"> |
|
187 // First we create a new function to display the secondary aside only on pages: |
|
188 |
|
189 function childtheme_secondary_aside() { |
|
190 |
|
191 if (is_page()) { |
|
192 |
|
193 if (is_sidebar_active('secondary-aside')) { |
|
194 |
|
195 echo thematic_before_widget_area('secondary-aside'); |
|
196 |
|
197 dynamic_sidebar('secondary-aside'); |
|
198 |
|
199 echo thematic_after_widget_area('secondary-aside'); |
|
200 |
|
201 } |
|
202 |
|
203 } |
|
204 |
|
205 } |
|
206 |
|
207 // ... and then ... without removing an action or so: |
|
208 |
|
209 function change_secondary_aside($content) { |
|
210 |
|
211 $content['Secondary Aside']['function'] = 'childtheme_secondary_aside'; |
|
212 |
|
213 return $content; |
|
214 |
|
215 } |
|
216 |
|
217 add_filter('thematic_widgetized_areas','change_secondary_aside'); |
|
218 </pre> |
|
219 |
|
220 <p>Create several widget areas that will be displayed on a certain position based on conditional tags:</p> |
|
221 |
|
222 <pre lang="php"> |
|
223 function change_secondary_aside($content) { |
|
224 |
|
225 $content['Secondary Aside']['function'] = 'childtheme_secondary_aside'; |
|
226 |
|
227 $content['Secondary Aside Pages'] = array( |
|
228 |
|
229 'admin_menu_order' => 201, |
|
230 |
|
231 'args' => array ( |
|
232 |
|
233 'name' => 'Secondary Aside Pages', |
|
234 |
|
235 'id' => 'secondary-aside-pages', |
|
236 |
|
237 'description' => __('The secondary widget area for pages.', 'childtheme'), |
|
238 |
|
239 'before_widget' => thematic_before_widget(), |
|
240 |
|
241 'after_widget' => thematic_after_widget(), |
|
242 |
|
243 'before_title' => thematic_before_title(), |
|
244 |
|
245 'after_title' => thematic_after_title(), |
|
246 |
|
247 ), |
|
248 |
|
249 'action_hook' => 'thematic_secondary_aside', |
|
250 |
|
251 'function' => 'childtheme_secondary_aside', |
|
252 |
|
253 'priority' => 10, |
|
254 |
|
255 ); |
|
256 |
|
257 |
|
258 |
|
259 return $content; |
|
260 |
|
261 } |
|
262 |
|
263 add_filter('thematic_widgetized_areas','change_secondary_aside'); |
|
264 |
|
265 |
|
266 |
|
267 function childtheme_secondary_aside() { |
|
268 |
|
269 if (is_sidebar_active('secondary-aside') && is_sidebar_active('secondary-aside-pages')) { |
|
270 |
|
271 echo thematic_before_widget_area('secondary-aside'); |
|
272 |
|
273 if (is_page()) { |
|
274 |
|
275 dynamic_sidebar('secondary-aside-pages'); |
|
276 |
|
277 } else { |
|
278 |
|
279 dynamic_sidebar('secondary-aside'); |
|
280 |
|
281 } |
|
282 |
|
283 echo thematic_after_widget_area('secondary-aside'); |
|
284 |
|
285 } |
|
286 |
|
287 } |
|
288 </pre> |
|
289 |
|
290 |
|
291 |
|
292 <li><h3>Fixed:</h3> |
|
293 <ul> |
|
294 <li>Fixed a bug in <code>thematic_page_title()</code> not displaying a correct title in attachement.php</li> |
|
295 |
|
296 <li>Fixed the widget area 'Index Insert'.</li> |
|
297 |
|
298 <li>Fixed a bug in <code>thematic_create_robots()</code>.</li> |
|
299 </ul> |
|
300 </li> |
|
301 </ul> |