Version Description
- Fixed: taxonomy pagination in sidebar editor
- Fixed: categories found in search can now be saved. props Xandoc
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 2.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 2.0.3
- content-aware-sidebars.php +918 -597
- css/index.php +2 -0
- css/style.css +199 -38
- img/index.php +2 -0
- index.php +1 -0
- js/accordion.min.js +1 -0
- js/cas_admin.js +459 -83
- js/index.php +2 -0
- js/jquery.ui.accordion.js +0 -1
- lang/content-aware-sidebars-da_DK.mo +0 -0
- lang/content-aware-sidebars-da_DK.po +192 -116
- lang/content-aware-sidebars-de_DE.mo +0 -0
- lang/content-aware-sidebars-de_DE.po +460 -0
- lang/content-aware-sidebars-es_ES.mo +0 -0
- lang/content-aware-sidebars-es_ES.po +403 -0
- lang/content-aware-sidebars-hu_HU.mo +0 -0
- lang/content-aware-sidebars-hu_HU.po +364 -0
- lang/content-aware-sidebars-it_IT.mo +0 -0
- lang/content-aware-sidebars-it_IT.po +257 -107
- lang/content-aware-sidebars-lt_LT.mo +0 -0
- lang/content-aware-sidebars-lt_LT.po +183 -136
- lang/content-aware-sidebars-lv_LV.mo +0 -0
- lang/content-aware-sidebars-lv_LV.po +299 -0
- lang/content-aware-sidebars-sk_SK.mo +0 -0
- lang/content-aware-sidebars-sk_SK.po +311 -0
- lang/content-aware-sidebars.po +356 -0
- lang/content-aware-sidebars.pot +0 -276
- lang/index.php +2 -0
- modules/abstract.php +236 -45
- modules/author.php +85 -13
- modules/bbpress.php +28 -14
- modules/bp_member.php +72 -26
- modules/index.php +2 -0
- modules/page_template.php +34 -13
- modules/polylang.php +36 -11
- modules/post_type.php +302 -71
- modules/qtranslate.php +32 -18
- modules/static.php +57 -33
- modules/taxonomy.php +322 -67
- modules/transposh.php +30 -9
- modules/wpml.php +29 -8
- readme.txt +150 -20
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- uninstall.php +5 -11
- update_db.php +126 -71
- walker.php +54 -192
content-aware-sidebars.php
CHANGED
@@ -7,171 +7,253 @@
|
|
7 |
Plugin Name: Content Aware Sidebars
|
8 |
Plugin URI: http://www.intox.dk/
|
9 |
Description: Manage and show sidebars according to the content being viewed.
|
10 |
-
Version:
|
11 |
-
Author: Joachim Jensen
|
12 |
Author URI: http://www.intox.dk/
|
13 |
Text Domain: content-aware-sidebars
|
14 |
Domain Path: /lang/
|
15 |
-
License:
|
16 |
|
17 |
-
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
You should have received a copy of the GNU General Public License
|
29 |
-
along with this program; if not, write to the Free Software
|
30 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
31 |
|
|
|
|
|
32 |
*/
|
33 |
|
34 |
final class ContentAwareSidebars {
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
private $metadata = array();
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
private $sidebar_cache = array();
|
43 |
-
|
|
|
|
|
|
|
|
|
44 |
private $modules = array();
|
45 |
|
46 |
/**
|
47 |
-
*
|
|
|
|
|
|
|
|
|
|
|
48 |
* Constructor
|
49 |
-
*
|
50 |
*/
|
51 |
public function __construct() {
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
register_activation_hook(__FILE__, array(&$this,'plugin_activation'));
|
56 |
-
register_deactivation_hook(__FILE__, array(&$this,'plugin_deactivation'));
|
57 |
|
58 |
$this->_load_dependencies();
|
59 |
-
|
60 |
// WordPress Hooks. Somewhat ordered by execution
|
61 |
|
62 |
-
//
|
63 |
-
add_action('plugins_loaded', array(&$this,'deploy_modules'));
|
64 |
-
add_action('init', array(&$this,'init_sidebar_type'),99);
|
65 |
-
add_action('widgets_init', array(&$this,'create_sidebars'));
|
66 |
-
|
67 |
-
// On admin requests
|
68 |
-
add_action('admin_menu', array(&$this,'clear_admin_menu'));
|
69 |
-
add_action('admin_enqueue_scripts', array(&$this,'load_admin_scripts'));
|
70 |
-
|
71 |
-
// On post type and taxonomy requests
|
72 |
-
add_action('delete_post', array(&$this,'remove_sidebar_widgets'));
|
73 |
-
add_action('save_post', array(&$this,'save_post'));
|
74 |
-
|
75 |
-
// Order not known yet
|
76 |
-
add_action('add_meta_boxes_sidebar', array(&$this,'create_meta_boxes'));
|
77 |
-
|
78 |
-
add_filter('default_hidden_meta_boxes', array(&$this,'change_default_hidden'),10,2);
|
79 |
-
add_filter('manage_edit-sidebar_columns', array(&$this,'admin_column_headers'));
|
80 |
-
add_filter('manage_edit-sidebar_sortable_columns', array(&$this,'admin_column_sortable_headers'));
|
81 |
-
add_filter('manage_posts_custom_column', array(&$this,'admin_column_rows'),10,3);
|
82 |
-
add_filter('post_row_actions', array(&$this,'sidebar_row_actions'),10,2);
|
83 |
-
add_filter('post_updated_messages', array(&$this,'sidebar_updated_messages'));
|
84 |
-
|
85 |
-
|
86 |
-
// Sitewide hooks that should not be loaded sitewide here
|
87 |
if(is_admin()) {
|
88 |
-
add_filter('request', array(&$this,'admin_column_orderby'));
|
89 |
|
90 |
-
add_action('wp_loaded',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
} else {
|
92 |
-
|
|
|
|
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
/**
|
98 |
-
*
|
99 |
* Deploy modules
|
100 |
-
*
|
101 |
*/
|
102 |
public function deploy_modules() {
|
|
|
|
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
// List modules
|
107 |
$modules = array(
|
108 |
-
'static'
|
109 |
-
'post_type'
|
110 |
-
'author'
|
111 |
-
'page_template'
|
112 |
-
'taxonomy'
|
113 |
-
'
|
114 |
-
'
|
115 |
-
'
|
116 |
-
'
|
117 |
-
'
|
118 |
-
'
|
|
|
119 |
);
|
|
|
|
|
120 |
|
121 |
// Forge modules
|
122 |
foreach($modules as $name => $enabled) {
|
123 |
-
if($enabled
|
124 |
-
$
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
}
|
128 |
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
-
*
|
133 |
* Create post meta fields
|
134 |
-
*
|
135 |
-
* @global int $post
|
136 |
* @global array $wp_registered_sidebars
|
|
|
137 |
*/
|
138 |
private function _init_metadata() {
|
139 |
-
global $
|
140 |
-
|
141 |
// List of sidebars
|
142 |
$sidebar_list = array();
|
143 |
foreach($wp_registered_sidebars as $sidebar) {
|
144 |
-
|
145 |
-
$sidebar_list[$sidebar['id']] = $sidebar['name'];
|
146 |
}
|
147 |
-
|
148 |
// Meta fields
|
149 |
$this->metadata['exposure'] = array(
|
150 |
-
'name' => __('Exposure',
|
151 |
'id' => 'exposure',
|
152 |
'desc' => '',
|
153 |
'val' => 1,
|
154 |
'type' => 'select',
|
155 |
'list' => array(
|
156 |
-
__('Singular',
|
157 |
-
__('Singular & Archive',
|
158 |
-
__('Archive',
|
159 |
)
|
160 |
);
|
161 |
$this->metadata['handle'] = array(
|
162 |
-
'name' => _x('Handle','option',
|
163 |
'id' => 'handle',
|
164 |
-
'desc' => __('Replace host sidebar, merge with it or add sidebar manually.',
|
165 |
'val' => 0,
|
166 |
'type' => 'select',
|
167 |
'list' => array(
|
168 |
-
__('Replace',
|
169 |
-
__('Merge',
|
170 |
-
__('Manual',
|
171 |
)
|
172 |
);
|
173 |
$this->metadata['host'] = array(
|
174 |
-
'name' => __('Host Sidebar',
|
175 |
'id' => 'host',
|
176 |
'desc' => '',
|
177 |
'val' => 'sidebar-1',
|
@@ -179,165 +261,185 @@ final class ContentAwareSidebars {
|
|
179 |
'list' => $sidebar_list
|
180 |
);
|
181 |
$this->metadata['merge-pos'] = array(
|
182 |
-
'name' => __('Merge position',
|
183 |
'id' => 'merge-pos',
|
184 |
-
'desc' => __('Place sidebar on top or bottom of host when merging.',
|
185 |
'val' => 1,
|
186 |
'type' => 'select',
|
187 |
'list' => array(
|
188 |
-
__('Top',
|
189 |
-
__('Bottom',
|
190 |
)
|
191 |
);
|
192 |
|
193 |
}
|
194 |
|
195 |
/**
|
196 |
-
*
|
197 |
-
*
|
198 |
-
*
|
199 |
*/
|
200 |
public function init_sidebar_type() {
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
// Register the sidebar type
|
208 |
-
register_post_type(
|
209 |
'labels' => array(
|
210 |
-
'name' => __('Sidebars',
|
211 |
-
'singular_name' => __('Sidebar',
|
212 |
-
'add_new' => _x('Add New', 'sidebar',
|
213 |
-
'add_new_item' => __('Add New Sidebar',
|
214 |
-
'edit_item' => __('Edit Sidebar',
|
215 |
-
'new_item' => __('New Sidebar',
|
216 |
-
'all_items' => __('All Sidebars',
|
217 |
-
'view_item' => __('View Sidebar',
|
218 |
-
'search_items' => __('Search Sidebars',
|
219 |
-
'not_found' => __('No sidebars found',
|
220 |
-
'not_found_in_trash' => __('No sidebars found in Trash',
|
221 |
),
|
222 |
-
'capabilities'
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
),
|
231 |
-
'
|
|
|
|
|
232 |
'query_var' => false,
|
233 |
'rewrite' => false,
|
234 |
-
'
|
235 |
-
'supports' => array('title','page-attributes','excerpt'),
|
236 |
-
'taxonomies' => $this->taxonomies,
|
237 |
-
'menu_icon' => WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/img/icon-16.png'
|
238 |
));
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
-
*
|
243 |
* Create update messages
|
244 |
-
*
|
245 |
* @global object $post
|
246 |
-
* @param
|
247 |
-
* @return array
|
248 |
*/
|
249 |
public function sidebar_updated_messages( $messages ) {
|
250 |
-
|
251 |
-
$messages['sidebar'] = array(
|
252 |
0 => '',
|
253 |
-
1 =>
|
254 |
2 => '',
|
255 |
3 => '',
|
256 |
-
4 => __('Sidebar updated.',
|
257 |
5 => '',
|
258 |
-
6 =>
|
259 |
-
7 => __('Sidebar saved.',
|
260 |
-
8 =>
|
261 |
-
9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>. <a href="%2$s"
|
262 |
-
|
263 |
-
|
264 |
-
|
|
|
|
|
265 |
);
|
266 |
return $messages;
|
267 |
}
|
268 |
|
269 |
/**
|
270 |
-
*
|
271 |
-
*
|
272 |
-
*
|
273 |
*/
|
274 |
-
public function
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
284 |
}
|
285 |
}
|
286 |
|
287 |
/**
|
288 |
-
*
|
289 |
-
*
|
290 |
-
*
|
291 |
*/
|
292 |
-
public function
|
293 |
|
294 |
-
//
|
295 |
-
$
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
register_sidebar( array(
|
302 |
'name' => $post->post_title,
|
303 |
-
'description' => $
|
304 |
-
'id' =>
|
305 |
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
306 |
'after_widget' => '</li>',
|
307 |
'before_title' => '<h3 class="widget-title">',
|
308 |
'after_title' => '</h3>',
|
309 |
));
|
310 |
-
}
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
-
*
|
315 |
* Add admin column headers
|
316 |
-
*
|
317 |
-
* @
|
318 |
-
* @return array
|
319 |
*/
|
320 |
public function admin_column_headers($columns) {
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
'merge-pos' => __('Merge position', 'content-aware-sidebars')
|
330 |
-
),
|
331 |
-
$columns
|
332 |
);
|
333 |
}
|
334 |
|
335 |
/**
|
336 |
-
*
|
337 |
* Make some columns sortable
|
338 |
-
*
|
339 |
-
* @
|
340 |
-
* @return array
|
341 |
*/
|
342 |
public function admin_column_sortable_headers($columns) {
|
343 |
return array_merge(
|
@@ -345,216 +447,215 @@ final class ContentAwareSidebars {
|
|
345 |
'exposure' => 'exposure',
|
346 |
'handle' => 'handle',
|
347 |
'merge-pos' => 'merge-pos'
|
348 |
-
),
|
349 |
-
$columns
|
350 |
);
|
351 |
}
|
352 |
|
353 |
/**
|
354 |
-
*
|
355 |
* Manage custom column sorting
|
356 |
-
*
|
357 |
-
* @param array $vars
|
358 |
* @return array
|
359 |
*/
|
360 |
public function admin_column_orderby($vars) {
|
361 |
-
if (isset($vars['orderby']) && in_array($vars['orderby'],array('exposure','handle','merge-pos'))) {
|
362 |
-
$vars = array_merge(
|
363 |
-
'meta_key'
|
364 |
-
'orderby'
|
365 |
-
)
|
366 |
}
|
367 |
return $vars;
|
368 |
}
|
369 |
|
370 |
/**
|
371 |
-
*
|
372 |
* Add admin column rows
|
373 |
-
*
|
374 |
-
* @param
|
375 |
-
* @
|
376 |
-
* @return void
|
377 |
*/
|
378 |
-
public function admin_column_rows($column_name
|
379 |
-
|
380 |
-
if(get_post_type($post_id) !=
|
381 |
return;
|
382 |
-
|
383 |
// Load metadata
|
384 |
-
if(!$this->metadata)
|
385 |
-
|
386 |
-
|
387 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
-
if($column_name == 'handle' && $current < 2) {
|
390 |
-
$host = get_post_meta($post_id,self::prefix.'host',true);
|
391 |
-
$current_from_list .= ": ".(isset($this->metadata['host']['list'][$host]) ? $this->metadata['host']['list'][$host] : '<span style="color:red;">'.__('Please update Host Sidebar','content-aware-sidebars').'</span>');
|
392 |
-
}
|
393 |
echo $current_from_list;
|
394 |
}
|
395 |
|
396 |
/**
|
397 |
-
*
|
398 |
* Remove widget when its sidebar is removed
|
399 |
-
*
|
400 |
-
* @
|
401 |
-
* @return void
|
402 |
*/
|
403 |
public function remove_sidebar_widgets($post_id) {
|
404 |
-
|
405 |
// Authenticate and only continue on sidebar post type
|
406 |
-
if(!current_user_can(
|
407 |
return;
|
408 |
-
|
409 |
-
$id =
|
410 |
-
|
411 |
//Get widgets
|
412 |
$sidebars_widgets = wp_get_sidebars_widgets();
|
413 |
-
|
414 |
// Check if sidebar exists in database
|
415 |
-
if(!isset($sidebars_widgets[$id]))
|
416 |
return;
|
417 |
-
|
418 |
// Remove widgets settings from sidebar
|
419 |
-
foreach($sidebars_widgets[$id] as $widget_id) {
|
420 |
-
$widget_type = preg_replace(
|
421 |
-
$widget_settings = get_option('widget_'
|
422 |
-
$widget_id = substr($widget_id,strpos($widget_id,'-')+1);
|
423 |
-
if($widget_settings && isset($widget_settings[$widget_id])) {
|
424 |
unset($widget_settings[$widget_id]);
|
425 |
-
update_option('widget_'
|
426 |
}
|
427 |
}
|
428 |
-
|
429 |
// Remove sidebar
|
430 |
unset($sidebars_widgets[$id]);
|
431 |
wp_set_sidebars_widgets($sidebars_widgets);
|
432 |
-
|
433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
}
|
435 |
|
436 |
/**
|
437 |
-
*
|
438 |
* Add admin rows actions
|
439 |
-
*
|
440 |
-
* @param
|
441 |
-
* @
|
442 |
-
* @return array
|
443 |
*/
|
444 |
public function sidebar_row_actions($actions, $post) {
|
445 |
-
if($post->post_type ==
|
446 |
-
|
447 |
-
//
|
448 |
-
|
449 |
-
unset($actions['view']);
|
450 |
-
|
451 |
-
return array_merge(
|
452 |
-
array_slice($actions, 0, 2, true),
|
453 |
-
array(
|
454 |
-
'mng_widgets' => '<a href="widgets.php" title="'.esc_html(__( 'Manage Widgets','content-aware-sidebars')).'">'.__( 'Manage Widgets','content-aware-sidebars').'</a>'
|
455 |
-
),
|
456 |
-
$actions
|
457 |
-
);
|
458 |
}
|
459 |
return $actions;
|
460 |
}
|
461 |
|
462 |
/**
|
463 |
-
*
|
464 |
-
*
|
465 |
-
* Handles content aware sidebars with hosts
|
466 |
-
*
|
467 |
* @global array $_wp_sidebars_widgets
|
468 |
* @return void
|
469 |
*/
|
470 |
public function replace_sidebar() {
|
471 |
global $_wp_sidebars_widgets;
|
472 |
-
|
473 |
$posts = $this->get_sidebars();
|
474 |
-
if(!$posts)
|
475 |
return;
|
476 |
-
|
477 |
-
foreach($posts as $post) {
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
// $continue = apply_filters('cas_exclude_sidebar', $continue, $post, self::prefix);
|
483 |
-
// if($continue)
|
484 |
-
// continue;
|
485 |
-
// }
|
486 |
-
//
|
487 |
-
$id = 'ca-sidebar-'.$post->ID;
|
488 |
-
$host = get_post_meta($post->ID, self::prefix.'host', true);
|
489 |
-
|
490 |
// Check for correct handling and if host exist
|
491 |
if ($post->handle == 2 || !isset($_wp_sidebars_widgets[$host]))
|
492 |
continue;
|
493 |
-
|
494 |
// Sidebar might not have any widgets. Get it anyway!
|
495 |
-
if(!isset($_wp_sidebars_widgets[$id]))
|
496 |
$_wp_sidebars_widgets[$id] = array();
|
497 |
-
|
498 |
// If host has already been replaced, merge with it instead. Might change in future.
|
499 |
-
if($post->handle || isset($handled_already[$host])) {
|
500 |
-
if(get_post_meta($post->ID, self::
|
501 |
-
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host]
|
502 |
else
|
503 |
-
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id]
|
504 |
} else {
|
505 |
$_wp_sidebars_widgets[$host] = $_wp_sidebars_widgets[$id];
|
506 |
$handled_already[$host] = 1;
|
507 |
-
}
|
508 |
}
|
509 |
}
|
510 |
|
511 |
/**
|
512 |
-
*
|
513 |
* Show manually handled content aware sidebars
|
514 |
-
*
|
515 |
* @global array $_wp_sidebars_widgets
|
516 |
-
* @param
|
517 |
-
* @return void
|
518 |
*/
|
519 |
public function manual_sidebar($args) {
|
520 |
global $_wp_sidebars_widgets;
|
521 |
-
|
522 |
// Grab args or defaults
|
523 |
-
$args = wp_parse_args($args,array(
|
524 |
-
'include'
|
525 |
-
'before'
|
526 |
-
'after'
|
527 |
));
|
528 |
-
extract($args,EXTR_SKIP);
|
529 |
|
530 |
// Get sidebars
|
531 |
$posts = $this->get_sidebars();
|
532 |
-
if(!$posts)
|
533 |
return;
|
534 |
|
535 |
// Handle include argument
|
536 |
-
if(!empty($include)) {
|
537 |
-
if(!is_array($include))
|
538 |
-
$include = explode(','
|
539 |
// Fast lookup
|
540 |
$include = array_flip($include);
|
541 |
}
|
542 |
|
543 |
-
$i = $host = 0;
|
544 |
-
foreach($posts as $post) {
|
545 |
|
546 |
-
$id =
|
547 |
|
548 |
// Check for manual handling, if sidebar exists and if id should be included
|
549 |
if ($post->handle != 2 || !isset($_wp_sidebars_widgets[$id]) || (!empty($include) && !isset($include[$post->ID])))
|
550 |
continue;
|
551 |
|
552 |
// Merge if more than one. First one is host.
|
553 |
-
if($i > 0) {
|
554 |
-
if(get_post_meta($post->ID, self::
|
555 |
-
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host]
|
556 |
else
|
557 |
-
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id]
|
558 |
} else {
|
559 |
$host = $id;
|
560 |
}
|
@@ -567,11 +668,9 @@ final class ContentAwareSidebars {
|
|
567 |
echo $after;
|
568 |
}
|
569 |
}
|
570 |
-
|
571 |
/**
|
572 |
-
*
|
573 |
* Query sidebars according to content
|
574 |
-
*
|
575 |
* @global type $wpdb
|
576 |
* @return array|boolean
|
577 |
*/
|
@@ -588,412 +687,634 @@ final class ContentAwareSidebars {
|
|
588 |
else
|
589 |
return $this->sidebar_cache;
|
590 |
}
|
591 |
-
|
592 |
-
$
|
593 |
-
$
|
594 |
-
$where2 = array();
|
595 |
-
|
596 |
-
// Get rules
|
597 |
-
foreach($this->modules as $module) {
|
598 |
-
if(apply_filters("cas-is-content-".$module->get_id(), $module->is_content())) {
|
599 |
-
$joins[] = apply_filters("cas-db-join-".$module->get_id(), $module->db_join());
|
600 |
-
$where[] = apply_filters("cas-db-where-".$module->get_id(), $module->db_where());
|
601 |
-
$where2[] = $module->db_where2();
|
602 |
-
}
|
603 |
-
}
|
604 |
|
605 |
// Check if there are any rules for this type of content
|
606 |
-
if(empty($
|
607 |
return false;
|
608 |
|
609 |
-
|
610 |
-
$
|
611 |
-
|
|
|
|
|
|
|
|
|
612 |
SELECT
|
613 |
-
posts.ID,
|
614 |
-
handle.meta_value handle
|
615 |
FROM $wpdb->posts posts
|
616 |
-
|
617 |
-
ON handle.post_id = posts.ID
|
618 |
-
AND handle.meta_key = '".self::prefix."handle'
|
619 |
-
LEFT JOIN $wpdb->postmeta exposure
|
620 |
-
ON exposure.post_id = posts.ID
|
621 |
-
AND exposure.meta_key = '".self::prefix."exposure'
|
622 |
-
".implode(' ',$joins)."
|
623 |
WHERE
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
|
632 |
// Return proper cache. If query was empty, tell the cache.
|
633 |
return (empty($this->sidebar_cache) ? $this->sidebar_cache[0] = false : $this->sidebar_cache);
|
634 |
|
635 |
}
|
636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
/**
|
638 |
-
*
|
639 |
* Meta boxes for sidebar edit
|
640 |
-
*
|
|
|
641 |
*/
|
642 |
public function create_meta_boxes() {
|
643 |
|
644 |
-
//
|
645 |
-
|
|
|
646 |
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
array(&$this,'meta_box_options'),
|
673 |
-
'sidebar',
|
674 |
-
'side'
|
675 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
}
|
677 |
|
678 |
-
|
679 |
/**
|
680 |
-
*
|
681 |
* Hide some meta boxes from start
|
682 |
-
*
|
683 |
-
* @param
|
684 |
-
* @param object $screen
|
685 |
* @return array
|
686 |
*/
|
687 |
-
public function change_default_hidden(
|
|
|
|
|
|
|
|
|
|
|
688 |
|
689 |
-
//WordPress 3.3 has changed get_hidden_meta_boxes().
|
690 |
-
if(get_bloginfo('version') < 3.3) {
|
691 |
-
$condition = $screen->base == 'sidebar';
|
692 |
-
} else {
|
693 |
-
$condition = $screen->post_type == 'sidebar';
|
694 |
-
}
|
695 |
-
|
696 |
-
if ($condition && get_user_option( 'metaboxhidden_sidebar' ) === false) {
|
697 |
-
|
698 |
-
$hidden_meta_boxes = array('postexcerpt','pageparentdiv');
|
699 |
-
$hidden = array_merge($hidden,$hidden_meta_boxes);
|
700 |
-
|
701 |
$user = wp_get_current_user();
|
702 |
-
update_user_option(
|
703 |
-
|
704 |
}
|
705 |
return $hidden;
|
706 |
}
|
707 |
-
|
|
|
|
|
|
|
|
|
708 |
public function meta_box_rules() {
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
echo '<div
|
719 |
-
|
720 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
721 |
}
|
|
|
|
|
|
|
|
|
|
|
722 |
echo '</div>'."\n";
|
723 |
|
724 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
725 |
|
726 |
/**
|
727 |
-
*
|
728 |
-
*
|
729 |
-
*
|
730 |
*/
|
731 |
public function meta_box_options() {
|
732 |
-
|
733 |
$columns = array(
|
734 |
'exposure',
|
735 |
'handle' => 'handle,host',
|
736 |
'merge-pos'
|
737 |
);
|
738 |
-
|
739 |
-
foreach($columns as $key => $value) {
|
740 |
-
|
741 |
-
echo '<span>'
|
742 |
echo '<p>';
|
743 |
-
$values = explode(','
|
744 |
-
foreach($values as $val) {
|
745 |
$this->_form_field($val);
|
746 |
}
|
747 |
echo '</p></span>';
|
748 |
}
|
749 |
}
|
750 |
-
|
751 |
/**
|
752 |
-
*
|
753 |
-
*
|
754 |
-
*
|
755 |
*/
|
756 |
public function meta_box_author_words() {
|
757 |
-
|
758 |
-
// Use nonce for verification
|
759 |
-
wp_nonce_field(
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
<?php
|
777 |
}
|
778 |
-
|
779 |
/**
|
780 |
-
*
|
781 |
* Create form field for metadata
|
782 |
-
*
|
783 |
* @global object $post
|
784 |
-
* @param
|
|
|
785 |
*/
|
786 |
private function _form_field($setting) {
|
787 |
-
|
788 |
-
|
789 |
-
$meta = get_post_meta($post->ID, self::prefix.$setting, true);
|
790 |
$setting = $this->metadata[$setting];
|
791 |
$current = $meta != '' ? $meta : $setting['val'];
|
792 |
-
switch($setting['type']) {
|
793 |
-
case 'select' :
|
794 |
-
echo '<select style="width:250px;" name="'
|
795 |
-
foreach($setting['list'] as $key => $value) {
|
796 |
-
echo '<option value="'
|
797 |
}
|
798 |
-
echo '</select>'."\n";
|
799 |
break;
|
800 |
case 'checkbox' :
|
801 |
-
echo '<ul>'."\n";
|
802 |
-
foreach($setting['list'] as $key => $value) {
|
803 |
-
echo '<li><label><input type="checkbox" name="'
|
804 |
}
|
805 |
-
echo '</ul>'."\n";
|
806 |
break;
|
807 |
case 'text' :
|
808 |
default :
|
809 |
-
echo '<input style="width:200px;" type="text" name="'
|
810 |
break;
|
811 |
}
|
812 |
}
|
813 |
-
|
814 |
/**
|
815 |
-
*
|
816 |
* Save meta values for post
|
817 |
-
*
|
818 |
-
* @param int $post_id
|
819 |
* @return void
|
820 |
*/
|
821 |
public function save_post($post_id) {
|
822 |
-
|
823 |
// Save button pressed
|
824 |
-
if(!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
825 |
return;
|
826 |
-
|
827 |
// Only sidebar type
|
828 |
-
if(get_post_type($post_id) !=
|
829 |
-
return;
|
830 |
-
|
831 |
// Verify nonce
|
832 |
-
if (!check_admin_referer(
|
833 |
return;
|
834 |
-
|
835 |
// Check permissions
|
836 |
-
if (!current_user_can(
|
837 |
return;
|
838 |
-
|
839 |
// Check autosave
|
840 |
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
841 |
return;
|
842 |
-
|
843 |
// Load metadata
|
844 |
$this->_init_metadata();
|
845 |
-
|
846 |
// Update metadata
|
847 |
-
foreach ($this->metadata as $field) {
|
848 |
$new = isset($_POST[$field['id']]) ? $_POST[$field['id']] : '';
|
849 |
-
$old = get_post_meta($post_id, self::
|
850 |
-
|
851 |
-
if ($new != '' && $new != $old) {
|
852 |
-
update_post_meta($post_id, self::
|
853 |
} elseif ($new == '' && $old != '') {
|
854 |
-
delete_post_meta($post_id, self::
|
855 |
-
}
|
856 |
-
}
|
857 |
-
// Update module data
|
858 |
-
foreach ($this->modules as $module) {
|
859 |
-
$new = isset($_POST[$module->get_id()]) ? $_POST[$module->get_id()] : '';
|
860 |
-
$old = array_flip(get_post_meta($post_id, self::prefix.$module->get_id(), false));
|
861 |
-
|
862 |
-
if(is_array($new)) {
|
863 |
-
// Skip existing data or insert new data
|
864 |
-
foreach($new as $new_single) {
|
865 |
-
if(isset($old[$new_single])) {
|
866 |
-
unset($old[$new_single]);
|
867 |
-
} else {
|
868 |
-
add_post_meta($post_id, self::prefix.$module->get_id(), $new_single);
|
869 |
-
}
|
870 |
-
}
|
871 |
-
// Remove existing data that have not been skipped
|
872 |
-
foreach($old as $old_key => $old_value) {
|
873 |
-
delete_post_meta($post_id, self::prefix.$module->get_id(), $old_key);
|
874 |
-
}
|
875 |
-
} elseif(!empty($old)) {
|
876 |
-
// Remove any old values when $new is empty
|
877 |
-
delete_post_meta($post_id, self::prefix.$module->get_id());
|
878 |
}
|
879 |
}
|
880 |
}
|
881 |
-
|
882 |
-
/**
|
883 |
-
*
|
884 |
-
* @param int $term_id
|
885 |
-
* @param int $tt_id
|
886 |
-
* @param string $taxonomy
|
887 |
-
* @return void
|
888 |
-
*/
|
889 |
-
public function term_ancestry_check($term_id, $tt_id, $taxonomy) {
|
890 |
-
|
891 |
-
if(is_taxonomy_hierarchical($taxonomy)) {
|
892 |
-
$term = get_term($term_id, $taxonomy);
|
893 |
-
//var_dump($term);
|
894 |
-
}
|
895 |
-
|
896 |
-
// Save button pressed
|
897 |
-
// if(!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
898 |
-
// return;
|
899 |
-
//
|
900 |
-
// // Check autosave
|
901 |
-
// if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
902 |
-
// return;
|
903 |
-
|
904 |
-
//$post = get_post($post_id);
|
905 |
-
|
906 |
-
// Only other types than sidebar
|
907 |
-
// if(get_post_type($post_id) == 'sidebar')
|
908 |
-
// return;
|
909 |
-
|
910 |
-
|
911 |
|
912 |
-
}
|
913 |
-
|
914 |
/**
|
915 |
-
*
|
916 |
* Database data update module
|
917 |
-
*
|
918 |
*/
|
919 |
public function db_update() {
|
920 |
-
cas_run_db_update(self::
|
921 |
}
|
922 |
-
|
923 |
/**
|
924 |
-
*
|
925 |
* Load scripts and styles for administration
|
926 |
-
*
|
927 |
-
* @
|
928 |
*/
|
929 |
public function load_admin_scripts($hook) {
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
if($hook == 'post.php' || $hook == 'post-new.php') {
|
935 |
-
// WordPress < 3.3 does not have jQuery UI accordion
|
936 |
-
if(get_bloginfo('version') < 3.3) {
|
937 |
-
wp_register_script('cas-jquery-ui-accordion', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/js/jquery.ui.accordion.js', array('jquery-ui-core','jquery-ui-widget'), '1.8.9', true);
|
938 |
-
wp_enqueue_script('cas-jquery-ui-accordion');
|
939 |
-
} else {
|
940 |
-
wp_enqueue_script('jquery-ui-accordion');
|
941 |
-
}
|
942 |
-
wp_enqueue_script('cas_admin_script');
|
943 |
|
944 |
-
|
945 |
-
|
946 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
}
|
948 |
-
|
949 |
}
|
950 |
|
951 |
/**
|
952 |
-
*
|
953 |
* Load dependencies
|
954 |
-
*
|
955 |
*/
|
956 |
private function _load_dependencies() {
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
require_once('modules/abstract.php');
|
961 |
-
|
962 |
-
}
|
963 |
-
|
964 |
-
/**
|
965 |
-
*
|
966 |
-
* Flush rewrite rules on plugin activation
|
967 |
-
*
|
968 |
-
*/
|
969 |
-
public function plugin_activation() {
|
970 |
-
$this->init_sidebar_type();
|
971 |
-
flush_rewrite_rules();
|
972 |
-
}
|
973 |
-
|
974 |
-
/**
|
975 |
-
*
|
976 |
-
* Flush rewrite rules on plugin deactivation
|
977 |
-
*
|
978 |
-
*/
|
979 |
-
public function plugin_deactivation() {
|
980 |
-
flush_rewrite_rules();
|
981 |
}
|
982 |
-
|
983 |
}
|
984 |
|
985 |
// Launch plugin
|
986 |
-
|
987 |
-
$ca_sidebars = new ContentAwareSidebars();
|
988 |
|
989 |
/**
|
990 |
-
*
|
991 |
-
*
|
992 |
-
*
|
993 |
-
* @global object $ca_sidebars
|
994 |
-
* @param array|string $args
|
995 |
*/
|
996 |
function display_ca_sidebar($args = array()) {
|
997 |
-
|
998 |
-
$ca_sidebars->manual_sidebar($args);
|
999 |
}
|
|
|
|
7 |
Plugin Name: Content Aware Sidebars
|
8 |
Plugin URI: http://www.intox.dk/
|
9 |
Description: Manage and show sidebars according to the content being viewed.
|
10 |
+
Version: 2.0.3
|
11 |
+
Author: Joachim Jensen, Intox Studio
|
12 |
Author URI: http://www.intox.dk/
|
13 |
Text Domain: content-aware-sidebars
|
14 |
Domain Path: /lang/
|
15 |
+
License: GPLv3
|
16 |
|
17 |
+
Content Aware Sidebars Plugin
|
18 |
+
Copyright (C) 2011-2014 Joachim Jensen - jv@intox.dk
|
19 |
|
20 |
+
This program is free software: you can redistribute it and/or modify
|
21 |
+
it under the terms of the GNU General Public License as published by
|
22 |
+
the Free Software Foundation, either version 3 of the License, or
|
23 |
+
(at your option) any later version.
|
24 |
|
25 |
+
This program is distributed in the hope that it will be useful,
|
26 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
27 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
28 |
+
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
You should have received a copy of the GNU General Public License
|
31 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
32 |
*/
|
33 |
|
34 |
final class ContentAwareSidebars {
|
35 |
|
36 |
+
/**
|
37 |
+
* Database version for update module
|
38 |
+
*/
|
39 |
+
const DB_VERSION = '2.0';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Plugin version
|
43 |
+
*/
|
44 |
+
const PLUGIN_VERSION = '2.0.3';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Prefix for data (keys) stored in database
|
48 |
+
*/
|
49 |
+
const PREFIX = '_cas_';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Prefix for sidebar id
|
53 |
+
*/
|
54 |
+
const SIDEBAR_PREFIX = 'ca-sidebar-';
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Post Type for sidebars
|
58 |
+
*/
|
59 |
+
const TYPE_SIDEBAR = 'sidebar';
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Post Type for sidebar groups
|
63 |
+
*/
|
64 |
+
const TYPE_CONDITION_GROUP = 'sidebar_group';
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Language domain
|
68 |
+
*/
|
69 |
+
const DOMAIN = 'content-aware-sidebars';
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Capability to manage sidebars
|
73 |
+
*/
|
74 |
+
const CAPABILITY = 'edit_theme_options';
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Sidebar metadata
|
78 |
+
* @var array
|
79 |
+
*/
|
80 |
private $metadata = array();
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Store all sidebars here
|
84 |
+
* @var array
|
85 |
+
*/
|
86 |
+
private $sidebars = array();
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Sidebars retrieved from database
|
90 |
+
* @var array
|
91 |
+
*/
|
92 |
private $sidebar_cache = array();
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Modules for specific content or cases
|
96 |
+
* @var array
|
97 |
+
*/
|
98 |
private $modules = array();
|
99 |
|
100 |
/**
|
101 |
+
* Instance of class
|
102 |
+
* @var ContentAwareSidebars
|
103 |
+
*/
|
104 |
+
private static $_instance;
|
105 |
+
|
106 |
+
/**
|
107 |
* Constructor
|
|
|
108 |
*/
|
109 |
public function __construct() {
|
110 |
+
|
111 |
+
//__('Manage and show sidebars according to the content being viewed.',self::DOMAIN);
|
112 |
+
//__('Content Aware Sidebars',self::DOMAIN);
|
|
|
|
|
113 |
|
114 |
$this->_load_dependencies();
|
115 |
+
|
116 |
// WordPress Hooks. Somewhat ordered by execution
|
117 |
|
118 |
+
//For administration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
if(is_admin()) {
|
|
|
120 |
|
121 |
+
add_action('wp_loaded', array(&$this,'db_update'));
|
122 |
+
add_action('admin_enqueue_scripts', array(&$this,'load_admin_scripts'));
|
123 |
+
add_action('delete_post', array(&$this,'remove_sidebar_widgets'));
|
124 |
+
add_action('delete_post', array(&$this,'cascade_sidebar_delete'));
|
125 |
+
add_action('save_post', array(&$this,'save_post'));
|
126 |
+
add_action('add_meta_boxes_'.self::TYPE_SIDEBAR, array(&$this,'create_meta_boxes'));
|
127 |
+
add_action('in_admin_header', array(&$this,'clear_admin_menu'),99);
|
128 |
+
|
129 |
+
add_action('transition_post_status', array(&$this,'cascade_sidebar_status'),10,3);
|
130 |
+
|
131 |
+
add_filter('request', array(&$this,'admin_column_orderby'));
|
132 |
+
add_filter('default_hidden_meta_boxes', array(&$this,'change_default_hidden'),10,2);
|
133 |
+
add_filter('manage_edit-'.self::TYPE_SIDEBAR.'_columns', array(&$this,'admin_column_headers'),99);
|
134 |
+
add_filter('manage_edit-'.self::TYPE_SIDEBAR.'_sortable_columns',array(&$this,'admin_column_sortable_headers'));
|
135 |
+
add_filter('manage_posts_custom_column', array(&$this,'admin_column_rows'),10,3);
|
136 |
+
add_filter('post_row_actions', array(&$this,'sidebar_row_actions'),10,2);
|
137 |
+
add_filter('post_updated_messages', array(&$this,'sidebar_updated_messages'));
|
138 |
+
|
139 |
+
add_action('wp_ajax_cas_add_group', array(&$this,'add_sidebar_group_ajax'));
|
140 |
+
add_action('wp_ajax_cas_add_rule', array(&$this,'add_sidebar_rule_ajax'));
|
141 |
+
add_action('wp_ajax_cas_remove_group', array(&$this,'remove_sidebar_group_ajax'));
|
142 |
+
|
143 |
+
//For frontend
|
144 |
} else {
|
145 |
+
|
146 |
+
add_filter('wp', array(&$this,'replace_sidebar'));
|
147 |
+
|
148 |
}
|
149 |
+
|
150 |
+
//For both
|
151 |
+
add_action('init', array(&$this,'deploy_modules'));
|
152 |
+
add_action('init', array(&$this,'init_sidebar_type'),99);
|
153 |
+
add_action('widgets_init', array(&$this,'create_sidebars'),99);
|
154 |
+
add_action('wp_loaded', array(&$this,'update_sidebars'),99);
|
155 |
|
156 |
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Instantiates and returns class singleton
|
160 |
+
* @return ContentAwareSidebars
|
161 |
+
*/
|
162 |
+
public static function instance() {
|
163 |
+
if(!self::$_instance) {
|
164 |
+
self::$_instance = new self();
|
165 |
+
}
|
166 |
+
return self::$_instance;
|
167 |
+
}
|
168 |
|
169 |
/**
|
|
|
170 |
* Deploy modules
|
171 |
+
* @return void
|
172 |
*/
|
173 |
public function deploy_modules() {
|
174 |
+
|
175 |
+
load_plugin_textdomain(self::DOMAIN, false, dirname(plugin_basename(__FILE__)).'/lang/');
|
176 |
|
177 |
+
// List builtin modules
|
|
|
|
|
178 |
$modules = array(
|
179 |
+
'static' => true,
|
180 |
+
'post_type' => true,
|
181 |
+
'author' => true,
|
182 |
+
'page_template' => true,
|
183 |
+
'taxonomy' => true,
|
184 |
+
'url' => false,
|
185 |
+
'bbpress' => function_exists('bbp_get_version'), // bbPress
|
186 |
+
'bp_member' => defined('BP_VERSION'), // BuddyPress
|
187 |
+
'polylang' => defined('POLYLANG_VERSION'), // Polylang
|
188 |
+
'qtranslate' => defined('QT_SUPPORTED_WP_VERSION'), // qTranslate
|
189 |
+
'transposh' => defined('TRANSPOSH_PLUGIN_VER'), // Transposh Translation Filter
|
190 |
+
'wpml' => class_exists('SitePress') // WPML Multilingual Blog/CMS
|
191 |
);
|
192 |
+
//Let developers remove builtin modules or add their own
|
193 |
+
$modules = apply_filters('cas-module-pre-deploy',$modules);
|
194 |
|
195 |
// Forge modules
|
196 |
foreach($modules as $name => $enabled) {
|
197 |
+
if($enabled) {
|
198 |
+
if(is_bool($enabled) && include('modules/'.$name .'.php')) {
|
199 |
+
$class = 'CASModule_'.$name;
|
200 |
+
$obj = new $class;
|
201 |
+
} else if(class_exists((string)$enabled)) {
|
202 |
+
$obj = new $enabled;
|
203 |
+
if(!($obj instanceof CASModule)) {
|
204 |
+
continue;
|
205 |
+
}
|
206 |
+
} else {
|
207 |
+
continue;
|
208 |
+
}
|
209 |
+
|
210 |
+
$this->modules[$obj->get_id()] = $obj;
|
211 |
}
|
212 |
}
|
213 |
|
214 |
}
|
215 |
|
216 |
/**
|
|
|
217 |
* Create post meta fields
|
|
|
|
|
218 |
* @global array $wp_registered_sidebars
|
219 |
+
* @return void
|
220 |
*/
|
221 |
private function _init_metadata() {
|
222 |
+
global $wp_registered_sidebars;
|
223 |
+
|
224 |
// List of sidebars
|
225 |
$sidebar_list = array();
|
226 |
foreach($wp_registered_sidebars as $sidebar) {
|
227 |
+
$sidebar_list[$sidebar['id']] = $sidebar['name'];
|
|
|
228 |
}
|
229 |
+
|
230 |
// Meta fields
|
231 |
$this->metadata['exposure'] = array(
|
232 |
+
'name' => __('Exposure', self::DOMAIN),
|
233 |
'id' => 'exposure',
|
234 |
'desc' => '',
|
235 |
'val' => 1,
|
236 |
'type' => 'select',
|
237 |
'list' => array(
|
238 |
+
__('Singular', self::DOMAIN),
|
239 |
+
__('Singular & Archive', self::DOMAIN),
|
240 |
+
__('Archive', self::DOMAIN)
|
241 |
)
|
242 |
);
|
243 |
$this->metadata['handle'] = array(
|
244 |
+
'name' => _x('Handle','option', self::DOMAIN),
|
245 |
'id' => 'handle',
|
246 |
+
'desc' => __('Replace host sidebar, merge with it or add sidebar manually.', self::DOMAIN),
|
247 |
'val' => 0,
|
248 |
'type' => 'select',
|
249 |
'list' => array(
|
250 |
+
__('Replace', self::DOMAIN),
|
251 |
+
__('Merge', self::DOMAIN),
|
252 |
+
__('Manual', self::DOMAIN)
|
253 |
)
|
254 |
);
|
255 |
$this->metadata['host'] = array(
|
256 |
+
'name' => __('Host Sidebar', self::DOMAIN),
|
257 |
'id' => 'host',
|
258 |
'desc' => '',
|
259 |
'val' => 'sidebar-1',
|
261 |
'list' => $sidebar_list
|
262 |
);
|
263 |
$this->metadata['merge-pos'] = array(
|
264 |
+
'name' => __('Merge position', self::DOMAIN),
|
265 |
'id' => 'merge-pos',
|
266 |
+
'desc' => __('Place sidebar on top or bottom of host when merging.', self::DOMAIN),
|
267 |
'val' => 1,
|
268 |
'type' => 'select',
|
269 |
'list' => array(
|
270 |
+
__('Top', self::DOMAIN),
|
271 |
+
__('Bottom', self::DOMAIN)
|
272 |
)
|
273 |
);
|
274 |
|
275 |
}
|
276 |
|
277 |
/**
|
278 |
+
* Create sidebar post type and filter group post type
|
279 |
+
* @return void
|
|
|
280 |
*/
|
281 |
public function init_sidebar_type() {
|
282 |
+
|
283 |
+
$capabilities = array(
|
284 |
+
'edit_post' => self::CAPABILITY,
|
285 |
+
'read_post' => self::CAPABILITY,
|
286 |
+
'delete_post' => self::CAPABILITY,
|
287 |
+
'edit_posts' => self::CAPABILITY,
|
288 |
+
'edit_others_posts' => self::CAPABILITY,
|
289 |
+
'publish_posts' => self::CAPABILITY,
|
290 |
+
'read_private_posts' => self::CAPABILITY
|
291 |
+
);
|
292 |
|
293 |
// Register the sidebar type
|
294 |
+
register_post_type(self::TYPE_SIDEBAR,array(
|
295 |
'labels' => array(
|
296 |
+
'name' => __('Sidebars', self::DOMAIN),
|
297 |
+
'singular_name' => __('Sidebar', self::DOMAIN),
|
298 |
+
'add_new' => _x('Add New', 'sidebar', self::DOMAIN),
|
299 |
+
'add_new_item' => __('Add New Sidebar', self::DOMAIN),
|
300 |
+
'edit_item' => __('Edit Sidebar', self::DOMAIN),
|
301 |
+
'new_item' => __('New Sidebar', self::DOMAIN),
|
302 |
+
'all_items' => __('All Sidebars', self::DOMAIN),
|
303 |
+
'view_item' => __('View Sidebar', self::DOMAIN),
|
304 |
+
'search_items' => __('Search Sidebars', self::DOMAIN),
|
305 |
+
'not_found' => __('No sidebars found', self::DOMAIN),
|
306 |
+
'not_found_in_trash' => __('No sidebars found in Trash', self::DOMAIN)
|
307 |
),
|
308 |
+
'capabilities' => $capabilities,
|
309 |
+
'show_ui' => true,
|
310 |
+
'show_in_menu' => true, //current_user_can(self::CAPABILITY),
|
311 |
+
'query_var' => false,
|
312 |
+
'rewrite' => false,
|
313 |
+
'menu_position' => 25.099, //less probable to be overwritten
|
314 |
+
'supports' => array('title','page-attributes'),
|
315 |
+
'menu_icon' => plugins_url('/img/icon-16.png', __FILE__ )
|
316 |
+
));
|
317 |
+
|
318 |
+
// Register the condition group type
|
319 |
+
register_post_type(self::TYPE_CONDITION_GROUP,array(
|
320 |
+
'labels' => array(
|
321 |
+
'name' => __('Condition Groups', self::DOMAIN),
|
322 |
+
'singular_name' => __('Condition Group', self::DOMAIN),
|
323 |
+
'add_new' => _x('Add New', 'group', self::DOMAIN),
|
324 |
+
'add_new_item' => __('Add New Group', self::DOMAIN),
|
325 |
+
'edit_item' => _x('Edit', 'group', self::DOMAIN),
|
326 |
+
'new_item' => '',
|
327 |
+
'all_items' => '',
|
328 |
+
'view_item' => '',
|
329 |
+
'search_items' => '',
|
330 |
+
'not_found' => '',
|
331 |
+
'not_found_in_trash' => ''
|
332 |
),
|
333 |
+
'capabilities' => $capabilities,
|
334 |
+
'show_ui' => false,
|
335 |
+
'show_in_menu' => false,
|
336 |
'query_var' => false,
|
337 |
'rewrite' => false,
|
338 |
+
'supports' => array('author'), //prevents fallback
|
|
|
|
|
|
|
339 |
));
|
340 |
}
|
341 |
|
342 |
/**
|
|
|
343 |
* Create update messages
|
|
|
344 |
* @global object $post
|
345 |
+
* @param array $messages
|
346 |
+
* @return array
|
347 |
*/
|
348 |
public function sidebar_updated_messages( $messages ) {
|
349 |
+
$messages[self::TYPE_SIDEBAR] = array(
|
|
|
350 |
0 => '',
|
351 |
+
1 => __('Sidebar updated.',self::DOMAIN).sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets',self::DOMAIN)),
|
352 |
2 => '',
|
353 |
3 => '',
|
354 |
+
4 => __('Sidebar updated.',self::DOMAIN),
|
355 |
5 => '',
|
356 |
+
6 => __('Sidebar published.',self::DOMAIN).sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets',self::DOMAIN)),
|
357 |
+
7 => __('Sidebar saved.',self::DOMAIN),
|
358 |
+
8 => __('Sidebar submitted.',self::DOMAIN).sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets',self::DOMAIN)),
|
359 |
+
9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>.',self::DOMAIN).' <a href="%2$s">%3$s</a>',
|
360 |
+
// translators: Publish box date format, see http://php.net/date
|
361 |
+
date_i18n(__('M j, Y @ G:i'),strtotime(get_the_ID())),
|
362 |
+
'widgets.php',
|
363 |
+
__('Manage widgets',self::DOMAIN)),
|
364 |
+
10 => __('Sidebar draft updated.',self::DOMAIN),
|
365 |
);
|
366 |
return $messages;
|
367 |
}
|
368 |
|
369 |
/**
|
370 |
+
* Add sidebars to widgets area
|
371 |
+
* Triggered in widgets_init to save location for each theme
|
372 |
+
* @return void
|
373 |
*/
|
374 |
+
public function create_sidebars() {
|
375 |
+
$this->sidebars = get_posts(array(
|
376 |
+
'numberposts' => -1,
|
377 |
+
'post_type' => self::TYPE_SIDEBAR,
|
378 |
+
'post_status' => array('publish','private','future')
|
379 |
+
));
|
380 |
+
|
381 |
+
//Register sidebars to add them to the list
|
382 |
+
foreach($this->sidebars as $post) {
|
383 |
+
register_sidebar( array(
|
384 |
+
'name' => $post->post_title,
|
385 |
+
'id' => self::SIDEBAR_PREFIX.$post->ID
|
386 |
+
));
|
387 |
}
|
388 |
}
|
389 |
|
390 |
/**
|
391 |
+
* Update the created sidebars with metadata
|
392 |
+
* @return void
|
|
|
393 |
*/
|
394 |
+
public function update_sidebars() {
|
395 |
|
396 |
+
//Init metadata
|
397 |
+
$this->_init_metadata();
|
398 |
+
|
399 |
+
//Now reregister sidebars with proper content
|
400 |
+
foreach($this->sidebars as $post) {
|
401 |
+
|
402 |
+
$handle = get_post_meta($post->ID,self::PREFIX . 'handle', true);
|
403 |
+
//$handle = $post->{self::PREFIX . 'handle'};
|
404 |
+
$desc = $this->metadata['handle']['list'][$handle];
|
405 |
+
|
406 |
+
if ($handle < 2) {
|
407 |
+
$host = get_post_meta($post->ID, self::PREFIX . 'host', true);
|
408 |
+
$desc .= ": " . (isset($this->metadata['host']['list'][$host]) ? $this->metadata['host']['list'][$host] : __('Please update Host Sidebar', self::DOMAIN) );
|
409 |
+
}
|
410 |
register_sidebar( array(
|
411 |
'name' => $post->post_title,
|
412 |
+
'description' => $desc,
|
413 |
+
'id' => self::SIDEBAR_PREFIX.$post->ID,
|
414 |
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
415 |
'after_widget' => '</li>',
|
416 |
'before_title' => '<h3 class="widget-title">',
|
417 |
'after_title' => '</h3>',
|
418 |
));
|
419 |
+
}
|
420 |
}
|
421 |
|
422 |
/**
|
|
|
423 |
* Add admin column headers
|
424 |
+
* @param array $columns
|
425 |
+
* @return array
|
|
|
426 |
*/
|
427 |
public function admin_column_headers($columns) {
|
428 |
+
// Totally discard current columns and rebuild
|
429 |
+
return array(
|
430 |
+
'cb' => $columns['cb'],
|
431 |
+
'title' => $columns['title'],
|
432 |
+
'exposure' => __('Exposure', self::DOMAIN),
|
433 |
+
'handle' => _x('Handle','option', self::DOMAIN),
|
434 |
+
'merge-pos' => __('Merge position', self::DOMAIN),
|
435 |
+
'date' => $columns['date']
|
|
|
|
|
|
|
436 |
);
|
437 |
}
|
438 |
|
439 |
/**
|
|
|
440 |
* Make some columns sortable
|
441 |
+
* @param array $columns
|
442 |
+
* @return array
|
|
|
443 |
*/
|
444 |
public function admin_column_sortable_headers($columns) {
|
445 |
return array_merge(
|
447 |
'exposure' => 'exposure',
|
448 |
'handle' => 'handle',
|
449 |
'merge-pos' => 'merge-pos'
|
450 |
+
), $columns
|
|
|
451 |
);
|
452 |
}
|
453 |
|
454 |
/**
|
|
|
455 |
* Manage custom column sorting
|
456 |
+
* @param array $vars
|
|
|
457 |
* @return array
|
458 |
*/
|
459 |
public function admin_column_orderby($vars) {
|
460 |
+
if (isset($vars['orderby']) && in_array($vars['orderby'], array('exposure', 'handle', 'merge-pos'))) {
|
461 |
+
$vars = array_merge($vars, array(
|
462 |
+
'meta_key' => self::PREFIX . $vars['orderby'],
|
463 |
+
'orderby' => 'meta_value'
|
464 |
+
));
|
465 |
}
|
466 |
return $vars;
|
467 |
}
|
468 |
|
469 |
/**
|
|
|
470 |
* Add admin column rows
|
471 |
+
* @param string $column_name
|
472 |
+
* @param int $post_id
|
473 |
+
* @return void
|
|
|
474 |
*/
|
475 |
+
public function admin_column_rows($column_name, $post_id) {
|
476 |
+
|
477 |
+
if (get_post_type($post_id) != self::TYPE_SIDEBAR)
|
478 |
return;
|
479 |
+
|
480 |
// Load metadata
|
481 |
+
if (!$this->metadata)
|
482 |
+
$this->_init_metadata();
|
483 |
+
|
484 |
+
$current = get_post_meta($post_id, self::PREFIX . $column_name, true);
|
485 |
+
$current_from_list = "";
|
486 |
+
|
487 |
+
if(isset($this->metadata[$column_name]['list'][$current])) {
|
488 |
+
|
489 |
+
$current_from_list = $this->metadata[$column_name]['list'][$current];
|
490 |
+
|
491 |
+
if ($column_name == 'handle' && $current < 2) {
|
492 |
+
$host = get_post_meta($post_id, self::PREFIX . 'host', true);
|
493 |
+
$current_from_list .= ": " . (isset($this->metadata['host']['list'][$host]) ? $this->metadata['host']['list'][$host] : '<span style="color:red;">' . __('Please update Host Sidebar', self::DOMAIN) . '</span>');
|
494 |
+
}
|
495 |
+
|
496 |
+
}
|
497 |
|
|
|
|
|
|
|
|
|
498 |
echo $current_from_list;
|
499 |
}
|
500 |
|
501 |
/**
|
|
|
502 |
* Remove widget when its sidebar is removed
|
503 |
+
* @param int $post_id
|
504 |
+
* @return void
|
|
|
505 |
*/
|
506 |
public function remove_sidebar_widgets($post_id) {
|
507 |
+
|
508 |
// Authenticate and only continue on sidebar post type
|
509 |
+
if (!current_user_can(self::CAPABILITY) || get_post_type($post_id) != self::TYPE_SIDEBAR)
|
510 |
return;
|
511 |
+
|
512 |
+
$id = self::SIDEBAR_PREFIX . $post_id;
|
513 |
+
|
514 |
//Get widgets
|
515 |
$sidebars_widgets = wp_get_sidebars_widgets();
|
516 |
+
|
517 |
// Check if sidebar exists in database
|
518 |
+
if (!isset($sidebars_widgets[$id]))
|
519 |
return;
|
520 |
+
|
521 |
// Remove widgets settings from sidebar
|
522 |
+
foreach ($sidebars_widgets[$id] as $widget_id) {
|
523 |
+
$widget_type = preg_replace('/-[0-9]+$/', '', $widget_id);
|
524 |
+
$widget_settings = get_option('widget_' . $widget_type);
|
525 |
+
$widget_id = substr($widget_id, strpos($widget_id, '-') + 1);
|
526 |
+
if ($widget_settings && isset($widget_settings[$widget_id])) {
|
527 |
unset($widget_settings[$widget_id]);
|
528 |
+
update_option('widget_' . $widget_type, $widget_settings);
|
529 |
}
|
530 |
}
|
531 |
+
|
532 |
// Remove sidebar
|
533 |
unset($sidebars_widgets[$id]);
|
534 |
wp_set_sidebars_widgets($sidebars_widgets);
|
535 |
+
}
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Delete condition groups for
|
539 |
+
* a sidebar that is deleted
|
540 |
+
* @author Joachim Jensen <jv@intox.dk>
|
541 |
+
* @since 2.0
|
542 |
+
* @param int $post_id
|
543 |
+
* @return void
|
544 |
+
*/
|
545 |
+
public function cascade_sidebar_delete($post_id) {
|
546 |
+
|
547 |
+
// Authenticate and only continue on sidebar post type
|
548 |
+
if (!current_user_can(self::CAPABILITY) || get_post_type($post_id) != self::TYPE_SIDEBAR)
|
549 |
+
return;
|
550 |
+
|
551 |
+
global $wpdb;
|
552 |
+
$groups = (array)$wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = '%d'", $post_id));
|
553 |
+
foreach($groups as $group_id) {
|
554 |
+
//Takes care of metadata and terms too
|
555 |
+
wp_delete_post($group_id,true);
|
556 |
+
}
|
557 |
+
|
558 |
}
|
559 |
|
560 |
/**
|
|
|
561 |
* Add admin rows actions
|
562 |
+
* @param array $actions
|
563 |
+
* @param WP_Post $post
|
564 |
+
* @return array
|
|
|
565 |
*/
|
566 |
public function sidebar_row_actions($actions, $post) {
|
567 |
+
if ($post->post_type == self::TYPE_SIDEBAR && $post->post_status != 'trash') {
|
568 |
+
$new_actions['mng_widgets'] = '<a href="widgets.php" title="' . esc_attr__('Manage Widgets', self::DOMAIN) . '">' . __('Manage Widgets', self::DOMAIN) . '</a>';
|
569 |
+
//Append new actions just before trash action
|
570 |
+
array_splice($actions, -1, 0, $new_actions);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
}
|
572 |
return $actions;
|
573 |
}
|
574 |
|
575 |
/**
|
576 |
+
* Replace or merge a sidebar with content aware sidebars.
|
577 |
+
* Handles sidebars with hosts
|
|
|
|
|
578 |
* @global array $_wp_sidebars_widgets
|
579 |
* @return void
|
580 |
*/
|
581 |
public function replace_sidebar() {
|
582 |
global $_wp_sidebars_widgets;
|
583 |
+
|
584 |
$posts = $this->get_sidebars();
|
585 |
+
if (!$posts)
|
586 |
return;
|
587 |
+
|
588 |
+
foreach ($posts as $post) {
|
589 |
+
|
590 |
+
$id = self::SIDEBAR_PREFIX . $post->ID;
|
591 |
+
$host = get_post_meta($post->ID, self::PREFIX . 'host', true);
|
592 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
// Check for correct handling and if host exist
|
594 |
if ($post->handle == 2 || !isset($_wp_sidebars_widgets[$host]))
|
595 |
continue;
|
596 |
+
|
597 |
// Sidebar might not have any widgets. Get it anyway!
|
598 |
+
if (!isset($_wp_sidebars_widgets[$id]))
|
599 |
$_wp_sidebars_widgets[$id] = array();
|
600 |
+
|
601 |
// If host has already been replaced, merge with it instead. Might change in future.
|
602 |
+
if ($post->handle || isset($handled_already[$host])) {
|
603 |
+
if (get_post_meta($post->ID, self::PREFIX . 'merge-pos', true))
|
604 |
+
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host], $_wp_sidebars_widgets[$id]);
|
605 |
else
|
606 |
+
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id], $_wp_sidebars_widgets[$host]);
|
607 |
} else {
|
608 |
$_wp_sidebars_widgets[$host] = $_wp_sidebars_widgets[$id];
|
609 |
$handled_already[$host] = 1;
|
610 |
+
}
|
611 |
}
|
612 |
}
|
613 |
|
614 |
/**
|
|
|
615 |
* Show manually handled content aware sidebars
|
|
|
616 |
* @global array $_wp_sidebars_widgets
|
617 |
+
* @param string|array $args
|
618 |
+
* @return void
|
619 |
*/
|
620 |
public function manual_sidebar($args) {
|
621 |
global $_wp_sidebars_widgets;
|
622 |
+
|
623 |
// Grab args or defaults
|
624 |
+
$args = wp_parse_args($args, array(
|
625 |
+
'include' => '',
|
626 |
+
'before' => '<div id="sidebar" class="widget-area"><ul class="xoxo">',
|
627 |
+
'after' => '</ul></div>'
|
628 |
));
|
629 |
+
extract($args, EXTR_SKIP);
|
630 |
|
631 |
// Get sidebars
|
632 |
$posts = $this->get_sidebars();
|
633 |
+
if (!$posts)
|
634 |
return;
|
635 |
|
636 |
// Handle include argument
|
637 |
+
if (!empty($include)) {
|
638 |
+
if (!is_array($include))
|
639 |
+
$include = explode(',', $include);
|
640 |
// Fast lookup
|
641 |
$include = array_flip($include);
|
642 |
}
|
643 |
|
644 |
+
$i = $host = 0;
|
645 |
+
foreach ($posts as $post) {
|
646 |
|
647 |
+
$id = self::SIDEBAR_PREFIX . $post->ID;
|
648 |
|
649 |
// Check for manual handling, if sidebar exists and if id should be included
|
650 |
if ($post->handle != 2 || !isset($_wp_sidebars_widgets[$id]) || (!empty($include) && !isset($include[$post->ID])))
|
651 |
continue;
|
652 |
|
653 |
// Merge if more than one. First one is host.
|
654 |
+
if ($i > 0) {
|
655 |
+
if (get_post_meta($post->ID, self::PREFIX . 'merge-pos', true))
|
656 |
+
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host], $_wp_sidebars_widgets[$id]);
|
657 |
else
|
658 |
+
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id], $_wp_sidebars_widgets[$host]);
|
659 |
} else {
|
660 |
$host = $id;
|
661 |
}
|
668 |
echo $after;
|
669 |
}
|
670 |
}
|
671 |
+
|
672 |
/**
|
|
|
673 |
* Query sidebars according to content
|
|
|
674 |
* @global type $wpdb
|
675 |
* @return array|boolean
|
676 |
*/
|
687 |
else
|
688 |
return $this->sidebar_cache;
|
689 |
}
|
690 |
+
|
691 |
+
$context_data['WHERE'] = $context_data['JOIN'] = $context_data['EXCLUDE'] = array();
|
692 |
+
$context_data = apply_filters('cas-context-data',$context_data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
|
694 |
// Check if there are any rules for this type of content
|
695 |
+
if(empty($context_data['WHERE']))
|
696 |
return false;
|
697 |
|
698 |
+
$context_data['WHERE'][] = "posts.post_type = '".self::TYPE_CONDITION_GROUP."'";
|
699 |
+
$context_data['WHERE'][] = "posts.post_status ".(current_user_can('read_private_posts') ? "IN('publish','private')" : "= 'publish'")."";
|
700 |
+
|
701 |
+
//Syntax changed in MySQL 5.6
|
702 |
+
$wpdb->query('SET'.(version_compare($wpdb->db_version(), '5.6', '>=') ? '' : ' OPTION').' SQL_BIG_SELECTS = 1');
|
703 |
+
|
704 |
+
$sidebars_in_context = $wpdb->get_results("
|
705 |
SELECT
|
706 |
+
posts.ID, posts.post_parent
|
|
|
707 |
FROM $wpdb->posts posts
|
708 |
+
".implode(' ',$context_data['JOIN'])."
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
WHERE
|
710 |
+
".implode(' AND ',$context_data['WHERE'])."
|
711 |
+
",OBJECT_K);
|
712 |
+
|
713 |
+
$valid = array();
|
714 |
+
|
715 |
+
//Force update of meta cache to prevent lazy loading
|
716 |
+
update_meta_cache('post',array_keys($sidebars_in_context));
|
717 |
+
|
718 |
+
//Exclude sidebars that have unrelated content in same group
|
719 |
+
foreach($sidebars_in_context as $key => $sidebar) {
|
720 |
+
$valid[$sidebar->ID] = $sidebar->post_parent;
|
721 |
+
//TODO: move to modules
|
722 |
+
foreach($context_data['EXCLUDE'] as $exclude) {
|
723 |
+
//quick fix to check for taxonomies terms
|
724 |
+
if($exclude == 'taxonomies') {
|
725 |
+
if($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE object_id = '{$sidebar->ID}'") > 0) {
|
726 |
+
unset($valid[$sidebar->ID]);
|
727 |
+
break;
|
728 |
+
}
|
729 |
+
}
|
730 |
+
if(get_post_custom_values(self::PREFIX . $exclude, $sidebar->ID) !== null) {
|
731 |
+
unset($valid[$sidebar->ID]);
|
732 |
+
break;
|
733 |
+
}
|
734 |
+
}
|
735 |
+
|
736 |
+
}
|
737 |
+
|
738 |
+
if(!empty($valid)) {
|
739 |
+
|
740 |
+
$context_data = array();
|
741 |
+
$context_data['JOIN'][] = "INNER JOIN $wpdb->postmeta handle ON handle.post_id = posts.ID AND handle.meta_key = '".self::PREFIX."handle'";
|
742 |
+
$context_data['JOIN'][] = "INNER JOIN $wpdb->postmeta exposure ON exposure.post_id = posts.ID AND exposure.meta_key = '".self::PREFIX."exposure'";
|
743 |
+
$context_data['WHERE'][] = "posts.post_type = '".self::TYPE_SIDEBAR."'";
|
744 |
+
$context_data['WHERE'][] = "exposure.meta_value ".(is_archive() || is_home() ? '>' : '<')."= '1'";
|
745 |
+
$context_data['WHERE'][] = "posts.post_status ".(current_user_can('read_private_posts') ? "IN('publish','private')" : "= 'publish'")."";
|
746 |
+
$context_data['WHERE'][] = "posts.ID IN(".implode(',',$valid).")";
|
747 |
+
|
748 |
+
$this->sidebar_cache = $wpdb->get_results("
|
749 |
+
SELECT
|
750 |
+
posts.ID,
|
751 |
+
handle.meta_value handle
|
752 |
+
FROM $wpdb->posts posts
|
753 |
+
".implode(' ',$context_data['JOIN'])."
|
754 |
+
WHERE
|
755 |
+
".implode(' AND ',$context_data['WHERE'])."
|
756 |
+
ORDER BY posts.menu_order ASC, handle.meta_value DESC, posts.post_date DESC
|
757 |
+
");
|
758 |
+
|
759 |
+
}
|
760 |
|
761 |
// Return proper cache. If query was empty, tell the cache.
|
762 |
return (empty($this->sidebar_cache) ? $this->sidebar_cache[0] = false : $this->sidebar_cache);
|
763 |
|
764 |
}
|
765 |
+
|
766 |
+
/**
|
767 |
+
* Remove unwanted meta boxes
|
768 |
+
* @return void
|
769 |
+
*/
|
770 |
+
public function clear_admin_menu() {
|
771 |
+
global $wp_meta_boxes;
|
772 |
+
|
773 |
+
$screen = get_current_screen();
|
774 |
+
|
775 |
+
// Post type not set on all pages in WP3.1
|
776 |
+
if(!(isset($screen->post_type) && $screen->post_type == self::TYPE_SIDEBAR && $screen->base == 'post'))
|
777 |
+
return;
|
778 |
+
|
779 |
+
// Names of whitelisted meta boxes
|
780 |
+
$whitelist = array(
|
781 |
+
'cas-support' => 'cas-support',
|
782 |
+
'cas-groups' => 'cas-groups',
|
783 |
+
'cas-rules' => 'cas-rules',
|
784 |
+
'cas-options' => 'cas-options',
|
785 |
+
'submitdiv' => 'submitdiv',
|
786 |
+
'pageparentdiv' => 'pageparentdiv',
|
787 |
+
'slugdiv' => 'slugdiv'
|
788 |
+
);
|
789 |
+
|
790 |
+
// Loop through context (normal,advanced,side)
|
791 |
+
foreach($wp_meta_boxes[self::TYPE_SIDEBAR] as $context_k => $context_v) {
|
792 |
+
// Loop through priority (high,core,default,low)
|
793 |
+
foreach($context_v as $priority_k => $priority_v) {
|
794 |
+
// Loop through boxes
|
795 |
+
foreach($priority_v as $box_k => $box_v) {
|
796 |
+
// If box is not whitelisted, remove it
|
797 |
+
if(!in_array($box_k,$whitelist)) {
|
798 |
+
$wp_meta_boxes[self::TYPE_SIDEBAR][$context_k][$priority_k][$box_k] = false;
|
799 |
+
//unset($whitelist[$box_k]);
|
800 |
+
}
|
801 |
+
}
|
802 |
+
}
|
803 |
+
}
|
804 |
+
}
|
805 |
+
|
806 |
/**
|
|
|
807 |
* Meta boxes for sidebar edit
|
808 |
+
* @global object $post
|
809 |
+
* @return void
|
810 |
*/
|
811 |
public function create_meta_boxes() {
|
812 |
|
813 |
+
// Remove ability to set self to host
|
814 |
+
if(get_the_ID())
|
815 |
+
unset($this->metadata['host']['list'][self::SIDEBAR_PREFIX.get_the_ID()]);
|
816 |
|
817 |
+
$boxes = array(
|
818 |
+
//About
|
819 |
+
array(
|
820 |
+
'id' => 'cas-support',
|
821 |
+
'title' => __('Support the Author of Content Aware Sidebars', self::DOMAIN),
|
822 |
+
'callback' => 'meta_box_author_words',
|
823 |
+
'context' => 'normal',
|
824 |
+
'priority' => 'high'
|
825 |
+
),
|
826 |
+
//Content
|
827 |
+
array(
|
828 |
+
'id' => 'cas-rules',
|
829 |
+
'title' => __('Content', self::DOMAIN),
|
830 |
+
'callback' => 'meta_box_rules',
|
831 |
+
'context' => 'normal',
|
832 |
+
'priority' => 'high'
|
833 |
+
),
|
834 |
+
//Options
|
835 |
+
array(
|
836 |
+
'id' => 'cas-options',
|
837 |
+
'title' => __('Options', self::DOMAIN),
|
838 |
+
'callback' => 'meta_box_options',
|
839 |
+
'context' => 'side',
|
840 |
+
'priority' => 'default'
|
841 |
+
),
|
|
|
|
|
|
|
842 |
);
|
843 |
+
|
844 |
+
//Add meta boxes
|
845 |
+
foreach($boxes as $box) {
|
846 |
+
add_meta_box(
|
847 |
+
$box['id'],
|
848 |
+
$box['title'],
|
849 |
+
array(&$this, $box['callback']),
|
850 |
+
self::TYPE_SIDEBAR,
|
851 |
+
$box['context'],
|
852 |
+
$box['priority']
|
853 |
+
);
|
854 |
+
}
|
855 |
+
|
856 |
}
|
857 |
|
|
|
858 |
/**
|
|
|
859 |
* Hide some meta boxes from start
|
860 |
+
* @param array $hidden
|
861 |
+
* @param object $screen
|
|
|
862 |
* @return array
|
863 |
*/
|
864 |
+
public function change_default_hidden($hidden, $screen) {
|
865 |
+
|
866 |
+
if ($screen->post_type == self::TYPE_SIDEBAR && get_user_option('metaboxhidden_sidebar') === false) {
|
867 |
+
|
868 |
+
$hidden_meta_boxes = array('pageparentdiv');
|
869 |
+
$hidden = array_merge($hidden, $hidden_meta_boxes);
|
870 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
871 |
$user = wp_get_current_user();
|
872 |
+
update_user_option($user->ID, 'metaboxhidden_sidebar', $hidden, true);
|
|
|
873 |
}
|
874 |
return $hidden;
|
875 |
}
|
876 |
+
|
877 |
+
/**
|
878 |
+
* Meta box for content rules
|
879 |
+
* @return void
|
880 |
+
*/
|
881 |
public function meta_box_rules() {
|
882 |
+
|
883 |
+
echo '<div id="cas-container">'."\n";
|
884 |
+
echo '<div id="cas-accordion" class="accordion-container postbox">'."\n";
|
885 |
+
echo '<ul class="outer-border">';
|
886 |
+
do_action('cas-module-admin-box');
|
887 |
+
echo '</ul>';
|
888 |
+
echo '</div>'."\n";
|
889 |
+
echo '<div id="cas-groups" class="postbox">'."\n";
|
890 |
+
echo '<div class="cas-groups-header"><h3>'.__('Condition Groups',self::DOMAIN).'</h3><input type="button" class="button button-primary js-cas-group-new" value="'.__('Add New Group',self::DOMAIN).'" /></div>';
|
891 |
+
echo '<div class="cas-groups-body"><p>'.__('Click to edit a group or create a new one. Select content on the left to add it. In each group, you can combine different types of associated content.',self::DOMAIN).'</p>';
|
892 |
+
echo '<h4>'.__('Display sidebar with',self::DOMAIN).':</h4>';
|
893 |
+
echo '<ul>';
|
894 |
+
$groups = $this->_get_sidebar_groups(null,true);
|
895 |
+
|
896 |
+
$i = 0;
|
897 |
+
foreach($groups as $group) {
|
898 |
+
|
899 |
+
echo '<li class="cas-group-single'.($i == 0 ? ' cas-group-active' : '').'">
|
900 |
+
<span class="cas-group-control cas-group-control-active">
|
901 |
+
<input type="button" class="button button-primary js-cas-group-save" value="'.__('Save',self::DOMAIN).'" /> | <a class="js-cas-group-cancel" href="#">'.__('Cancel',self::DOMAIN).'</a>
|
902 |
+
</span>
|
903 |
+
<span class="cas-group-control">
|
904 |
+
<input type="button" class="js-cas-group-edit button" value="'._x('Edit','group',self::DOMAIN).'" /> | <a class="submitdelete trash js-cas-group-remove" href="#">'.__('Remove',self::DOMAIN).'</a>
|
905 |
+
</span>
|
906 |
+
<div class="cas-content">';
|
907 |
+
do_action('cas-module-print-data',$group->ID);
|
908 |
+
echo '</div>
|
909 |
+
<input type="hidden" class="cas_group_id" name="cas_group_id" value="'.$group->ID.'" />';
|
910 |
+
|
911 |
+
echo '</li>';
|
912 |
+
$i++;
|
913 |
}
|
914 |
+
echo '</ul></div>';
|
915 |
+
echo '<div class="cas-groups-footer">';
|
916 |
+
echo '<input type="button" class="button button-primary js-cas-group-new" value="'.__('Add New Group',self::DOMAIN).'" />';
|
917 |
+
echo '</div>';
|
918 |
+
echo '</div>'."\n";
|
919 |
echo '</div>'."\n";
|
920 |
|
921 |
}
|
922 |
+
|
923 |
+
/**
|
924 |
+
* Insert new condition group for sidebar
|
925 |
+
* Uses current sidebar per default
|
926 |
+
* @author Joachim Jensen <jv@intox.dk>
|
927 |
+
* @since 2.0
|
928 |
+
* @param WP_Post|int $post
|
929 |
+
* @return int
|
930 |
+
*/
|
931 |
+
private function _add_sidebar_group($post_id = null) {
|
932 |
+
$post = get_post($post_id);
|
933 |
+
|
934 |
+
$status = $post->post_status;
|
935 |
+
//Make sure to go from auto-draft to draft
|
936 |
+
if($status == 'auto-draft') {
|
937 |
+
$status = 'draft';
|
938 |
+
wp_update_post( array(
|
939 |
+
'ID' => $post->ID,
|
940 |
+
'post_status' => $status
|
941 |
+
));
|
942 |
+
}
|
943 |
+
|
944 |
+
return wp_insert_post(array(
|
945 |
+
'post_status' => $status,
|
946 |
+
'post_type' => self::TYPE_CONDITION_GROUP,
|
947 |
+
'post_author' => $post->post_author,
|
948 |
+
'post_parent' => $post->ID,
|
949 |
+
));
|
950 |
+
}
|
951 |
+
|
952 |
+
/**
|
953 |
+
* Get condition groups for sidebar
|
954 |
+
* Uses current sidebar per default
|
955 |
+
* Creates the first group if necessary
|
956 |
+
* @author Joachim Jensen <jv@intox.dk>
|
957 |
+
* @since 2.0
|
958 |
+
* @param WP_Post|int $post_id
|
959 |
+
* @param boolean $create_first
|
960 |
+
* @return array
|
961 |
+
*/
|
962 |
+
private function _get_sidebar_groups($post_id = null, $create_first = false) {
|
963 |
+
$post = get_post($post_id);
|
964 |
+
|
965 |
+
$groups = get_posts(array(
|
966 |
+
'posts_per_page' => -1,
|
967 |
+
'post_type' => self::TYPE_CONDITION_GROUP,
|
968 |
+
'post_parent' => $post->ID,
|
969 |
+
'post_status' => 'any',
|
970 |
+
'order' => 'ASC'
|
971 |
+
));
|
972 |
+
if($groups == null && $create_first) {
|
973 |
+
$group = $this->_add_sidebar_group($post);
|
974 |
+
$groups[] = get_post($group);
|
975 |
+
}
|
976 |
+
|
977 |
+
return $groups;
|
978 |
+
|
979 |
+
}
|
980 |
+
|
981 |
+
/**
|
982 |
+
* AJAX call to add filters to a group
|
983 |
+
* @author Joachim Jensen <jv@intox.dk>
|
984 |
+
* @since 2.0
|
985 |
+
* @return void
|
986 |
+
*/
|
987 |
+
public function add_sidebar_rule_ajax() {
|
988 |
+
|
989 |
+
try {
|
990 |
+
if(!isset($_POST['current_id']) || !isset($_POST['cas_group_id'])) {
|
991 |
+
echo "Unauthorized request";
|
992 |
+
throw new Exception("Forbidden",403);
|
993 |
+
}
|
994 |
+
|
995 |
+
if(!check_ajax_referer(self::SIDEBAR_PREFIX.$_POST['current_id'],'token',false)) {
|
996 |
+
echo "Unauthorized request";
|
997 |
+
throw new Exception("Forbidden",403);
|
998 |
+
}
|
999 |
+
|
1000 |
+
$post_id = intval($_POST['cas_group_id']);
|
1001 |
+
|
1002 |
+
// Update module data
|
1003 |
+
do_action('cas-module-save-data',$post_id);
|
1004 |
+
|
1005 |
+
echo json_encode(array(
|
1006 |
+
'message' => __('Condition group saved',self::DOMAIN),
|
1007 |
+
"POST" => $_POST,
|
1008 |
+
"GROUP_ID" => $post_id
|
1009 |
+
));
|
1010 |
+
|
1011 |
+
} catch(Exception $e) {
|
1012 |
+
header("HTTP/1.1 ".$e->getCode()." ".$e->getMessage());
|
1013 |
+
}
|
1014 |
+
die();
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
/**
|
1018 |
+
* AJAX call to add a group to a sidebar
|
1019 |
+
* @author Joachim Jensen <jv@intox.dk>
|
1020 |
+
* @since 2.0
|
1021 |
+
* @return void
|
1022 |
+
*/
|
1023 |
+
public function add_sidebar_group_ajax() {
|
1024 |
+
|
1025 |
+
try {
|
1026 |
+
if(!isset($_POST['current_id'])) {
|
1027 |
+
echo "Unauthorized request";
|
1028 |
+
throw new Exception("Forbidden",403);
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
if(!check_ajax_referer(self::SIDEBAR_PREFIX.$_POST['current_id'],'token',false)) {
|
1032 |
+
echo "Unauthorized request";
|
1033 |
+
throw new Exception("Forbidden",403);
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
$group = $this->_add_sidebar_group(intval($_POST['current_id']));
|
1037 |
+
|
1038 |
+
if(!$group) {
|
1039 |
+
echo "Condition group could not be created";
|
1040 |
+
throw new Exception("Internal Server Error",500);
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
echo json_encode(array(
|
1044 |
+
'message' => __('Condition group added',self::DOMAIN),
|
1045 |
+
'group' => $group
|
1046 |
+
));
|
1047 |
+
|
1048 |
+
} catch(Exception $e) {
|
1049 |
+
header("HTTP/1.1 ".$e->getCode()." ".$e->getMessage());
|
1050 |
+
}
|
1051 |
+
die();
|
1052 |
+
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/**
|
1056 |
+
* AJAX call to remove group from a sidebar
|
1057 |
+
* @author Joachim Jensen <jv@intox.dk>
|
1058 |
+
* @since 2.0
|
1059 |
+
* @return void
|
1060 |
+
*/
|
1061 |
+
public function remove_sidebar_group_ajax() {
|
1062 |
+
|
1063 |
+
try {
|
1064 |
+
if(!isset($_POST['current_id']) || !isset($_POST['cas_group_id'])) {
|
1065 |
+
echo "Unauthorized request";
|
1066 |
+
throw new Exception("Forbidden",403);
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
if(!check_ajax_referer(self::SIDEBAR_PREFIX.$_POST['current_id'],'token',false)) {
|
1070 |
+
echo "Unauthorized request";
|
1071 |
+
throw new Exception("Forbidden",403);
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
if(wp_delete_post(intval($_POST['cas_group_id']), true) === false) {
|
1075 |
+
echo "Condition group could not be removed";
|
1076 |
+
throw new Exception("Internal Server Error",500);
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
echo json_encode(array(
|
1080 |
+
'message' => __('Condition group removed',self::DOMAIN)
|
1081 |
+
));
|
1082 |
+
|
1083 |
+
} catch(Exception $e) {
|
1084 |
+
header("HTTP/1.1 ".$e->getCode()." ".$e->getMessage());
|
1085 |
+
}
|
1086 |
+
die();
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
/**
|
1090 |
+
* Whenever a sidebar changes post_status
|
1091 |
+
* Cascade that status to its groups
|
1092 |
+
* @author Joachim Jensen <jv@intox.dk>
|
1093 |
+
* @since 2.0
|
1094 |
+
* @param string $new_status
|
1095 |
+
* @param string $old_status
|
1096 |
+
* @param WP_Post $post
|
1097 |
+
* @return void
|
1098 |
+
*/
|
1099 |
+
public function cascade_sidebar_status($new_status, $old_status, $post) {
|
1100 |
+
if($post->post_type == self::TYPE_SIDEBAR && $old_status != $new_status) {
|
1101 |
+
global $wpdb;
|
1102 |
+
$wpdb->query("
|
1103 |
+
UPDATE $wpdb->posts
|
1104 |
+
SET post_status = '".$new_status."'
|
1105 |
+
WHERE post_parent = '".$post->ID."' AND post_type = '".self::TYPE_CONDITION_GROUP."'
|
1106 |
+
");
|
1107 |
+
}
|
1108 |
+
}
|
1109 |
|
1110 |
/**
|
1111 |
+
* Meta box for options
|
1112 |
+
* @return void
|
|
|
1113 |
*/
|
1114 |
public function meta_box_options() {
|
1115 |
+
|
1116 |
$columns = array(
|
1117 |
'exposure',
|
1118 |
'handle' => 'handle,host',
|
1119 |
'merge-pos'
|
1120 |
);
|
1121 |
+
|
1122 |
+
foreach ($columns as $key => $value) {
|
1123 |
+
|
1124 |
+
echo '<span>' . $this->metadata[is_numeric($key) ? $value : $key]['name'] . ':';
|
1125 |
echo '<p>';
|
1126 |
+
$values = explode(',', $value);
|
1127 |
+
foreach ($values as $val) {
|
1128 |
$this->_form_field($val);
|
1129 |
}
|
1130 |
echo '</p></span>';
|
1131 |
}
|
1132 |
}
|
1133 |
+
|
1134 |
/**
|
1135 |
+
* Meta box for author words
|
1136 |
+
* @return void
|
|
|
1137 |
*/
|
1138 |
public function meta_box_author_words() {
|
1139 |
+
|
1140 |
+
// Use nonce for verification. Unique per sidebar
|
1141 |
+
wp_nonce_field(self::SIDEBAR_PREFIX.get_the_ID(), '_ca-sidebar-nonce');
|
1142 |
+
echo '<input type="hidden" id="current_sidebar" value="'.get_the_ID().'" />';
|
1143 |
+
?>
|
1144 |
+
<div style="overflow:hidden;">
|
1145 |
+
<div style="float:left;width:40%;overflow:hidden">
|
1146 |
+
<p><strong><?php _e('If you love this plugin, please consider donating to support future development.', self::DOMAIN); ?></strong></p>
|
1147 |
+
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KPZHE6A72LEN4&lc=US&item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"
|
1148 |
+
target="_blank" title="PayPal - The safer, easier way to pay online!">
|
1149 |
+
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" width="147" height="47" alt="PayPal - The safer, easier way to pay online!">
|
1150 |
+
</a>
|
1151 |
+
|
1152 |
+
</p>
|
1153 |
+
</div>
|
1154 |
+
<div style="float:left;width:40%;">
|
1155 |
+
<p><strong><?php _e('Or you could:',self::DOMAIN); ?></strong></p>
|
1156 |
+
<ul>
|
1157 |
+
<li><a href="http://wordpress.org/support/view/plugin-reviews/content-aware-sidebars?rate=5#postform" target="_blank"><?php _e('Rate the plugin on WordPress.org',self::DOMAIN); ?></a></li>
|
1158 |
+
<li><a href="http://wordpress.org/extend/plugins/content-aware-sidebars/" target="_blank"><?php _e('Link to the plugin page',self::DOMAIN); ?></a></li>
|
1159 |
+
<li><a href="http://wordpress.org/extend/plugins/content-aware-sidebars/" target="_blank"><?php _e('Translate the plugin into your language',self::DOMAIN); ?></a></li>
|
1160 |
+
</ul>
|
1161 |
+
</div>
|
1162 |
+
<div style="float:left;width:20%;">
|
1163 |
+
<p><a href="https://twitter.com/intoxstudio" class="twitter-follow-button" data-show-count="false">Follow @intoxstudio</a>
|
1164 |
+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
|
1165 |
+
<p>
|
1166 |
+
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fintoxstudio&width=450&height=21&colorscheme=light&layout=button_count&action=like&show_faces=false&send=false&appId=436031373100972" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
|
1167 |
+
</p>
|
1168 |
+
</div>
|
1169 |
+
</div>
|
1170 |
<?php
|
1171 |
}
|
1172 |
+
|
1173 |
/**
|
|
|
1174 |
* Create form field for metadata
|
|
|
1175 |
* @global object $post
|
1176 |
+
* @param array $setting
|
1177 |
+
* @return void
|
1178 |
*/
|
1179 |
private function _form_field($setting) {
|
1180 |
+
|
1181 |
+
$meta = get_post_meta(get_the_ID(), self::PREFIX . $setting, true);
|
|
|
1182 |
$setting = $this->metadata[$setting];
|
1183 |
$current = $meta != '' ? $meta : $setting['val'];
|
1184 |
+
switch ($setting['type']) {
|
1185 |
+
case 'select' :
|
1186 |
+
echo '<select style="width:250px;" name="' . $setting['id'] . '">' . "\n";
|
1187 |
+
foreach ($setting['list'] as $key => $value) {
|
1188 |
+
echo '<option value="' . $key . '"' . selected($current,$key,false) . '>' . $value . '</option>' . "\n";
|
1189 |
}
|
1190 |
+
echo '</select>' . "\n";
|
1191 |
break;
|
1192 |
case 'checkbox' :
|
1193 |
+
echo '<ul>' . "\n";
|
1194 |
+
foreach ($setting['list'] as $key => $value) {
|
1195 |
+
echo '<li><label><input type="checkbox" name="' . $setting['id'] . '[]" value="' . $key . '"' . (in_array($key, $current) ? ' checked="checked"' : '') . ' /> ' . $value . '</label></li>' . "\n";
|
1196 |
}
|
1197 |
+
echo '</ul>' . "\n";
|
1198 |
break;
|
1199 |
case 'text' :
|
1200 |
default :
|
1201 |
+
echo '<input style="width:200px;" type="text" name="' . $setting['id'] . '" value="' . $current . '" />' . "\n";
|
1202 |
break;
|
1203 |
}
|
1204 |
}
|
1205 |
+
|
1206 |
/**
|
|
|
1207 |
* Save meta values for post
|
1208 |
+
* @param int $post_id
|
|
|
1209 |
* @return void
|
1210 |
*/
|
1211 |
public function save_post($post_id) {
|
1212 |
+
|
1213 |
// Save button pressed
|
1214 |
+
if (!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
1215 |
return;
|
1216 |
+
|
1217 |
// Only sidebar type
|
1218 |
+
if (get_post_type($post_id) != self::TYPE_SIDEBAR)
|
1219 |
+
return;
|
1220 |
+
|
1221 |
// Verify nonce
|
1222 |
+
if (!check_admin_referer(self::SIDEBAR_PREFIX.$post_id, '_ca-sidebar-nonce'))
|
1223 |
return;
|
1224 |
+
|
1225 |
// Check permissions
|
1226 |
+
if (!current_user_can(self::CAPABILITY, $post_id))
|
1227 |
return;
|
1228 |
+
|
1229 |
// Check autosave
|
1230 |
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
1231 |
return;
|
1232 |
+
|
1233 |
// Load metadata
|
1234 |
$this->_init_metadata();
|
1235 |
+
|
1236 |
// Update metadata
|
1237 |
+
foreach ($this->metadata as $field) {
|
1238 |
$new = isset($_POST[$field['id']]) ? $_POST[$field['id']] : '';
|
1239 |
+
$old = get_post_meta($post_id, self::PREFIX . $field['id'], true);
|
1240 |
+
|
1241 |
+
if ($new != '' && $new != $old) {
|
1242 |
+
update_post_meta($post_id, self::PREFIX . $field['id'], $new);
|
1243 |
} elseif ($new == '' && $old != '') {
|
1244 |
+
delete_post_meta($post_id, self::PREFIX . $field['id'], $old);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1245 |
}
|
1246 |
}
|
1247 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1248 |
|
|
|
|
|
1249 |
/**
|
|
|
1250 |
* Database data update module
|
1251 |
+
* @return void
|
1252 |
*/
|
1253 |
public function db_update() {
|
1254 |
+
cas_run_db_update(self::DB_VERSION);
|
1255 |
}
|
1256 |
+
|
1257 |
/**
|
|
|
1258 |
* Load scripts and styles for administration
|
1259 |
+
* @param string $hook
|
1260 |
+
* @return void
|
1261 |
*/
|
1262 |
public function load_admin_scripts($hook) {
|
1263 |
+
|
1264 |
+
$current_screen = get_current_screen();
|
1265 |
+
|
1266 |
+
if($current_screen->post_type == self::TYPE_SIDEBAR) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1267 |
|
1268 |
+
wp_register_script('cas_admin_script', plugins_url('/js/cas_admin.js', __FILE__), array('jquery'), self::PLUGIN_VERSION, true);
|
1269 |
+
wp_register_style('cas_admin_style', plugins_url('/css/style.css', __FILE__), array(), self::PLUGIN_VERSION);
|
1270 |
+
|
1271 |
+
//Sidebar editor
|
1272 |
+
if ($current_screen->base == 'post') {
|
1273 |
+
|
1274 |
+
if(!wp_script_is('accordion','registered')) {
|
1275 |
+
wp_register_script('accordion', plugins_url('/js/accordion.min.js', __FILE__), array('jquery'), self::PLUGIN_VERSION, true);
|
1276 |
+
}
|
1277 |
+
wp_enqueue_script('accordion');
|
1278 |
+
wp_enqueue_script('cas_admin_script');
|
1279 |
+
wp_localize_script( 'cas_admin_script', 'CASAdmin', array(
|
1280 |
+
'save' => __('Save',self::DOMAIN),
|
1281 |
+
'cancel' => __('Cancel',self::DOMAIN),
|
1282 |
+
'edit' => _x('Edit','group',self::DOMAIN),
|
1283 |
+
'remove' => __('Remove',self::DOMAIN),
|
1284 |
+
'confirmRemove' => __('Remove this group and its contents permanently?',self::DOMAIN),
|
1285 |
+
'noResults' => __('No results found.',self::DOMAIN)
|
1286 |
+
));
|
1287 |
+
wp_enqueue_style('cas_admin_style');
|
1288 |
+
//Sidebar overview
|
1289 |
+
} else if ($hook == 'edit.php') {
|
1290 |
+
wp_enqueue_style('cas_admin_style');
|
1291 |
+
}
|
1292 |
}
|
1293 |
+
|
1294 |
}
|
1295 |
|
1296 |
/**
|
|
|
1297 |
* Load dependencies
|
1298 |
+
* @return void
|
1299 |
*/
|
1300 |
private function _load_dependencies() {
|
1301 |
+
require('walker.php');
|
1302 |
+
require('update_db.php');
|
1303 |
+
require('modules/abstract.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1304 |
}
|
1305 |
+
|
1306 |
}
|
1307 |
|
1308 |
// Launch plugin
|
1309 |
+
ContentAwareSidebars::instance();
|
|
|
1310 |
|
1311 |
/**
|
1312 |
+
* Template wrapper to display content aware sidebars
|
1313 |
+
* @param array|string $args
|
1314 |
+
* @return void
|
|
|
|
|
1315 |
*/
|
1316 |
function display_ca_sidebar($args = array()) {
|
1317 |
+
ContentAwareSidebars::instance()->manual_sidebar($args);
|
|
|
1318 |
}
|
1319 |
+
|
1320 |
+
//eol
|
css/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**/
|
css/style.css
CHANGED
@@ -7,70 +7,231 @@
|
|
7 |
background:transparent url('../img/icon-32.png') no-repeat !important;
|
8 |
}
|
9 |
|
10 |
-
#cas-rules
|
11 |
-
|
12 |
}
|
13 |
|
14 |
-
#cas-rules
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
overflow:hidden;
|
16 |
margin:0;
|
17 |
padding:0;
|
18 |
}
|
19 |
|
20 |
-
#cas-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
margin:0;
|
25 |
-
background-color:#ececec;
|
26 |
-
display:block;
|
27 |
-
outline: none;
|
28 |
}
|
29 |
|
30 |
-
#cas-accordion
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
-
#cas-accordion
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
|
42 |
-
.cas-
|
43 |
-
|
44 |
-
border-
|
45 |
-
|
46 |
-
|
47 |
-
background-color:#dfdfdf !important;
|
48 |
}
|
49 |
|
50 |
-
#cas-accordion .
|
51 |
-
|
|
|
|
|
52 |
}
|
53 |
|
54 |
-
#cas-accordion .
|
55 |
-
|
56 |
-
|
57 |
-
border-color:#c0c0c0 #fff #cfcfcf !important;
|
58 |
-
box-shadow:inset 0 2px 1px 0 #cfcfcf;
|
59 |
}
|
60 |
|
61 |
-
#cas-accordion .
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
-
#cas-accordion .tabs {
|
69 |
-
border-color
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
.cas-tick {
|
73 |
background-image:url('../img/tick.png'); /* Icon by fatcow.com */
|
74 |
background-repeat: no-repeat;
|
75 |
background-position: 8px center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
7 |
background:transparent url('../img/icon-32.png') no-repeat !important;
|
8 |
}
|
9 |
|
10 |
+
#cas-rules > .handlediv, #cas-rules > .hndle {
|
11 |
+
display:none;
|
12 |
}
|
13 |
|
14 |
+
#cas-rules.postbox {
|
15 |
+
background:none;
|
16 |
+
border:none;
|
17 |
+
box-shadow: none;
|
18 |
+
}
|
19 |
+
|
20 |
+
#cas-rules > .inside {
|
21 |
overflow:hidden;
|
22 |
margin:0;
|
23 |
padding:0;
|
24 |
}
|
25 |
|
26 |
+
#cas-container {
|
27 |
+
overflow:hidden;
|
28 |
+
width:100%;
|
29 |
+
}
|
30 |
+
|
31 |
+
#cas-accordion {
|
32 |
+
float:left;
|
33 |
+
width:280px;
|
34 |
+
}
|
35 |
+
|
36 |
+
#cas-accordion .outer-border {
|
37 |
margin:0;
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
+
#cas-accordion.accordion-container .accordion-section:first-child,
|
41 |
+
#cas-accordion.accordion-container .accordion-section:first-child h3,
|
42 |
+
#cas-accordion.accordion-container .top,
|
43 |
+
#cas-accordion.accordion-container .top h3 {
|
44 |
+
border-top-left-radius: 3px;
|
45 |
+
border-top-right-radius: 3px;
|
46 |
}
|
47 |
|
48 |
+
#cas-accordion.accordion-container .accordion-section:last-child,
|
49 |
+
#cas-accordion.accordion-container .accordion-section:last-child .accordion-section-content,
|
50 |
+
#cas-accordion.accordion-container .bottom,
|
51 |
+
#cas-accordion.accordion-container .bottom:not(.open) h3 {
|
52 |
+
border-bottom-left-radius: 3px;
|
53 |
+
border-bottom-right-radius: 3px;
|
54 |
}
|
55 |
|
56 |
+
.js #cas-accordion .accordion-section-title {
|
57 |
+
cursor: pointer;
|
58 |
+
border-radius:0!important;
|
59 |
+
box-shadow:none!important;
|
60 |
+
border-bottom-width: 0;
|
|
|
61 |
}
|
62 |
|
63 |
+
#cas-accordion .accordion-section-title {
|
64 |
+
padding: 10px 20px;
|
65 |
+
margin:0!important;
|
66 |
+
overflow:hidden;
|
67 |
}
|
68 |
|
69 |
+
#cas-accordion .accordion-section-content {
|
70 |
+
padding: 18px 13px;
|
71 |
+
font-size: 14px;
|
|
|
|
|
72 |
}
|
73 |
|
74 |
+
#cas-accordion .accordion-section {
|
75 |
+
margin:0;
|
76 |
+
}
|
77 |
+
|
78 |
+
.js #cas-accordion .accordion-section:not(.open) .accordion-section-content {
|
79 |
+
display:none;
|
80 |
+
}
|
81 |
+
|
82 |
+
#cas-accordion ul.category-tabs {
|
83 |
+
width:auto;
|
84 |
+
}
|
85 |
+
|
86 |
+
#cas-accordion ul.category-tabs li {
|
87 |
+
padding: 3px 5px 5px;
|
88 |
+
border-style: solid;
|
89 |
+
border-width: 1px;
|
90 |
+
position: relative;
|
91 |
+
display: inline-block;
|
92 |
+
line-height: 1.35em;
|
93 |
+
margin:0;
|
94 |
+
border-color: #fff
|
95 |
}
|
96 |
|
97 |
+
#cas-accordion ul.category-tabs li.tabs {
|
98 |
+
border-color: #DFDFDF #DFDFDF #FFFFFF
|
99 |
+
}
|
100 |
+
|
101 |
+
#cas-accordion .tabs-panel {
|
102 |
+
overflow:auto;
|
103 |
+
clear:both;
|
104 |
}
|
105 |
|
106 |
.cas-tick {
|
107 |
background-image:url('../img/tick.png'); /* Icon by fatcow.com */
|
108 |
background-repeat: no-repeat;
|
109 |
background-position: 8px center;
|
110 |
+
}
|
111 |
+
|
112 |
+
.cas-contentlist .children li {
|
113 |
+
padding-left:20px;
|
114 |
+
}
|
115 |
+
|
116 |
+
#cas-accordion .button-controls {
|
117 |
+
overflow:hidden;
|
118 |
+
}
|
119 |
+
|
120 |
+
.add-to-group {
|
121 |
+
float:right;
|
122 |
+
}
|
123 |
+
|
124 |
+
#cas-groups {
|
125 |
+
box-sizing:border-box;
|
126 |
+
-moz-box-sizing:border-box;
|
127 |
+
-webkit-box-sizing:border-box;
|
128 |
+
-o-box-sizing:border-box;
|
129 |
+
-ms-box-sizing:border-box;
|
130 |
+
|
131 |
+
margin-left:300px;
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
#cas-groups h3 {
|
136 |
+
cursor:auto;
|
137 |
+
display:inline-block;
|
138 |
+
border:none;
|
139 |
+
padding:0;
|
140 |
+
line-height:2;
|
141 |
+
background:none;
|
142 |
+
box-shadow: none;
|
143 |
+
}
|
144 |
+
|
145 |
+
.cas-groups-header, .cas-groups-footer {
|
146 |
+
background: none repeat scroll 0 0 #F5F5F5;
|
147 |
+
padding: 6px 10px;
|
148 |
+
overflow:hidden;
|
149 |
+
}
|
150 |
+
|
151 |
+
.cas-groups-header .button, .cas-groups-footer .button {
|
152 |
+
float:right;
|
153 |
+
}
|
154 |
+
|
155 |
+
.cas-groups-header {
|
156 |
+
border-bottom:1px solid #DFDFDF;
|
157 |
+
}
|
158 |
+
|
159 |
+
.cas-groups-footer {
|
160 |
+
border-top:1px solid #DFDFDF;
|
161 |
+
}
|
162 |
+
|
163 |
+
.cas-groups-body {
|
164 |
+
padding:8px 10px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.cas-groups-body .success {
|
168 |
+
border:2px solid #7AD03A;
|
169 |
+
padding:6px 10px;
|
170 |
+
}
|
171 |
+
|
172 |
+
.cas-groups-body .error {
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
.cas-group-single.cas-group-active {
|
177 |
+
box-shadow: inset 0 0 0 2px #B3D6E6;
|
178 |
+
}
|
179 |
+
|
180 |
+
.cas-group-single {
|
181 |
+
-webkit-box-sizing:border-box;
|
182 |
+
-moz-box-sizing:border-box;
|
183 |
+
-ms-box-sizing:border-box;
|
184 |
+
box-sizing:border-box;
|
185 |
+
border-width:1px;
|
186 |
+
border-style:solid;
|
187 |
+
border-color:#cfcfcf;
|
188 |
+
padding:5px;
|
189 |
+
overflow:hidden;
|
190 |
+
}
|
191 |
+
|
192 |
+
.cas-group-single .cas-group-control {
|
193 |
+
display:inline;
|
194 |
+
float:right;
|
195 |
+
height:30px;
|
196 |
+
line-height:25px;
|
197 |
+
}
|
198 |
+
|
199 |
+
.cas-group-active .cas-group-control {
|
200 |
+
display:none;
|
201 |
+
}
|
202 |
+
|
203 |
+
.cas-group-single .cas-group-control-active {
|
204 |
+
display:none;
|
205 |
+
}
|
206 |
+
|
207 |
+
.cas-group-active .cas-group-control-active {
|
208 |
+
display:inline;
|
209 |
+
}
|
210 |
+
|
211 |
+
.cas-group-single:not(.cas-group-active) label {
|
212 |
+
cursor:auto;
|
213 |
+
}
|
214 |
+
|
215 |
+
.cas-group-single:not(.cas-group-active) input[type="checkbox"] {
|
216 |
+
display:none;
|
217 |
+
}
|
218 |
+
|
219 |
+
.cas-group-single .submitdelete {
|
220 |
+
color:#BC0B0B;
|
221 |
+
}
|
222 |
+
|
223 |
+
.cas-group-single li {
|
224 |
+
list-style: disc inside;
|
225 |
+
}
|
226 |
+
|
227 |
+
.cas-group-single li.cas-new {
|
228 |
+
background:#F6F3E4;
|
229 |
+
}
|
230 |
+
|
231 |
+
.cas-group-single.cas-group-active li {
|
232 |
+
list-style:none;
|
233 |
+
}
|
234 |
+
|
235 |
+
.cas-condition {
|
236 |
+
padding:0 0 5px;
|
237 |
}
|
img/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**/
|
index.php
CHANGED
@@ -1 +1,2 @@
|
|
1 |
<?php
|
|
1 |
<?php
|
2 |
+
/**/
|
js/accordion.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a){function b(){d.removeClass("top bottom"),d.filter(":visible").first().addClass("top"),d.filter(":visible").last().addClass("bottom").find(e).addClass("bottom")}function c(a){var c=a.closest(".accordion-section"),d=c.closest(".accordion-container").find(".open"),f=c.find(e);c.hasClass("cannot-expand")||(c.hasClass("open")?(c.toggleClass("open"),f.toggle(!0).slideToggle(150)):(d.removeClass("open"),d.find(e).show().slideUp(150),f.toggle(!1).slideToggle(150),c.toggleClass("open")),b())}a(document).ready(function(){a(".accordion-container").on("click keydown",".accordion-section-title",function(b){("keydown"!==b.type||13===b.which)&&(b.preventDefault(),c(a(this)))}),a(".hide-postbox-tog").click(function(){b()})});var d=a(".accordion-container li.accordion-section"),e=a(".accordion-section-content");b()}(jQuery);
|
js/cas_admin.js
CHANGED
@@ -3,89 +3,465 @@
|
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
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 |
-
function handleSidebarHandle() {
|
60 |
-
|
61 |
-
var name = "select[name='handle']";
|
62 |
-
|
63 |
-
// Execute on ready
|
64 |
-
$(name).each(function(){
|
65 |
-
endisableHostSidebars($(this));
|
66 |
-
});
|
67 |
-
|
68 |
-
// Execute on change
|
69 |
-
$(name).change(function(){
|
70 |
-
endisableHostSidebars($(this));
|
71 |
-
});
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* The value of Handle selection will control the
|
76 |
-
* accessibility of the host sidebar selection
|
77 |
-
* If Handling is manual, selection of host sidebar will be disabled
|
78 |
-
*/
|
79 |
-
function endisableHostSidebars(select) {
|
80 |
-
var name = "select[name='host']";
|
81 |
-
if(select.val() == 2) {
|
82 |
-
$(name).hide();
|
83 |
-
$(name).attr("disabled", true);
|
84 |
-
|
85 |
-
} else {
|
86 |
-
$(name).show();
|
87 |
-
$(name).removeAttr("disabled");
|
88 |
}
|
89 |
}
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
*/
|
5 |
|
6 |
+
(function($) {
|
7 |
+
|
8 |
+
function GroupHandler() {
|
9 |
+
this._currentIndex = 0;
|
10 |
+
this._stack = [];
|
11 |
+
this._activeClass = 'cas-group-active';
|
12 |
+
|
13 |
+
this.push = function(obj) {
|
14 |
+
this._stack.push(obj);
|
15 |
+
this.setCurrentGroup(this._stack.length-1);
|
16 |
+
//console.log("adding group. now has "+this._stack.length+" groups.");
|
17 |
+
};
|
18 |
+
this.remove = function(obj) {
|
19 |
+
var index = obj.index();
|
20 |
+
|
21 |
+
this._stack.splice(index,1);
|
22 |
+
obj.remove();
|
23 |
+
//console.log("removing group. now has "+this._stack.length+" groups.");
|
24 |
+
|
25 |
+
if(index == this._currentIndex) {
|
26 |
+
//console.log("removing current index");
|
27 |
+
//If we are the first element, set current to next,
|
28 |
+
//otherwise set current to prev
|
29 |
+
this.setCurrentGroup((index == 0) ? 0 : --index);
|
30 |
+
} else if(index < this._currentIndex) {
|
31 |
+
//if we are removing an element before current,
|
32 |
+
//update current silently
|
33 |
+
this._currentIndex--;
|
34 |
+
//console.log("current group now " + this._currentIndex);
|
35 |
+
}
|
36 |
+
|
37 |
+
};
|
38 |
+
this.getArray = function() {
|
39 |
+
return this._stack;
|
40 |
+
};
|
41 |
+
this.setArray = function(array) {
|
42 |
+
this._stack = array;
|
43 |
+
};
|
44 |
+
this.setCurrentGroup = function(index) {
|
45 |
+
if(index < this._stack.length) {
|
46 |
+
this.resetCurrentGroup();
|
47 |
+
$('.js-cas-condition-add').attr('disabled',false);
|
48 |
+
this._currentIndex = index;
|
49 |
+
this.getCurrentGroup().addClass(this._activeClass);
|
50 |
+
$("input:checkbox",this.getCurrentGroup()).attr('disabled',false).attr('checked',true);
|
51 |
+
//console.log("current group now "+this._currentIndex);
|
52 |
+
}
|
53 |
+
};
|
54 |
+
this.resetCurrentGroup = function() {
|
55 |
+
if(this._currentIndex != null && this._currentIndex < this._stack.length) {
|
56 |
+
|
57 |
+
$("li.cas-new",this.getCurrentGroup()).remove();
|
58 |
+
|
59 |
+
$(".cas-condition",this.getCurrentGroup()).each( function() {
|
60 |
+
if($(this).find('input').length == 0) {
|
61 |
+
$(this).remove();
|
62 |
+
}
|
63 |
+
});
|
64 |
+
|
65 |
+
$("input:checkbox",this.getCurrentGroup()).attr('disabled',true);
|
66 |
+
this.getCurrentGroup().removeClass(this._activeClass);
|
67 |
+
}
|
68 |
+
$('.js-cas-condition-add').attr('disabled',true);
|
69 |
+
this._currentIndex = null;
|
70 |
}
|
71 |
+
this.getCurrentGroup = function() {
|
72 |
+
if(this._currentIndex != null && this._currentIndex < this._stack.length) {
|
73 |
+
return $(this._stack[this._currentIndex]);
|
74 |
+
}
|
75 |
+
return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
}
|
78 |
+
|
79 |
+
var cas_admin = {
|
80 |
+
|
81 |
+
groups:new GroupHandler(),
|
82 |
+
nonce: $('#_ca-sidebar-nonce').val(),
|
83 |
+
sidebarID: $('#current_sidebar').val(),
|
84 |
+
message: $('<div></div>'),
|
85 |
+
|
86 |
+
init: function() {
|
87 |
+
|
88 |
+
$('.cas-contentlist').on('click','.page-numbers', function(e) {
|
89 |
+
e.preventDefault();
|
90 |
+
|
91 |
+
var link = $(this);
|
92 |
+
var action = link.closest('.cas-rule-content');
|
93 |
+
|
94 |
+
$.ajax({
|
95 |
+
url: ajaxurl,
|
96 |
+
data:link.attr('href').split('?')[1]+'&action=cas-module-'+action.attr('data-cas-module'),
|
97 |
+
dataType: 'JSON',
|
98 |
+
type: 'POST',
|
99 |
+
success:function(data){
|
100 |
+
link.closest('.cas-contentlist').html(data);
|
101 |
+
},
|
102 |
+
error: function(xhr, desc, e) {
|
103 |
+
console.log(xhr.responseText);
|
104 |
+
}
|
105 |
+
});
|
106 |
+
|
107 |
+
});
|
108 |
+
|
109 |
+
cas_admin.groups.setArray($("#cas-groups .cas-group-single"));
|
110 |
+
|
111 |
+
this.addTabListener();
|
112 |
+
|
113 |
+
//this.addCheckboxListener();
|
114 |
+
this.addHandleListener();
|
115 |
+
this.addSearchListener();
|
116 |
+
|
117 |
+
this.addNewGroupListener();
|
118 |
+
this.addSetGroupListener();
|
119 |
+
|
120 |
+
this.addAddContentListener();
|
121 |
+
|
122 |
+
|
123 |
+
},
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Listen to and handle adding
|
127 |
+
* content to current group
|
128 |
+
* @author Joachim Jensen <jv@intox.dk>
|
129 |
+
* @since 2.0
|
130 |
+
*/
|
131 |
+
addAddContentListener: function() {
|
132 |
+
$("#cas-accordion").on("click",".js-cas-condition-add", function(e) {
|
133 |
+
|
134 |
+
e.preventDefault();
|
135 |
+
|
136 |
+
if(cas_admin.groups.getCurrentGroup() != null) {
|
137 |
+
|
138 |
+
var button = $(this);
|
139 |
+
|
140 |
+
var old_checkboxes = $("input:checkbox:checked", button.closest('.cas-rule-content'));
|
141 |
+
var condition_elem = $('.cas-condition-'+button.attr('data-cas-condition'), cas_admin.groups.getCurrentGroup());
|
142 |
+
var data = [];
|
143 |
+
|
144 |
+
if(condition_elem.length == 0) {
|
145 |
+
condition_elem = $('<div class="cas-condition cas-condition-'+button.attr('data-cas-condition')+'"><strong>'+button.closest('.accordion-section').find('.accordion-section-title').text()+'</strong><ul></ul></div>');
|
146 |
+
cas_admin.groups.getCurrentGroup().find('.cas-content').append(condition_elem);
|
147 |
+
}
|
148 |
+
|
149 |
+
//Check if checkbox with value already exists
|
150 |
+
old_checkboxes.each( function() {
|
151 |
+
var elem = $(this);
|
152 |
+
if(condition_elem.find("input[value='"+elem.val()+"']").length == 0) {
|
153 |
+
var temp = elem.closest('li').clone().addClass('cas-new');
|
154 |
+
//jQuery 1.7 fix
|
155 |
+
data.push(temp[0]);
|
156 |
+
}
|
157 |
+
});
|
158 |
+
old_checkboxes.attr('checked',false);
|
159 |
+
|
160 |
+
$('ul',condition_elem).append(data);
|
161 |
+
}
|
162 |
+
|
163 |
+
});
|
164 |
+
},
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Listen to and handle Add New Group clicks
|
168 |
+
* Uses AJAX to create a new group
|
169 |
+
* @author Joachim Jensen <jv@intox.dk>
|
170 |
+
* @since 2.0
|
171 |
+
*/
|
172 |
+
addNewGroupListener: function() {
|
173 |
+
var groupContainer = $('#cas-groups');
|
174 |
+
groupContainer.on('click', '.js-cas-group-new', function(e) {
|
175 |
+
|
176 |
+
e.preventDefault();
|
177 |
+
|
178 |
+
var input = $('input', groupContainer);
|
179 |
+
|
180 |
+
input.attr('disabled',true);
|
181 |
+
cas_admin.message.removeClass().html();
|
182 |
+
cas_admin.message.remove();
|
183 |
+
|
184 |
+
$.ajax({
|
185 |
+
url: ajaxurl,
|
186 |
+
data:{
|
187 |
+
action: 'cas_add_group',
|
188 |
+
token: cas_admin.nonce,
|
189 |
+
current_id: cas_admin.sidebarID
|
190 |
+
},
|
191 |
+
dataType: 'JSON',
|
192 |
+
type: 'POST',
|
193 |
+
success:function(data){
|
194 |
+
cas_admin.message.addClass('success').text(data.message);
|
195 |
+
$('.cas-groups-body',groupContainer).prepend(cas_admin.message);
|
196 |
+
|
197 |
+
var group = $('<li>', {class: 'cas-group-single', html: '<span class="cas-group-control cas-group-control-active">'+
|
198 |
+
'<input type="button" class="button button-primary js-cas-group-save" value="'+CASAdmin.save+'" /> | <a class="js-cas-group-cancel" href="#">'+CASAdmin.cancel+'</a>'+
|
199 |
+
'</span>'+
|
200 |
+
'<span class="cas-group-control">'+
|
201 |
+
'<input type="button" class="js-cas-group-edit button" value="'+CASAdmin.edit+'" /> | <a class="submitdelete trash js-cas-group-remove" href="#">'+CASAdmin.remove+'</a>'+
|
202 |
+
'</span>'+
|
203 |
+
'<div class="cas-content"></div>'+
|
204 |
+
'<input type="hidden" class="cas_group_id" value="'+data['group']+'" name="cas_group_id" />'});
|
205 |
+
|
206 |
+
$('ul', groupContainer).first().append(group);
|
207 |
+
cas_admin.groups.push(group[0]); //object vs node reference?
|
208 |
+
|
209 |
+
input.attr('disabled',false);
|
210 |
+
|
211 |
+
},
|
212 |
+
error: function(xhr, desc, e) {
|
213 |
+
cas_admin.message.addClass('error').text(xhr.responseText);
|
214 |
+
$('.cas-groups-body',groupContainer).prepend(cas_admin.message);
|
215 |
+
input.attr('disabled',false);
|
216 |
+
}
|
217 |
+
});
|
218 |
+
});
|
219 |
+
},
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Listen to and manage
|
223 |
+
* group saving, editing, removal and cancelling
|
224 |
+
* @author Joachim Jensen <jv@intox.dk>
|
225 |
+
* @since 2.0
|
226 |
+
*/
|
227 |
+
addSetGroupListener: function() {
|
228 |
+
var groupContainer = $("#cas-groups");
|
229 |
+
groupContainer.on("click", ".js-cas-group-save", function(e){
|
230 |
+
e.preventDefault();
|
231 |
+
|
232 |
+
cas_admin.message.removeClass().html();
|
233 |
+
cas_admin.message.remove();
|
234 |
+
|
235 |
+
var data = cas_admin.groups.getCurrentGroup().find("input").serializeArray();
|
236 |
+
data.push({name:"action",value:"cas_add_rule"});
|
237 |
+
data.push({name:"token",value:cas_admin.nonce});
|
238 |
+
data.push({name:"current_id",value:cas_admin.sidebarID});
|
239 |
+
|
240 |
+
$.ajax({
|
241 |
+
url: ajaxurl,
|
242 |
+
data:$.param(data),
|
243 |
+
dataType: 'JSON',
|
244 |
+
type: 'POST',
|
245 |
+
success:function(data){
|
246 |
+
cas_admin.message.addClass('success').text(data.message);
|
247 |
+
$('.cas-groups-body',groupContainer).prepend(cas_admin.message);
|
248 |
+
|
249 |
+
var content = $("input:checkbox",cas_admin.groups.getCurrentGroup()).closest('li');
|
250 |
+
if(content.length > 0) {
|
251 |
+
$("input:checkbox:not(:checked)",cas_admin.groups.getCurrentGroup()).closest('li').remove();
|
252 |
+
content.removeClass('cas-new');
|
253 |
+
}
|
254 |
+
|
255 |
+
$(".cas-condition",cas_admin.groups.getCurrentGroup()).each( function() {
|
256 |
+
if($(this).find('input').length == 0) {
|
257 |
+
$(this).remove();
|
258 |
+
}
|
259 |
+
});
|
260 |
+
|
261 |
+
},
|
262 |
+
error: function(xhr, desc, e) {
|
263 |
+
cas_admin.message.addClass('error').text(xhr.responseText);
|
264 |
+
$('.cas-groups-body',groupContainer).prepend(cas_admin.message);
|
265 |
+
}
|
266 |
+
});
|
267 |
+
});
|
268 |
+
groupContainer.on("click", ".js-cas-group-cancel", function(e){
|
269 |
+
e.preventDefault();
|
270 |
+
cas_admin.groups.resetCurrentGroup();
|
271 |
+
});
|
272 |
+
groupContainer.on("click", ".js-cas-group-edit", function(e){
|
273 |
+
e.preventDefault();
|
274 |
+
cas_admin.groups.setCurrentGroup($(this).parents('.cas-group-single').index());
|
275 |
+
});
|
276 |
+
groupContainer.on("click", ".js-cas-group-remove", function(e){
|
277 |
+
e.preventDefault();
|
278 |
+
|
279 |
+
if(confirm(CASAdmin.confirmRemove) == true) {
|
280 |
+
|
281 |
+
if(cas_admin.groups.getArray().length > 1) {
|
282 |
+
|
283 |
+
cas_admin.message.removeClass().html();
|
284 |
+
cas_admin.message.remove();
|
285 |
+
|
286 |
+
var button = $(this);
|
287 |
+
button.attr('disabled',true);
|
288 |
+
var group = $(this).closest('.cas-group-single');
|
289 |
+
group.css('background','red');
|
290 |
+
$.ajax({
|
291 |
+
url: ajaxurl,
|
292 |
+
data:{
|
293 |
+
action: 'cas_remove_group',
|
294 |
+
token: cas_admin.nonce,
|
295 |
+
cas_group_id: group.find('.cas_group_id').val(),
|
296 |
+
current_id: cas_admin.sidebarID
|
297 |
+
},
|
298 |
+
dataType: 'JSON',
|
299 |
+
type: 'POST',
|
300 |
+
success:function(data){
|
301 |
+
cas_admin.message.addClass('success').text(data.message);
|
302 |
+
$('.cas-groups-body',groupContainer).prepend(cas_admin.message);
|
303 |
+
|
304 |
+
group.fadeOut('slow', function() {
|
305 |
+
cas_admin.groups.remove($(this));
|
306 |
+
})
|
307 |
+
|
308 |
+
button.attr('disabled',false);
|
309 |
+
},
|
310 |
+
error: function(xhr, desc, e) {
|
311 |
+
cas_admin.message.addClass('error').text(xhr.responseText);
|
312 |
+
$('.cas-groups-body',groupContainer).prepend(cas_admin.message);
|
313 |
+
button.attr('disabled',false);
|
314 |
+
}
|
315 |
+
});
|
316 |
+
}
|
317 |
+
}
|
318 |
+
});
|
319 |
+
},
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Listen to and manage tab clicks
|
323 |
+
* Based on code from WordPress Core
|
324 |
+
* @author Joachim Jensen <jv@intox.dk>
|
325 |
+
* @since 2.0
|
326 |
+
*/
|
327 |
+
addTabListener: function() {
|
328 |
+
var class_active = 'tabs-panel-active',
|
329 |
+
class_inactive = 'tabs-panel-inactive';
|
330 |
+
|
331 |
+
$("#cas-accordion .accordion-section").first().addClass('open');
|
332 |
+
|
333 |
+
$('.nav-tab-link').on('click', function(e) {
|
334 |
+
e.preventDefault();
|
335 |
+
|
336 |
+
panelId = $(this).data( 'type' );
|
337 |
+
|
338 |
+
wrapper = $(this).closest('.accordion-section-content');
|
339 |
+
|
340 |
+
// upon changing tabs, we want to uncheck all checkboxes
|
341 |
+
$('input', wrapper).removeAttr('checked');
|
342 |
+
|
343 |
+
//Change active tab panel
|
344 |
+
$('.' + class_active, wrapper).removeClass(class_active).addClass(class_inactive);
|
345 |
+
$('#' + panelId, wrapper).removeClass(class_inactive).addClass(class_active);
|
346 |
+
|
347 |
+
$('.tabs', wrapper).removeClass('tabs');
|
348 |
+
$(this).parent().addClass('tabs');
|
349 |
+
|
350 |
+
// select the search bar
|
351 |
+
$('.quick-search', wrapper).focus();
|
352 |
+
|
353 |
+
|
354 |
+
});
|
355 |
+
},
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Set tickers if at least one checkbox is checked
|
359 |
+
*/
|
360 |
+
addCheckboxListener: function() {
|
361 |
+
$('.cas-rule-content :input').change( function() {
|
362 |
+
var parent = $(this).parents('.cas-rule-content');
|
363 |
+
cas_admin.toggleTick(parent);
|
364 |
+
if($(this).attr('class') == 'cas-chk-all')
|
365 |
+
cas_admin.toggleSelectAll(this, parent);
|
366 |
+
}).change(); //fire change event on page load
|
367 |
+
},
|
368 |
+
toggleTick: function(parent) {
|
369 |
+
//Toggle on any selected checkbox
|
370 |
+
parent.prev().toggleClass('cas-tick',parent.find('input:checked').length > 0);
|
371 |
+
},
|
372 |
+
/**
|
373 |
+
* Toggle specific input depending on "show with all" checkbox
|
374 |
+
*/
|
375 |
+
toggleSelectAll: function(checkbox, parent) {
|
376 |
+
var checkboxes = parent.find("input[type=checkbox]").not(checkbox);
|
377 |
+
checkboxes.attr("disabled", $(checkbox).is(":checked"));
|
378 |
+
},
|
379 |
+
/**
|
380 |
+
* The value of Handle selection will control the
|
381 |
+
* accessibility of the host sidebar selection
|
382 |
+
* If Handling is manual, selection of host sidebar will be disabled
|
383 |
+
*/
|
384 |
+
addHandleListener: function() {
|
385 |
+
$("select[name='handle']").change(function(){
|
386 |
+
cas_admin.toggleHostOption($(this));
|
387 |
+
}).change(); //fire change event on page load
|
388 |
+
},
|
389 |
+
toggleHostOption: function(handle) {
|
390 |
+
var host = $("select[name='host']");
|
391 |
+
host.attr("disabled", handle.val() == 2);
|
392 |
+
if(handle.val() == 2)
|
393 |
+
host.hide();
|
394 |
+
else
|
395 |
+
host.show();
|
396 |
+
},
|
397 |
+
/**
|
398 |
+
* Use AJAX to search for content from a specific module
|
399 |
+
*/
|
400 |
+
addSearchListener: function() {
|
401 |
+
var searchTimer;
|
402 |
+
|
403 |
+
$('.cas-autocomplete').keypress(function(e){
|
404 |
+
var t = $(this);
|
405 |
+
|
406 |
+
//If Enter (13) is pressed, search immediately
|
407 |
+
if( 13 == e.which ) {
|
408 |
+
cas_admin.updateSearchResults( t );
|
409 |
+
return false;
|
410 |
+
}
|
411 |
+
|
412 |
+
if( searchTimer ) clearTimeout(searchTimer);
|
413 |
+
|
414 |
+
searchTimer = setTimeout(function(){
|
415 |
+
cas_admin.updateSearchResults( t );
|
416 |
+
}, 400);
|
417 |
+
}).attr('autocomplete','off');
|
418 |
+
|
419 |
+
},
|
420 |
+
updateSearchResults: function(input) {
|
421 |
+
var panel,
|
422 |
+
minSearchLength = 2,
|
423 |
+
q = input.val();
|
424 |
+
|
425 |
+
if( q.length < minSearchLength ) return;
|
426 |
+
|
427 |
+
panel = input.parents('.tabs-panel');
|
428 |
+
var spinner = $('.spinner', panel);
|
429 |
+
|
430 |
+
spinner.show();
|
431 |
+
|
432 |
+
$.ajax({
|
433 |
+
url: ajaxurl,
|
434 |
+
data:{
|
435 |
+
'action': input.attr('class').split(' ')[0],
|
436 |
+
'response-format': 'JSON',
|
437 |
+
'nonce': cas_admin.nonce,
|
438 |
+
'sidebar_id': cas_admin.sidebarID,
|
439 |
+
'type': input.attr('id'),
|
440 |
+
'q': q
|
441 |
+
},
|
442 |
+
dataType: 'JSON',
|
443 |
+
type: 'POST',
|
444 |
+
success:function(response){
|
445 |
+
var elements = "";
|
446 |
+
if(response.length > 0) {
|
447 |
+
$.each(response, function(i,item) {
|
448 |
+
elements += '<li><label class="selectit"><input value="'+item.value+'" type="checkbox" name="'+item.name+'[]"/> '+item.label+'</label></li>';
|
449 |
+
});
|
450 |
+
} else {
|
451 |
+
elements = '<li><p>'+CASAdmin.noResults+'</p></li>';
|
452 |
+
}
|
453 |
+
|
454 |
+
$('.categorychecklist', panel).html(elements);
|
455 |
+
spinner.hide();
|
456 |
+
},
|
457 |
+
error: function(xhr, desc, e) {
|
458 |
+
console.log(xhr.responseText);
|
459 |
+
}
|
460 |
+
});
|
461 |
+
|
462 |
+
},
|
463 |
+
}
|
464 |
+
|
465 |
+
$(document).ready(function(){ cas_admin.init(); });
|
466 |
+
|
467 |
+
})(jQuery);
|
js/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**/
|
js/jquery.ui.accordion.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function($,undefined){$.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase();}},_create:function(){var self=this,options=self.options;self.running=0;self.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");self.headers=self.element.find(options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(options.disabled){return;}$(this).addClass("ui-state-hover");}).bind("mouseleave.accordion",function(){if(options.disabled){return;}$(this).removeClass("ui-state-hover");}).bind("focus.accordion",function(){if(options.disabled){return;}$(this).addClass("ui-state-focus");}).bind("blur.accordion",function(){if(options.disabled){return;}$(this).removeClass("ui-state-focus");});self.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(options.navigation){var current=self.element.find("a").filter(options.navigationFilter).eq(0);if(current.length){var header=current.closest(".ui-accordion-header");if(header.length){self.active=header;}else{self.active=current.closest(".ui-accordion-content").prev();}}}self.active=self._findActive(self.active||options.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");self.active.next().addClass("ui-accordion-content-active");self._createIcons();self.resize();self.element.attr("role","tablist");self.headers.attr("role","tab").bind("keydown.accordion",function(event){return self._keydown(event);}).next().attr("role","tabpanel");self.headers.not(self.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();if(!self.active.length){self.headers.eq(0).attr("tabIndex",0);}else{self.active.attr({"aria-expanded":"true",tabIndex:0});}if(!$.browser.safari){self.headers.find("a").attr("tabIndex",-1);}if(options.event){self.headers.bind(options.event.split(" ").join(".accordion ")+".accordion",function(event){self._clickHandler.call(self,event,this);event.preventDefault();});}},_createIcons:function(){var options=this.options;if(options.icons){$("<span></span>").addClass("ui-icon "+options.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(options.icons.header).toggleClass(options.icons.headerSelected);this.element.addClass("ui-accordion-icons");}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons");},destroy:function(){var options=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(options.autoHeight||options.fillHeight){contents.css("height","");}return $.Widget.prototype.destroy.call(this);},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);if(key=="active"){this.activate(value);}if(key=="icons"){this._destroyIcons();if(value){this._createIcons();}}if(key=="disabled"){this.headers.add(this.headers.next())[value?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled");}},_keydown:function(event){if(this.options.disabled||event.altKey||event.ctrlKey){return;}var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._clickHandler({target:event.target},event.target);event.preventDefault();}if(toFocus){$(event.target).attr("tabIndex",-1);$(toFocus).attr("tabIndex",0);toFocus.focus();return false;}return true;},resize:function(){var options=this.options,maxHeight;if(options.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden");}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow);}this.headers.each(function(){maxHeight-=$(this).outerHeight(true);});this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()));}).css("overflow","auto");}else{if(options.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height());}).height(maxHeight);}}return this;},activate:function(index){this.options.active=index;var active=this._findActive(index)[0];this._clickHandler({target:active},active);return this;},_findActive:function(selector){return selector?typeof selector==="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)");},_clickHandler:function(event,target){var options=this.options;if(options.disabled){return;}if(!event.target){if(!options.collapsible){return;}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(options.icons.headerSelected).addClass(options.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:options,newHeader:$([]),oldHeader:options.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return;}var clicked=$(event.currentTarget||target),clickedIsActive=clicked[0]===this.active[0];options.active=options.collapsible&&clickedIsActive?false:this.headers.index(clicked);if(this.running||(!options.collapsible&&clickedIsActive)){return;}var active=this.active,toShow=clicked.next(),toHide=this.active.next(),data={options:options,newHeader:clickedIsActive&&options.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&options.collapsible?$([]):toShow,oldContent:toHide},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(options.icons.headerSelected).addClass(options.icons.header);if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(options.icons.header).addClass(options.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active");}return;},_toggle:function(toShow,toHide,data,clickedIsActive,down){var self=this,options=self.options;self.toShow=toShow;self.toHide=toHide;self.data=data;var complete=function(){if(!self){return;}return self._completed.apply(self,arguments);};self._trigger("changestart",null,self.data);self.running=toHide.size()===0?toShow.size():toHide.size();if(options.animated){var animOptions={};if(options.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight||options.fillSpace};}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight||options.fillSpace};}if(!options.proxied){options.proxied=options.animated;}if(!options.proxiedDuration){options.proxiedDuration=options.duration;}options.animated=$.isFunction(options.proxied)?options.proxied(animOptions):options.proxied;options.duration=$.isFunction(options.proxiedDuration)?options.proxiedDuration(animOptions):options.proxiedDuration;var animations=$.ui.accordion.animations,duration=options.duration,easing=options.animated;if(easing&&!animations[easing]&&!$.easing[easing]){easing="slide";}if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700});};}animations[easing](animOptions);}else{if(options.collapsible&&clickedIsActive){toShow.toggle();}else{toHide.hide();toShow.show();}complete(true);}toHide.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();toShow.prev().attr({"aria-expanded":"true",tabIndex:0}).focus();},_completed:function(cancel){this.running=cancel?0:--this.running;if(this.running){return;}if(this.options.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""});}this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className;}this._trigger("change",null,this.data);}});$.extend($.ui.accordion,{version:"1.8.9",animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},options);return;}if(!options.toShow.size()){options.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},options);return;}var overflow=options.toShow.css("overflow"),percentDone=0,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-(parseInt(s.css("borderLeftWidth"),10)||0)-(parseInt(s.css("borderRightWidth"),10)||0));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"};});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.end-settings.start===0)?0:(settings.now-settings.start)/(settings.end-settings.start);}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit;},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","");}options.toShow.css({width:originalWidth,overflow:overflow});options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200});}}});})(jQuery);
|
|
lang/content-aware-sidebars-da_DK.mo
CHANGED
Binary file
|
lang/content-aware-sidebars-da_DK.po
CHANGED
@@ -2,286 +2,362 @@
|
|
2 |
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Content Aware Sidebars 0
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
-
"PO-Revision-Date: 2013-
|
9 |
-
"Last-Translator:
|
10 |
-
"Language-Team:
|
11 |
"Language: da_DK\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
#: content-aware-sidebars.php:
|
17 |
msgid "Exposure"
|
18 |
msgstr "Eksponering"
|
19 |
|
20 |
-
#: content-aware-sidebars.php:
|
21 |
msgid "Singular"
|
22 |
msgstr "Singulær"
|
23 |
|
24 |
-
#: content-aware-sidebars.php:
|
25 |
msgid "Singular & Archive"
|
26 |
msgstr "Singulær og arkiv"
|
27 |
|
28 |
-
#: content-aware-sidebars.php:
|
29 |
msgid "Archive"
|
30 |
msgstr "Arkiv"
|
31 |
|
32 |
-
#: content-aware-sidebars.php:
|
33 |
msgctxt "option"
|
34 |
msgid "Handle"
|
35 |
msgstr "Håndtering"
|
36 |
|
37 |
-
#: content-aware-sidebars.php:
|
38 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
39 |
msgstr "Erstat værts-sidebar, flet med den eller tilføj denne sidebar manuelt."
|
40 |
|
41 |
-
#: content-aware-sidebars.php:
|
42 |
msgid "Replace"
|
43 |
msgstr "Erstat"
|
44 |
|
45 |
-
#: content-aware-sidebars.php:
|
46 |
msgid "Merge"
|
47 |
msgstr "Flet"
|
48 |
|
49 |
-
#: content-aware-sidebars.php:
|
50 |
msgid "Manual"
|
51 |
msgstr "Manuel"
|
52 |
|
53 |
-
#: content-aware-sidebars.php:
|
54 |
msgid "Host Sidebar"
|
55 |
msgstr "Værts-sidebar"
|
56 |
|
57 |
-
#: content-aware-sidebars.php:
|
58 |
msgid "Merge position"
|
59 |
msgstr "Fletteposition"
|
60 |
|
61 |
-
#: content-aware-sidebars.php:
|
62 |
msgid "Place sidebar on top or bottom of host when merging."
|
63 |
msgstr "Flet ind fra oven eller bunden."
|
64 |
|
65 |
-
#: content-aware-sidebars.php:
|
66 |
msgid "Top"
|
67 |
msgstr "Top"
|
68 |
|
69 |
-
#: content-aware-sidebars.php:
|
70 |
msgid "Bottom"
|
71 |
msgstr "Bund"
|
72 |
|
73 |
-
#: content-aware-sidebars.php:
|
74 |
msgid "Sidebars"
|
75 |
msgstr "Sidebars"
|
76 |
|
77 |
-
#: content-aware-sidebars.php:
|
78 |
msgid "Sidebar"
|
79 |
msgstr "Sidebar"
|
80 |
|
81 |
-
#: content-aware-sidebars.php:
|
82 |
msgctxt "sidebar"
|
83 |
msgid "Add New"
|
84 |
msgstr "Tilføj ny"
|
85 |
|
86 |
-
#: content-aware-sidebars.php:
|
87 |
msgid "Add New Sidebar"
|
88 |
msgstr "Tilføj ny sidebar"
|
89 |
|
90 |
-
#: content-aware-sidebars.php:
|
91 |
msgid "Edit Sidebar"
|
92 |
msgstr "Rediger sidebar"
|
93 |
|
94 |
-
#: content-aware-sidebars.php:
|
95 |
msgid "New Sidebar"
|
96 |
msgstr "Ny sidebar"
|
97 |
|
98 |
-
#: content-aware-sidebars.php:
|
99 |
msgid "All Sidebars"
|
100 |
msgstr "Alle sidebars"
|
101 |
|
102 |
-
#: content-aware-sidebars.php:
|
103 |
msgid "View Sidebar"
|
104 |
msgstr "Vis sidebar"
|
105 |
|
106 |
-
#: content-aware-sidebars.php:
|
107 |
msgid "Search Sidebars"
|
108 |
msgstr "Søg sidebars"
|
109 |
|
110 |
-
#: content-aware-sidebars.php:
|
111 |
msgid "No sidebars found"
|
112 |
msgstr "Ingen sidebars fundet"
|
113 |
|
114 |
-
#: content-aware-sidebars.php:
|
115 |
msgid "No sidebars found in Trash"
|
116 |
msgstr "Ingen sidebars fundet i papirkurven"
|
117 |
|
118 |
-
#: content-aware-sidebars.php:
|
119 |
-
msgid "
|
120 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
-
#: content-aware-sidebars.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
msgid "Sidebar updated."
|
124 |
msgstr "Sidebar opdateret."
|
125 |
|
126 |
-
#: content-aware-sidebars.php:
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
#: content-aware-sidebars.php:
|
131 |
msgid "Sidebar saved."
|
132 |
msgstr "Sidebar gemt."
|
133 |
|
134 |
-
#: content-aware-sidebars.php:
|
135 |
-
msgid "Sidebar submitted.
|
136 |
-
msgstr "Sidebar indsendt.
|
137 |
|
138 |
-
#: content-aware-sidebars.php:
|
139 |
-
|
140 |
-
"Sidebar scheduled for: <strong>%1$s</strong>.
|
141 |
-
"
|
142 |
-
msgstr ""
|
143 |
-
"Sidebar planlagt til: <strong>%1$s</strong>. <a href=\"%2$s\">Håndter "
|
144 |
-
"widgets</a>"
|
145 |
|
146 |
-
|
147 |
-
#: content-aware-sidebars.php:263
|
148 |
msgid "M j, Y @ G:i"
|
149 |
msgstr "j. M, Y @ G:i"
|
150 |
|
151 |
-
#: content-aware-sidebars.php:
|
152 |
msgid "Sidebar draft updated."
|
153 |
msgstr "Sidebar-kladde opdateret."
|
154 |
|
155 |
-
#: content-aware-sidebars.php:
|
156 |
msgid "Please update Host Sidebar"
|
157 |
msgstr "Værts-sidebar skal opdateres"
|
158 |
|
159 |
-
#: content-aware-sidebars.php:
|
160 |
msgid "Manage Widgets"
|
161 |
msgstr "Håndter widgets"
|
162 |
|
163 |
-
#: content-aware-sidebars.php:
|
164 |
-
msgid "
|
165 |
-
msgstr "
|
166 |
|
167 |
-
#: content-aware-sidebars.php:
|
168 |
msgid "Content"
|
169 |
msgstr "Indhold"
|
170 |
|
171 |
-
#: content-aware-sidebars.php:
|
172 |
msgid "Options"
|
173 |
msgstr "Indstillinger"
|
174 |
|
175 |
-
#: content-aware-sidebars.php:
|
176 |
-
msgid "
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
#: content-aware-sidebars.php:
|
|
|
|
|
|
|
|
|
180 |
msgid ""
|
181 |
-
"
|
182 |
-
"
|
183 |
msgstr ""
|
184 |
-
"
|
185 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
-
#: content-aware-sidebars.php:
|
188 |
-
msgid "
|
189 |
-
msgstr "
|
190 |
|
191 |
-
#: content-aware-sidebars.php:
|
192 |
-
msgid "
|
193 |
-
msgstr "
|
194 |
|
195 |
-
#: modules/abstract.php:
|
|
|
196 |
msgid "Show with All %s"
|
197 |
msgstr "Vis ved alle %s"
|
198 |
|
199 |
-
#: modules/abstract.php:
|
|
|
200 |
msgid "View All"
|
201 |
msgstr "Vis alle"
|
202 |
|
203 |
-
#: modules/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
msgid "Authors"
|
205 |
msgstr "Forfattere"
|
206 |
|
207 |
-
#: modules/bbpress.php:
|
208 |
msgid "bbPress User Profiles"
|
209 |
msgstr "bbPress brugerprofiler"
|
210 |
|
211 |
-
#: modules/bp_member.php:
|
212 |
msgid "BuddyPress Members"
|
213 |
msgstr "BuddyPress medlemmer"
|
214 |
|
215 |
-
#: modules/page_template.php:
|
216 |
msgid "Page Templates"
|
217 |
msgstr "Skabeloner"
|
218 |
|
219 |
-
#: modules/polylang.php:
|
220 |
-
#: modules/wpml.php:
|
221 |
msgid "Languages"
|
222 |
msgstr "Sprog"
|
223 |
|
224 |
-
#: modules/post_type.php:
|
225 |
msgid "Post Types"
|
226 |
msgstr "Indholdstyper"
|
227 |
|
228 |
-
#: modules/post_type.php:
|
229 |
msgid "Automatically select new children of a selected ancestor"
|
230 |
msgstr "Vælg automatisk nye børn af den valgte forælder"
|
231 |
|
232 |
-
#: modules/post_type.php:
|
|
|
|
|
|
|
|
|
|
|
233 |
msgid "No items."
|
234 |
msgstr "Ingen elementer."
|
235 |
|
236 |
-
#: modules/
|
|
|
|
|
|
|
|
|
237 |
msgid "Static Pages"
|
238 |
msgstr "Statiske sider"
|
239 |
|
240 |
-
#: modules/static.php:
|
241 |
msgid "Front Page"
|
242 |
msgstr "Forside"
|
243 |
|
244 |
-
#: modules/static.php:
|
245 |
msgid "Search Results"
|
246 |
msgstr "Søgeresultater"
|
247 |
|
248 |
-
#: modules/static.php:
|
249 |
msgid "404 Page"
|
250 |
msgstr "404-side"
|
251 |
|
252 |
-
#: modules/taxonomy.php:
|
253 |
msgid "Taxonomies"
|
254 |
msgstr "Taksonomier"
|
255 |
|
256 |
-
#: modules/taxonomy.php:
|
257 |
-
msgid "Show with %s"
|
258 |
-
msgstr "Vis ved %s"
|
259 |
-
|
260 |
-
#: modules/taxonomy.php:120
|
261 |
msgid "Most Used"
|
262 |
msgstr "Mest brugte"
|
263 |
|
264 |
-
|
265 |
-
msgid "
|
266 |
-
msgstr "
|
267 |
-
|
268 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
|
269 |
-
#. Plugin URI of the plugin/theme
|
270 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
|
271 |
-
#. Author URI of the plugin/theme
|
272 |
-
msgid "http://www.intox.dk/"
|
273 |
-
msgstr "http://www.intox.dk/"
|
274 |
-
|
275 |
-
#. Description of the plugin/theme
|
276 |
-
msgid "Manage and show sidebars according to the content being viewed."
|
277 |
-
msgstr "Administrer og vis sidebars i henhold til det indhold, der vises."
|
278 |
-
|
279 |
-
#. Author of the plugin/theme
|
280 |
-
msgid "Joachim Jensen"
|
281 |
-
msgstr "Joachim Jensen"
|
282 |
-
|
283 |
-
#~ msgid "bbPress"
|
284 |
-
#~ msgstr "bbPress"
|
285 |
|
286 |
-
|
287 |
-
|
|
2 |
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 2.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-11-29 12:48+0100\n"
|
8 |
+
"PO-Revision-Date: 2013-11-29 15:18+0100\n"
|
9 |
+
"Last-Translator: \n"
|
10 |
+
"Language-Team: Joachim Jensen <jv@intox.dk>\n"
|
11 |
"Language: da_DK\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 1.5.5\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
18 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
19 |
+
"X-Poedit-Basepath: .\n"
|
20 |
+
"X-Textdomain-Support: yes\n"
|
21 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
22 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
+
"X-Poedit-SearchPath-0: .\n"
|
24 |
+
"X-Poedit-SearchPath-1: ..\n"
|
25 |
+
|
26 |
+
#: ../content-aware-sidebars.php:117
|
27 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
28 |
+
msgstr "Administrer og vis sidebars i henhold til det indhold, der vises."
|
29 |
+
|
30 |
+
#: ../content-aware-sidebars.php:118
|
31 |
+
msgid "Content Aware Sidebars"
|
32 |
+
msgstr "Content Aware Sidebars"
|
33 |
|
34 |
+
#: ../content-aware-sidebars.php:233 ../content-aware-sidebars.php:432
|
35 |
msgid "Exposure"
|
36 |
msgstr "Eksponering"
|
37 |
|
38 |
+
#: ../content-aware-sidebars.php:239
|
39 |
msgid "Singular"
|
40 |
msgstr "Singulær"
|
41 |
|
42 |
+
#: ../content-aware-sidebars.php:240
|
43 |
msgid "Singular & Archive"
|
44 |
msgstr "Singulær og arkiv"
|
45 |
|
46 |
+
#: ../content-aware-sidebars.php:241
|
47 |
msgid "Archive"
|
48 |
msgstr "Arkiv"
|
49 |
|
50 |
+
#: ../content-aware-sidebars.php:245 ../content-aware-sidebars.php:433
|
51 |
msgctxt "option"
|
52 |
msgid "Handle"
|
53 |
msgstr "Håndtering"
|
54 |
|
55 |
+
#: ../content-aware-sidebars.php:247
|
56 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
57 |
msgstr "Erstat værts-sidebar, flet med den eller tilføj denne sidebar manuelt."
|
58 |
|
59 |
+
#: ../content-aware-sidebars.php:251
|
60 |
msgid "Replace"
|
61 |
msgstr "Erstat"
|
62 |
|
63 |
+
#: ../content-aware-sidebars.php:252
|
64 |
msgid "Merge"
|
65 |
msgstr "Flet"
|
66 |
|
67 |
+
#: ../content-aware-sidebars.php:253
|
68 |
msgid "Manual"
|
69 |
msgstr "Manuel"
|
70 |
|
71 |
+
#: ../content-aware-sidebars.php:257
|
72 |
msgid "Host Sidebar"
|
73 |
msgstr "Værts-sidebar"
|
74 |
|
75 |
+
#: ../content-aware-sidebars.php:265 ../content-aware-sidebars.php:434
|
76 |
msgid "Merge position"
|
77 |
msgstr "Fletteposition"
|
78 |
|
79 |
+
#: ../content-aware-sidebars.php:267
|
80 |
msgid "Place sidebar on top or bottom of host when merging."
|
81 |
msgstr "Flet ind fra oven eller bunden."
|
82 |
|
83 |
+
#: ../content-aware-sidebars.php:271
|
84 |
msgid "Top"
|
85 |
msgstr "Top"
|
86 |
|
87 |
+
#: ../content-aware-sidebars.php:272
|
88 |
msgid "Bottom"
|
89 |
msgstr "Bund"
|
90 |
|
91 |
+
#: ../content-aware-sidebars.php:297
|
92 |
msgid "Sidebars"
|
93 |
msgstr "Sidebars"
|
94 |
|
95 |
+
#: ../content-aware-sidebars.php:298
|
96 |
msgid "Sidebar"
|
97 |
msgstr "Sidebar"
|
98 |
|
99 |
+
#: ../content-aware-sidebars.php:299
|
100 |
msgctxt "sidebar"
|
101 |
msgid "Add New"
|
102 |
msgstr "Tilføj ny"
|
103 |
|
104 |
+
#: ../content-aware-sidebars.php:300
|
105 |
msgid "Add New Sidebar"
|
106 |
msgstr "Tilføj ny sidebar"
|
107 |
|
108 |
+
#: ../content-aware-sidebars.php:301
|
109 |
msgid "Edit Sidebar"
|
110 |
msgstr "Rediger sidebar"
|
111 |
|
112 |
+
#: ../content-aware-sidebars.php:302
|
113 |
msgid "New Sidebar"
|
114 |
msgstr "Ny sidebar"
|
115 |
|
116 |
+
#: ../content-aware-sidebars.php:303
|
117 |
msgid "All Sidebars"
|
118 |
msgstr "Alle sidebars"
|
119 |
|
120 |
+
#: ../content-aware-sidebars.php:304
|
121 |
msgid "View Sidebar"
|
122 |
msgstr "Vis sidebar"
|
123 |
|
124 |
+
#: ../content-aware-sidebars.php:305
|
125 |
msgid "Search Sidebars"
|
126 |
msgstr "Søg sidebars"
|
127 |
|
128 |
+
#: ../content-aware-sidebars.php:306
|
129 |
msgid "No sidebars found"
|
130 |
msgstr "Ingen sidebars fundet"
|
131 |
|
132 |
+
#: ../content-aware-sidebars.php:307
|
133 |
msgid "No sidebars found in Trash"
|
134 |
msgstr "Ingen sidebars fundet i papirkurven"
|
135 |
|
136 |
+
#: ../content-aware-sidebars.php:320 ../content-aware-sidebars.php:926
|
137 |
+
msgid "Condition Groups"
|
138 |
+
msgstr "Betingelsesgrupper"
|
139 |
+
|
140 |
+
#: ../content-aware-sidebars.php:321
|
141 |
+
msgid "Condition Group"
|
142 |
+
msgstr "Betingelsesgruppe"
|
143 |
+
|
144 |
+
#: ../content-aware-sidebars.php:322
|
145 |
+
msgctxt "group"
|
146 |
+
msgid "Add New"
|
147 |
+
msgstr "Tilføj ny"
|
148 |
+
|
149 |
+
#: ../content-aware-sidebars.php:323 ../content-aware-sidebars.php:926
|
150 |
+
#: ../content-aware-sidebars.php:951
|
151 |
+
msgid "Add New Group"
|
152 |
+
msgstr "Tilføj ny gruppe"
|
153 |
|
154 |
+
#: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:940
|
155 |
+
#: ../content-aware-sidebars.php:1294
|
156 |
+
msgctxt "group"
|
157 |
+
msgid "Edit"
|
158 |
+
msgstr "Rediger"
|
159 |
+
|
160 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:353
|
161 |
msgid "Sidebar updated."
|
162 |
msgstr "Sidebar opdateret."
|
163 |
|
164 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:355
|
165 |
+
#: ../content-aware-sidebars.php:357 ../content-aware-sidebars.php:362
|
166 |
+
msgid "Manage widgets"
|
167 |
+
msgstr "Håndter widgets"
|
168 |
+
|
169 |
+
#: ../content-aware-sidebars.php:355
|
170 |
+
msgid "Sidebar published."
|
171 |
+
msgstr "Sidebar udgivet."
|
172 |
|
173 |
+
#: ../content-aware-sidebars.php:356
|
174 |
msgid "Sidebar saved."
|
175 |
msgstr "Sidebar gemt."
|
176 |
|
177 |
+
#: ../content-aware-sidebars.php:357
|
178 |
+
msgid "Sidebar submitted."
|
179 |
+
msgstr "Sidebar indsendt."
|
180 |
|
181 |
+
#: ../content-aware-sidebars.php:358
|
182 |
+
#, php-format
|
183 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>."
|
184 |
+
msgstr "Sidebar planlagt til: <strong>%1$s</strong>."
|
|
|
|
|
|
|
185 |
|
186 |
+
#: ../content-aware-sidebars.php:360
|
|
|
187 |
msgid "M j, Y @ G:i"
|
188 |
msgstr "j. M, Y @ G:i"
|
189 |
|
190 |
+
#: ../content-aware-sidebars.php:363
|
191 |
msgid "Sidebar draft updated."
|
192 |
msgstr "Sidebar-kladde opdateret."
|
193 |
|
194 |
+
#: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:489
|
195 |
msgid "Please update Host Sidebar"
|
196 |
msgstr "Værts-sidebar skal opdateres"
|
197 |
|
198 |
+
#: ../content-aware-sidebars.php:544
|
199 |
msgid "Manage Widgets"
|
200 |
msgstr "Håndter widgets"
|
201 |
|
202 |
+
#: ../content-aware-sidebars.php:850
|
203 |
+
msgid "Support the Author of Content Aware Sidebars"
|
204 |
+
msgstr "Støt skaberen af Content Aware Sidebars"
|
205 |
|
206 |
+
#: ../content-aware-sidebars.php:858
|
207 |
msgid "Content"
|
208 |
msgstr "Indhold"
|
209 |
|
210 |
+
#: ../content-aware-sidebars.php:866
|
211 |
msgid "Options"
|
212 |
msgstr "Indstillinger"
|
213 |
|
214 |
+
#: ../content-aware-sidebars.php:927
|
215 |
+
msgid ""
|
216 |
+
"Click to edit a group or create a new one. Select content on the left to add "
|
217 |
+
"it. In each group, you can combine different types of associated content."
|
218 |
+
msgstr ""
|
219 |
+
"Klik for at redigere en gruppe eller opret en ny. Vælg indhold til venstre "
|
220 |
+
"for at tilføje det. I hver gruppe kan du kombinere forskellige typer af "
|
221 |
+
"forbundet indhold."
|
222 |
+
|
223 |
+
#: ../content-aware-sidebars.php:928
|
224 |
+
msgid "Display sidebar with"
|
225 |
+
msgstr "Vis sidebar ved"
|
226 |
+
|
227 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1292
|
228 |
+
msgid "Save"
|
229 |
+
msgstr "Gem"
|
230 |
+
|
231 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1293
|
232 |
+
msgid "Cancel"
|
233 |
+
msgstr "Annuller"
|
234 |
|
235 |
+
#: ../content-aware-sidebars.php:940 ../content-aware-sidebars.php:1295
|
236 |
+
msgid "Remove"
|
237 |
+
msgstr "Fjern"
|
238 |
+
|
239 |
+
#: ../content-aware-sidebars.php:1159
|
240 |
msgid ""
|
241 |
+
"If you love this plugin, please consider donating to support future "
|
242 |
+
"development."
|
243 |
msgstr ""
|
244 |
+
"Hvis du elsker dette plugin, kan du overveje at donere for at støtte den "
|
245 |
+
"fremtidige udvikling."
|
246 |
+
|
247 |
+
#: ../content-aware-sidebars.php:1168
|
248 |
+
msgid "Or you could:"
|
249 |
+
msgstr "Eller du kunne:"
|
250 |
+
|
251 |
+
#: ../content-aware-sidebars.php:1170
|
252 |
+
msgid "Rate the plugin on WordPress.org"
|
253 |
+
msgstr "Bedømme pluginnet på WordPress.org"
|
254 |
+
|
255 |
+
#: ../content-aware-sidebars.php:1171
|
256 |
+
msgid "Link to the plugin page"
|
257 |
+
msgstr "Linke til plugin-siden"
|
258 |
+
|
259 |
+
#: ../content-aware-sidebars.php:1172
|
260 |
+
msgid "Translate the plugin into your language"
|
261 |
+
msgstr "Oversæt dette plugin til dit sprog"
|
262 |
|
263 |
+
#: ../content-aware-sidebars.php:1296
|
264 |
+
msgid "Remove this group and its contents permanently?"
|
265 |
+
msgstr "Fjern denne gruppe og dens indhold permanent?"
|
266 |
|
267 |
+
#: ../content-aware-sidebars.php:1297
|
268 |
+
msgid "No results found."
|
269 |
+
msgstr "Ingen resultater fundet."
|
270 |
|
271 |
+
#: ../modules/abstract.php:108
|
272 |
+
#, php-format
|
273 |
msgid "Show with All %s"
|
274 |
msgstr "Vis ved alle %s"
|
275 |
|
276 |
+
#: ../modules/abstract.php:118 ../modules/post_type.php:181
|
277 |
+
#: ../modules/taxonomy.php:235
|
278 |
msgid "View All"
|
279 |
msgstr "Vis alle"
|
280 |
|
281 |
+
#: ../modules/abstract.php:125 ../modules/abstract.php:128
|
282 |
+
#: ../modules/post_type.php:187 ../modules/post_type.php:190
|
283 |
+
#: ../modules/taxonomy.php:241 ../modules/taxonomy.php:244
|
284 |
+
msgid "Search"
|
285 |
+
msgstr "Søg"
|
286 |
+
|
287 |
+
#: ../modules/abstract.php:136
|
288 |
+
msgid "Add to Group"
|
289 |
+
msgstr "Tilføj til gruppe"
|
290 |
+
|
291 |
+
#: ../modules/author.php:22
|
292 |
msgid "Authors"
|
293 |
msgstr "Forfattere"
|
294 |
|
295 |
+
#: ../modules/bbpress.php:23
|
296 |
msgid "bbPress User Profiles"
|
297 |
msgstr "bbPress brugerprofiler"
|
298 |
|
299 |
+
#: ../modules/bp_member.php:21
|
300 |
msgid "BuddyPress Members"
|
301 |
msgstr "BuddyPress medlemmer"
|
302 |
|
303 |
+
#: ../modules/page_template.php:22
|
304 |
msgid "Page Templates"
|
305 |
msgstr "Skabeloner"
|
306 |
|
307 |
+
#: ../modules/polylang.php:21 ../modules/qtranslate.php:21
|
308 |
+
#: ../modules/transposh.php:21 ../modules/wpml.php:21
|
309 |
msgid "Languages"
|
310 |
msgstr "Sprog"
|
311 |
|
312 |
+
#: ../modules/post_type.php:28
|
313 |
msgid "Post Types"
|
314 |
msgstr "Indholdstyper"
|
315 |
|
316 |
+
#: ../modules/post_type.php:160 ../modules/taxonomy.php:217
|
317 |
msgid "Automatically select new children of a selected ancestor"
|
318 |
msgstr "Vælg automatisk nye børn af den valgte forælder"
|
319 |
|
320 |
+
#: ../modules/post_type.php:166 ../modules/taxonomy.php:221
|
321 |
+
#, php-format
|
322 |
+
msgid "Display with %s"
|
323 |
+
msgstr "Vis ved %s"
|
324 |
+
|
325 |
+
#: ../modules/post_type.php:171 ../modules/taxonomy.php:225
|
326 |
msgid "No items."
|
327 |
msgstr "Ingen elementer."
|
328 |
|
329 |
+
#: ../modules/post_type.php:176
|
330 |
+
msgid "Most Recent"
|
331 |
+
msgstr "Seneste"
|
332 |
+
|
333 |
+
#: ../modules/static.php:23
|
334 |
msgid "Static Pages"
|
335 |
msgstr "Statiske sider"
|
336 |
|
337 |
+
#: ../modules/static.php:33
|
338 |
msgid "Front Page"
|
339 |
msgstr "Forside"
|
340 |
|
341 |
+
#: ../modules/static.php:34
|
342 |
msgid "Search Results"
|
343 |
msgstr "Søgeresultater"
|
344 |
|
345 |
+
#: ../modules/static.php:35
|
346 |
msgid "404 Page"
|
347 |
msgstr "404-side"
|
348 |
|
349 |
+
#: ../modules/taxonomy.php:34
|
350 |
msgid "Taxonomies"
|
351 |
msgstr "Taksonomier"
|
352 |
|
353 |
+
#: ../modules/taxonomy.php:230
|
|
|
|
|
|
|
|
|
354 |
msgid "Most Used"
|
355 |
msgstr "Mest brugte"
|
356 |
|
357 |
+
#: ../modules/url.php:22
|
358 |
+
msgid "URLs"
|
359 |
+
msgstr "URLs"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
|
361 |
+
#: ../modules/url.php:40
|
362 |
+
msgid "Add"
|
363 |
+
msgstr "Tilføj"
|
lang/content-aware-sidebars-de_DE.mo
ADDED
Binary file
|
lang/content-aware-sidebars-de_DE.po
ADDED
@@ -0,0 +1,460 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Content Aware Sidebars v2.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2014-01-02 21:04+0100\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: Poedit 1.5.5\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-Basepath: ../\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"Language: de_DE\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ content-aware-sidebars
|
23 |
+
#. translators: plugin header field 'Name'
|
24 |
+
#: content-aware-sidebars.php:0
|
25 |
+
msgid "Content Aware Sidebars"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
# @ content-aware-sidebars
|
29 |
+
#. translators: plugin header field 'PluginURI'
|
30 |
+
#. translators: plugin header field 'AuthorURI'
|
31 |
+
#: content-aware-sidebars.php:0
|
32 |
+
msgid "http://www.intox.dk/"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
# @ content-aware-sidebars
|
36 |
+
#. translators: plugin header field 'Description'
|
37 |
+
#: content-aware-sidebars.php:0
|
38 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
39 |
+
msgstr "Sidebars abhängig vom dargestellten Inhalt einblenden"
|
40 |
+
|
41 |
+
# @ content-aware-sidebars
|
42 |
+
#. translators: plugin header field 'Author'
|
43 |
+
#: content-aware-sidebars.php:0
|
44 |
+
msgid "Joachim Jensen, Intox Studio"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
# @ content-aware-sidebars
|
48 |
+
#. translators: plugin header field 'Version'
|
49 |
+
#: content-aware-sidebars.php:0
|
50 |
+
msgid "2.0"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
# @ content-aware-sidebars
|
54 |
+
#: content-aware-sidebars.php:233 content-aware-sidebars.php:432
|
55 |
+
msgid "Exposure"
|
56 |
+
msgstr "Darstellung"
|
57 |
+
|
58 |
+
# @ content-aware-sidebars
|
59 |
+
#: content-aware-sidebars.php:239
|
60 |
+
msgid "Singular"
|
61 |
+
msgstr "Beitragsseite"
|
62 |
+
|
63 |
+
# @ content-aware-sidebars
|
64 |
+
#: content-aware-sidebars.php:240
|
65 |
+
msgid "Singular & Archive"
|
66 |
+
msgstr "Beitrags- & Archivseite"
|
67 |
+
|
68 |
+
# @ content-aware-sidebars
|
69 |
+
#: content-aware-sidebars.php:241
|
70 |
+
msgid "Archive"
|
71 |
+
msgstr "Archivseite"
|
72 |
+
|
73 |
+
# @ content-aware-sidebars
|
74 |
+
#: content-aware-sidebars.php:245 content-aware-sidebars.php:433
|
75 |
+
msgctxt "option"
|
76 |
+
msgid "Handle"
|
77 |
+
msgstr "Funktion"
|
78 |
+
|
79 |
+
# @ content-aware-sidebars
|
80 |
+
#: content-aware-sidebars.php:247
|
81 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
82 |
+
msgstr ""
|
83 |
+
"Ersetze Haupt-Sidebar, mit Haupt-Sidebar verbinden oder manuell hinzufügen."
|
84 |
+
|
85 |
+
# @ content-aware-sidebars
|
86 |
+
#: content-aware-sidebars.php:251
|
87 |
+
msgid "Replace"
|
88 |
+
msgstr "Ersetze"
|
89 |
+
|
90 |
+
# @ content-aware-sidebars
|
91 |
+
#: content-aware-sidebars.php:252
|
92 |
+
msgid "Merge"
|
93 |
+
msgstr "Verbinde"
|
94 |
+
|
95 |
+
# @ content-aware-sidebars
|
96 |
+
#: content-aware-sidebars.php:253
|
97 |
+
msgid "Manual"
|
98 |
+
msgstr "Manuell"
|
99 |
+
|
100 |
+
# @ content-aware-sidebars
|
101 |
+
#: content-aware-sidebars.php:257
|
102 |
+
msgid "Host Sidebar"
|
103 |
+
msgstr "Haupt Sidebar"
|
104 |
+
|
105 |
+
# @ content-aware-sidebars
|
106 |
+
#: content-aware-sidebars.php:265 content-aware-sidebars.php:434
|
107 |
+
msgid "Merge position"
|
108 |
+
msgstr "Position bei verbinden"
|
109 |
+
|
110 |
+
# @ content-aware-sidebars
|
111 |
+
#: content-aware-sidebars.php:267
|
112 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
113 |
+
msgstr ""
|
114 |
+
"Beim Verbinden platziere die Sidebar ober- oder unterhalb der Haupt Sidebar."
|
115 |
+
|
116 |
+
# @ content-aware-sidebars
|
117 |
+
#: content-aware-sidebars.php:271
|
118 |
+
msgid "Top"
|
119 |
+
msgstr "Oberhalb"
|
120 |
+
|
121 |
+
# @ content-aware-sidebars
|
122 |
+
#: content-aware-sidebars.php:272
|
123 |
+
msgid "Bottom"
|
124 |
+
msgstr "Unterhalb"
|
125 |
+
|
126 |
+
# @ content-aware-sidebars
|
127 |
+
#: content-aware-sidebars.php:297
|
128 |
+
msgid "Sidebars"
|
129 |
+
msgstr "Sidebars"
|
130 |
+
|
131 |
+
# @ content-aware-sidebars
|
132 |
+
#: content-aware-sidebars.php:298
|
133 |
+
msgid "Sidebar"
|
134 |
+
msgstr "Sidebar"
|
135 |
+
|
136 |
+
# @ content-aware-sidebars
|
137 |
+
#: content-aware-sidebars.php:299
|
138 |
+
msgctxt "sidebar"
|
139 |
+
msgid "Add New"
|
140 |
+
msgstr "Neu hinzufügen"
|
141 |
+
|
142 |
+
# @ content-aware-sidebars
|
143 |
+
#: content-aware-sidebars.php:300
|
144 |
+
msgid "Add New Sidebar"
|
145 |
+
msgstr "Neue Sidebar erstellen"
|
146 |
+
|
147 |
+
# @ content-aware-sidebars
|
148 |
+
#: content-aware-sidebars.php:301
|
149 |
+
msgid "Edit Sidebar"
|
150 |
+
msgstr "Sidebar bearbeiten"
|
151 |
+
|
152 |
+
# @ content-aware-sidebars
|
153 |
+
#: content-aware-sidebars.php:302
|
154 |
+
msgid "New Sidebar"
|
155 |
+
msgstr "Neue Sidebar"
|
156 |
+
|
157 |
+
# @ content-aware-sidebars
|
158 |
+
#: content-aware-sidebars.php:303
|
159 |
+
msgid "All Sidebars"
|
160 |
+
msgstr "Alle Sidebars"
|
161 |
+
|
162 |
+
# @ content-aware-sidebars
|
163 |
+
#: content-aware-sidebars.php:304
|
164 |
+
msgid "View Sidebar"
|
165 |
+
msgstr "Sidebar ansehen"
|
166 |
+
|
167 |
+
# @ content-aware-sidebars
|
168 |
+
#: content-aware-sidebars.php:305
|
169 |
+
msgid "Search Sidebars"
|
170 |
+
msgstr "Sidebars durchsuchen"
|
171 |
+
|
172 |
+
# @ content-aware-sidebars
|
173 |
+
#: content-aware-sidebars.php:306
|
174 |
+
msgid "No sidebars found"
|
175 |
+
msgstr "Keine Sidebars gefunden"
|
176 |
+
|
177 |
+
# @ content-aware-sidebars
|
178 |
+
#: content-aware-sidebars.php:307
|
179 |
+
msgid "No sidebars found in Trash"
|
180 |
+
msgstr "Keine Sidebars im Papierkorb gefunden"
|
181 |
+
|
182 |
+
# @ content-aware-sidebars
|
183 |
+
#: content-aware-sidebars.php:320 content-aware-sidebars.php:926
|
184 |
+
msgid "Condition Groups"
|
185 |
+
msgstr "Gruppen"
|
186 |
+
|
187 |
+
# @ content-aware-sidebars
|
188 |
+
#: content-aware-sidebars.php:321
|
189 |
+
msgid "Condition Group"
|
190 |
+
msgstr "Gruppe"
|
191 |
+
|
192 |
+
# @ content-aware-sidebars
|
193 |
+
#: content-aware-sidebars.php:322
|
194 |
+
msgctxt "group"
|
195 |
+
msgid "Add New"
|
196 |
+
msgstr "Neu erstellen"
|
197 |
+
|
198 |
+
# @ content-aware-sidebars
|
199 |
+
#: content-aware-sidebars.php:323 content-aware-sidebars.php:926
|
200 |
+
#: content-aware-sidebars.php:951
|
201 |
+
msgid "Add New Group"
|
202 |
+
msgstr "Erstelle neue Gruppe"
|
203 |
+
|
204 |
+
# @ content-aware-sidebars
|
205 |
+
#: content-aware-sidebars.php:324 content-aware-sidebars.php:940
|
206 |
+
#: content-aware-sidebars.php:1294
|
207 |
+
msgctxt "group"
|
208 |
+
msgid "Edit"
|
209 |
+
msgstr "Bearbeiten"
|
210 |
+
|
211 |
+
# @ content-aware-sidebars
|
212 |
+
#: content-aware-sidebars.php:350 content-aware-sidebars.php:353
|
213 |
+
msgid "Sidebar updated."
|
214 |
+
msgstr "Sidebar wurde geändert."
|
215 |
+
|
216 |
+
# @ content-aware-sidebars
|
217 |
+
#: content-aware-sidebars.php:350 content-aware-sidebars.php:355
|
218 |
+
#: content-aware-sidebars.php:357 content-aware-sidebars.php:362
|
219 |
+
msgid "Manage widgets"
|
220 |
+
msgstr "Widgets bearbeiten"
|
221 |
+
|
222 |
+
# @ content-aware-sidebars
|
223 |
+
#: content-aware-sidebars.php:355
|
224 |
+
msgid "Sidebar published."
|
225 |
+
msgstr "Sidebar wurde publiziert."
|
226 |
+
|
227 |
+
# @ content-aware-sidebars
|
228 |
+
#: content-aware-sidebars.php:356
|
229 |
+
msgid "Sidebar saved."
|
230 |
+
msgstr "Sidebar wurde gesichert."
|
231 |
+
|
232 |
+
# @ content-aware-sidebars
|
233 |
+
#: content-aware-sidebars.php:357
|
234 |
+
msgid "Sidebar submitted."
|
235 |
+
msgstr "Sidebar wurde übertragen."
|
236 |
+
|
237 |
+
# @ content-aware-sidebars
|
238 |
+
#: content-aware-sidebars.php:358
|
239 |
+
#, php-format
|
240 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>."
|
241 |
+
msgstr "Sidebar wurde eingeplant für: <strong>%1$s</strong>."
|
242 |
+
|
243 |
+
# @ default
|
244 |
+
#: content-aware-sidebars.php:360
|
245 |
+
msgid "M j, Y @ G:i"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
# @ content-aware-sidebars
|
249 |
+
#: content-aware-sidebars.php:363
|
250 |
+
msgid "Sidebar draft updated."
|
251 |
+
msgstr "Sidebar-Entwurf wurde gesichert."
|
252 |
+
|
253 |
+
# @ content-aware-sidebars
|
254 |
+
#: content-aware-sidebars.php:408 content-aware-sidebars.php:489
|
255 |
+
msgid "Please update Host Sidebar"
|
256 |
+
msgstr "Bitte Haupt-Sidebar aktualisieren."
|
257 |
+
|
258 |
+
# @ content-aware-sidebars
|
259 |
+
#: content-aware-sidebars.php:544
|
260 |
+
msgid "Manage Widgets"
|
261 |
+
msgstr "Widgetverwaltung"
|
262 |
+
|
263 |
+
# @ content-aware-sidebars
|
264 |
+
#: content-aware-sidebars.php:850
|
265 |
+
msgid "Support the Author of Content Aware Sidebars"
|
266 |
+
msgstr "Den Autor von Content Aware Sidebars unterstützen"
|
267 |
+
|
268 |
+
# @ content-aware-sidebars
|
269 |
+
#: content-aware-sidebars.php:858
|
270 |
+
msgid "Content"
|
271 |
+
msgstr "Inhalt"
|
272 |
+
|
273 |
+
# @ content-aware-sidebars
|
274 |
+
#: content-aware-sidebars.php:866
|
275 |
+
msgid "Options"
|
276 |
+
msgstr "Optionen"
|
277 |
+
|
278 |
+
# @ content-aware-sidebars
|
279 |
+
#: content-aware-sidebars.php:927
|
280 |
+
msgid ""
|
281 |
+
"Click to edit a group or create a new one. Select content on the left to add "
|
282 |
+
"it. In each group, you can combine different types of associated content."
|
283 |
+
msgstr ""
|
284 |
+
"Klicke \"Bearbeiten\" um eine Gruppe auszuwählen oder lege eine neue Gruppe "
|
285 |
+
"an. Wähle links den Inhalt aus und klicke auf \"Zur Gruppe hinzufügen\" um "
|
286 |
+
"ihn der Gruppe zuzuordnen. In jeder Gruppe können verschiedene Inhaltstypen "
|
287 |
+
"kombiniert werden."
|
288 |
+
|
289 |
+
# @ content-aware-sidebars
|
290 |
+
#: content-aware-sidebars.php:928
|
291 |
+
msgid "Display sidebar with"
|
292 |
+
msgstr "Zeige Sidebar an bei"
|
293 |
+
|
294 |
+
# @ content-aware-sidebars
|
295 |
+
#: content-aware-sidebars.php:937 content-aware-sidebars.php:1292
|
296 |
+
msgid "Save"
|
297 |
+
msgstr "Sichern"
|
298 |
+
|
299 |
+
# @ content-aware-sidebars
|
300 |
+
#: content-aware-sidebars.php:937 content-aware-sidebars.php:1293
|
301 |
+
msgid "Cancel"
|
302 |
+
msgstr "Abbrechen"
|
303 |
+
|
304 |
+
# @ content-aware-sidebars
|
305 |
+
#: content-aware-sidebars.php:940 content-aware-sidebars.php:1295
|
306 |
+
msgid "Remove"
|
307 |
+
msgstr "Löschen"
|
308 |
+
|
309 |
+
# @ content-aware-sidebars
|
310 |
+
#: content-aware-sidebars.php:1159
|
311 |
+
msgid ""
|
312 |
+
"If you love this plugin, please consider donating to support future "
|
313 |
+
"development."
|
314 |
+
msgstr ""
|
315 |
+
"Wenn du dieses Plugin magst, dann würde sich der Autor über eine Spende "
|
316 |
+
"freuen."
|
317 |
+
|
318 |
+
# @ content-aware-sidebars
|
319 |
+
#: content-aware-sidebars.php:1168
|
320 |
+
msgid "Or you could:"
|
321 |
+
msgstr "Weitere Möglichkeiten:"
|
322 |
+
|
323 |
+
# @ content-aware-sidebars
|
324 |
+
#: content-aware-sidebars.php:1170
|
325 |
+
msgid "Rate the plugin on WordPress.org"
|
326 |
+
msgstr "Dieses Plugin bei WordPress.org bewerten"
|
327 |
+
|
328 |
+
# @ content-aware-sidebars
|
329 |
+
#: content-aware-sidebars.php:1171
|
330 |
+
msgid "Link to the plugin page"
|
331 |
+
msgstr "Link zur Plugin-Seite"
|
332 |
+
|
333 |
+
# @ content-aware-sidebars
|
334 |
+
#: content-aware-sidebars.php:1172
|
335 |
+
msgid "Translate the plugin into your language"
|
336 |
+
msgstr "Übersetze das Plugin in deine Sprache"
|
337 |
+
|
338 |
+
# @ content-aware-sidebars
|
339 |
+
#: content-aware-sidebars.php:1296
|
340 |
+
msgid "Remove this group and its contents permanently?"
|
341 |
+
msgstr "Diese Gruppe und seine Inhalte unwiderruflich löschen?"
|
342 |
+
|
343 |
+
# @ content-aware-sidebars
|
344 |
+
#: content-aware-sidebars.php:1297
|
345 |
+
msgid "No results found."
|
346 |
+
msgstr "Keine Ergebnisse gefunden."
|
347 |
+
|
348 |
+
# @ content-aware-sidebars
|
349 |
+
#: modules/abstract.php:108
|
350 |
+
#, php-format
|
351 |
+
msgid "Show with All %s"
|
352 |
+
msgstr "Anzeige bei allen %s"
|
353 |
+
|
354 |
+
# @ default
|
355 |
+
#: modules/abstract.php:118 modules/post_type.php:181 modules/taxonomy.php:235
|
356 |
+
msgid "View All"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
# @ default
|
360 |
+
#: modules/abstract.php:125 modules/abstract.php:128 modules/post_type.php:187
|
361 |
+
#: modules/post_type.php:190 modules/taxonomy.php:241 modules/taxonomy.php:244
|
362 |
+
msgid "Search"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
# @ content-aware-sidebars
|
366 |
+
#: modules/abstract.php:136
|
367 |
+
msgid "Add to Group"
|
368 |
+
msgstr "Zur Gruppe hinzufügen"
|
369 |
+
|
370 |
+
# @ content-aware-sidebars
|
371 |
+
#: modules/author.php:22
|
372 |
+
msgid "Authors"
|
373 |
+
msgstr "Autoren"
|
374 |
+
|
375 |
+
# @ content-aware-sidebars
|
376 |
+
#: modules/bbpress.php:23
|
377 |
+
msgid "bbPress User Profiles"
|
378 |
+
msgstr "bbPress Benutzerprofile"
|
379 |
+
|
380 |
+
# @ content-aware-sidebars
|
381 |
+
#: modules/bp_member.php:21
|
382 |
+
msgid "BuddyPress Members"
|
383 |
+
msgstr "BuddyPress Mitglieder"
|
384 |
+
|
385 |
+
# @ content-aware-sidebars
|
386 |
+
#: modules/page_template.php:22
|
387 |
+
msgid "Page Templates"
|
388 |
+
msgstr "Seitenvorlage"
|
389 |
+
|
390 |
+
# @ content-aware-sidebars
|
391 |
+
#: modules/polylang.php:21 modules/qtranslate.php:21 modules/transposh.php:21
|
392 |
+
#: modules/wpml.php:21
|
393 |
+
msgid "Languages"
|
394 |
+
msgstr "Sprachen"
|
395 |
+
|
396 |
+
# @ content-aware-sidebars
|
397 |
+
#: modules/post_type.php:28
|
398 |
+
msgid "Post Types"
|
399 |
+
msgstr "Post Types"
|
400 |
+
|
401 |
+
# @ content-aware-sidebars
|
402 |
+
#: modules/post_type.php:160 modules/taxonomy.php:217
|
403 |
+
msgid "Automatically select new children of a selected ancestor"
|
404 |
+
msgstr "Neue untergeordnete Einträge automatisch markieren"
|
405 |
+
|
406 |
+
# @ content-aware-sidebars
|
407 |
+
#: modules/post_type.php:166 modules/taxonomy.php:221
|
408 |
+
#, php-format
|
409 |
+
msgid "Display with %s"
|
410 |
+
msgstr "Anzeigen bei %s"
|
411 |
+
|
412 |
+
# @ default
|
413 |
+
#: modules/post_type.php:171 modules/taxonomy.php:225
|
414 |
+
msgid "No items."
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
# @ default
|
418 |
+
#: modules/post_type.php:176
|
419 |
+
msgid "Most Recent"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
# @ content-aware-sidebars
|
423 |
+
#: modules/static.php:23
|
424 |
+
msgid "Static Pages"
|
425 |
+
msgstr "Statische Seiten"
|
426 |
+
|
427 |
+
# @ content-aware-sidebars
|
428 |
+
#: modules/static.php:33
|
429 |
+
msgid "Front Page"
|
430 |
+
msgstr "Titelseite"
|
431 |
+
|
432 |
+
# @ content-aware-sidebars
|
433 |
+
#: modules/static.php:34
|
434 |
+
msgid "Search Results"
|
435 |
+
msgstr "Suchergebnisse"
|
436 |
+
|
437 |
+
# @ content-aware-sidebars
|
438 |
+
#: modules/static.php:35
|
439 |
+
msgid "404 Page"
|
440 |
+
msgstr "404 Seite"
|
441 |
+
|
442 |
+
# @ content-aware-sidebars
|
443 |
+
#: modules/taxonomy.php:34
|
444 |
+
msgid "Taxonomies"
|
445 |
+
msgstr "Taxonomien"
|
446 |
+
|
447 |
+
# @ default
|
448 |
+
#: modules/taxonomy.php:230
|
449 |
+
msgid "Most Used"
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
# @ content-aware-sidebars
|
453 |
+
#: modules/url.php:22
|
454 |
+
msgid "URLs"
|
455 |
+
msgstr "URLs"
|
456 |
+
|
457 |
+
# @ content-aware-sidebars
|
458 |
+
#: modules/url.php:40
|
459 |
+
msgid "Add"
|
460 |
+
msgstr "Hinzufügen"
|
lang/content-aware-sidebars-es_ES.mo
ADDED
Binary file
|
lang/content-aware-sidebars-es_ES.po
ADDED
@@ -0,0 +1,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012 Content Aware Sidebars
|
2 |
+
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 1.3.5\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-11-29 15:13+0100\n"
|
8 |
+
"PO-Revision-Date: 2013-11-29 22:49+0100\n"
|
9 |
+
"Last-Translator: \n"
|
10 |
+
"Language-Team: Analia Jensen <analiajensen@gmail.com>\n"
|
11 |
+
"Language: es_ES\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 1.5.5\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
|
18 |
+
#: ../content-aware-sidebars.php:117
|
19 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
20 |
+
msgstr ""
|
21 |
+
"Administrar y mostrar las barras laterales, en función del contenido que se "
|
22 |
+
"está viendo"
|
23 |
+
|
24 |
+
#: ../content-aware-sidebars.php:118
|
25 |
+
msgid "Content Aware Sidebars"
|
26 |
+
msgstr "Content Aware Sidebars (Barras Laterales)"
|
27 |
+
|
28 |
+
#: ../content-aware-sidebars.php:233 ../content-aware-sidebars.php:432
|
29 |
+
msgid "Exposure"
|
30 |
+
msgstr "Exposición"
|
31 |
+
|
32 |
+
#: ../content-aware-sidebars.php:239
|
33 |
+
msgid "Singular"
|
34 |
+
msgstr "Singular"
|
35 |
+
|
36 |
+
#: ../content-aware-sidebars.php:240
|
37 |
+
msgid "Singular & Archive"
|
38 |
+
msgstr "Singular y Archivo"
|
39 |
+
|
40 |
+
#: ../content-aware-sidebars.php:241
|
41 |
+
msgid "Archive"
|
42 |
+
msgstr "Archivo"
|
43 |
+
|
44 |
+
#: ../content-aware-sidebars.php:245 ../content-aware-sidebars.php:433
|
45 |
+
msgctxt "option"
|
46 |
+
msgid "Handle"
|
47 |
+
msgstr "Acciones"
|
48 |
+
|
49 |
+
#: ../content-aware-sidebars.php:247
|
50 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
51 |
+
msgstr ""
|
52 |
+
"Reemplazar la barra lateral huésped, fusionar con la misma, o añadir una "
|
53 |
+
"barra lateral manualmente."
|
54 |
+
|
55 |
+
#: ../content-aware-sidebars.php:251
|
56 |
+
msgid "Replace"
|
57 |
+
msgstr "Reemplazar"
|
58 |
+
|
59 |
+
#: ../content-aware-sidebars.php:252
|
60 |
+
msgid "Merge"
|
61 |
+
msgstr "Fusionar"
|
62 |
+
|
63 |
+
#: ../content-aware-sidebars.php:253
|
64 |
+
msgid "Manual"
|
65 |
+
msgstr "Manualmente"
|
66 |
+
|
67 |
+
#: ../content-aware-sidebars.php:257
|
68 |
+
msgid "Host Sidebar"
|
69 |
+
msgstr "Barra lateral huésped"
|
70 |
+
|
71 |
+
#: ../content-aware-sidebars.php:265 ../content-aware-sidebars.php:434
|
72 |
+
msgid "Merge position"
|
73 |
+
msgstr "Fusionar en posición"
|
74 |
+
|
75 |
+
#: ../content-aware-sidebars.php:267
|
76 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
77 |
+
msgstr ""
|
78 |
+
"Coloque esta barra lateral en la parte de arriba o abajo del huésped, al "
|
79 |
+
"fusionar."
|
80 |
+
|
81 |
+
#: ../content-aware-sidebars.php:271
|
82 |
+
msgid "Top"
|
83 |
+
msgstr "Arriba"
|
84 |
+
|
85 |
+
#: ../content-aware-sidebars.php:272
|
86 |
+
msgid "Bottom"
|
87 |
+
msgstr "Abajo"
|
88 |
+
|
89 |
+
#: ../content-aware-sidebars.php:297
|
90 |
+
msgid "Sidebars"
|
91 |
+
msgstr "Barras laterales"
|
92 |
+
|
93 |
+
#: ../content-aware-sidebars.php:298
|
94 |
+
msgid "Sidebar"
|
95 |
+
msgstr "Barra lateral"
|
96 |
+
|
97 |
+
#: ../content-aware-sidebars.php:299
|
98 |
+
msgctxt "sidebar"
|
99 |
+
msgid "Add New"
|
100 |
+
msgstr "Añadir nuevo"
|
101 |
+
|
102 |
+
#: ../content-aware-sidebars.php:300
|
103 |
+
msgid "Add New Sidebar"
|
104 |
+
msgstr "Añadir nueva barra lateral"
|
105 |
+
|
106 |
+
#: ../content-aware-sidebars.php:301
|
107 |
+
msgid "Edit Sidebar"
|
108 |
+
msgstr "Editar barra lateral"
|
109 |
+
|
110 |
+
#: ../content-aware-sidebars.php:302
|
111 |
+
msgid "New Sidebar"
|
112 |
+
msgstr "Nueva barra lateral"
|
113 |
+
|
114 |
+
#: ../content-aware-sidebars.php:303
|
115 |
+
msgid "All Sidebars"
|
116 |
+
msgstr "Todas las barras laterales"
|
117 |
+
|
118 |
+
#: ../content-aware-sidebars.php:304
|
119 |
+
msgid "View Sidebar"
|
120 |
+
msgstr "Ver barra lateral"
|
121 |
+
|
122 |
+
#: ../content-aware-sidebars.php:305
|
123 |
+
msgid "Search Sidebars"
|
124 |
+
msgstr "Buscar barras laterales"
|
125 |
+
|
126 |
+
#: ../content-aware-sidebars.php:306
|
127 |
+
msgid "No sidebars found"
|
128 |
+
msgstr "No se encontraron barras laterales"
|
129 |
+
|
130 |
+
#: ../content-aware-sidebars.php:307
|
131 |
+
msgid "No sidebars found in Trash"
|
132 |
+
msgstr "Ninguna barra lateral encontradada en la papelera"
|
133 |
+
|
134 |
+
#: ../content-aware-sidebars.php:320 ../content-aware-sidebars.php:926
|
135 |
+
msgid "Condition Groups"
|
136 |
+
msgstr "Grupos de condiciones"
|
137 |
+
|
138 |
+
#: ../content-aware-sidebars.php:321
|
139 |
+
msgid "Condition Group"
|
140 |
+
msgstr "Grupo de condiciones"
|
141 |
+
|
142 |
+
#: ../content-aware-sidebars.php:322
|
143 |
+
msgctxt "group"
|
144 |
+
msgid "Add New"
|
145 |
+
msgstr "Añadir nuevo"
|
146 |
+
|
147 |
+
#: ../content-aware-sidebars.php:323 ../content-aware-sidebars.php:926
|
148 |
+
#: ../content-aware-sidebars.php:951
|
149 |
+
msgid "Add New Group"
|
150 |
+
msgstr "Añadir nuevo"
|
151 |
+
|
152 |
+
#: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:940
|
153 |
+
#: ../content-aware-sidebars.php:1294
|
154 |
+
msgctxt "group"
|
155 |
+
msgid "Edit"
|
156 |
+
msgstr "Editar"
|
157 |
+
|
158 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:353
|
159 |
+
msgid "Sidebar updated."
|
160 |
+
msgstr "Barra lateral actualizada"
|
161 |
+
|
162 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:355
|
163 |
+
#: ../content-aware-sidebars.php:357 ../content-aware-sidebars.php:362
|
164 |
+
msgid "Manage widgets"
|
165 |
+
msgstr "Administrar los widgets"
|
166 |
+
|
167 |
+
#: ../content-aware-sidebars.php:355
|
168 |
+
msgid "Sidebar published."
|
169 |
+
msgstr "Barra lateral publicada."
|
170 |
+
|
171 |
+
#: ../content-aware-sidebars.php:356
|
172 |
+
msgid "Sidebar saved."
|
173 |
+
msgstr "Barra lateral guardada."
|
174 |
+
|
175 |
+
#: ../content-aware-sidebars.php:357
|
176 |
+
msgid "Sidebar submitted."
|
177 |
+
msgstr "Barra lateral actualizada."
|
178 |
+
|
179 |
+
#: ../content-aware-sidebars.php:358
|
180 |
+
#, php-format
|
181 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>."
|
182 |
+
msgstr "Barra lateral programada el: <strong>%1$s</strong>."
|
183 |
+
|
184 |
+
#: ../content-aware-sidebars.php:360
|
185 |
+
msgid "M j, Y @ G:i"
|
186 |
+
msgstr "j M, Y @ G:i"
|
187 |
+
|
188 |
+
#: ../content-aware-sidebars.php:363
|
189 |
+
msgid "Sidebar draft updated."
|
190 |
+
msgstr "Borrador de la barra lateral actualizado"
|
191 |
+
|
192 |
+
#: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:489
|
193 |
+
msgid "Please update Host Sidebar"
|
194 |
+
msgstr "Por favor, actualice la barra lateral huésped"
|
195 |
+
|
196 |
+
#: ../content-aware-sidebars.php:544
|
197 |
+
msgid "Manage Widgets"
|
198 |
+
msgstr "Administrar los widgets"
|
199 |
+
|
200 |
+
#: ../content-aware-sidebars.php:850
|
201 |
+
msgid "Support the Author of Content Aware Sidebars"
|
202 |
+
msgstr "Ayuda al Autor de Content Aware Sidebars"
|
203 |
+
|
204 |
+
#: ../content-aware-sidebars.php:858
|
205 |
+
msgid "Content"
|
206 |
+
msgstr "Contenido"
|
207 |
+
|
208 |
+
#: ../content-aware-sidebars.php:866
|
209 |
+
msgid "Options"
|
210 |
+
msgstr "Opciónes"
|
211 |
+
|
212 |
+
#: ../content-aware-sidebars.php:927
|
213 |
+
msgid ""
|
214 |
+
"Click to edit a group or create a new one. Select content on the left to add "
|
215 |
+
"it. In each group, you can combine different types of associated content."
|
216 |
+
msgstr ""
|
217 |
+
"Haga clic para editar un grupo o crear uno nuevo. Seleccione el contenido de "
|
218 |
+
"la izquierda para añadirlo. En cada grupo, se pueden combinar diferentes "
|
219 |
+
"tipos de contenido asociado."
|
220 |
+
|
221 |
+
#: ../content-aware-sidebars.php:928
|
222 |
+
msgid "Display sidebar with"
|
223 |
+
msgstr "Mostrar la barra lateral con"
|
224 |
+
|
225 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1292
|
226 |
+
msgid "Save"
|
227 |
+
msgstr "Guardar"
|
228 |
+
|
229 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1293
|
230 |
+
msgid "Cancel"
|
231 |
+
msgstr "Cancelar"
|
232 |
+
|
233 |
+
#: ../content-aware-sidebars.php:940 ../content-aware-sidebars.php:1295
|
234 |
+
msgid "Remove"
|
235 |
+
msgstr "Eliminar"
|
236 |
+
|
237 |
+
#: ../content-aware-sidebars.php:1159
|
238 |
+
msgid ""
|
239 |
+
"If you love this plugin, please consider donating to support future "
|
240 |
+
"development."
|
241 |
+
msgstr ""
|
242 |
+
"Si usted ama este plugin, por favor considere hacer una donación para apoyar "
|
243 |
+
"el futuro desarrollo."
|
244 |
+
|
245 |
+
#: ../content-aware-sidebars.php:1168
|
246 |
+
msgid "Or you could:"
|
247 |
+
msgstr "O usted podría:"
|
248 |
+
|
249 |
+
#: ../content-aware-sidebars.php:1170
|
250 |
+
msgid "Rate the plugin on WordPress.org"
|
251 |
+
msgstr "Calificar el plugin en WordPress.org"
|
252 |
+
|
253 |
+
#: ../content-aware-sidebars.php:1171
|
254 |
+
msgid "Link to the plugin page"
|
255 |
+
msgstr "Crear un enlace web refiriendo al plugin"
|
256 |
+
|
257 |
+
#: ../content-aware-sidebars.php:1172
|
258 |
+
msgid "Translate the plugin into your language"
|
259 |
+
msgstr "Traducir el plugin a su idioma"
|
260 |
+
|
261 |
+
#: ../content-aware-sidebars.php:1296
|
262 |
+
msgid "Remove this group and its contents permanently?"
|
263 |
+
msgstr "Eliminar este grupo y sus contenidos de forma permanente?"
|
264 |
+
|
265 |
+
#: ../content-aware-sidebars.php:1297
|
266 |
+
msgid "No results found."
|
267 |
+
msgstr "No se han encontrado resultados."
|
268 |
+
|
269 |
+
#: ../modules/abstract.php:108
|
270 |
+
#, php-format
|
271 |
+
msgid "Show with All %s"
|
272 |
+
msgstr "Mostrar con todos %s"
|
273 |
+
|
274 |
+
#: ../modules/abstract.php:118 ../modules/post_type.php:181
|
275 |
+
#: ../modules/taxonomy.php:235
|
276 |
+
msgid "View All"
|
277 |
+
msgstr "Vis alle"
|
278 |
+
|
279 |
+
#: ../modules/abstract.php:125 ../modules/abstract.php:128
|
280 |
+
#: ../modules/post_type.php:187 ../modules/post_type.php:190
|
281 |
+
#: ../modules/taxonomy.php:241 ../modules/taxonomy.php:244
|
282 |
+
msgid "Search"
|
283 |
+
msgstr "Buscar"
|
284 |
+
|
285 |
+
#: ../modules/abstract.php:136
|
286 |
+
msgid "Add to Group"
|
287 |
+
msgstr "Añadir al grupo"
|
288 |
+
|
289 |
+
#: ../modules/author.php:22
|
290 |
+
msgid "Authors"
|
291 |
+
msgstr "Autores"
|
292 |
+
|
293 |
+
#: ../modules/bbpress.php:23
|
294 |
+
msgid "bbPress User Profiles"
|
295 |
+
msgstr "Perfiles de usuario de bbPress"
|
296 |
+
|
297 |
+
#: ../modules/bp_member.php:21
|
298 |
+
msgid "BuddyPress Members"
|
299 |
+
msgstr "Miembros de BuddyPress"
|
300 |
+
|
301 |
+
#: ../modules/page_template.php:22
|
302 |
+
msgid "Page Templates"
|
303 |
+
msgstr "Plantillas"
|
304 |
+
|
305 |
+
#: ../modules/polylang.php:21 ../modules/qtranslate.php:21
|
306 |
+
#: ../modules/transposh.php:21 ../modules/wpml.php:21
|
307 |
+
msgid "Languages"
|
308 |
+
msgstr "Idiomas"
|
309 |
+
|
310 |
+
#: ../modules/post_type.php:28
|
311 |
+
msgid "Post Types"
|
312 |
+
msgstr "Tipos de contenido"
|
313 |
+
|
314 |
+
#: ../modules/post_type.php:160 ../modules/taxonomy.php:217
|
315 |
+
msgid "Automatically select new children of a selected ancestor"
|
316 |
+
msgstr ""
|
317 |
+
"Seleccionar automáticamente nuevos inferiores de los superiores seleccionados"
|
318 |
+
|
319 |
+
#: ../modules/post_type.php:166 ../modules/taxonomy.php:221
|
320 |
+
#, php-format
|
321 |
+
msgid "Display with %s"
|
322 |
+
msgstr "Mostrar con %s"
|
323 |
+
|
324 |
+
#: ../modules/post_type.php:171 ../modules/taxonomy.php:225
|
325 |
+
msgid "No items."
|
326 |
+
msgstr "Ningun elemento."
|
327 |
+
|
328 |
+
#: ../modules/post_type.php:176
|
329 |
+
msgid "Most Recent"
|
330 |
+
msgstr "Más reciente"
|
331 |
+
|
332 |
+
#: ../modules/static.php:23
|
333 |
+
msgid "Static Pages"
|
334 |
+
msgstr "Páginas estáticas"
|
335 |
+
|
336 |
+
#: ../modules/static.php:33
|
337 |
+
msgid "Front Page"
|
338 |
+
msgstr "Página delantera"
|
339 |
+
|
340 |
+
#: ../modules/static.php:34
|
341 |
+
msgid "Search Results"
|
342 |
+
msgstr "Resultados de la búsqueda"
|
343 |
+
|
344 |
+
#: ../modules/static.php:35
|
345 |
+
msgid "404 Page"
|
346 |
+
msgstr "Página 404"
|
347 |
+
|
348 |
+
#: ../modules/taxonomy.php:34
|
349 |
+
msgid "Taxonomies"
|
350 |
+
msgstr "Taxonomias"
|
351 |
+
|
352 |
+
#: ../modules/taxonomy.php:230
|
353 |
+
msgid "Most Used"
|
354 |
+
msgstr "Mest brugte"
|
355 |
+
|
356 |
+
#: ../modules/url.php:22
|
357 |
+
msgid "URLs"
|
358 |
+
msgstr "URLs"
|
359 |
+
|
360 |
+
#: ../modules/url.php:40
|
361 |
+
msgid "Add"
|
362 |
+
msgstr "Añadir"
|
363 |
+
|
364 |
+
#~ msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
365 |
+
#~ msgstr ""
|
366 |
+
#~ "Barra lateral actualizada. <a href=\"%s\">Administrar los widgets</a>"
|
367 |
+
|
368 |
+
#~ msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
369 |
+
#~ msgstr "Barra lateral publicada. <a href=\"%s\">Administrar los widgets</a>"
|
370 |
+
|
371 |
+
#~ msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
372 |
+
#~ msgstr "Barra lateral enviada. <a href=\"%s\">Administrar los widgets</a>"
|
373 |
+
|
374 |
+
#~ msgid "Spread the Word"
|
375 |
+
#~ msgstr "Ayudar al autor del plugin"
|
376 |
+
|
377 |
+
#~ msgid "Show with %s"
|
378 |
+
#~ msgstr "Mostrar con %s"
|
379 |
+
|
380 |
+
#~ msgid "http://www.intox.dk/"
|
381 |
+
#~ msgstr "http://www.intox.dk/"
|
382 |
+
|
383 |
+
#~ msgid "Joachim Jensen, Intox Studio"
|
384 |
+
#~ msgstr "Joachim Jensen, Intox Studio"
|
385 |
+
|
386 |
+
#~ msgid "Words from the author"
|
387 |
+
#~ msgstr "Et par ord fra forfatteren"
|
388 |
+
|
389 |
+
#~ msgid ""
|
390 |
+
#~ "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> "
|
391 |
+
#~ "and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
392 |
+
#~ msgstr ""
|
393 |
+
#~ "Glem ikke at <a class=\"button\" href=\"%1$s\" target=\"_blank\">vurdere</"
|
394 |
+
#~ "a> og <a class=\"button\" href=\"%2$s\" target=\"_blank\">dele</a> det!"
|
395 |
+
|
396 |
+
#~ msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
397 |
+
#~ msgstr "Jeg bruger Content Aware Sidebars til %23WordPress! :)"
|
398 |
+
|
399 |
+
#~ msgid "bbPress"
|
400 |
+
#~ msgstr "bbPress"
|
401 |
+
|
402 |
+
#~ msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
|
403 |
+
#~ msgstr "Sidebar-udkast opdateret. <a href=\"%s\">Håndter widgets</a>"
|
lang/content-aware-sidebars-hu_HU.mo
ADDED
Binary file
|
lang/content-aware-sidebars-hu_HU.po
ADDED
@@ -0,0 +1,364 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012 Content Aware Sidebars
|
2 |
+
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 2.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-11-29 15:13+0100\n"
|
8 |
+
"PO-Revision-Date: 2014-01-02 21:04+0100\n"
|
9 |
+
"Last-Translator: \n"
|
10 |
+
"Language-Team: Kis Lukács <kislukacs@gmail.com>\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Generator: Poedit 1.5.5\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
17 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
18 |
+
"X-Poedit-Basepath: .\n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
+
"Language: hu_HU\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
"X-Poedit-SearchPath-1: ..\n"
|
24 |
+
|
25 |
+
#: ../content-aware-sidebars.php:117
|
26 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
27 |
+
msgstr "Az oldalsávok kezelése és megjelenítése a tartalomnak megfelelően."
|
28 |
+
|
29 |
+
#: ../content-aware-sidebars.php:118
|
30 |
+
msgid "Content Aware Sidebars"
|
31 |
+
msgstr "Tartalomfüggő oldalsáv"
|
32 |
+
|
33 |
+
#: ../content-aware-sidebars.php:233 ../content-aware-sidebars.php:432
|
34 |
+
msgid "Exposure"
|
35 |
+
msgstr "Expozíció"
|
36 |
+
|
37 |
+
#: ../content-aware-sidebars.php:239
|
38 |
+
msgid "Singular"
|
39 |
+
msgstr "Egyes szám"
|
40 |
+
|
41 |
+
#: ../content-aware-sidebars.php:240
|
42 |
+
msgid "Singular & Archive"
|
43 |
+
msgstr "Egyes szám & archívum"
|
44 |
+
|
45 |
+
#: ../content-aware-sidebars.php:241
|
46 |
+
msgid "Archive"
|
47 |
+
msgstr "Archívum"
|
48 |
+
|
49 |
+
#: ../content-aware-sidebars.php:245 ../content-aware-sidebars.php:433
|
50 |
+
msgctxt "option"
|
51 |
+
msgid "Handle"
|
52 |
+
msgstr "Művelet"
|
53 |
+
|
54 |
+
#: ../content-aware-sidebars.php:247
|
55 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
56 |
+
msgstr ""
|
57 |
+
"Eredeti oldalsáv helyettesítése, egyesítés vele vagy oldalsáv hozzáadása "
|
58 |
+
"manuálisan."
|
59 |
+
|
60 |
+
#: ../content-aware-sidebars.php:251
|
61 |
+
msgid "Replace"
|
62 |
+
msgstr "Helyettesítés"
|
63 |
+
|
64 |
+
#: ../content-aware-sidebars.php:252
|
65 |
+
msgid "Merge"
|
66 |
+
msgstr "Egyesítés"
|
67 |
+
|
68 |
+
#: ../content-aware-sidebars.php:253
|
69 |
+
msgid "Manual"
|
70 |
+
msgstr "Manuális"
|
71 |
+
|
72 |
+
#: ../content-aware-sidebars.php:257
|
73 |
+
msgid "Host Sidebar"
|
74 |
+
msgstr "Eredeti oldalsáv"
|
75 |
+
|
76 |
+
#: ../content-aware-sidebars.php:265 ../content-aware-sidebars.php:434
|
77 |
+
msgid "Merge position"
|
78 |
+
msgstr "Egyesítés helye"
|
79 |
+
|
80 |
+
#: ../content-aware-sidebars.php:267
|
81 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
82 |
+
msgstr ""
|
83 |
+
"Az oldalsáv elhelyezése a eredeti oldalsáv fölött vagy alatt egyesítéskor."
|
84 |
+
|
85 |
+
#: ../content-aware-sidebars.php:271
|
86 |
+
msgid "Top"
|
87 |
+
msgstr "Fent"
|
88 |
+
|
89 |
+
#: ../content-aware-sidebars.php:272
|
90 |
+
msgid "Bottom"
|
91 |
+
msgstr "Lent"
|
92 |
+
|
93 |
+
#: ../content-aware-sidebars.php:297
|
94 |
+
msgid "Sidebars"
|
95 |
+
msgstr "Oldalsávok"
|
96 |
+
|
97 |
+
#: ../content-aware-sidebars.php:298
|
98 |
+
msgid "Sidebar"
|
99 |
+
msgstr "Oldalsáv"
|
100 |
+
|
101 |
+
#: ../content-aware-sidebars.php:299
|
102 |
+
msgctxt "sidebar"
|
103 |
+
msgid "Add New"
|
104 |
+
msgstr "Új hozzáadása"
|
105 |
+
|
106 |
+
#: ../content-aware-sidebars.php:300
|
107 |
+
msgid "Add New Sidebar"
|
108 |
+
msgstr "Új oldalsáv hozzáadása"
|
109 |
+
|
110 |
+
#: ../content-aware-sidebars.php:301
|
111 |
+
msgid "Edit Sidebar"
|
112 |
+
msgstr "Oldalsáv szerkesztése"
|
113 |
+
|
114 |
+
#: ../content-aware-sidebars.php:302
|
115 |
+
msgid "New Sidebar"
|
116 |
+
msgstr "Új oldalsáv"
|
117 |
+
|
118 |
+
#: ../content-aware-sidebars.php:303
|
119 |
+
msgid "All Sidebars"
|
120 |
+
msgstr "Összes oldalsáv"
|
121 |
+
|
122 |
+
#: ../content-aware-sidebars.php:304
|
123 |
+
msgid "View Sidebar"
|
124 |
+
msgstr "Oldalsáv megtekintése"
|
125 |
+
|
126 |
+
#: ../content-aware-sidebars.php:305
|
127 |
+
msgid "Search Sidebars"
|
128 |
+
msgstr "Oldalsáv keresése"
|
129 |
+
|
130 |
+
#: ../content-aware-sidebars.php:306
|
131 |
+
msgid "No sidebars found"
|
132 |
+
msgstr "Oldalsáv nem található"
|
133 |
+
|
134 |
+
#: ../content-aware-sidebars.php:307
|
135 |
+
msgid "No sidebars found in Trash"
|
136 |
+
msgstr "Oldalsáv nem található a kukában"
|
137 |
+
|
138 |
+
#: ../content-aware-sidebars.php:320 ../content-aware-sidebars.php:926
|
139 |
+
msgid "Condition Groups"
|
140 |
+
msgstr "Állapot csoportok"
|
141 |
+
|
142 |
+
#: ../content-aware-sidebars.php:321
|
143 |
+
msgid "Condition Group"
|
144 |
+
msgstr "Állapot csoport"
|
145 |
+
|
146 |
+
#: ../content-aware-sidebars.php:322
|
147 |
+
msgctxt "group"
|
148 |
+
msgid "Add New"
|
149 |
+
msgstr "Új hozzáadása"
|
150 |
+
|
151 |
+
#: ../content-aware-sidebars.php:323 ../content-aware-sidebars.php:926
|
152 |
+
#: ../content-aware-sidebars.php:951
|
153 |
+
msgid "Add New Group"
|
154 |
+
msgstr "Új csoport hozzáadása"
|
155 |
+
|
156 |
+
#: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:940
|
157 |
+
#: ../content-aware-sidebars.php:1294
|
158 |
+
msgctxt "group"
|
159 |
+
msgid "Edit"
|
160 |
+
msgstr "Szerkesztés"
|
161 |
+
|
162 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:353
|
163 |
+
msgid "Sidebar updated."
|
164 |
+
msgstr "Oldalsáv frissítve."
|
165 |
+
|
166 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:355
|
167 |
+
#: ../content-aware-sidebars.php:357 ../content-aware-sidebars.php:362
|
168 |
+
msgid "Manage widgets"
|
169 |
+
msgstr "Widgetek kezelése"
|
170 |
+
|
171 |
+
#: ../content-aware-sidebars.php:355
|
172 |
+
msgid "Sidebar published."
|
173 |
+
msgstr "Oldalsáv közzétéve."
|
174 |
+
|
175 |
+
#: ../content-aware-sidebars.php:356
|
176 |
+
msgid "Sidebar saved."
|
177 |
+
msgstr "Oldalsáv mentve."
|
178 |
+
|
179 |
+
#: ../content-aware-sidebars.php:357
|
180 |
+
msgid "Sidebar submitted."
|
181 |
+
msgstr "Oldalsáv létrehozva."
|
182 |
+
|
183 |
+
#: ../content-aware-sidebars.php:358
|
184 |
+
#, php-format
|
185 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>."
|
186 |
+
msgstr "Oldalsáv időzítve: <strong>%1$s</strong>."
|
187 |
+
|
188 |
+
#: ../content-aware-sidebars.php:360
|
189 |
+
msgid "M j, Y @ G:i"
|
190 |
+
msgstr "M j, Y @ G:i"
|
191 |
+
|
192 |
+
#: ../content-aware-sidebars.php:363
|
193 |
+
msgid "Sidebar draft updated."
|
194 |
+
msgstr "Oldalsáv vázlat frissítve."
|
195 |
+
|
196 |
+
#: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:489
|
197 |
+
msgid "Please update Host Sidebar"
|
198 |
+
msgstr "Kérjük, frissítse az eredeti oldalsávot"
|
199 |
+
|
200 |
+
#: ../content-aware-sidebars.php:544
|
201 |
+
msgid "Manage Widgets"
|
202 |
+
msgstr "Widgetek kezelése"
|
203 |
+
|
204 |
+
#: ../content-aware-sidebars.php:850
|
205 |
+
msgid "Support the Author of Content Aware Sidebars"
|
206 |
+
msgstr "A szerző támogatása"
|
207 |
+
|
208 |
+
#: ../content-aware-sidebars.php:858
|
209 |
+
msgid "Content"
|
210 |
+
msgstr "Tartalom"
|
211 |
+
|
212 |
+
#: ../content-aware-sidebars.php:866
|
213 |
+
msgid "Options"
|
214 |
+
msgstr "Beállítások"
|
215 |
+
|
216 |
+
#: ../content-aware-sidebars.php:927
|
217 |
+
msgid ""
|
218 |
+
"Click to edit a group or create a new one. Select content on the left to add "
|
219 |
+
"it. In each group, you can combine different types of associated content."
|
220 |
+
msgstr ""
|
221 |
+
"Kattintson ide a csoportok szerkesztéséhez, vagy új létrehozásához. A "
|
222 |
+
"tartalmat válassza ki a bal oldalon. Minden csoportban külön tudja kezelni a "
|
223 |
+
"tartalomhoz megfelelő típusokat."
|
224 |
+
|
225 |
+
#: ../content-aware-sidebars.php:928
|
226 |
+
msgid "Display sidebar with"
|
227 |
+
msgstr "Oldalsáv megjelenítése ezzel:"
|
228 |
+
|
229 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1292
|
230 |
+
msgid "Save"
|
231 |
+
msgstr "Mentés"
|
232 |
+
|
233 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1293
|
234 |
+
msgid "Cancel"
|
235 |
+
msgstr "Mégse"
|
236 |
+
|
237 |
+
#: ../content-aware-sidebars.php:940 ../content-aware-sidebars.php:1295
|
238 |
+
msgid "Remove"
|
239 |
+
msgstr "Eltávolítás"
|
240 |
+
|
241 |
+
#: ../content-aware-sidebars.php:1159
|
242 |
+
msgid ""
|
243 |
+
"If you love this plugin, please consider donating to support future "
|
244 |
+
"development."
|
245 |
+
msgstr ""
|
246 |
+
"Ha tetszik ez a plugin, kérjük támogassa, hogy folytathassuk a fejlesztését."
|
247 |
+
|
248 |
+
#: ../content-aware-sidebars.php:1168
|
249 |
+
msgid "Or you could:"
|
250 |
+
msgstr "Vagy esetleg:"
|
251 |
+
|
252 |
+
#: ../content-aware-sidebars.php:1170
|
253 |
+
msgid "Rate the plugin on WordPress.org"
|
254 |
+
msgstr "Értékelje a plugint a WordPress.org címen"
|
255 |
+
|
256 |
+
#: ../content-aware-sidebars.php:1171
|
257 |
+
msgid "Link to the plugin page"
|
258 |
+
msgstr "Link a plugin oldalra"
|
259 |
+
|
260 |
+
#: ../content-aware-sidebars.php:1172
|
261 |
+
msgid "Translate the plugin into your language"
|
262 |
+
msgstr "Plugin lefordítása a saját nyelvre"
|
263 |
+
|
264 |
+
#: ../content-aware-sidebars.php:1296
|
265 |
+
msgid "Remove this group and its contents permanently?"
|
266 |
+
msgstr "Csoport és tartalmának eltávolítása véglegesen?"
|
267 |
+
|
268 |
+
#: ../content-aware-sidebars.php:1297
|
269 |
+
msgid "No results found."
|
270 |
+
msgstr "Nincs találat."
|
271 |
+
|
272 |
+
#: ../modules/abstract.php:108
|
273 |
+
#, php-format
|
274 |
+
msgid "Show with All %s"
|
275 |
+
msgstr "Megjelenítés az összes %s-val/vel"
|
276 |
+
|
277 |
+
#: ../modules/abstract.php:118 ../modules/post_type.php:181
|
278 |
+
#: ../modules/taxonomy.php:235
|
279 |
+
msgid "View All"
|
280 |
+
msgstr "Összes megtekintése"
|
281 |
+
|
282 |
+
#: ../modules/abstract.php:125 ../modules/abstract.php:128
|
283 |
+
#: ../modules/post_type.php:187 ../modules/post_type.php:190
|
284 |
+
#: ../modules/taxonomy.php:241 ../modules/taxonomy.php:244
|
285 |
+
msgid "Search"
|
286 |
+
msgstr "Keresés"
|
287 |
+
|
288 |
+
#: ../modules/abstract.php:136
|
289 |
+
msgid "Add to Group"
|
290 |
+
msgstr "Hozzáadás a csoporthoz"
|
291 |
+
|
292 |
+
#: ../modules/author.php:22
|
293 |
+
msgid "Authors"
|
294 |
+
msgstr "Szerzők"
|
295 |
+
|
296 |
+
#: ../modules/bbpress.php:23
|
297 |
+
msgid "bbPress User Profiles"
|
298 |
+
msgstr "bbPress felhasználói fiókok"
|
299 |
+
|
300 |
+
#: ../modules/bp_member.php:21
|
301 |
+
msgid "BuddyPress Members"
|
302 |
+
msgstr "BuddyPress felhasználók"
|
303 |
+
|
304 |
+
#: ../modules/page_template.php:22
|
305 |
+
msgid "Page Templates"
|
306 |
+
msgstr "Oldal sablonok"
|
307 |
+
|
308 |
+
#: ../modules/polylang.php:21 ../modules/qtranslate.php:21
|
309 |
+
#: ../modules/transposh.php:21 ../modules/wpml.php:21
|
310 |
+
msgid "Languages"
|
311 |
+
msgstr "Nyelvek"
|
312 |
+
|
313 |
+
#: ../modules/post_type.php:28
|
314 |
+
msgid "Post Types"
|
315 |
+
msgstr "Bejegyzés típusok"
|
316 |
+
|
317 |
+
#: ../modules/post_type.php:160 ../modules/taxonomy.php:217
|
318 |
+
msgid "Automatically select new children of a selected ancestor"
|
319 |
+
msgstr "Automatikus utód kiválasztása az ős alapján."
|
320 |
+
|
321 |
+
#: ../modules/post_type.php:166 ../modules/taxonomy.php:221
|
322 |
+
#, php-format
|
323 |
+
msgid "Display with %s"
|
324 |
+
msgstr "Megjelenítés %s-val/vel."
|
325 |
+
|
326 |
+
#: ../modules/post_type.php:171 ../modules/taxonomy.php:225
|
327 |
+
msgid "No items."
|
328 |
+
msgstr "Nincs elem."
|
329 |
+
|
330 |
+
#: ../modules/post_type.php:176
|
331 |
+
msgid "Most Recent"
|
332 |
+
msgstr "Legújabb"
|
333 |
+
|
334 |
+
#: ../modules/static.php:23
|
335 |
+
msgid "Static Pages"
|
336 |
+
msgstr "Statikus oldal"
|
337 |
+
|
338 |
+
#: ../modules/static.php:33
|
339 |
+
msgid "Front Page"
|
340 |
+
msgstr "Kezdőlap"
|
341 |
+
|
342 |
+
#: ../modules/static.php:34
|
343 |
+
msgid "Search Results"
|
344 |
+
msgstr "Keresési találatok"
|
345 |
+
|
346 |
+
#: ../modules/static.php:35
|
347 |
+
msgid "404 Page"
|
348 |
+
msgstr "404-es oldal"
|
349 |
+
|
350 |
+
#: ../modules/taxonomy.php:34
|
351 |
+
msgid "Taxonomies"
|
352 |
+
msgstr "Taxonómiák"
|
353 |
+
|
354 |
+
#: ../modules/taxonomy.php:230
|
355 |
+
msgid "Most Used"
|
356 |
+
msgstr "Leggyakrabban használt"
|
357 |
+
|
358 |
+
#: ../modules/url.php:22
|
359 |
+
msgid "URLs"
|
360 |
+
msgstr "URL-ek"
|
361 |
+
|
362 |
+
#: ../modules/url.php:40
|
363 |
+
msgid "Add"
|
364 |
+
msgstr "Hozzáadás"
|
lang/content-aware-sidebars-it_IT.mo
CHANGED
Binary file
|
lang/content-aware-sidebars-it_IT.po
CHANGED
@@ -4,8 +4,8 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Content Aware Sidebars\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
-
"PO-Revision-Date: 2013-
|
9 |
"Last-Translator: Luciano Del Fico <info@myweb2.it>\n"
|
10 |
"Language-Team: MyWeb2 <info@myweb2.it>\n"
|
11 |
"Language: it_IT\n"
|
@@ -13,275 +13,425 @@ msgstr ""
|
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
-
"X-Generator: Poedit 1.5.
|
17 |
|
18 |
-
#: content-aware-sidebars.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Exposure"
|
20 |
msgstr "Tipologia"
|
21 |
|
22 |
-
#: content-aware-sidebars.php:
|
23 |
msgid "Singular"
|
24 |
msgstr "Singola"
|
25 |
|
26 |
-
#: content-aware-sidebars.php:
|
27 |
msgid "Singular & Archive"
|
28 |
msgstr "Singola e archivio"
|
29 |
|
30 |
-
#: content-aware-sidebars.php:
|
31 |
msgid "Archive"
|
32 |
msgstr "Archivio"
|
33 |
|
34 |
-
#: content-aware-sidebars.php:
|
35 |
msgctxt "option"
|
36 |
msgid "Handle"
|
37 |
msgstr "Comportamento"
|
38 |
|
39 |
-
#: content-aware-sidebars.php:
|
40 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
41 |
msgstr ""
|
42 |
"Sostituisce sidebar, si fonde con essa o aggiunge la sidebar manualmente."
|
43 |
|
44 |
-
#: content-aware-sidebars.php:
|
45 |
msgid "Replace"
|
46 |
msgstr "Sostituzione"
|
47 |
|
48 |
-
#: content-aware-sidebars.php:
|
49 |
msgid "Merge"
|
50 |
msgstr "Unione"
|
51 |
|
52 |
-
#: content-aware-sidebars.php:
|
53 |
msgid "Manual"
|
54 |
msgstr "Manuale"
|
55 |
|
56 |
-
#: content-aware-sidebars.php:
|
57 |
msgid "Host Sidebar"
|
58 |
msgstr "Sidebar"
|
59 |
|
60 |
-
#: content-aware-sidebars.php:
|
61 |
msgid "Merge position"
|
62 |
msgstr "Posizione"
|
63 |
|
64 |
-
#: content-aware-sidebars.php:
|
65 |
msgid "Place sidebar on top or bottom of host when merging."
|
66 |
msgstr "Posizione sidebar in alto o in basso dell'host durante la fusione."
|
67 |
|
68 |
-
#: content-aware-sidebars.php:
|
69 |
msgid "Top"
|
70 |
msgstr "Alto"
|
71 |
|
72 |
-
#: content-aware-sidebars.php:
|
73 |
msgid "Bottom"
|
74 |
msgstr "Basso"
|
75 |
|
76 |
-
#: content-aware-sidebars.php:
|
77 |
msgid "Sidebars"
|
78 |
msgstr "Sidebars"
|
79 |
|
80 |
-
#: content-aware-sidebars.php:
|
81 |
msgid "Sidebar"
|
82 |
msgstr "Sidebar"
|
83 |
|
84 |
-
#: content-aware-sidebars.php:
|
85 |
msgctxt "sidebar"
|
86 |
msgid "Add New"
|
87 |
msgstr "Aggiungi"
|
88 |
|
89 |
-
#: content-aware-sidebars.php:
|
90 |
msgid "Add New Sidebar"
|
91 |
msgstr "Aggiungi Nuova Sidebar"
|
92 |
|
93 |
-
#: content-aware-sidebars.php:
|
94 |
msgid "Edit Sidebar"
|
95 |
msgstr "Modifica Sidebar"
|
96 |
|
97 |
-
#: content-aware-sidebars.php:
|
98 |
msgid "New Sidebar"
|
99 |
msgstr "Nuova Sidebar"
|
100 |
|
101 |
-
#: content-aware-sidebars.php:
|
102 |
msgid "All Sidebars"
|
103 |
msgstr "Tutte le Sidebars"
|
104 |
|
105 |
-
#: content-aware-sidebars.php:
|
106 |
msgid "View Sidebar"
|
107 |
msgstr "Vedi Sidebar"
|
108 |
|
109 |
-
#: content-aware-sidebars.php:
|
110 |
msgid "Search Sidebars"
|
111 |
msgstr "Cerca Sidebars"
|
112 |
|
113 |
-
#: content-aware-sidebars.php:
|
114 |
msgid "No sidebars found"
|
115 |
msgstr "Nessuna sidebar trovata"
|
116 |
|
117 |
-
#: content-aware-sidebars.php:
|
118 |
msgid "No sidebars found in Trash"
|
119 |
msgstr "nessuna sidebar cancellata"
|
120 |
|
121 |
-
#: content-aware-sidebars.php:
|
122 |
-
msgid "
|
123 |
-
msgstr "
|
124 |
|
125 |
-
#: content-aware-sidebars.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
msgid "Sidebar updated."
|
127 |
msgstr "Sidebar aggiornata."
|
128 |
|
129 |
-
#: content-aware-sidebars.php:
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
-
#: content-aware-sidebars.php:
|
134 |
msgid "Sidebar saved."
|
135 |
msgstr "Sidebar salvata."
|
136 |
|
137 |
-
#: content-aware-sidebars.php:
|
138 |
-
msgid "Sidebar submitted.
|
139 |
-
msgstr "Sidebar
|
140 |
|
141 |
-
#: content-aware-sidebars.php:
|
142 |
-
|
143 |
-
"Sidebar scheduled for: <strong>%1$s</strong>.
|
144 |
-
"
|
145 |
-
msgstr ""
|
146 |
-
"Sidebar posticipata per: <strong>%1$s</strong>. <a href=\"%2$s\">Gestione "
|
147 |
-
"widgets</a>"
|
148 |
|
149 |
-
|
150 |
-
#: content-aware-sidebars.php:263
|
151 |
msgid "M j, Y @ G:i"
|
152 |
msgstr "M j, Y @ G:i"
|
153 |
|
154 |
-
#: content-aware-sidebars.php:
|
155 |
msgid "Sidebar draft updated."
|
156 |
msgstr "Bozza sidebar aggiornata. "
|
157 |
|
158 |
-
#: content-aware-sidebars.php:
|
159 |
msgid "Please update Host Sidebar"
|
160 |
msgstr "Aggiorna Sidebar"
|
161 |
|
162 |
-
#: content-aware-sidebars.php:
|
163 |
msgid "Manage Widgets"
|
164 |
msgstr "Gestione Widgets"
|
165 |
|
166 |
-
#: content-aware-sidebars.php:
|
167 |
-
msgid "
|
168 |
-
msgstr "
|
169 |
|
170 |
-
#: content-aware-sidebars.php:
|
171 |
msgid "Content"
|
172 |
msgstr "Contenuto"
|
173 |
|
174 |
-
#: content-aware-sidebars.php:
|
175 |
msgid "Options"
|
176 |
msgstr "Opzioni"
|
177 |
|
178 |
-
#: content-aware-sidebars.php:
|
179 |
-
msgid "
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
-
#: content-aware-sidebars.php:
|
|
|
|
|
|
|
|
|
183 |
msgid ""
|
184 |
-
"
|
185 |
-
"
|
186 |
msgstr ""
|
187 |
-
"
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
|
190 |
-
#: content-aware-sidebars.php:
|
191 |
-
msgid "
|
192 |
-
msgstr "
|
193 |
|
194 |
-
#: content-aware-sidebars.php:
|
195 |
-
msgid "
|
196 |
-
msgstr "
|
197 |
|
198 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
199 |
msgid "Show with All %s"
|
200 |
msgstr "Seleziona tutto: %s"
|
201 |
|
202 |
-
#: modules/abstract.php:
|
|
|
203 |
msgid "View All"
|
204 |
msgstr "Vedi tutti"
|
205 |
|
206 |
-
#: modules/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
msgid "Authors"
|
208 |
msgstr "Autori"
|
209 |
|
210 |
-
#: modules/bbpress.php:
|
211 |
msgid "bbPress User Profiles"
|
212 |
msgstr "Profilo utente bbPress"
|
213 |
|
214 |
-
#: modules/bp_member.php:
|
215 |
msgid "BuddyPress Members"
|
216 |
msgstr "Utenti BuddyPress"
|
217 |
|
218 |
-
#: modules/page_template.php:
|
219 |
msgid "Page Templates"
|
220 |
-
msgstr "Template
|
221 |
|
222 |
-
#: modules/polylang.php:
|
223 |
-
#: modules/wpml.php:
|
224 |
msgid "Languages"
|
225 |
msgstr "Lingue"
|
226 |
|
227 |
-
#: modules/post_type.php:
|
228 |
msgid "Post Types"
|
229 |
msgstr "Tipi di messaggi"
|
230 |
|
231 |
-
#: modules/post_type.php:
|
232 |
msgid "Automatically select new children of a selected ancestor"
|
233 |
msgstr "Seleziona automaticamente nuovi figli di un percorso selezionato"
|
234 |
|
235 |
-
#: modules/post_type.php:
|
|
|
|
|
|
|
|
|
|
|
236 |
msgid "No items."
|
237 |
msgstr "Nessun oggetto."
|
238 |
|
239 |
-
#: modules/
|
|
|
|
|
|
|
|
|
240 |
msgid "Static Pages"
|
241 |
msgstr "Pagine statiche"
|
242 |
|
243 |
-
#: modules/static.php:
|
244 |
msgid "Front Page"
|
245 |
msgstr "Pagina principale"
|
246 |
|
247 |
-
#: modules/static.php:
|
248 |
msgid "Search Results"
|
249 |
msgstr "Risultati di ricerca"
|
250 |
|
251 |
-
#: modules/static.php:
|
252 |
msgid "404 Page"
|
253 |
msgstr "Pagina 404"
|
254 |
|
255 |
-
#: modules/taxonomy.php:
|
256 |
msgid "Taxonomies"
|
257 |
msgstr "Tassonomie"
|
258 |
|
259 |
-
#: modules/taxonomy.php:
|
260 |
-
msgid "Show with %s"
|
261 |
-
msgstr "Mostra %s"
|
262 |
-
|
263 |
-
#: modules/taxonomy.php:120
|
264 |
msgid "Most Used"
|
265 |
msgstr "Più usati"
|
266 |
|
267 |
-
|
268 |
-
msgid "
|
269 |
-
msgstr "
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
#. Author URI of the plugin/theme
|
275 |
-
msgid "http://www.intox.dk/"
|
276 |
-
msgstr "http://www.intox.dk/"
|
277 |
|
278 |
-
|
279 |
-
msgid "
|
280 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
-
|
283 |
-
msgid "
|
284 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
#~ msgid "bbPress"
|
287 |
#~ msgstr "bbPress"
|
|
|
|
|
|
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Content Aware Sidebars\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-11-29 12:48+0100\n"
|
8 |
+
"PO-Revision-Date: 2013-11-30 12:35+0100\n"
|
9 |
"Last-Translator: Luciano Del Fico <info@myweb2.it>\n"
|
10 |
"Language-Team: MyWeb2 <info@myweb2.it>\n"
|
11 |
"Language: it_IT\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Generator: Poedit 1.5.7\n"
|
17 |
|
18 |
+
#: ../content-aware-sidebars.php:117
|
19 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
20 |
+
msgstr "Gestisce e mostra sidebars a seconda del contenuto visualizzato."
|
21 |
+
|
22 |
+
#: ../content-aware-sidebars.php:118
|
23 |
+
msgid "Content Aware Sidebars"
|
24 |
+
msgstr "Content Aware Sidebars"
|
25 |
+
|
26 |
+
#: ../content-aware-sidebars.php:233 ../content-aware-sidebars.php:432
|
27 |
msgid "Exposure"
|
28 |
msgstr "Tipologia"
|
29 |
|
30 |
+
#: ../content-aware-sidebars.php:239
|
31 |
msgid "Singular"
|
32 |
msgstr "Singola"
|
33 |
|
34 |
+
#: ../content-aware-sidebars.php:240
|
35 |
msgid "Singular & Archive"
|
36 |
msgstr "Singola e archivio"
|
37 |
|
38 |
+
#: ../content-aware-sidebars.php:241
|
39 |
msgid "Archive"
|
40 |
msgstr "Archivio"
|
41 |
|
42 |
+
#: ../content-aware-sidebars.php:245 ../content-aware-sidebars.php:433
|
43 |
msgctxt "option"
|
44 |
msgid "Handle"
|
45 |
msgstr "Comportamento"
|
46 |
|
47 |
+
#: ../content-aware-sidebars.php:247
|
48 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
49 |
msgstr ""
|
50 |
"Sostituisce sidebar, si fonde con essa o aggiunge la sidebar manualmente."
|
51 |
|
52 |
+
#: ../content-aware-sidebars.php:251
|
53 |
msgid "Replace"
|
54 |
msgstr "Sostituzione"
|
55 |
|
56 |
+
#: ../content-aware-sidebars.php:252
|
57 |
msgid "Merge"
|
58 |
msgstr "Unione"
|
59 |
|
60 |
+
#: ../content-aware-sidebars.php:253
|
61 |
msgid "Manual"
|
62 |
msgstr "Manuale"
|
63 |
|
64 |
+
#: ../content-aware-sidebars.php:257
|
65 |
msgid "Host Sidebar"
|
66 |
msgstr "Sidebar"
|
67 |
|
68 |
+
#: ../content-aware-sidebars.php:265 ../content-aware-sidebars.php:434
|
69 |
msgid "Merge position"
|
70 |
msgstr "Posizione"
|
71 |
|
72 |
+
#: ../content-aware-sidebars.php:267
|
73 |
msgid "Place sidebar on top or bottom of host when merging."
|
74 |
msgstr "Posizione sidebar in alto o in basso dell'host durante la fusione."
|
75 |
|
76 |
+
#: ../content-aware-sidebars.php:271
|
77 |
msgid "Top"
|
78 |
msgstr "Alto"
|
79 |
|
80 |
+
#: ../content-aware-sidebars.php:272
|
81 |
msgid "Bottom"
|
82 |
msgstr "Basso"
|
83 |
|
84 |
+
#: ../content-aware-sidebars.php:297
|
85 |
msgid "Sidebars"
|
86 |
msgstr "Sidebars"
|
87 |
|
88 |
+
#: ../content-aware-sidebars.php:298
|
89 |
msgid "Sidebar"
|
90 |
msgstr "Sidebar"
|
91 |
|
92 |
+
#: ../content-aware-sidebars.php:299
|
93 |
msgctxt "sidebar"
|
94 |
msgid "Add New"
|
95 |
msgstr "Aggiungi"
|
96 |
|
97 |
+
#: ../content-aware-sidebars.php:300
|
98 |
msgid "Add New Sidebar"
|
99 |
msgstr "Aggiungi Nuova Sidebar"
|
100 |
|
101 |
+
#: ../content-aware-sidebars.php:301
|
102 |
msgid "Edit Sidebar"
|
103 |
msgstr "Modifica Sidebar"
|
104 |
|
105 |
+
#: ../content-aware-sidebars.php:302
|
106 |
msgid "New Sidebar"
|
107 |
msgstr "Nuova Sidebar"
|
108 |
|
109 |
+
#: ../content-aware-sidebars.php:303
|
110 |
msgid "All Sidebars"
|
111 |
msgstr "Tutte le Sidebars"
|
112 |
|
113 |
+
#: ../content-aware-sidebars.php:304
|
114 |
msgid "View Sidebar"
|
115 |
msgstr "Vedi Sidebar"
|
116 |
|
117 |
+
#: ../content-aware-sidebars.php:305
|
118 |
msgid "Search Sidebars"
|
119 |
msgstr "Cerca Sidebars"
|
120 |
|
121 |
+
#: ../content-aware-sidebars.php:306
|
122 |
msgid "No sidebars found"
|
123 |
msgstr "Nessuna sidebar trovata"
|
124 |
|
125 |
+
#: ../content-aware-sidebars.php:307
|
126 |
msgid "No sidebars found in Trash"
|
127 |
msgstr "nessuna sidebar cancellata"
|
128 |
|
129 |
+
#: ../content-aware-sidebars.php:320 ../content-aware-sidebars.php:926
|
130 |
+
msgid "Condition Groups"
|
131 |
+
msgstr "Condizione gruppi "
|
132 |
|
133 |
+
#: ../content-aware-sidebars.php:321
|
134 |
+
msgid "Condition Group"
|
135 |
+
msgstr "Condizione gruppo "
|
136 |
+
|
137 |
+
#: ../content-aware-sidebars.php:322
|
138 |
+
msgctxt "group"
|
139 |
+
msgid "Add New"
|
140 |
+
msgstr "Aggiungi"
|
141 |
+
|
142 |
+
#: ../content-aware-sidebars.php:323 ../content-aware-sidebars.php:926
|
143 |
+
#: ../content-aware-sidebars.php:951
|
144 |
+
msgid "Add New Group"
|
145 |
+
msgstr "Aggiungi"
|
146 |
+
|
147 |
+
#: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:940
|
148 |
+
#: ../content-aware-sidebars.php:1294
|
149 |
+
msgctxt "group"
|
150 |
+
msgid "Edit"
|
151 |
+
msgstr "Modifica"
|
152 |
+
|
153 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:353
|
154 |
msgid "Sidebar updated."
|
155 |
msgstr "Sidebar aggiornata."
|
156 |
|
157 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:355
|
158 |
+
#: ../content-aware-sidebars.php:357 ../content-aware-sidebars.php:362
|
159 |
+
msgid "Manage widgets"
|
160 |
+
msgstr "Gestione Widgets"
|
161 |
+
|
162 |
+
#: ../content-aware-sidebars.php:355
|
163 |
+
msgid "Sidebar published."
|
164 |
+
msgstr "Sidebar pubblicata."
|
165 |
|
166 |
+
#: ../content-aware-sidebars.php:356
|
167 |
msgid "Sidebar saved."
|
168 |
msgstr "Sidebar salvata."
|
169 |
|
170 |
+
#: ../content-aware-sidebars.php:357
|
171 |
+
msgid "Sidebar submitted."
|
172 |
+
msgstr "Sidebar aggiornata."
|
173 |
|
174 |
+
#: ../content-aware-sidebars.php:358
|
175 |
+
#, php-format
|
176 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>."
|
177 |
+
msgstr "Sidebar posticipata per: <strong>%1$s</strong>."
|
|
|
|
|
|
|
178 |
|
179 |
+
#: ../content-aware-sidebars.php:360
|
|
|
180 |
msgid "M j, Y @ G:i"
|
181 |
msgstr "M j, Y @ G:i"
|
182 |
|
183 |
+
#: ../content-aware-sidebars.php:363
|
184 |
msgid "Sidebar draft updated."
|
185 |
msgstr "Bozza sidebar aggiornata. "
|
186 |
|
187 |
+
#: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:489
|
188 |
msgid "Please update Host Sidebar"
|
189 |
msgstr "Aggiorna Sidebar"
|
190 |
|
191 |
+
#: ../content-aware-sidebars.php:544
|
192 |
msgid "Manage Widgets"
|
193 |
msgstr "Gestione Widgets"
|
194 |
|
195 |
+
#: ../content-aware-sidebars.php:850
|
196 |
+
msgid "Support the Author of Content Aware Sidebars"
|
197 |
+
msgstr "Supporta l'autore di Content Aware Sidebars"
|
198 |
|
199 |
+
#: ../content-aware-sidebars.php:858
|
200 |
msgid "Content"
|
201 |
msgstr "Contenuto"
|
202 |
|
203 |
+
#: ../content-aware-sidebars.php:866
|
204 |
msgid "Options"
|
205 |
msgstr "Opzioni"
|
206 |
|
207 |
+
#: ../content-aware-sidebars.php:927
|
208 |
+
msgid ""
|
209 |
+
"Click to edit a group or create a new one. Select content on the left to add "
|
210 |
+
"it. In each group, you can combine different types of associated content."
|
211 |
+
msgstr ""
|
212 |
+
"Clicca per modificare un gruppo o crearne uno nuovo. Seleziona il contenuto "
|
213 |
+
"a sinistra per aggiungerlo. In ogni gruppo, è possibile combinare diversi "
|
214 |
+
"tipi di contenuti associati."
|
215 |
+
|
216 |
+
#: ../content-aware-sidebars.php:928
|
217 |
+
msgid "Display sidebar with"
|
218 |
+
msgstr "Visualizza larghezza sidebar"
|
219 |
+
|
220 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1292
|
221 |
+
msgid "Save"
|
222 |
+
msgstr "Salva"
|
223 |
+
|
224 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1293
|
225 |
+
msgid "Cancel"
|
226 |
+
msgstr "Annulla"
|
227 |
|
228 |
+
#: ../content-aware-sidebars.php:940 ../content-aware-sidebars.php:1295
|
229 |
+
msgid "Remove"
|
230 |
+
msgstr "Elimina"
|
231 |
+
|
232 |
+
#: ../content-aware-sidebars.php:1159
|
233 |
msgid ""
|
234 |
+
"If you love this plugin, please consider donating to support future "
|
235 |
+
"development."
|
236 |
msgstr ""
|
237 |
+
"Se ti piace questo plugin, considera l'eventualità di fare una donazione."
|
238 |
+
|
239 |
+
#: ../content-aware-sidebars.php:1168
|
240 |
+
msgid "Or you could:"
|
241 |
+
msgstr "Ti potrebbe anche interessare:"
|
242 |
+
|
243 |
+
#: ../content-aware-sidebars.php:1170
|
244 |
+
msgid "Rate the plugin on WordPress.org"
|
245 |
+
msgstr "Valutare il plugin su WordPress.org"
|
246 |
+
|
247 |
+
#: ../content-aware-sidebars.php:1171
|
248 |
+
msgid "Link to the plugin page"
|
249 |
+
msgstr "Collegarti alla pagina WordPress del plugin"
|
250 |
|
251 |
+
#: ../content-aware-sidebars.php:1172
|
252 |
+
msgid "Translate the plugin into your language"
|
253 |
+
msgstr "Tradurre questo plugin nella tua lingua"
|
254 |
|
255 |
+
#: ../content-aware-sidebars.php:1296
|
256 |
+
msgid "Remove this group and its contents permanently?"
|
257 |
+
msgstr "Vuoi eliminare questo gruppo e il suo contenuto in modo permanente?"
|
258 |
|
259 |
+
#: ../content-aware-sidebars.php:1297
|
260 |
+
msgid "No results found."
|
261 |
+
msgstr "Nessuna sidebar trovata"
|
262 |
+
|
263 |
+
#: ../modules/abstract.php:108
|
264 |
+
#, php-format
|
265 |
msgid "Show with All %s"
|
266 |
msgstr "Seleziona tutto: %s"
|
267 |
|
268 |
+
#: ../modules/abstract.php:118 ../modules/post_type.php:181
|
269 |
+
#: ../modules/taxonomy.php:235
|
270 |
msgid "View All"
|
271 |
msgstr "Vedi tutti"
|
272 |
|
273 |
+
#: ../modules/abstract.php:125 ../modules/abstract.php:128
|
274 |
+
#: ../modules/post_type.php:187 ../modules/post_type.php:190
|
275 |
+
#: ../modules/taxonomy.php:241 ../modules/taxonomy.php:244
|
276 |
+
msgid "Search"
|
277 |
+
msgstr "Cerca"
|
278 |
+
|
279 |
+
#: ../modules/abstract.php:136
|
280 |
+
msgid "Add to Group"
|
281 |
+
msgstr "Aggiungi gruppo"
|
282 |
+
|
283 |
+
#: ../modules/author.php:22
|
284 |
msgid "Authors"
|
285 |
msgstr "Autori"
|
286 |
|
287 |
+
#: ../modules/bbpress.php:23
|
288 |
msgid "bbPress User Profiles"
|
289 |
msgstr "Profilo utente bbPress"
|
290 |
|
291 |
+
#: ../modules/bp_member.php:21
|
292 |
msgid "BuddyPress Members"
|
293 |
msgstr "Utenti BuddyPress"
|
294 |
|
295 |
+
#: ../modules/page_template.php:22
|
296 |
msgid "Page Templates"
|
297 |
+
msgstr "Template pagine"
|
298 |
|
299 |
+
#: ../modules/polylang.php:21 ../modules/qtranslate.php:21
|
300 |
+
#: ../modules/transposh.php:21 ../modules/wpml.php:21
|
301 |
msgid "Languages"
|
302 |
msgstr "Lingue"
|
303 |
|
304 |
+
#: ../modules/post_type.php:28
|
305 |
msgid "Post Types"
|
306 |
msgstr "Tipi di messaggi"
|
307 |
|
308 |
+
#: ../modules/post_type.php:160 ../modules/taxonomy.php:217
|
309 |
msgid "Automatically select new children of a selected ancestor"
|
310 |
msgstr "Seleziona automaticamente nuovi figli di un percorso selezionato"
|
311 |
|
312 |
+
#: ../modules/post_type.php:166 ../modules/taxonomy.php:221
|
313 |
+
#, php-format
|
314 |
+
msgid "Display with %s"
|
315 |
+
msgstr "Larghezza %s"
|
316 |
+
|
317 |
+
#: ../modules/post_type.php:171 ../modules/taxonomy.php:225
|
318 |
msgid "No items."
|
319 |
msgstr "Nessun oggetto."
|
320 |
|
321 |
+
#: ../modules/post_type.php:176
|
322 |
+
msgid "Most Recent"
|
323 |
+
msgstr "Più usati"
|
324 |
+
|
325 |
+
#: ../modules/static.php:23
|
326 |
msgid "Static Pages"
|
327 |
msgstr "Pagine statiche"
|
328 |
|
329 |
+
#: ../modules/static.php:33
|
330 |
msgid "Front Page"
|
331 |
msgstr "Pagina principale"
|
332 |
|
333 |
+
#: ../modules/static.php:34
|
334 |
msgid "Search Results"
|
335 |
msgstr "Risultati di ricerca"
|
336 |
|
337 |
+
#: ../modules/static.php:35
|
338 |
msgid "404 Page"
|
339 |
msgstr "Pagina 404"
|
340 |
|
341 |
+
#: ../modules/taxonomy.php:34
|
342 |
msgid "Taxonomies"
|
343 |
msgstr "Tassonomie"
|
344 |
|
345 |
+
#: ../modules/taxonomy.php:230
|
|
|
|
|
|
|
|
|
346 |
msgid "Most Used"
|
347 |
msgstr "Più usati"
|
348 |
|
349 |
+
#: ../modules/url.php:22
|
350 |
+
msgid "URLs"
|
351 |
+
msgstr "URL"
|
352 |
|
353 |
+
#: ../modules/url.php:40
|
354 |
+
msgid "Add"
|
355 |
+
msgstr "Aggiungi"
|
|
|
|
|
|
|
356 |
|
357 |
+
#, fuzzy
|
358 |
+
#~ msgid "New Sidebar Group"
|
359 |
+
#~ msgstr "Nuova Sidebar"
|
360 |
+
|
361 |
+
#, fuzzy
|
362 |
+
#~ msgid "Sidebar Groups"
|
363 |
+
#~ msgstr "Sidebars"
|
364 |
+
|
365 |
+
#, fuzzy
|
366 |
+
#~ msgid "Sidebar Group"
|
367 |
+
#~ msgstr "Sidebar"
|
368 |
+
|
369 |
+
#, fuzzy
|
370 |
+
#~ msgid "Add New Sidebar Group"
|
371 |
+
#~ msgstr "Aggiungi Nuova Sidebar"
|
372 |
+
|
373 |
+
#, fuzzy
|
374 |
+
#~ msgid "Edit Sidebar Group"
|
375 |
+
#~ msgstr "Modifica Sidebar"
|
376 |
+
|
377 |
+
#, fuzzy
|
378 |
+
#~ msgid "All Sidebar Groups"
|
379 |
+
#~ msgstr "Tutte le Sidebars"
|
380 |
|
381 |
+
#, fuzzy
|
382 |
+
#~ msgid "View Sidebar Group"
|
383 |
+
#~ msgstr "Vedi Sidebar"
|
384 |
+
|
385 |
+
#, fuzzy
|
386 |
+
#~ msgid "Search Sidebar Groups"
|
387 |
+
#~ msgstr "Cerca Sidebars"
|
388 |
+
|
389 |
+
#, fuzzy
|
390 |
+
#~ msgid "No sidebar groups found"
|
391 |
+
#~ msgstr "Nessuna sidebar trovata"
|
392 |
+
|
393 |
+
#, fuzzy
|
394 |
+
#~ msgid "No sidebar groups found in Trash"
|
395 |
+
#~ msgstr "nessuna sidebar cancellata"
|
396 |
+
|
397 |
+
#~ msgid "http://www.intox.dk/"
|
398 |
+
#~ msgstr "http://www.intox.dk/"
|
399 |
+
|
400 |
+
#~ msgid "Joachim Jensen, Intox Studio"
|
401 |
+
#~ msgstr "Joachim Jensen, Intox Studio"
|
402 |
+
|
403 |
+
#~ msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
404 |
+
#~ msgstr "Sidebar aggiornata. <a href=\"%s\">Gestione widgets</a>"
|
405 |
+
|
406 |
+
#~ msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
407 |
+
#~ msgstr "Sidebar publicata. <a href=\"%s\">Gestione widgets</a>"
|
408 |
+
|
409 |
+
#~ msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
410 |
+
#~ msgstr "Sidebar inviata. <a href=\"%s\">Gestione widgets</a>"
|
411 |
+
|
412 |
+
#~ msgid "Spread the Word"
|
413 |
+
#~ msgstr "Spargi la voce"
|
414 |
+
|
415 |
+
#~ msgid "Show with %s"
|
416 |
+
#~ msgstr "Mostra %s"
|
417 |
+
|
418 |
+
#~ msgid "Words from the author"
|
419 |
+
#~ msgstr "Parole dell'autore"
|
420 |
+
|
421 |
+
#~ msgid ""
|
422 |
+
#~ "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> "
|
423 |
+
#~ "and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
424 |
+
#~ msgstr ""
|
425 |
+
#~ "Ricorda di <a class=\"button\" href=\"%1$s\" target=\"_blank"
|
426 |
+
#~ "\">valutarlo</a> e <a class=\"button\" href=\"%2$s\" target=\"_blank"
|
427 |
+
#~ "\">condiverlo</a>!"
|
428 |
+
|
429 |
+
#~ msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
430 |
+
#~ msgstr "Verifica Content Aware Sidebars per %23WordPress! :)"
|
431 |
|
432 |
#~ msgid "bbPress"
|
433 |
#~ msgstr "bbPress"
|
434 |
+
|
435 |
+
#, fuzzy
|
436 |
+
#~ msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
|
437 |
+
#~ msgstr "Sidebar aggiornata. <a href=\"%s\">Gestione widgets</a>"
|
lang/content-aware-sidebars-lt_LT.mo
CHANGED
Binary file
|
lang/content-aware-sidebars-lt_LT.po
CHANGED
@@ -1,252 +1,299 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Content Aware Sidebars
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date:
|
|
|
|
|
|
|
|
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"
|
12 |
-
"Last-Translator: \n"
|
13 |
-
"Language-Team: \n"
|
14 |
-
"X-Poedit-Language: Lithuanian\n"
|
15 |
-
"X-Poedit-Country: Lithuania\n"
|
16 |
|
17 |
-
#: content-aware-sidebars.php:
|
18 |
-
msgid "Post Types"
|
19 |
-
msgstr "Įrašų tipai"
|
20 |
-
|
21 |
-
#: content-aware-sidebars.php:111
|
22 |
-
msgid "Taxonomies"
|
23 |
-
msgstr "Taksonomijos"
|
24 |
-
|
25 |
-
#: content-aware-sidebars.php:119
|
26 |
-
msgid "Authors"
|
27 |
-
msgstr "Autoriai"
|
28 |
-
|
29 |
-
#: content-aware-sidebars.php:127
|
30 |
-
msgid "Page Templates"
|
31 |
-
msgstr "Puslapio Šablonai"
|
32 |
-
|
33 |
-
#: content-aware-sidebars.php:135
|
34 |
-
msgid "Static Pages"
|
35 |
-
msgstr "Statiniai Puslapiai"
|
36 |
-
|
37 |
-
#: content-aware-sidebars.php:141
|
38 |
-
msgid "Front Page"
|
39 |
-
msgstr "Namų Puslapis"
|
40 |
-
|
41 |
-
#: content-aware-sidebars.php:142
|
42 |
-
msgid "Search Results"
|
43 |
-
msgstr "Paieškos Rezultatai"
|
44 |
-
|
45 |
-
#: content-aware-sidebars.php:143
|
46 |
-
msgid "404 Page"
|
47 |
-
msgstr "404 Puslapis"
|
48 |
-
|
49 |
-
#: content-aware-sidebars.php:147
|
50 |
-
#: content-aware-sidebars.php:312
|
51 |
msgid "Exposure"
|
52 |
-
msgstr "
|
53 |
|
54 |
-
#: content-aware-sidebars.php:
|
55 |
msgid "Singular"
|
56 |
-
msgstr "
|
57 |
|
58 |
-
#: content-aware-sidebars.php:
|
59 |
msgid "Singular & Archive"
|
60 |
-
msgstr "
|
61 |
|
62 |
-
#: content-aware-sidebars.php:
|
63 |
msgid "Archive"
|
64 |
-
msgstr "
|
65 |
|
66 |
-
#: content-aware-sidebars.php:
|
67 |
-
#: content-aware-sidebars.php:313
|
68 |
msgctxt "option"
|
69 |
msgid "Handle"
|
70 |
-
msgstr "
|
71 |
|
72 |
-
#: content-aware-sidebars.php:
|
73 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
74 |
-
msgstr "
|
|
|
|
|
75 |
|
76 |
-
#: content-aware-sidebars.php:
|
77 |
msgid "Replace"
|
78 |
msgstr "Pakeisti"
|
79 |
|
80 |
-
#: content-aware-sidebars.php:
|
81 |
msgid "Merge"
|
82 |
msgstr "Sulieti"
|
83 |
|
84 |
-
#: content-aware-sidebars.php:
|
85 |
msgid "Manual"
|
86 |
-
msgstr "
|
87 |
|
88 |
-
#: content-aware-sidebars.php:
|
89 |
msgid "Host Sidebar"
|
90 |
msgstr "Serverio šoninė juosta"
|
91 |
|
92 |
-
#: content-aware-sidebars.php:
|
93 |
-
#: content-aware-sidebars.php:314
|
94 |
msgid "Merge position"
|
95 |
-
msgstr "
|
96 |
|
97 |
-
#: content-aware-sidebars.php:
|
98 |
msgid "Place sidebar on top or bottom of host when merging."
|
99 |
-
msgstr "
|
|
|
100 |
|
101 |
-
#: content-aware-sidebars.php:
|
102 |
msgid "Top"
|
103 |
msgstr "Viršus"
|
104 |
|
105 |
-
#: content-aware-sidebars.php:
|
106 |
msgid "Bottom"
|
107 |
msgstr "Apačia"
|
108 |
|
109 |
-
#: content-aware-sidebars.php:
|
110 |
msgid "Sidebars"
|
111 |
msgstr "Šoninės juostos"
|
112 |
|
113 |
-
#: content-aware-sidebars.php:
|
114 |
msgid "Sidebar"
|
115 |
msgstr "Šoninė juosta"
|
116 |
|
117 |
-
#: content-aware-sidebars.php:
|
118 |
msgctxt "sidebar"
|
119 |
msgid "Add New"
|
120 |
-
msgstr "Pridėti Naują"
|
121 |
|
122 |
-
#: content-aware-sidebars.php:
|
123 |
msgid "Add New Sidebar"
|
124 |
-
msgstr "Pridėti Naują
|
125 |
|
126 |
-
#: content-aware-sidebars.php:
|
127 |
msgid "Edit Sidebar"
|
128 |
-
msgstr "Redaguoti
|
129 |
|
130 |
-
#: content-aware-sidebars.php:
|
131 |
msgid "New Sidebar"
|
132 |
-
msgstr "Nauja Šoninė
|
133 |
|
134 |
-
#: content-aware-sidebars.php:
|
135 |
msgid "All Sidebars"
|
136 |
-
msgstr "Visos
|
137 |
|
138 |
-
#: content-aware-sidebars.php:
|
139 |
msgid "View Sidebar"
|
140 |
-
msgstr "Peržiūrėti
|
141 |
|
142 |
-
#: content-aware-sidebars.php:
|
143 |
msgid "Search Sidebars"
|
144 |
-
msgstr "Ieškoti Šoninių
|
145 |
|
146 |
-
#: content-aware-sidebars.php:
|
147 |
msgid "No sidebars found"
|
148 |
-
msgstr "
|
149 |
|
150 |
-
#: content-aware-sidebars.php:
|
151 |
msgid "No sidebars found in Trash"
|
152 |
msgstr "Šiukšlėse nerasta jokių šoninių juostų"
|
153 |
|
154 |
-
#: content-aware-sidebars.php:
|
155 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
156 |
-
msgstr "Šoninė juosta atnaujinta. <a href=\"%s\">
|
157 |
|
158 |
-
#: content-aware-sidebars.php:
|
159 |
msgid "Sidebar updated."
|
160 |
msgstr "Šoninė juosta atnaujinta."
|
161 |
|
162 |
-
#: content-aware-sidebars.php:
|
163 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
164 |
-
msgstr "Šoninė juosta
|
165 |
|
166 |
-
#: content-aware-sidebars.php:
|
167 |
msgid "Sidebar saved."
|
168 |
msgstr "Šoninė juosta įrašyta."
|
169 |
|
170 |
-
#: content-aware-sidebars.php:
|
171 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
172 |
-
msgstr "Šoninė juosta
|
173 |
|
174 |
-
#: content-aware-sidebars.php:
|
175 |
-
msgid "
|
176 |
-
|
|
|
|
|
|
|
|
|
177 |
|
178 |
#. translators: Publish box date format, see http:php.net/date
|
179 |
-
#: content-aware-sidebars.php:
|
180 |
msgid "M j, Y @ G:i"
|
181 |
msgstr "M j, Y @ G:i"
|
182 |
|
183 |
-
#: content-aware-sidebars.php:
|
184 |
-
msgid "Sidebar draft updated.
|
185 |
-
msgstr "Šoninės
|
186 |
|
187 |
-
#: content-aware-sidebars.php:
|
|
|
|
|
|
|
|
|
188 |
msgid "Manage Widgets"
|
189 |
-
msgstr "
|
190 |
|
191 |
-
#: content-aware-sidebars.php:
|
192 |
-
msgid "
|
193 |
-
msgstr "
|
194 |
|
195 |
-
#: content-aware-sidebars.php:
|
196 |
msgid "Options"
|
197 |
msgstr "Parinktys"
|
198 |
|
199 |
-
#: content-aware-sidebars.php:
|
200 |
-
msgid "
|
201 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
-
#:
|
204 |
-
msgid "
|
205 |
-
msgstr "
|
206 |
|
207 |
-
#:
|
208 |
-
msgid "
|
209 |
-
msgstr "
|
210 |
|
211 |
-
#:
|
212 |
-
#: content-aware-sidebars.php:852
|
213 |
msgid "No items."
|
214 |
-
msgstr "Jokių elementų."
|
215 |
|
216 |
-
#:
|
217 |
-
msgid "
|
218 |
-
msgstr "
|
219 |
|
220 |
-
#:
|
221 |
-
|
222 |
-
|
223 |
-
msgid "View All"
|
224 |
-
msgstr "Peržiūrėti Viską"
|
225 |
|
226 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
msgid "Show with %s"
|
228 |
-
msgstr "Rodyti
|
229 |
|
230 |
-
#:
|
231 |
-
msgid "
|
232 |
-
msgstr "
|
233 |
|
234 |
#. Plugin Name of the plugin/theme
|
235 |
msgid "Content Aware Sidebars"
|
236 |
msgstr "Content Aware Sidebars"
|
237 |
|
238 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars
|
239 |
#. Plugin URI of the plugin/theme
|
240 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars
|
241 |
#. Author URI of the plugin/theme
|
242 |
msgid "http://www.intox.dk/"
|
243 |
msgstr "http://www.intox.dk/"
|
244 |
|
245 |
#. Description of the plugin/theme
|
246 |
msgid "Manage and show sidebars according to the content being viewed."
|
247 |
-
msgstr "
|
|
|
|
|
248 |
|
249 |
#. Author of the plugin/theme
|
250 |
-
msgid "Joachim Jensen"
|
251 |
-
msgstr "Joachim Jensen"
|
|
|
|
|
|
|
252 |
|
|
|
|
1 |
+
# Copyright (C) 2013 Content Aware Sidebars
|
2 |
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 1.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-05-14 13:07:12+00:00\n"
|
8 |
+
"PO-Revision-Date: 2013-05-14 15:11+0100\n"
|
9 |
+
"Last-Translator: Joachim Jensen <jv@intox.dk>\n"
|
10 |
+
"Language-Team: Host1Free.com <info@host1free.com>\n"
|
11 |
+
"Language: Lithuanian\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 1.5.5\n"
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
#: content-aware-sidebars.php:178 content-aware-sidebars.php:345
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
msgid "Exposure"
|
19 |
+
msgstr "Atidengimas"
|
20 |
|
21 |
+
#: content-aware-sidebars.php:184
|
22 |
msgid "Singular"
|
23 |
+
msgstr "Išskirti"
|
24 |
|
25 |
+
#: content-aware-sidebars.php:185
|
26 |
msgid "Singular & Archive"
|
27 |
+
msgstr "Išskirti ir Archyvuoti"
|
28 |
|
29 |
+
#: content-aware-sidebars.php:186
|
30 |
msgid "Archive"
|
31 |
+
msgstr "Archyvuoti"
|
32 |
|
33 |
+
#: content-aware-sidebars.php:190 content-aware-sidebars.php:346
|
|
|
34 |
msgctxt "option"
|
35 |
msgid "Handle"
|
36 |
+
msgstr "Apdoroti [ parinktis ]"
|
37 |
|
38 |
+
#: content-aware-sidebars.php:192
|
39 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
40 |
+
msgstr ""
|
41 |
+
"Pakeisti serverio šoninę juostą, sulieti ją ar pridėti šoninę juostą "
|
42 |
+
"rankiniu būdu"
|
43 |
|
44 |
+
#: content-aware-sidebars.php:196
|
45 |
msgid "Replace"
|
46 |
msgstr "Pakeisti"
|
47 |
|
48 |
+
#: content-aware-sidebars.php:197
|
49 |
msgid "Merge"
|
50 |
msgstr "Sulieti"
|
51 |
|
52 |
+
#: content-aware-sidebars.php:198
|
53 |
msgid "Manual"
|
54 |
+
msgstr "Rankinis"
|
55 |
|
56 |
+
#: content-aware-sidebars.php:202
|
57 |
msgid "Host Sidebar"
|
58 |
msgstr "Serverio šoninė juosta"
|
59 |
|
60 |
+
#: content-aware-sidebars.php:210 content-aware-sidebars.php:347
|
|
|
61 |
msgid "Merge position"
|
62 |
+
msgstr "Sulieti poziciją"
|
63 |
|
64 |
+
#: content-aware-sidebars.php:212
|
65 |
msgid "Place sidebar on top or bottom of host when merging."
|
66 |
+
msgstr ""
|
67 |
+
"Patalpinti šoninę serverio juostą viršuje arba apačioje kuomet suliejama."
|
68 |
|
69 |
+
#: content-aware-sidebars.php:216
|
70 |
msgid "Top"
|
71 |
msgstr "Viršus"
|
72 |
|
73 |
+
#: content-aware-sidebars.php:217
|
74 |
msgid "Bottom"
|
75 |
msgstr "Apačia"
|
76 |
|
77 |
+
#: content-aware-sidebars.php:232
|
78 |
msgid "Sidebars"
|
79 |
msgstr "Šoninės juostos"
|
80 |
|
81 |
+
#: content-aware-sidebars.php:233
|
82 |
msgid "Sidebar"
|
83 |
msgstr "Šoninė juosta"
|
84 |
|
85 |
+
#: content-aware-sidebars.php:234
|
86 |
msgctxt "sidebar"
|
87 |
msgid "Add New"
|
88 |
+
msgstr "Pridėti Naują [ šoninę juostą ]"
|
89 |
|
90 |
+
#: content-aware-sidebars.php:235
|
91 |
msgid "Add New Sidebar"
|
92 |
+
msgstr "Pridėti Naują Šoninę Juostą"
|
93 |
|
94 |
+
#: content-aware-sidebars.php:236
|
95 |
msgid "Edit Sidebar"
|
96 |
+
msgstr "Redaguoti Šoninę Juostą"
|
97 |
|
98 |
+
#: content-aware-sidebars.php:237
|
99 |
msgid "New Sidebar"
|
100 |
+
msgstr "Nauja Šoninė Juosta"
|
101 |
|
102 |
+
#: content-aware-sidebars.php:238
|
103 |
msgid "All Sidebars"
|
104 |
+
msgstr "Visos Šoninės Juostos"
|
105 |
|
106 |
+
#: content-aware-sidebars.php:239
|
107 |
msgid "View Sidebar"
|
108 |
+
msgstr "Peržiūrėti Šoninę Juostą"
|
109 |
|
110 |
+
#: content-aware-sidebars.php:240
|
111 |
msgid "Search Sidebars"
|
112 |
+
msgstr "Ieškoti Šoninių Juostų"
|
113 |
|
114 |
+
#: content-aware-sidebars.php:241
|
115 |
msgid "No sidebars found"
|
116 |
+
msgstr "Šoninių juostų nerasta"
|
117 |
|
118 |
+
#: content-aware-sidebars.php:242
|
119 |
msgid "No sidebars found in Trash"
|
120 |
msgstr "Šiukšlėse nerasta jokių šoninių juostų"
|
121 |
|
122 |
+
#: content-aware-sidebars.php:273
|
123 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
124 |
+
msgstr "Šoninė juosta atnaujinta. <a href=\"%s\">Tvarkyti Valdiklius</a>"
|
125 |
|
126 |
+
#: content-aware-sidebars.php:276
|
127 |
msgid "Sidebar updated."
|
128 |
msgstr "Šoninė juosta atnaujinta."
|
129 |
|
130 |
+
#: content-aware-sidebars.php:278
|
131 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
132 |
+
msgstr "Šoninė juosta publikuota. <a href=\"%s\">Manage widgets</a>"
|
133 |
|
134 |
+
#: content-aware-sidebars.php:279
|
135 |
msgid "Sidebar saved."
|
136 |
msgstr "Šoninė juosta įrašyta."
|
137 |
|
138 |
+
#: content-aware-sidebars.php:280
|
139 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
140 |
+
msgstr "Šoninė juosta išsiųsta. <a href=\"%s\">Manage widgets</a>"
|
141 |
|
142 |
+
#: content-aware-sidebars.php:281
|
143 |
+
msgid ""
|
144 |
+
"Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage "
|
145 |
+
"widgets</a>"
|
146 |
+
msgstr ""
|
147 |
+
"Šoninė juosta suplanuota už: <strong>%1$s</strong>. <a href=\"%s\">Manage "
|
148 |
+
"widgets</a>"
|
149 |
|
150 |
#. translators: Publish box date format, see http:php.net/date
|
151 |
+
#: content-aware-sidebars.php:283
|
152 |
msgid "M j, Y @ G:i"
|
153 |
msgstr "M j, Y @ G:i"
|
154 |
|
155 |
+
#: content-aware-sidebars.php:284
|
156 |
+
msgid "Sidebar draft updated."
|
157 |
+
msgstr "Šoninės juostos juodraštis atnaujintas."
|
158 |
|
159 |
+
#: content-aware-sidebars.php:321 content-aware-sidebars.php:402
|
160 |
+
msgid "Please update Host Sidebar"
|
161 |
+
msgstr "Prašome atnaujinti Serverio Šoninę Juostą"
|
162 |
+
|
163 |
+
#: content-aware-sidebars.php:457
|
164 |
msgid "Manage Widgets"
|
165 |
+
msgstr "Tvarkyti Valdiklius"
|
166 |
|
167 |
+
#: content-aware-sidebars.php:689
|
168 |
+
msgid "Content"
|
169 |
+
msgstr "Turinys"
|
170 |
|
171 |
+
#: content-aware-sidebars.php:699
|
172 |
msgid "Options"
|
173 |
msgstr "Parinktys"
|
174 |
|
175 |
+
#: content-aware-sidebars.php:708
|
176 |
+
msgid "Spread the Word"
|
177 |
+
msgstr "Paskleiskite Žinią"
|
178 |
+
|
179 |
+
#: content-aware-sidebars.php:798
|
180 |
+
msgid ""
|
181 |
+
"If you love this plugin, please consider donating to support future "
|
182 |
+
"development."
|
183 |
+
msgstr ""
|
184 |
+
"Jeigu Jums patiko šis papildinys, prašome paaukoti. Taip prisidėsi prie "
|
185 |
+
"tolesnio papildinio plėtojimo."
|
186 |
+
|
187 |
+
#: content-aware-sidebars.php:803
|
188 |
+
msgid "Or you could:"
|
189 |
+
msgstr "Arba galite:"
|
190 |
+
|
191 |
+
#: content-aware-sidebars.php:805
|
192 |
+
msgid "Rate the plugin on WordPress.org"
|
193 |
+
msgstr "Įvertinti papildinį WordPress.org svetainėje"
|
194 |
+
|
195 |
+
#: content-aware-sidebars.php:806
|
196 |
+
msgid "Link to the plugin page"
|
197 |
+
msgstr "Nukreipti į papildinio puslapį"
|
198 |
+
|
199 |
+
#: modules/abstract.php:57 modules/post_type.php:110
|
200 |
+
msgid "Show with All %s"
|
201 |
+
msgstr "Rodyti su Visais %s"
|
202 |
+
|
203 |
+
#: modules/abstract.php:61 modules/post_type.php:134 modules/taxonomy.php:175
|
204 |
+
msgctxt "verb"
|
205 |
+
msgid "Search"
|
206 |
+
msgstr "Ieškoti"
|
207 |
+
|
208 |
+
#: modules/abstract.php:61 modules/post_type.php:134 modules/taxonomy.php:175
|
209 |
+
#: modules/url.php:42
|
210 |
+
msgid "Add"
|
211 |
+
msgstr "Pridėti"
|
212 |
+
|
213 |
+
#: modules/author.php:24
|
214 |
+
msgid "Authors"
|
215 |
+
msgstr "Autorius"
|
216 |
+
|
217 |
+
#: modules/bbpress.php:23
|
218 |
+
msgid "bbPress User Profiles"
|
219 |
+
msgstr "bbPress Vartotojų Profilius"
|
220 |
+
|
221 |
+
#: modules/bp_member.php:23
|
222 |
+
msgid "BuddyPress Members"
|
223 |
+
msgstr "BuddyPress Narius"
|
224 |
+
|
225 |
+
#: modules/page_template.php:24
|
226 |
+
msgid "Page Templates"
|
227 |
+
msgstr "Puslapių Ruošinius"
|
228 |
+
|
229 |
+
#: modules/polylang.php:23 modules/qtranslate.php:23 modules/transposh.php:23
|
230 |
+
#: modules/wpml.php:23
|
231 |
+
msgid "Languages"
|
232 |
+
msgstr "Kalbas"
|
233 |
|
234 |
+
#: modules/post_type.php:30
|
235 |
+
msgid "Post Types"
|
236 |
+
msgstr "Įrašų Tipus"
|
237 |
|
238 |
+
#: modules/post_type.php:104 modules/taxonomy.php:151
|
239 |
+
msgid "Automatically select new children of a selected ancestor"
|
240 |
+
msgstr "Automatiškai pasirinkti naujus pažymėtų savininkų \"vaikus\"."
|
241 |
|
242 |
+
#: modules/post_type.php:114 modules/taxonomy.php:159
|
|
|
243 |
msgid "No items."
|
244 |
+
msgstr "Jokių elementų. "
|
245 |
|
246 |
+
#: modules/static.php:25
|
247 |
+
msgid "Static Pages"
|
248 |
+
msgstr "Statiniai Puslapiai"
|
249 |
|
250 |
+
#: modules/static.php:34
|
251 |
+
msgid "Front Page"
|
252 |
+
msgstr "Titulinis Puslapis"
|
|
|
|
|
253 |
|
254 |
+
#: modules/static.php:35
|
255 |
+
msgid "Search Results"
|
256 |
+
msgstr "Paieškos Rezultatai"
|
257 |
+
|
258 |
+
#: modules/static.php:36
|
259 |
+
msgid "404 Page"
|
260 |
+
msgstr "404 Puslapis"
|
261 |
+
|
262 |
+
#: modules/taxonomy.php:36
|
263 |
+
msgid "Taxonomies"
|
264 |
+
msgstr "Taksonomijos"
|
265 |
+
|
266 |
+
#: modules/taxonomy.php:155
|
267 |
msgid "Show with %s"
|
268 |
+
msgstr "Rodyti su %s"
|
269 |
|
270 |
+
#: modules/url.php:24
|
271 |
+
msgid "URLs"
|
272 |
+
msgstr "Universalieji Adresai"
|
273 |
|
274 |
#. Plugin Name of the plugin/theme
|
275 |
msgid "Content Aware Sidebars"
|
276 |
msgstr "Content Aware Sidebars"
|
277 |
|
278 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.3.1) #-#-#-#-#
|
279 |
#. Plugin URI of the plugin/theme
|
280 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.3.1) #-#-#-#-#
|
281 |
#. Author URI of the plugin/theme
|
282 |
msgid "http://www.intox.dk/"
|
283 |
msgstr "http://www.intox.dk/"
|
284 |
|
285 |
#. Description of the plugin/theme
|
286 |
msgid "Manage and show sidebars according to the content being viewed."
|
287 |
+
msgstr ""
|
288 |
+
"Pagal šiuo metu peržiūrimą turinį valdykite ir rodykite tinkamas šonines "
|
289 |
+
"juostas."
|
290 |
|
291 |
#. Author of the plugin/theme
|
292 |
+
msgid "Joachim Jensen, Intox Studio"
|
293 |
+
msgstr "Joachim Jensen, Intox Studio"
|
294 |
+
|
295 |
+
#~ msgid "View All"
|
296 |
+
#~ msgstr "Peržiūrėti Visus"
|
297 |
|
298 |
+
#~ msgid "Most Used"
|
299 |
+
#~ msgstr "Dažniausiai naudoti(os)"
|
lang/content-aware-sidebars-lv_LV.mo
ADDED
Binary file
|
lang/content-aware-sidebars-lv_LV.po
ADDED
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 Content Aware Sidebars
|
2 |
+
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 1.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-05-14 13:07:12+00:00\n"
|
8 |
+
"PO-Revision-Date: 2013-11-29 15:23+0200\n"
|
9 |
+
"Last-Translator: HG <firebirdclub@firebirdclublatvia.lv>\n"
|
10 |
+
"Language-Team: Host1Free.com <info@host1free.com>\n"
|
11 |
+
"Language: Lithuanian\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 1.5.5\n"
|
16 |
+
|
17 |
+
#: content-aware-sidebars.php:178
|
18 |
+
#: content-aware-sidebars.php:345
|
19 |
+
msgid "Exposure"
|
20 |
+
msgstr "Ekspozīcija"
|
21 |
+
|
22 |
+
#: content-aware-sidebars.php:184
|
23 |
+
msgid "Singular"
|
24 |
+
msgstr "Atsevišķs"
|
25 |
+
|
26 |
+
#: content-aware-sidebars.php:185
|
27 |
+
msgid "Singular & Archive"
|
28 |
+
msgstr "Atsevišķs un Arhīvs"
|
29 |
+
|
30 |
+
#: content-aware-sidebars.php:186
|
31 |
+
msgid "Archive"
|
32 |
+
msgstr "Arhīvs"
|
33 |
+
|
34 |
+
#: content-aware-sidebars.php:190
|
35 |
+
#: content-aware-sidebars.php:346
|
36 |
+
msgctxt "option"
|
37 |
+
msgid "Handle"
|
38 |
+
msgstr "Pārvaldīt [iespējas]"
|
39 |
+
|
40 |
+
#: content-aware-sidebars.php:192
|
41 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
42 |
+
msgstr "Aizvietot galveno sānjoslu, sapludināt ar to vai pievienot sānjoslu manuāli."
|
43 |
+
|
44 |
+
#: content-aware-sidebars.php:196
|
45 |
+
msgid "Replace"
|
46 |
+
msgstr "Aizvietot"
|
47 |
+
|
48 |
+
#: content-aware-sidebars.php:197
|
49 |
+
msgid "Merge"
|
50 |
+
msgstr "Sapludināt"
|
51 |
+
|
52 |
+
#: content-aware-sidebars.php:198
|
53 |
+
msgid "Manual"
|
54 |
+
msgstr "Manuāli"
|
55 |
+
|
56 |
+
#: content-aware-sidebars.php:202
|
57 |
+
msgid "Host Sidebar"
|
58 |
+
msgstr "Galvenā sānjosla"
|
59 |
+
|
60 |
+
#: content-aware-sidebars.php:210
|
61 |
+
#: content-aware-sidebars.php:347
|
62 |
+
msgid "Merge position"
|
63 |
+
msgstr "Sapludināšanas pozīcija"
|
64 |
+
|
65 |
+
#: content-aware-sidebars.php:212
|
66 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
67 |
+
msgstr "Novietot sānjoslu augšā vai apakšā galvenajai joslai, kad sapludina."
|
68 |
+
|
69 |
+
#: content-aware-sidebars.php:216
|
70 |
+
msgid "Top"
|
71 |
+
msgstr "Augšā"
|
72 |
+
|
73 |
+
#: content-aware-sidebars.php:217
|
74 |
+
msgid "Bottom"
|
75 |
+
msgstr "Apakšā"
|
76 |
+
|
77 |
+
#: content-aware-sidebars.php:232
|
78 |
+
msgid "Sidebars"
|
79 |
+
msgstr "Sānjoslas"
|
80 |
+
|
81 |
+
#: content-aware-sidebars.php:233
|
82 |
+
msgid "Sidebar"
|
83 |
+
msgstr "Sānjosla"
|
84 |
+
|
85 |
+
#: content-aware-sidebars.php:234
|
86 |
+
msgctxt "sidebar"
|
87 |
+
msgid "Add New"
|
88 |
+
msgstr "Pievienot jaunu"
|
89 |
+
|
90 |
+
#: content-aware-sidebars.php:235
|
91 |
+
msgid "Add New Sidebar"
|
92 |
+
msgstr "Pievienot jaunu sānjoslu"
|
93 |
+
|
94 |
+
#: content-aware-sidebars.php:236
|
95 |
+
msgid "Edit Sidebar"
|
96 |
+
msgstr "Rediģēt sānjoslu"
|
97 |
+
|
98 |
+
#: content-aware-sidebars.php:237
|
99 |
+
msgid "New Sidebar"
|
100 |
+
msgstr "Jauna sānjosla"
|
101 |
+
|
102 |
+
#: content-aware-sidebars.php:238
|
103 |
+
msgid "All Sidebars"
|
104 |
+
msgstr "Visas sānjoslas"
|
105 |
+
|
106 |
+
#: content-aware-sidebars.php:239
|
107 |
+
msgid "View Sidebar"
|
108 |
+
msgstr "Aplūkot sānjoslu"
|
109 |
+
|
110 |
+
#: content-aware-sidebars.php:240
|
111 |
+
msgid "Search Sidebars"
|
112 |
+
msgstr "Meklēt sānjoslas"
|
113 |
+
|
114 |
+
#: content-aware-sidebars.php:241
|
115 |
+
msgid "No sidebars found"
|
116 |
+
msgstr "Nav atrasta neviena sānjosla"
|
117 |
+
|
118 |
+
#: content-aware-sidebars.php:242
|
119 |
+
msgid "No sidebars found in Trash"
|
120 |
+
msgstr "Atkritnē nav atrasta neviena sānjosla"
|
121 |
+
|
122 |
+
#: content-aware-sidebars.php:273
|
123 |
+
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
124 |
+
msgstr "Sānjosla atjaunota. <a href=\"%s\">Pārvaldīt logrīkus</a>"
|
125 |
+
|
126 |
+
#: content-aware-sidebars.php:276
|
127 |
+
msgid "Sidebar updated."
|
128 |
+
msgstr "Sānjosla atjaunota."
|
129 |
+
|
130 |
+
#: content-aware-sidebars.php:278
|
131 |
+
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
132 |
+
msgstr "Sānjosla publicēta. <a href=\"%s\">Pārvaldīt logrīkus</a>"
|
133 |
+
|
134 |
+
#: content-aware-sidebars.php:279
|
135 |
+
msgid "Sidebar saved."
|
136 |
+
msgstr "Sānjosla saglabāta."
|
137 |
+
|
138 |
+
#: content-aware-sidebars.php:280
|
139 |
+
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
140 |
+
msgstr "Sānjosla iesniegta. <a href=\"%s\">Pārvaldīt logrīkus</a>"
|
141 |
+
|
142 |
+
#: content-aware-sidebars.php:281
|
143 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage widgets</a>"
|
144 |
+
msgstr "Sānjosla ieplānota uz: <strong>%1$s</strong>. <a href=\"%s\">Pārvaldīt logrīkus</a>"
|
145 |
+
|
146 |
+
#. translators: Publish box date format, see http:php.net/date
|
147 |
+
#: content-aware-sidebars.php:283
|
148 |
+
msgid "M j, Y @ G:i"
|
149 |
+
msgstr "M j, Y @ G:i"
|
150 |
+
|
151 |
+
#: content-aware-sidebars.php:284
|
152 |
+
msgid "Sidebar draft updated."
|
153 |
+
msgstr "Sānjoslas melnraksts atjaunināts."
|
154 |
+
|
155 |
+
#: content-aware-sidebars.php:321
|
156 |
+
#: content-aware-sidebars.php:402
|
157 |
+
msgid "Please update Host Sidebar"
|
158 |
+
msgstr "Lūdzu atjauniniet galveno sānjoslu"
|
159 |
+
|
160 |
+
#: content-aware-sidebars.php:457
|
161 |
+
msgid "Manage Widgets"
|
162 |
+
msgstr "Pārvaldīt logrīkus"
|
163 |
+
|
164 |
+
#: content-aware-sidebars.php:689
|
165 |
+
msgid "Content"
|
166 |
+
msgstr "Saturs"
|
167 |
+
|
168 |
+
#: content-aware-sidebars.php:699
|
169 |
+
msgid "Options"
|
170 |
+
msgstr "Iespējas"
|
171 |
+
|
172 |
+
#: content-aware-sidebars.php:708
|
173 |
+
msgid "Spread the Word"
|
174 |
+
msgstr "Izplatiet Vārdu"
|
175 |
+
|
176 |
+
#: content-aware-sidebars.php:798
|
177 |
+
msgid "If you love this plugin, please consider donating to support future development."
|
178 |
+
msgstr "Ja Jums patīk šis spraudnis, apsveriet iespēju noziedot tā turpmākai attīstībai."
|
179 |
+
|
180 |
+
#: content-aware-sidebars.php:803
|
181 |
+
msgid "Or you could:"
|
182 |
+
msgstr "Vai arī Jūs variet:"
|
183 |
+
|
184 |
+
#: content-aware-sidebars.php:805
|
185 |
+
msgid "Rate the plugin on WordPress.org"
|
186 |
+
msgstr "Novērtēt spraudni WordPress.org"
|
187 |
+
|
188 |
+
#: content-aware-sidebars.php:806
|
189 |
+
msgid "Link to the plugin page"
|
190 |
+
msgstr "Saite uz spraudni"
|
191 |
+
|
192 |
+
#: modules/abstract.php:57
|
193 |
+
#: modules/post_type.php:110
|
194 |
+
msgid "Show with All %s"
|
195 |
+
msgstr "Parādīt ar visiem %s"
|
196 |
+
|
197 |
+
#: modules/abstract.php:61
|
198 |
+
#: modules/post_type.php:134
|
199 |
+
#: modules/taxonomy.php:175
|
200 |
+
msgctxt "verb"
|
201 |
+
msgid "Search"
|
202 |
+
msgstr "Meklēt"
|
203 |
+
|
204 |
+
#: modules/abstract.php:61
|
205 |
+
#: modules/post_type.php:134
|
206 |
+
#: modules/taxonomy.php:175
|
207 |
+
#: modules/url.php:42
|
208 |
+
msgid "Add"
|
209 |
+
msgstr "Pievienot"
|
210 |
+
|
211 |
+
#: modules/author.php:24
|
212 |
+
msgid "Authors"
|
213 |
+
msgstr "Autori"
|
214 |
+
|
215 |
+
#: modules/bbpress.php:23
|
216 |
+
msgid "bbPress User Profiles"
|
217 |
+
msgstr "bbPress Lietotāja profili"
|
218 |
+
|
219 |
+
#: modules/bp_member.php:23
|
220 |
+
msgid "BuddyPress Members"
|
221 |
+
msgstr "BuddyPress Lietotāji"
|
222 |
+
|
223 |
+
#: modules/page_template.php:24
|
224 |
+
msgid "Page Templates"
|
225 |
+
msgstr "Lapu veidnes"
|
226 |
+
|
227 |
+
#: modules/polylang.php:23
|
228 |
+
#: modules/qtranslate.php:23
|
229 |
+
#: modules/transposh.php:23
|
230 |
+
#: modules/wpml.php:23
|
231 |
+
msgid "Languages"
|
232 |
+
msgstr "Valodas"
|
233 |
+
|
234 |
+
#: modules/post_type.php:30
|
235 |
+
msgid "Post Types"
|
236 |
+
msgstr "Rakstu tipi"
|
237 |
+
|
238 |
+
#: modules/post_type.php:104
|
239 |
+
#: modules/taxonomy.php:151
|
240 |
+
msgid "Automatically select new children of a selected ancestor"
|
241 |
+
msgstr "Automātiski izvēlēties jaunus bērnu ierakstus izvēlētajam ierakstam"
|
242 |
+
|
243 |
+
#: modules/post_type.php:114
|
244 |
+
#: modules/taxonomy.php:159
|
245 |
+
msgid "No items."
|
246 |
+
msgstr "Nav priekšmetu."
|
247 |
+
|
248 |
+
#: modules/static.php:25
|
249 |
+
msgid "Static Pages"
|
250 |
+
msgstr "Statiskās lapas"
|
251 |
+
|
252 |
+
#: modules/static.php:34
|
253 |
+
msgid "Front Page"
|
254 |
+
msgstr "Glavenā lapa"
|
255 |
+
|
256 |
+
#: modules/static.php:35
|
257 |
+
msgid "Search Results"
|
258 |
+
msgstr "Meklēšanas rezultāti"
|
259 |
+
|
260 |
+
#: modules/static.php:36
|
261 |
+
msgid "404 Page"
|
262 |
+
msgstr "404 lapa"
|
263 |
+
|
264 |
+
#: modules/taxonomy.php:36
|
265 |
+
msgid "Taxonomies"
|
266 |
+
msgstr "Taksonomijas"
|
267 |
+
|
268 |
+
#: modules/taxonomy.php:155
|
269 |
+
msgid "Show with %s"
|
270 |
+
msgstr "Parādīt ar %s"
|
271 |
+
|
272 |
+
#: modules/url.php:24
|
273 |
+
msgid "URLs"
|
274 |
+
msgstr "URLi"
|
275 |
+
|
276 |
+
#. Plugin Name of the plugin/theme
|
277 |
+
msgid "Content Aware Sidebars"
|
278 |
+
msgstr "Content Aware Sidebars"
|
279 |
+
|
280 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.3.1) #-#-#-#-#
|
281 |
+
#. Plugin URI of the plugin/theme
|
282 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.3.1) #-#-#-#-#
|
283 |
+
#. Author URI of the plugin/theme
|
284 |
+
msgid "http://www.intox.dk/"
|
285 |
+
msgstr "http://www.intox.dk/"
|
286 |
+
|
287 |
+
#. Description of the plugin/theme
|
288 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
289 |
+
msgstr "Pārvaldīt un rādīt sānsjolas atbilstoši aplūkojamajam saturam."
|
290 |
+
|
291 |
+
#. Author of the plugin/theme
|
292 |
+
msgid "Joachim Jensen, Intox Studio"
|
293 |
+
msgstr "Joachim Jensen, Intox Studio"
|
294 |
+
|
295 |
+
#~ msgid "View All"
|
296 |
+
#~ msgstr "Peržiūrėti Visus"
|
297 |
+
#~ msgid "Most Used"
|
298 |
+
#~ msgstr "Dažniausiai naudoti(os)"
|
299 |
+
|
lang/content-aware-sidebars-sk_SK.mo
ADDED
Binary file
|
lang/content-aware-sidebars-sk_SK.po
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: \n"
|
4 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
5 |
+
"POT-Creation-Date: 2013-05-14 13:07:12+00:00\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=iso-8859-1\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.5.5\n"
|
13 |
+
|
14 |
+
# Copyright (C) 2013 Content Aware Sidebars
|
15 |
+
# This file is distributed under the same license as the Content Aware Sidebars package.
|
16 |
+
#: content-aware-sidebars.php:178 content-aware-sidebars.php:345
|
17 |
+
msgid "Exposure"
|
18 |
+
msgstr "Expozicie"
|
19 |
+
|
20 |
+
#: content-aware-sidebars.php:184
|
21 |
+
msgid "Singular"
|
22 |
+
msgstr "Singularni"
|
23 |
+
|
24 |
+
#: content-aware-sidebars.php:185
|
25 |
+
msgid "Singular & Archive"
|
26 |
+
msgstr "Singularni & Archiv"
|
27 |
+
|
28 |
+
#: content-aware-sidebars.php:186
|
29 |
+
msgid "Archive"
|
30 |
+
msgstr "Archiv"
|
31 |
+
|
32 |
+
#: content-aware-sidebars.php:190 content-aware-sidebars.php:346
|
33 |
+
msgctxt "option"
|
34 |
+
msgid "Handle"
|
35 |
+
msgstr "Rukovat"
|
36 |
+
|
37 |
+
#: content-aware-sidebars.php:192
|
38 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
39 |
+
msgstr ""
|
40 |
+
"Nahradit hostitela sidebar, zlucit s nim alebo manualne pridat sidebar."
|
41 |
+
|
42 |
+
#: content-aware-sidebars.php:196
|
43 |
+
msgid "Replace"
|
44 |
+
msgstr "Nahradit"
|
45 |
+
|
46 |
+
#: content-aware-sidebars.php:197
|
47 |
+
msgid "Merge"
|
48 |
+
msgstr "Zlucit"
|
49 |
+
|
50 |
+
#: content-aware-sidebars.php:198
|
51 |
+
msgid "Manual"
|
52 |
+
msgstr "Manual"
|
53 |
+
|
54 |
+
#: content-aware-sidebars.php:202
|
55 |
+
msgid "Host Sidebar"
|
56 |
+
msgstr "Hostitel Sidebar"
|
57 |
+
|
58 |
+
#: content-aware-sidebars.php:210 content-aware-sidebars.php:347
|
59 |
+
msgid "Merge position"
|
60 |
+
msgstr "Zlucit pozicie"
|
61 |
+
|
62 |
+
#: content-aware-sidebars.php:212
|
63 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
64 |
+
msgstr "Miesto sidebar na hornej alebo dolnej casti hostitela pri zlucovani."
|
65 |
+
|
66 |
+
#: content-aware-sidebars.php:216
|
67 |
+
msgid "Top"
|
68 |
+
msgstr "Top"
|
69 |
+
|
70 |
+
#: content-aware-sidebars.php:217
|
71 |
+
msgid "Bottom"
|
72 |
+
msgstr "Dno"
|
73 |
+
|
74 |
+
#: content-aware-sidebars.php:232
|
75 |
+
msgid "Sidebars"
|
76 |
+
msgstr "Bocne panely"
|
77 |
+
|
78 |
+
#: content-aware-sidebars.php:233
|
79 |
+
msgid "Sidebar"
|
80 |
+
msgstr "Bocny panel"
|
81 |
+
|
82 |
+
#: content-aware-sidebars.php:234
|
83 |
+
msgctxt "sidebar"
|
84 |
+
msgid "Add New"
|
85 |
+
msgstr "Pridat nove"
|
86 |
+
|
87 |
+
#: content-aware-sidebars.php:235
|
88 |
+
msgid "Add New Sidebar"
|
89 |
+
msgstr "Pridat novy bocny panel"
|
90 |
+
|
91 |
+
#: content-aware-sidebars.php:236
|
92 |
+
msgid "Edit Sidebar"
|
93 |
+
msgstr "Upravit Sidebar"
|
94 |
+
|
95 |
+
#: content-aware-sidebars.php:237
|
96 |
+
msgid "New Sidebar"
|
97 |
+
msgstr "Novy bocny panel"
|
98 |
+
|
99 |
+
#: content-aware-sidebars.php:238
|
100 |
+
msgid "All Sidebars"
|
101 |
+
msgstr "Vsetci postranne"
|
102 |
+
|
103 |
+
#: content-aware-sidebars.php:239
|
104 |
+
msgid "View Sidebar"
|
105 |
+
msgstr "Zobrazit bocny panel"
|
106 |
+
|
107 |
+
#: content-aware-sidebars.php:240
|
108 |
+
msgid "Search Sidebars"
|
109 |
+
msgstr "Hladat Sidebars"
|
110 |
+
|
111 |
+
#: content-aware-sidebars.php:241
|
112 |
+
msgid "No sidebars found"
|
113 |
+
msgstr "C sidebars nasiel"
|
114 |
+
|
115 |
+
#: content-aware-sidebars.php:242
|
116 |
+
msgid "No sidebars found in Trash"
|
117 |
+
msgstr "Ziadne sidebars, nachadza v kosi"
|
118 |
+
|
119 |
+
#: content-aware-sidebars.php:273
|
120 |
+
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
121 |
+
msgstr "Sidebar aktualizovane. <a href=\"%s\">Spravovat widgety</a>"
|
122 |
+
|
123 |
+
#: content-aware-sidebars.php:276
|
124 |
+
msgid "Sidebar updated."
|
125 |
+
msgstr "Sidebar aktualizovane."
|
126 |
+
|
127 |
+
#: content-aware-sidebars.php:278
|
128 |
+
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
129 |
+
msgstr "Bocny panel publikoval. <a href=\"%s\">Spravovat widgety</a>"
|
130 |
+
|
131 |
+
#: content-aware-sidebars.php:279
|
132 |
+
msgid "Sidebar saved."
|
133 |
+
msgstr "Sidebar ulozene."
|
134 |
+
|
135 |
+
#: content-aware-sidebars.php:280
|
136 |
+
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
137 |
+
msgstr "Bocnom paneli posielaju. <a href=\"%s\">Spravovat widgety</a>"
|
138 |
+
|
139 |
+
#: content-aware-sidebars.php:281
|
140 |
+
msgid ""
|
141 |
+
"Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage "
|
142 |
+
"widgets</a>"
|
143 |
+
msgstr ""
|
144 |
+
"Sidebar naplanovane na: <strong>%1$s</strong>. <a href=\"%2$s\">Spravovat "
|
145 |
+
"widgety</a>"
|
146 |
+
|
147 |
+
#. translators: Publish box date format, see http:php.net/date
|
148 |
+
#: content-aware-sidebars.php:283
|
149 |
+
msgid "M j, Y @ G:i"
|
150 |
+
msgstr "M j, Y @ G:i"
|
151 |
+
|
152 |
+
#: content-aware-sidebars.php:284
|
153 |
+
msgid "Sidebar draft updated."
|
154 |
+
msgstr "Sidebar navrh aktualizovane."
|
155 |
+
|
156 |
+
#: content-aware-sidebars.php:321 content-aware-sidebars.php:402
|
157 |
+
msgid "Please update Host Sidebar"
|
158 |
+
msgstr "Prosim aktualizujte hostitela Sidebar"
|
159 |
+
|
160 |
+
#: content-aware-sidebars.php:457
|
161 |
+
msgid "Manage Widgets"
|
162 |
+
msgstr "Spravovat widgety"
|
163 |
+
|
164 |
+
#: content-aware-sidebars.php:689
|
165 |
+
msgid "Content"
|
166 |
+
msgstr "Obsah"
|
167 |
+
|
168 |
+
#: content-aware-sidebars.php:699
|
169 |
+
msgid "Options"
|
170 |
+
msgstr "Moznosti"
|
171 |
+
|
172 |
+
#: content-aware-sidebars.php:708
|
173 |
+
msgid "Spread the Word"
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: content-aware-sidebars.php:798
|
177 |
+
#, fuzzy
|
178 |
+
msgid ""
|
179 |
+
"If you love this plugin, please consider donating to support future "
|
180 |
+
"development."
|
181 |
+
msgstr "Ak mate radi tento plugin, prosim zvazte darovanie."
|
182 |
+
|
183 |
+
#: content-aware-sidebars.php:803
|
184 |
+
msgid "Or you could:"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: content-aware-sidebars.php:805
|
188 |
+
msgid "Rate the plugin on WordPress.org"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: content-aware-sidebars.php:806
|
192 |
+
msgid "Link to the plugin page"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: modules/abstract.php:57 modules/post_type.php:110
|
196 |
+
msgid "Show with All %s"
|
197 |
+
msgstr "Zobrazit s vsetky %s"
|
198 |
+
|
199 |
+
#: modules/abstract.php:61 modules/post_type.php:134 modules/taxonomy.php:175
|
200 |
+
msgctxt "verb"
|
201 |
+
msgid "Search"
|
202 |
+
msgstr "Hladat"
|
203 |
+
|
204 |
+
#: modules/abstract.php:61 modules/post_type.php:134 modules/taxonomy.php:175
|
205 |
+
#: modules/url.php:42
|
206 |
+
msgid "Add"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: modules/author.php:24
|
210 |
+
msgid "Authors"
|
211 |
+
msgstr "Autori"
|
212 |
+
|
213 |
+
#: modules/bbpress.php:23
|
214 |
+
msgid "bbPress User Profiles"
|
215 |
+
msgstr "bbPress pouzivatelske profily"
|
216 |
+
|
217 |
+
#: modules/bp_member.php:23
|
218 |
+
msgid "BuddyPress Members"
|
219 |
+
msgstr "BuddyPress clenov"
|
220 |
+
|
221 |
+
#: modules/page_template.php:24
|
222 |
+
msgid "Page Templates"
|
223 |
+
msgstr "Stranky sablony"
|
224 |
+
|
225 |
+
#: modules/polylang.php:23 modules/qtranslate.php:23 modules/transposh.php:23
|
226 |
+
#: modules/wpml.php:23
|
227 |
+
msgid "Languages"
|
228 |
+
msgstr "Jazyky"
|
229 |
+
|
230 |
+
#: modules/post_type.php:30
|
231 |
+
msgid "Post Types"
|
232 |
+
msgstr "Prispevok typy"
|
233 |
+
|
234 |
+
#: modules/post_type.php:104 modules/taxonomy.php:151
|
235 |
+
msgid "Automatically select new children of a selected ancestor"
|
236 |
+
msgstr "Automaticky vybrat nove deti z vybranych predok"
|
237 |
+
|
238 |
+
#: modules/post_type.php:114 modules/taxonomy.php:159
|
239 |
+
msgid "No items."
|
240 |
+
msgstr "Ziadne polozky."
|
241 |
+
|
242 |
+
#: modules/static.php:25
|
243 |
+
msgid "Static Pages"
|
244 |
+
msgstr "Staticke stranky"
|
245 |
+
|
246 |
+
#: modules/static.php:34
|
247 |
+
msgid "Front Page"
|
248 |
+
msgstr "Predna strana"
|
249 |
+
|
250 |
+
#: modules/static.php:35
|
251 |
+
msgid "Search Results"
|
252 |
+
msgstr "Vysledky hladania"
|
253 |
+
|
254 |
+
#: modules/static.php:36
|
255 |
+
msgid "404 Page"
|
256 |
+
msgstr "404 Stranka"
|
257 |
+
|
258 |
+
#: modules/taxonomy.php:36
|
259 |
+
msgid "Taxonomies"
|
260 |
+
msgstr "Taxonomie"
|
261 |
+
|
262 |
+
#: modules/taxonomy.php:155
|
263 |
+
msgid "Show with %s"
|
264 |
+
msgstr "Zobrazit s %s"
|
265 |
+
|
266 |
+
#: modules/url.php:24
|
267 |
+
msgid "URLs"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#. Plugin Name of the plugin/theme
|
271 |
+
msgid "Content Aware Sidebars"
|
272 |
+
msgstr "Obsah vedomi Sidebars"
|
273 |
+
|
274 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.3.1) #-#-#-#-#
|
275 |
+
#. Plugin URI of the plugin/theme
|
276 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.3.1) #-#-#-#-#
|
277 |
+
#. Author URI of the plugin/theme
|
278 |
+
msgid "http://www.intox.dk/"
|
279 |
+
msgstr "http://www.Intox.dk/"
|
280 |
+
|
281 |
+
#. Description of the plugin/theme
|
282 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
283 |
+
msgstr "Spravovat a Zobrazit sidebars podla obsahu je prezerana."
|
284 |
+
|
285 |
+
#. Author of the plugin/theme
|
286 |
+
msgid "Joachim Jensen, Intox Studio"
|
287 |
+
msgstr "Joachim Jensen, Intox Studio"
|
288 |
+
|
289 |
+
#~ msgid "Words from the author"
|
290 |
+
#~ msgstr "Slov od autora"
|
291 |
+
|
292 |
+
#~ msgid ""
|
293 |
+
#~ "this-is-translatedRemember to <a class=\"button\" href=\"%1$s\" target="
|
294 |
+
#~ "\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank"
|
295 |
+
#~ "\">share</a> it too!"
|
296 |
+
#~ msgstr ""
|
297 |
+
#~ "Nezabudnite <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> "
|
298 |
+
#~ "and <a class=\"button\" href=\"%2$s\" target=\"_blank\">zdielat</a> to "
|
299 |
+
#~ "taky!"
|
300 |
+
|
301 |
+
#~ msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
302 |
+
#~ msgstr "Pozrite sa na obsah vedomi postrehov pre % 23WordPress! :)"
|
303 |
+
|
304 |
+
#~ msgid "Check out Content Aware Sidebars :)"
|
305 |
+
#~ msgstr "Pozrite sa na obsah vedomi Sidebars:)"
|
306 |
+
|
307 |
+
#~ msgid "View All"
|
308 |
+
#~ msgstr "Zobrazit vsetky"
|
309 |
+
|
310 |
+
#~ msgid "Most Used"
|
311 |
+
#~ msgstr "Najpouzivanejsie"
|
lang/content-aware-sidebars.po
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012 Content Aware Sidebars
|
2 |
+
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 2.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2013-11-29 15:13+0100\n"
|
8 |
+
"PO-Revision-Date: 2013-11-29 15:21+0100\n"
|
9 |
+
"Last-Translator: \n"
|
10 |
+
"Language-Team: \n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Generator: Poedit 1.5.5\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
17 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
18 |
+
"X-Poedit-Basepath: .\n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
+
"X-Poedit-SearchPath-0: .\n"
|
22 |
+
"X-Poedit-SearchPath-1: ..\n"
|
23 |
+
|
24 |
+
#: ../content-aware-sidebars.php:117
|
25 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../content-aware-sidebars.php:118
|
29 |
+
msgid "Content Aware Sidebars"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../content-aware-sidebars.php:233 ../content-aware-sidebars.php:432
|
33 |
+
msgid "Exposure"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: ../content-aware-sidebars.php:239
|
37 |
+
msgid "Singular"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../content-aware-sidebars.php:240
|
41 |
+
msgid "Singular & Archive"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: ../content-aware-sidebars.php:241
|
45 |
+
msgid "Archive"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../content-aware-sidebars.php:245 ../content-aware-sidebars.php:433
|
49 |
+
msgctxt "option"
|
50 |
+
msgid "Handle"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: ../content-aware-sidebars.php:247
|
54 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: ../content-aware-sidebars.php:251
|
58 |
+
msgid "Replace"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: ../content-aware-sidebars.php:252
|
62 |
+
msgid "Merge"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../content-aware-sidebars.php:253
|
66 |
+
msgid "Manual"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../content-aware-sidebars.php:257
|
70 |
+
msgid "Host Sidebar"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: ../content-aware-sidebars.php:265 ../content-aware-sidebars.php:434
|
74 |
+
msgid "Merge position"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../content-aware-sidebars.php:267
|
78 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: ../content-aware-sidebars.php:271
|
82 |
+
msgid "Top"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../content-aware-sidebars.php:272
|
86 |
+
msgid "Bottom"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../content-aware-sidebars.php:297
|
90 |
+
msgid "Sidebars"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../content-aware-sidebars.php:298
|
94 |
+
msgid "Sidebar"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../content-aware-sidebars.php:299
|
98 |
+
msgctxt "sidebar"
|
99 |
+
msgid "Add New"
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: ../content-aware-sidebars.php:300
|
103 |
+
msgid "Add New Sidebar"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: ../content-aware-sidebars.php:301
|
107 |
+
msgid "Edit Sidebar"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: ../content-aware-sidebars.php:302
|
111 |
+
msgid "New Sidebar"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: ../content-aware-sidebars.php:303
|
115 |
+
msgid "All Sidebars"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: ../content-aware-sidebars.php:304
|
119 |
+
msgid "View Sidebar"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: ../content-aware-sidebars.php:305
|
123 |
+
msgid "Search Sidebars"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: ../content-aware-sidebars.php:306
|
127 |
+
msgid "No sidebars found"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: ../content-aware-sidebars.php:307
|
131 |
+
msgid "No sidebars found in Trash"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: ../content-aware-sidebars.php:320 ../content-aware-sidebars.php:926
|
135 |
+
msgid "Condition Groups"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: ../content-aware-sidebars.php:321
|
139 |
+
msgid "Condition Group"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: ../content-aware-sidebars.php:322
|
143 |
+
msgctxt "group"
|
144 |
+
msgid "Add New"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: ../content-aware-sidebars.php:323 ../content-aware-sidebars.php:926
|
148 |
+
#: ../content-aware-sidebars.php:951
|
149 |
+
msgid "Add New Group"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:940
|
153 |
+
#: ../content-aware-sidebars.php:1294
|
154 |
+
msgctxt "group"
|
155 |
+
msgid "Edit"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:353
|
159 |
+
msgid "Sidebar updated."
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: ../content-aware-sidebars.php:350 ../content-aware-sidebars.php:355
|
163 |
+
#: ../content-aware-sidebars.php:357 ../content-aware-sidebars.php:362
|
164 |
+
msgid "Manage widgets"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: ../content-aware-sidebars.php:355
|
168 |
+
msgid "Sidebar published."
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: ../content-aware-sidebars.php:356
|
172 |
+
msgid "Sidebar saved."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: ../content-aware-sidebars.php:357
|
176 |
+
msgid "Sidebar submitted."
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: ../content-aware-sidebars.php:358
|
180 |
+
#, php-format
|
181 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: ../content-aware-sidebars.php:360
|
185 |
+
msgid "M j, Y @ G:i"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: ../content-aware-sidebars.php:363
|
189 |
+
msgid "Sidebar draft updated."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:489
|
193 |
+
msgid "Please update Host Sidebar"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: ../content-aware-sidebars.php:544
|
197 |
+
msgid "Manage Widgets"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: ../content-aware-sidebars.php:850
|
201 |
+
msgid "Support the Author of Content Aware Sidebars"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: ../content-aware-sidebars.php:858
|
205 |
+
msgid "Content"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: ../content-aware-sidebars.php:866
|
209 |
+
msgid "Options"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: ../content-aware-sidebars.php:927
|
213 |
+
msgid ""
|
214 |
+
"Click to edit a group or create a new one. Select content on the left to add "
|
215 |
+
"it. In each group, you can combine different types of associated content."
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: ../content-aware-sidebars.php:928
|
219 |
+
msgid "Display sidebar with"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1292
|
223 |
+
msgid "Save"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: ../content-aware-sidebars.php:937 ../content-aware-sidebars.php:1293
|
227 |
+
msgid "Cancel"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: ../content-aware-sidebars.php:940 ../content-aware-sidebars.php:1295
|
231 |
+
msgid "Remove"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: ../content-aware-sidebars.php:1159
|
235 |
+
msgid ""
|
236 |
+
"If you love this plugin, please consider donating to support future "
|
237 |
+
"development."
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: ../content-aware-sidebars.php:1168
|
241 |
+
msgid "Or you could:"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: ../content-aware-sidebars.php:1170
|
245 |
+
msgid "Rate the plugin on WordPress.org"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: ../content-aware-sidebars.php:1171
|
249 |
+
msgid "Link to the plugin page"
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: ../content-aware-sidebars.php:1172
|
253 |
+
msgid "Translate the plugin into your language"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: ../content-aware-sidebars.php:1296
|
257 |
+
msgid "Remove this group and its contents permanently?"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: ../content-aware-sidebars.php:1297
|
261 |
+
msgid "No results found."
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: ../modules/abstract.php:108
|
265 |
+
#, php-format
|
266 |
+
msgid "Show with All %s"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: ../modules/abstract.php:118 ../modules/post_type.php:181
|
270 |
+
#: ../modules/taxonomy.php:235
|
271 |
+
msgid "View All"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: ../modules/abstract.php:125 ../modules/abstract.php:128
|
275 |
+
#: ../modules/post_type.php:187 ../modules/post_type.php:190
|
276 |
+
#: ../modules/taxonomy.php:241 ../modules/taxonomy.php:244
|
277 |
+
msgid "Search"
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: ../modules/abstract.php:136
|
281 |
+
msgid "Add to Group"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: ../modules/author.php:22
|
285 |
+
msgid "Authors"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: ../modules/bbpress.php:23
|
289 |
+
msgid "bbPress User Profiles"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: ../modules/bp_member.php:21
|
293 |
+
msgid "BuddyPress Members"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: ../modules/page_template.php:22
|
297 |
+
msgid "Page Templates"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: ../modules/polylang.php:21 ../modules/qtranslate.php:21
|
301 |
+
#: ../modules/transposh.php:21 ../modules/wpml.php:21
|
302 |
+
msgid "Languages"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: ../modules/post_type.php:28
|
306 |
+
msgid "Post Types"
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: ../modules/post_type.php:160 ../modules/taxonomy.php:217
|
310 |
+
msgid "Automatically select new children of a selected ancestor"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: ../modules/post_type.php:166 ../modules/taxonomy.php:221
|
314 |
+
#, php-format
|
315 |
+
msgid "Display with %s"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: ../modules/post_type.php:171 ../modules/taxonomy.php:225
|
319 |
+
msgid "No items."
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: ../modules/post_type.php:176
|
323 |
+
msgid "Most Recent"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: ../modules/static.php:23
|
327 |
+
msgid "Static Pages"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: ../modules/static.php:33
|
331 |
+
msgid "Front Page"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: ../modules/static.php:34
|
335 |
+
msgid "Search Results"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: ../modules/static.php:35
|
339 |
+
msgid "404 Page"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: ../modules/taxonomy.php:34
|
343 |
+
msgid "Taxonomies"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: ../modules/taxonomy.php:230
|
347 |
+
msgid "Most Used"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: ../modules/url.php:22
|
351 |
+
msgid "URLs"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: ../modules/url.php:40
|
355 |
+
msgid "Add"
|
356 |
+
msgstr ""
|
lang/content-aware-sidebars.pot
DELETED
@@ -1,276 +0,0 @@
|
|
1 |
-
# Copyright (C) 2013 Content Aware Sidebars
|
2 |
-
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Content Aware Sidebars 1.1.2\n"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date: 2013-01-07 16:09:52+00:00\n"
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
|
12 |
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
|
15 |
-
#: content-aware-sidebars.php:150 content-aware-sidebars.php:327
|
16 |
-
msgid "Exposure"
|
17 |
-
msgstr ""
|
18 |
-
|
19 |
-
#: content-aware-sidebars.php:156
|
20 |
-
msgid "Singular"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: content-aware-sidebars.php:157
|
24 |
-
msgid "Singular & Archive"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: content-aware-sidebars.php:158
|
28 |
-
msgid "Archive"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: content-aware-sidebars.php:162 content-aware-sidebars.php:328
|
32 |
-
msgctxt "option"
|
33 |
-
msgid "Handle"
|
34 |
-
msgstr ""
|
35 |
-
|
36 |
-
#: content-aware-sidebars.php:164
|
37 |
-
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
38 |
-
msgstr ""
|
39 |
-
|
40 |
-
#: content-aware-sidebars.php:168
|
41 |
-
msgid "Replace"
|
42 |
-
msgstr ""
|
43 |
-
|
44 |
-
#: content-aware-sidebars.php:169
|
45 |
-
msgid "Merge"
|
46 |
-
msgstr ""
|
47 |
-
|
48 |
-
#: content-aware-sidebars.php:170
|
49 |
-
msgid "Manual"
|
50 |
-
msgstr ""
|
51 |
-
|
52 |
-
#: content-aware-sidebars.php:174
|
53 |
-
msgid "Host Sidebar"
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: content-aware-sidebars.php:182 content-aware-sidebars.php:329
|
57 |
-
msgid "Merge position"
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: content-aware-sidebars.php:184
|
61 |
-
msgid "Place sidebar on top or bottom of host when merging."
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: content-aware-sidebars.php:188
|
65 |
-
msgid "Top"
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: content-aware-sidebars.php:189
|
69 |
-
msgid "Bottom"
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: content-aware-sidebars.php:210
|
73 |
-
msgid "Sidebars"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: content-aware-sidebars.php:211
|
77 |
-
msgid "Sidebar"
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: content-aware-sidebars.php:212
|
81 |
-
msgctxt "sidebar"
|
82 |
-
msgid "Add New"
|
83 |
-
msgstr ""
|
84 |
-
|
85 |
-
#: content-aware-sidebars.php:213
|
86 |
-
msgid "Add New Sidebar"
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: content-aware-sidebars.php:214
|
90 |
-
msgid "Edit Sidebar"
|
91 |
-
msgstr ""
|
92 |
-
|
93 |
-
#: content-aware-sidebars.php:215
|
94 |
-
msgid "New Sidebar"
|
95 |
-
msgstr ""
|
96 |
-
|
97 |
-
#: content-aware-sidebars.php:216
|
98 |
-
msgid "All Sidebars"
|
99 |
-
msgstr ""
|
100 |
-
|
101 |
-
#: content-aware-sidebars.php:217
|
102 |
-
msgid "View Sidebar"
|
103 |
-
msgstr ""
|
104 |
-
|
105 |
-
#: content-aware-sidebars.php:218
|
106 |
-
msgid "Search Sidebars"
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: content-aware-sidebars.php:219
|
110 |
-
msgid "No sidebars found"
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: content-aware-sidebars.php:220
|
114 |
-
msgid "No sidebars found in Trash"
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: content-aware-sidebars.php:253
|
118 |
-
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
119 |
-
msgstr ""
|
120 |
-
|
121 |
-
#: content-aware-sidebars.php:256
|
122 |
-
msgid "Sidebar updated."
|
123 |
-
msgstr ""
|
124 |
-
|
125 |
-
#: content-aware-sidebars.php:258
|
126 |
-
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
127 |
-
msgstr ""
|
128 |
-
|
129 |
-
#: content-aware-sidebars.php:259
|
130 |
-
msgid "Sidebar saved."
|
131 |
-
msgstr ""
|
132 |
-
|
133 |
-
#: content-aware-sidebars.php:260
|
134 |
-
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
135 |
-
msgstr ""
|
136 |
-
|
137 |
-
#: content-aware-sidebars.php:261
|
138 |
-
msgid ""
|
139 |
-
"Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage "
|
140 |
-
"widgets</a>"
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
#. translators: Publish box date format, see http:php.net/date
|
144 |
-
#: content-aware-sidebars.php:263
|
145 |
-
msgid "M j, Y @ G:i"
|
146 |
-
msgstr ""
|
147 |
-
|
148 |
-
#: content-aware-sidebars.php:264
|
149 |
-
msgid "Sidebar draft updated."
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: content-aware-sidebars.php:391
|
153 |
-
msgid "Please update Host Sidebar"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: content-aware-sidebars.php:454
|
157 |
-
msgid "Manage Widgets"
|
158 |
-
msgstr ""
|
159 |
-
|
160 |
-
#: content-aware-sidebars.php:651
|
161 |
-
msgid "Words from the author"
|
162 |
-
msgstr ""
|
163 |
-
|
164 |
-
#: content-aware-sidebars.php:661
|
165 |
-
msgid "Content"
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: content-aware-sidebars.php:671
|
169 |
-
msgid "Options"
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: content-aware-sidebars.php:766
|
173 |
-
msgid "If you love this plugin, please consider donating."
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
#: content-aware-sidebars.php:768
|
177 |
-
msgid ""
|
178 |
-
"Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and "
|
179 |
-
"<a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
180 |
-
msgstr ""
|
181 |
-
|
182 |
-
#: content-aware-sidebars.php:770
|
183 |
-
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
184 |
-
msgstr ""
|
185 |
-
|
186 |
-
#: content-aware-sidebars.php:772
|
187 |
-
msgid "Check out Content Aware Sidebars :)"
|
188 |
-
msgstr ""
|
189 |
-
|
190 |
-
#: modules/abstract.php:39 modules/post_type.php:78
|
191 |
-
msgid "Show with All %s"
|
192 |
-
msgstr ""
|
193 |
-
|
194 |
-
#: modules/abstract.php:43 modules/post_type.php:88 modules/taxonomy.php:121
|
195 |
-
msgid "View All"
|
196 |
-
msgstr ""
|
197 |
-
|
198 |
-
#: modules/author.php:21
|
199 |
-
msgid "Authors"
|
200 |
-
msgstr ""
|
201 |
-
|
202 |
-
#: modules/bbpress.php:20
|
203 |
-
msgid "bbPress User Profiles"
|
204 |
-
msgstr ""
|
205 |
-
|
206 |
-
#: modules/bp_member.php:20
|
207 |
-
msgid "BuddyPress Members"
|
208 |
-
msgstr ""
|
209 |
-
|
210 |
-
#: modules/page_template.php:21
|
211 |
-
msgid "Page Templates"
|
212 |
-
msgstr ""
|
213 |
-
|
214 |
-
#: modules/polylang.php:20 modules/qtranslate.php:20 modules/transposh.php:20
|
215 |
-
#: modules/wpml.php:20
|
216 |
-
msgid "Languages"
|
217 |
-
msgstr ""
|
218 |
-
|
219 |
-
#: modules/post_type.php:23
|
220 |
-
msgid "Post Types"
|
221 |
-
msgstr ""
|
222 |
-
|
223 |
-
#: modules/post_type.php:73 modules/taxonomy.php:107
|
224 |
-
msgid "Automatically select new children of a selected ancestor"
|
225 |
-
msgstr ""
|
226 |
-
|
227 |
-
#: modules/post_type.php:82 modules/taxonomy.php:115
|
228 |
-
msgid "No items."
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
#: modules/static.php:22
|
232 |
-
msgid "Static Pages"
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
#: modules/static.php:27
|
236 |
-
msgid "Front Page"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: modules/static.php:28
|
240 |
-
msgid "Search Results"
|
241 |
-
msgstr ""
|
242 |
-
|
243 |
-
#: modules/static.php:29
|
244 |
-
msgid "404 Page"
|
245 |
-
msgstr ""
|
246 |
-
|
247 |
-
#: modules/taxonomy.php:24
|
248 |
-
msgid "Taxonomies"
|
249 |
-
msgstr ""
|
250 |
-
|
251 |
-
#: modules/taxonomy.php:111
|
252 |
-
msgid "Show with %s"
|
253 |
-
msgstr ""
|
254 |
-
|
255 |
-
#: modules/taxonomy.php:120
|
256 |
-
msgid "Most Used"
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
#. Plugin Name of the plugin/theme
|
260 |
-
msgid "Content Aware Sidebars"
|
261 |
-
msgstr ""
|
262 |
-
|
263 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
|
264 |
-
#. Plugin URI of the plugin/theme
|
265 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
|
266 |
-
#. Author URI of the plugin/theme
|
267 |
-
msgid "http://www.intox.dk/"
|
268 |
-
msgstr ""
|
269 |
-
|
270 |
-
#. Description of the plugin/theme
|
271 |
-
msgid "Manage and show sidebars according to the content being viewed."
|
272 |
-
msgstr ""
|
273 |
-
|
274 |
-
#. Author of the plugin/theme
|
275 |
-
msgid "Joachim Jensen"
|
276 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**/
|
modules/abstract.php
CHANGED
@@ -11,78 +11,269 @@
|
|
11 |
*/
|
12 |
abstract class CASModule {
|
13 |
|
|
|
|
|
|
|
|
|
14 |
protected $id;
|
|
|
|
|
|
|
|
|
|
|
15 |
protected $name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
/**
|
18 |
*
|
19 |
* Constructor
|
20 |
*
|
21 |
*/
|
22 |
-
public function __construct() {
|
23 |
-
$this->id =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
|
|
|
|
|
|
|
|
|
|
26 |
public function meta_box_content() {
|
27 |
global $post;
|
28 |
|
29 |
if(!$this->_get_content())
|
30 |
return;
|
31 |
-
|
32 |
-
echo '<
|
33 |
-
echo '<
|
34 |
-
|
35 |
-
|
36 |
-
$
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
<
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
echo '</div>';
|
|
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
59 |
public function db_join() {
|
60 |
global $wpdb;
|
61 |
-
return "LEFT JOIN $wpdb->postmeta {$this->id} ON {$this->id}.post_id = posts.ID AND {$this->id}.meta_key = '".ContentAwareSidebars::
|
62 |
}
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
|
|
|
|
|
|
71 |
}
|
72 |
-
return $continue;
|
73 |
-
|
74 |
}
|
75 |
-
|
76 |
-
public function
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
-
|
84 |
-
abstract protected function _get_content();
|
85 |
-
abstract public function is_content();
|
86 |
-
abstract public function db_where();
|
87 |
|
88 |
}
|
11 |
*/
|
12 |
abstract class CASModule {
|
13 |
|
14 |
+
/**
|
15 |
+
* Module idenfification
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
protected $id;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Module name
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
protected $name;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Enable AJAX search in editor
|
28 |
+
* @var boolean
|
29 |
+
*/
|
30 |
+
protected $searchable = false;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Enable display for all content of type
|
34 |
+
* @var boolean
|
35 |
+
*/
|
36 |
+
protected $type_display = false;
|
37 |
+
|
38 |
+
protected $pagination = array(
|
39 |
+
'per_page' => 20,
|
40 |
+
'total_pages' => 1,
|
41 |
+
'total_items' => 0
|
42 |
+
);
|
43 |
+
|
44 |
+
protected $ajax = false;
|
45 |
|
46 |
/**
|
47 |
*
|
48 |
* Constructor
|
49 |
*
|
50 |
*/
|
51 |
+
public function __construct($id, $title, $ajax = false) {
|
52 |
+
$this->id = $id;
|
53 |
+
$this->name = $title;
|
54 |
+
$this->ajax = $ajax;
|
55 |
+
|
56 |
+
add_action('cas-module-admin-box',array(&$this,'meta_box_content'));
|
57 |
+
add_action('cas-module-save-data',array(&$this,'save_data'));
|
58 |
+
add_filter('cas-module-print-data',array(&$this,'print_group_data'),10,2);
|
59 |
+
|
60 |
+
add_filter('cas-context-data',array(&$this,'parse_context_data'));
|
61 |
+
if($this->ajax) {
|
62 |
+
add_action('wp_ajax_cas-module-'.$this->id,array(&$this,'ajax_get_content'));
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
public function ajax_get_content() {
|
68 |
+
echo "hejsa";
|
69 |
+
die();
|
70 |
}
|
71 |
+
|
72 |
+
// public function ajax_get_content() {
|
73 |
+
|
74 |
+
// //validation
|
75 |
+
// $paged = isset($_POST['paged']) ? intval($_POST['paged']) : 0;
|
76 |
+
// $search = isset($_POST['search']) ? $_POST['search'] : false;
|
77 |
+
|
78 |
+
// $content = $this->_get_content($paged,$search);
|
79 |
+
// if($_POST['format'] == 'plain') {
|
80 |
+
// $response = "";
|
81 |
+
// } else {
|
82 |
+
// $response = "";
|
83 |
+
// }
|
84 |
+
|
85 |
+
// json_encode($response);
|
86 |
+
// die();
|
87 |
+
// }
|
88 |
|
89 |
+
/**
|
90 |
+
* Default meta box content
|
91 |
+
* @global object $post
|
92 |
+
* @return void
|
93 |
+
*/
|
94 |
public function meta_box_content() {
|
95 |
global $post;
|
96 |
|
97 |
if(!$this->_get_content())
|
98 |
return;
|
99 |
+
|
100 |
+
echo '<li class="control-section accordion-section">';
|
101 |
+
echo '<h3 class="accordion-section-title" title="'.$this->name.'" tabindex="0">'.$this->name.'</h3>'."\n";
|
102 |
+
echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-'.$this->id.'">';
|
103 |
+
|
104 |
+
if($this->type_display) {
|
105 |
+
echo '<ul><li><label><input class="cas-chk-all" type="checkbox" name="'.$this->id.'[]" value="'.$this->id.'" /> '.sprintf(__('Display with All %s',ContentAwareSidebars::DOMAIN),$this->name).'</label></li></ul>'."\n";
|
106 |
+
}
|
107 |
+
|
108 |
+
$content = "";
|
109 |
+
foreach($this->_get_content() as $id => $name) {
|
110 |
+
$content .= '<li class="cas-'.$this->id.'-'.$id.'"><label><input class="cas-' . $this->id . '" type="checkbox" name="'.$this->id.'[]" title="'.$name.'" value="'.$id.'" /> '.$name.'</label></li>'."\n";
|
111 |
+
}
|
112 |
+
|
113 |
+
$tabs = array();
|
114 |
+
$tabs['all'] = array(
|
115 |
+
'title' => __('View All'),
|
116 |
+
'status' => true,
|
117 |
+
'content' => $content
|
118 |
+
);
|
119 |
+
|
120 |
+
if($this->searchable) {
|
121 |
+
$tabs['search'] = array(
|
122 |
+
'title' => __('Search'),
|
123 |
+
'status' => false,
|
124 |
+
'content' => '',
|
125 |
+
'content_before' => '<p><input class="cas-autocomplete-' . $this->id . ' cas-autocomplete quick-search" id="cas-autocomplete-' . $this->id . '" type="search" name="cas-autocomplete" value="" placeholder="'.__('Search').'" autocomplete="off" /><span class="spinner"></span></p>'
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
echo $this->create_tab_panels($this->id,$tabs);
|
130 |
+
|
131 |
+
echo '<p class="button-controls">';
|
132 |
+
|
133 |
+
echo '<span class="add-to-group"><input data-cas-condition="'.$this->id.'" data-cas-module="'.$this->id.'" type="button" name="cas-condition-add" class="js-cas-condition-add button" value="'.__('Add to Group',ContentAwareSidebars::DOMAIN).'"></span>';
|
134 |
+
|
135 |
+
echo '</p>';
|
136 |
+
|
137 |
echo '</div>';
|
138 |
+
echo '</li>';
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* Default query join
|
143 |
+
* @global object $wpdb
|
144 |
+
* @return string
|
145 |
+
*/
|
146 |
public function db_join() {
|
147 |
global $wpdb;
|
148 |
+
return "LEFT JOIN $wpdb->postmeta {$this->id} ON {$this->id}.post_id = posts.ID AND {$this->id}.meta_key = '".ContentAwareSidebars::PREFIX.$this->id."' ";
|
149 |
}
|
150 |
|
151 |
+
/**
|
152 |
+
* Idenficiation getter
|
153 |
+
* @return string
|
154 |
+
*/
|
155 |
+
final public function get_id() {
|
156 |
+
return $this->id;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Save data on POST
|
161 |
+
* @param int $post_id
|
162 |
+
* @return void
|
163 |
+
*/
|
164 |
+
public function save_data($post_id) {
|
165 |
+
$meta_key = ContentAwareSidebars::PREFIX . $this->id;
|
166 |
+
$new = isset($_POST[$this->id]) ? $_POST[$this->id] : '';
|
167 |
+
$old = array_flip(get_post_meta($post_id, $meta_key, false));
|
168 |
+
|
169 |
+
if (is_array($new)) {
|
170 |
+
//$new = array_unique($new);
|
171 |
+
// Skip existing data or insert new data
|
172 |
+
foreach ($new as $new_single) {
|
173 |
+
if (isset($old[$new_single])) {
|
174 |
+
unset($old[$new_single]);
|
175 |
+
} else {
|
176 |
+
add_post_meta($post_id, $meta_key, $new_single);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
// Remove existing data that have not been skipped
|
180 |
+
foreach ($old as $old_key => $old_value) {
|
181 |
+
delete_post_meta($post_id, $meta_key, $old_key);
|
182 |
}
|
183 |
+
} elseif (!empty($old)) {
|
184 |
+
// Remove any old values when $new is empty
|
185 |
+
delete_post_meta($post_id, $meta_key);
|
186 |
}
|
|
|
|
|
187 |
}
|
188 |
+
|
189 |
+
public function print_group_data($post_id) {
|
190 |
+
$data = get_post_custom_values(ContentAwareSidebars::PREFIX . $this->id, $post_id);
|
191 |
+
if($data) {
|
192 |
+
echo '<div class="cas-condition cas-condition-'.$this->id.'">';
|
193 |
+
|
194 |
+
echo '<strong>'.$this->name.'</strong>';
|
195 |
+
echo '<ul>';
|
196 |
+
|
197 |
+
if(in_array($this->id,$data)) {
|
198 |
+
echo '<li><label><input type="checkbox" name="'.$this->id.'[]" value="'.$this->id.'" checked="checked" /> '.sprintf(__('All %s',ContentAwareSidebars::DOMAIN),$this->name).'</label></li>';
|
199 |
+
}
|
200 |
+
|
201 |
+
foreach($this->_get_content(array('include' => $data)) as $id => $name) {
|
202 |
+
echo '<li><label><input type="checkbox" name="'.$this->id.'[]" value="'.$id.'" checked="checked" /> '.$name.'</label></li>'."\n";
|
203 |
+
}
|
204 |
+
echo '</ul>';
|
205 |
+
echo '</div>';
|
206 |
+
}
|
207 |
}
|
208 |
|
209 |
+
/**
|
210 |
+
* Get content for sidebar edit screen
|
211 |
+
* @return array
|
212 |
+
*/
|
213 |
+
abstract protected function _get_content($args = array());
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Determine if current content is relevant
|
217 |
+
* @return boolean
|
218 |
+
*/
|
219 |
+
abstract public function in_context();
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Get data from current content
|
223 |
+
* @author Joachim Jensen <jv@intox.dk>
|
224 |
+
* @since 2.0
|
225 |
+
* @return array|string
|
226 |
+
*/
|
227 |
+
abstract public function get_context_data();
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Parse context data together with
|
231 |
+
* table query
|
232 |
+
*/
|
233 |
+
final public function parse_context_data($data) {
|
234 |
+
if(apply_filters("cas-is-content-{$this->id}", $this->in_context())) {
|
235 |
+
$data['JOIN'][$this->id] = apply_filters("cas-db-join-{$this->id}", $this->db_join());
|
236 |
+
|
237 |
+
$context_data = $this->get_context_data();
|
238 |
+
|
239 |
+
if(is_array($context_data)) {
|
240 |
+
$context_data = "({$this->id}.meta_value IS NULL OR {$this->id}.meta_value IN ('".implode("','",$context_data) ."'))";
|
241 |
+
}
|
242 |
+
$data['WHERE'][$this->id] = apply_filters("cas-db-where-{$this->id}", $context_data);
|
243 |
+
|
244 |
+
|
245 |
+
} else {
|
246 |
+
$data['EXCLUDE'][] = $this->id;
|
247 |
+
}
|
248 |
+
return $data;
|
249 |
+
}
|
250 |
+
|
251 |
+
final protected function create_tab_panels($id, $args) {
|
252 |
+
$return = '<div id="'.$id.'" class="posttypediv">';
|
253 |
+
$return .= '<ul class="category-tabs">';
|
254 |
+
|
255 |
+
$return2 = '';
|
256 |
+
$count = count($args);
|
257 |
+
foreach($args as $key => $tab) {
|
258 |
+
if($count > 1) {
|
259 |
+
$return .= '<li'.($tab['status'] ? ' class="tabs"' : '').'>';
|
260 |
+
$return .= '<a class="nav-tab-link" href="#tabs-panel-' . $id . '-'.$key.'" data-type="tabs-panel-' . $id . '-'.$key.'"> '.$tab['title'].' </a>';
|
261 |
+
$return .= '</li>';
|
262 |
+
}
|
263 |
+
$return2 .= '<div id="tabs-panel-' . $id . '-'.$key.'" class="tabs-panel'.($tab['status'] ? ' tabs-panel-active' : ' tabs-panel-inactive').'">';
|
264 |
+
if(isset($tab['content_before'])) {
|
265 |
+
$return2 .= $tab['content_before'];
|
266 |
+
}
|
267 |
+
$return2 .= '<ul id="cas-list-' . $id . '" class="cas-contentlist categorychecklist form-no-clear">'."\n";
|
268 |
+
$return2 .= $tab['content'];
|
269 |
+
$return2 .= '</ul>'."\n";
|
270 |
+
$return2 .= '</div>';
|
271 |
+
}
|
272 |
+
$return .= '</ul>';
|
273 |
+
$return .= $return2;
|
274 |
+
$return .'</div>';
|
275 |
+
|
276 |
+
return $return;
|
277 |
}
|
|
|
|
|
|
|
|
|
278 |
|
279 |
}
|
modules/author.php
CHANGED
@@ -15,30 +15,102 @@
|
|
15 |
*/
|
16 |
class CASModule_author extends CASModule {
|
17 |
|
|
|
|
|
|
|
18 |
public function __construct() {
|
19 |
-
parent::__construct();
|
20 |
-
|
21 |
-
$this->
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
return (is_singular() && !is_front_page()) || is_author();
|
26 |
}
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
global $post;
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
}
|
34 |
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
$author_list = array();
|
38 |
-
|
39 |
-
$
|
|
|
|
|
40 |
}
|
41 |
return $author_list;
|
42 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
}
|
15 |
*/
|
16 |
class CASModule_author extends CASModule {
|
17 |
|
18 |
+
/**
|
19 |
+
* Constructor
|
20 |
+
*/
|
21 |
public function __construct() {
|
22 |
+
parent::__construct('authors',__('Authors',ContentAwareSidebars::DOMAIN));
|
23 |
+
|
24 |
+
$this->searchable = true;
|
25 |
+
$this->type_display = true;
|
26 |
+
|
27 |
+
add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
|
28 |
}
|
29 |
|
30 |
+
/**
|
31 |
+
* Determine if content is relevant
|
32 |
+
* @return boolean
|
33 |
+
*/
|
34 |
+
public function in_context() {
|
35 |
return (is_singular() && !is_front_page()) || is_author();
|
36 |
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get data from context
|
40 |
+
* @author Joachim Jensen <jv@intox.dk>
|
41 |
+
* @since 2.0
|
42 |
+
* @return array
|
43 |
+
*/
|
44 |
+
public function get_context_data() {
|
45 |
global $post;
|
46 |
+
return array(
|
47 |
+
$this->id,
|
48 |
+
(string)(is_singular() ? $post->post_author : get_query_var('author'))
|
49 |
+
);
|
50 |
}
|
51 |
|
52 |
+
/**
|
53 |
+
* Get authors
|
54 |
+
* @author Joachim Jensen <jv@intox.dk>
|
55 |
+
* @since
|
56 |
+
* @param array $args
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
protected function _get_content($args = array()) {
|
60 |
+
|
61 |
+
$args['number'] = 20;
|
62 |
+
|
63 |
+
$user_query = new WP_User_Query( $args );
|
64 |
+
|
65 |
$author_list = array();
|
66 |
+
if($user_query->results) {
|
67 |
+
foreach($user_query->results as $user) {
|
68 |
+
$author_list[$user->ID] = $user->display_name;
|
69 |
+
}
|
70 |
}
|
71 |
return $author_list;
|
72 |
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get authors with AJAX search
|
76 |
+
* @return void
|
77 |
+
*/
|
78 |
+
public function ajax_content_search() {
|
79 |
+
global $wpdb;
|
80 |
+
|
81 |
+
if(!isset($_POST['sidebar_id'])) {
|
82 |
+
die(-1);
|
83 |
+
}
|
84 |
+
|
85 |
+
// Verify request
|
86 |
+
check_ajax_referer(ContentAwareSidebars::SIDEBAR_PREFIX.$_POST['sidebar_id'],'nonce');
|
87 |
+
|
88 |
+
$suggestions = array();
|
89 |
+
|
90 |
+
$authors =$wpdb->get_results($wpdb->prepare("
|
91 |
+
SELECT ID, display_name
|
92 |
+
FROM $wpdb->users
|
93 |
+
WHERE display_name
|
94 |
+
LIKE '%s'
|
95 |
+
ORDER BY display_name ASC
|
96 |
+
LIMIT 0,10
|
97 |
+
",
|
98 |
+
'%'.$_REQUEST['q'].'%'));
|
99 |
+
|
100 |
+
foreach($authors as $user) {
|
101 |
+
$suggestions[] = array(
|
102 |
+
'label' => $user->display_name,
|
103 |
+
'value' => $user->ID,
|
104 |
+
'id' => $user->ID,
|
105 |
+
'module' => $this->id,
|
106 |
+
'name' => $this->id,
|
107 |
+
'id2' => $this->id,
|
108 |
+
'elem' => $this->id.'-'.$user->ID
|
109 |
+
);
|
110 |
+
}
|
111 |
+
|
112 |
+
echo json_encode($suggestions);
|
113 |
+
die();
|
114 |
+
}
|
115 |
|
116 |
}
|
modules/bbpress.php
CHANGED
@@ -12,33 +12,47 @@
|
|
12 |
* a) any or specific bbpress user profile
|
13 |
*
|
14 |
*/
|
15 |
-
class CASModule_bbpress extends
|
16 |
|
|
|
|
|
|
|
17 |
public function __construct() {
|
18 |
parent::__construct();
|
19 |
$this->id = 'bb_profile';
|
20 |
-
$this->name = __('bbPress User Profiles',
|
21 |
|
22 |
add_filter('cas-db-where-post_types', array(&$this,'add_forum_dependency'));
|
|
|
23 |
}
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
26 |
return bbp_is_single_user();
|
27 |
}
|
28 |
-
|
29 |
-
public function db_where() {
|
30 |
-
return "(bb_profile.meta_value = 'bb_profile' OR bb_profile.meta_value = '".bbp_get_displayed_user_id()."')";
|
31 |
-
}
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
public function add_forum_dependency($where) {
|
43 |
if(is_singular(array('topic','reply'))) {
|
44 |
$where = "(post_types.meta_value IS NULL OR post_types.meta_value IN('".get_post_type()."','".get_the_ID()."','".bbp_get_forum_id()."','forum'))";
|
12 |
* a) any or specific bbpress user profile
|
13 |
*
|
14 |
*/
|
15 |
+
class CASModule_bbpress extends CASModule_author {
|
16 |
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*/
|
20 |
public function __construct() {
|
21 |
parent::__construct();
|
22 |
$this->id = 'bb_profile';
|
23 |
+
$this->name = __('bbPress User Profiles',ContentAwareSidebars::DOMAIN);
|
24 |
|
25 |
add_filter('cas-db-where-post_types', array(&$this,'add_forum_dependency'));
|
26 |
+
add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
|
27 |
}
|
28 |
|
29 |
+
/**
|
30 |
+
* Determine if content is relevant
|
31 |
+
* @return boolean
|
32 |
+
*/
|
33 |
+
public function in_context() {
|
34 |
return bbp_is_single_user();
|
35 |
}
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
/**
|
38 |
+
* Get data from context
|
39 |
+
* @author Joachim Jensen <jv@intox.dk>
|
40 |
+
* @since 2.0
|
41 |
+
* @return array
|
42 |
+
*/
|
43 |
+
public function get_context_data() {
|
44 |
+
return array(
|
45 |
+
$this->id,
|
46 |
+
bbp_get_displayed_user_id()
|
47 |
+
);
|
48 |
}
|
49 |
|
50 |
+
/**
|
51 |
+
* Sidebars to be displayed with forums will also
|
52 |
+
* be dislpayed with respective topics and replies
|
53 |
+
* @param string $where
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
public function add_forum_dependency($where) {
|
57 |
if(is_singular(array('topic','reply'))) {
|
58 |
$where = "(post_types.meta_value IS NULL OR post_types.meta_value IN('".get_post_type()."','".get_the_ID()."','".bbp_get_forum_id()."','forum'))";
|
modules/bp_member.php
CHANGED
@@ -14,16 +14,22 @@
|
|
14 |
*/
|
15 |
class CASModule_bp_member extends CASModule {
|
16 |
|
|
|
|
|
|
|
17 |
public function __construct() {
|
18 |
-
parent::__construct();
|
19 |
-
$this->id = 'bp_member';
|
20 |
-
$this->name = __('BuddyPress Members','content-aware-sidebars');
|
21 |
|
22 |
add_filter('cas-is-content-static', array(&$this,'static_is_content'));
|
23 |
|
24 |
}
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
27 |
global $bp;
|
28 |
|
29 |
$components = $bp->loaded_components;
|
@@ -34,52 +40,92 @@ class CASModule_bp_member extends CASModule {
|
|
34 |
foreach((array)$components as $name) {
|
35 |
$content[$name] = ucfirst($name);
|
36 |
}
|
|
|
|
|
|
|
37 |
|
38 |
return $content;
|
39 |
}
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
42 |
global $bp;
|
43 |
return $bp->displayed_user->domain != null;
|
44 |
}
|
45 |
-
|
46 |
-
public function db_where() {
|
47 |
-
global $bp;
|
48 |
-
return "(bp_member.meta_value IS NULL OR bp_member.meta_value IN ('".$bp->current_component."','".$bp->current_component."-".$bp->current_action."'))";
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
public function meta_box_content() {
|
53 |
global $post, $bp;
|
54 |
|
55 |
-
echo '<
|
56 |
-
echo '<
|
|
|
|
|
57 |
$field = $this->id;
|
58 |
-
|
59 |
-
$
|
60 |
-
|
61 |
-
<div style="min-height:100%;">
|
62 |
-
<ul class="list:<?php echo $field; ?> categorychecklist form-no-clear">
|
63 |
-
<?php
|
64 |
foreach ($this->_get_content() as $id => $name) {
|
65 |
-
|
66 |
if(isset($bp->bp_options_nav[$id])) {
|
67 |
-
|
68 |
foreach($bp->bp_options_nav[$id] as $child) {
|
69 |
-
|
70 |
}
|
71 |
-
|
72 |
}
|
73 |
|
74 |
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
public function static_is_content($content) {
|
82 |
-
return $content && !$this->
|
83 |
}
|
84 |
|
85 |
}
|
14 |
*/
|
15 |
class CASModule_bp_member extends CASModule {
|
16 |
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*/
|
20 |
public function __construct() {
|
21 |
+
parent::__construct('bp_member',__('BuddyPress Members',ContentAwareSidebars::DOMAIN));
|
|
|
|
|
22 |
|
23 |
add_filter('cas-is-content-static', array(&$this,'static_is_content'));
|
24 |
|
25 |
}
|
26 |
|
27 |
+
/**
|
28 |
+
* Get member pages
|
29 |
+
* @global object $bp
|
30 |
+
* @return array
|
31 |
+
*/
|
32 |
+
protected function _get_content($args = array()) {
|
33 |
global $bp;
|
34 |
|
35 |
$components = $bp->loaded_components;
|
40 |
foreach((array)$components as $name) {
|
41 |
$content[$name] = ucfirst($name);
|
42 |
}
|
43 |
+
if(isset($args['include'])) {
|
44 |
+
$content = array_intersect_key($content,array_flip($args['include']));
|
45 |
+
}
|
46 |
|
47 |
return $content;
|
48 |
}
|
49 |
|
50 |
+
/**
|
51 |
+
* Determine if content is relevant
|
52 |
+
* @global object $bp
|
53 |
+
* @return boolean
|
54 |
+
*/
|
55 |
+
public function in_context() {
|
56 |
global $bp;
|
57 |
return $bp->displayed_user->domain != null;
|
58 |
}
|
|
|
|
|
|
|
|
|
59 |
|
60 |
+
/**
|
61 |
+
* Get data from context
|
62 |
+
* @author Joachim Jensen <jv@intox.dk>
|
63 |
+
* @since 2.0
|
64 |
+
* @return array
|
65 |
+
*/
|
66 |
+
public function get_context_data() {
|
67 |
+
global $bp;
|
68 |
+
return array(
|
69 |
+
$bp->current_component,
|
70 |
+
$bp->current_component."-".$bp->current_action
|
71 |
+
);
|
72 |
}
|
73 |
|
74 |
+
/**
|
75 |
+
* Meta box content
|
76 |
+
* @global object $post
|
77 |
+
* @global object $bp
|
78 |
+
* @return void
|
79 |
+
*/
|
80 |
public function meta_box_content() {
|
81 |
global $post, $bp;
|
82 |
|
83 |
+
echo '<li class="control-section accordion-section">';
|
84 |
+
echo '<h3 class="accordion-section-title" title="'.$this->name.'" tabindex="0">'.$this->name.'</h3>'."\n";
|
85 |
+
echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-'.$this->id.'">';
|
86 |
+
|
87 |
$field = $this->id;
|
88 |
+
|
89 |
+
$tab_content = "";
|
90 |
+
|
|
|
|
|
|
|
91 |
foreach ($this->_get_content() as $id => $name) {
|
92 |
+
$tab_content .= '<li class="cas-'.$this->id.'-'.$id.'"><label class="selectit"><input type="checkbox" name="' . $field . '[]" value="' . $id . '" /> ' . $name . '</label></li>' . "\n";
|
93 |
if(isset($bp->bp_options_nav[$id])) {
|
94 |
+
$tab_content .= '<li><ul class="children">';
|
95 |
foreach($bp->bp_options_nav[$id] as $child) {
|
96 |
+
$tab_content .= '<li class="cas-'.$this->id.'-'.$id.'-'.$child['slug'].'"><label class="selectit"><input type="checkbox" name="' . $field . '[]" value="' . $id . '-'. $child['slug'].'" /> ' . $child['name'] . '</label></li>' . "\n";
|
97 |
}
|
98 |
+
$tab_content .= '</ul></li>';
|
99 |
}
|
100 |
|
101 |
}
|
102 |
+
|
103 |
+
$tabs['all'] = array(
|
104 |
+
'title' => __('View All'),
|
105 |
+
'status' => true,
|
106 |
+
'content' => $tab_content
|
107 |
+
);
|
108 |
+
|
109 |
+
echo $this->create_tab_panels($this->id,$tabs);
|
110 |
+
|
111 |
+
echo '<p class="button-controls">';
|
112 |
+
|
113 |
+
echo '<span class="add-to-group"><input data-cas-condition="'.$this->id.'" data-cas-module="'.$this->id.'" type="button" name="cas-condition-add" class="js-cas-condition-add button" value="'.__('Add to Group',ContentAwareSidebars::DOMAIN).'"></span>';
|
114 |
+
|
115 |
+
echo '</p>';
|
116 |
+
|
117 |
+
echo '</div>'."\n";
|
118 |
+
echo '</li>';
|
119 |
}
|
120 |
|
121 |
+
/**
|
122 |
+
* Avoid collision with content of static module
|
123 |
+
* Somehow buddypress pages pass is_404()
|
124 |
+
* @param boolean $content
|
125 |
+
* @return boolean
|
126 |
+
*/
|
127 |
public function static_is_content($content) {
|
128 |
+
return $content && !$this->in_context();
|
129 |
}
|
130 |
|
131 |
}
|
modules/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**/
|
modules/page_template.php
CHANGED
@@ -15,29 +15,50 @@
|
|
15 |
*/
|
16 |
class CASModule_page_template extends CASModule {
|
17 |
|
|
|
|
|
|
|
18 |
public function __construct() {
|
19 |
-
parent::__construct();
|
20 |
-
|
21 |
-
$this->
|
22 |
}
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
if(is_singular() && !('page' == get_option( 'show_on_front') && get_option('page_on_front') == get_the_ID())) {
|
26 |
$template = get_post_meta(get_the_ID(),'_wp_page_template',true);
|
27 |
-
|
28 |
-
return true;
|
29 |
-
}
|
30 |
}
|
31 |
return false;
|
32 |
}
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
}
|
15 |
*/
|
16 |
class CASModule_page_template extends CASModule {
|
17 |
|
18 |
+
/**
|
19 |
+
* Constructor
|
20 |
+
*/
|
21 |
public function __construct() {
|
22 |
+
parent::__construct('page_templates',__('Page Templates',ContentAwareSidebars::DOMAIN));
|
23 |
+
|
24 |
+
$this->type_display = true;
|
25 |
}
|
26 |
|
27 |
+
/**
|
28 |
+
* Determine if content is relevant
|
29 |
+
* @return boolean
|
30 |
+
*/
|
31 |
+
public function in_context() {
|
32 |
if(is_singular() && !('page' == get_option( 'show_on_front') && get_option('page_on_front') == get_the_ID())) {
|
33 |
$template = get_post_meta(get_the_ID(),'_wp_page_template',true);
|
34 |
+
return ($template && $template != 'default');
|
|
|
|
|
35 |
}
|
36 |
return false;
|
37 |
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get data from context
|
41 |
+
* @author Joachim Jensen <jv@intox.dk>
|
42 |
+
* @since 2.0
|
43 |
+
* @return array
|
44 |
+
*/
|
45 |
+
public function get_context_data() {
|
46 |
+
return array(
|
47 |
+
$this->id,
|
48 |
+
get_post_meta(get_the_ID(),'_wp_page_template',true)
|
49 |
+
);
|
50 |
}
|
51 |
|
52 |
+
/**
|
53 |
+
* Get page templates
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
protected function _get_content($args = array()) {
|
57 |
+
$templates = array_flip(get_page_templates());
|
58 |
+
if(isset($args['include'])) {
|
59 |
+
$templates = array_intersect_key($templates,array_flip($args['include']));
|
60 |
+
}
|
61 |
+
return $templates;
|
62 |
}
|
63 |
|
64 |
}
|
modules/polylang.php
CHANGED
@@ -14,37 +14,62 @@
|
|
14 |
*/
|
15 |
class CASModule_polylang extends CASModule {
|
16 |
|
|
|
|
|
|
|
17 |
public function __construct() {
|
18 |
-
parent::__construct();
|
19 |
-
$this->id = 'language';
|
20 |
-
$this->name = __('Languages','content-aware-sidebars');
|
21 |
-
|
22 |
|
23 |
add_filter('pll_get_post_types', array(&$this,'remove_sidebar_multilingual'));
|
24 |
|
25 |
}
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
return true;
|
29 |
}
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
36 |
global $polylang;
|
37 |
$langs = array();
|
38 |
|
39 |
foreach($polylang->get_languages_list() as $lng) {
|
40 |
$langs[$lng->slug] = $lng->name;
|
41 |
}
|
|
|
|
|
|
|
42 |
return $langs;
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
public function remove_sidebar_multilingual($post_types) {
|
46 |
-
|
47 |
-
unset($post_types['sidebar']);
|
48 |
return $post_types;
|
49 |
}
|
50 |
|
14 |
*/
|
15 |
class CASModule_polylang extends CASModule {
|
16 |
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*/
|
20 |
public function __construct() {
|
21 |
+
parent::__construct('language',__('Languages',ContentAwareSidebars::DOMAIN));
|
|
|
|
|
|
|
22 |
|
23 |
add_filter('pll_get_post_types', array(&$this,'remove_sidebar_multilingual'));
|
24 |
|
25 |
}
|
26 |
|
27 |
+
/**
|
28 |
+
* Determine if content is relevant
|
29 |
+
* @return boolean
|
30 |
+
*/
|
31 |
+
public function in_context() {
|
32 |
return true;
|
33 |
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get data from context
|
37 |
+
* @author Joachim Jensen <jv@intox.dk>
|
38 |
+
* @since 2.0
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_context_data() {
|
42 |
+
return array(
|
43 |
+
$this->id,
|
44 |
+
pll_current_language()
|
45 |
+
);
|
46 |
}
|
47 |
|
48 |
+
/**
|
49 |
+
* Get languages
|
50 |
+
* @global object $polylang
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
protected function _get_content($args = array()) {
|
54 |
global $polylang;
|
55 |
$langs = array();
|
56 |
|
57 |
foreach($polylang->get_languages_list() as $lng) {
|
58 |
$langs[$lng->slug] = $lng->name;
|
59 |
}
|
60 |
+
if(isset($args['include'])) {
|
61 |
+
$langs = array_intersect_key($langs,array_flip($args['include']));
|
62 |
+
}
|
63 |
return $langs;
|
64 |
}
|
65 |
|
66 |
+
/**
|
67 |
+
* Remove sidebars from multilingual list
|
68 |
+
* @param array $post_types
|
69 |
+
* @return array
|
70 |
+
*/
|
71 |
public function remove_sidebar_multilingual($post_types) {
|
72 |
+
unset($post_types[ContentAwareSidebars::TYPE_SIDEBAR]);
|
|
|
73 |
return $post_types;
|
74 |
}
|
75 |
|
modules/post_type.php
CHANGED
@@ -15,110 +15,344 @@
|
|
15 |
*/
|
16 |
class CASModule_post_type extends CASModule {
|
17 |
|
|
|
|
|
|
|
|
|
18 |
private $post_type_objects;
|
19 |
|
|
|
|
|
|
|
20 |
public function __construct() {
|
21 |
-
parent::__construct();
|
22 |
-
$this->
|
23 |
-
$this->
|
24 |
|
25 |
add_action('transition_post_status', array(&$this,'post_ancestry_check'),10,3);
|
26 |
-
|
|
|
|
|
27 |
}
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
return ((is_singular() || is_home()) && !is_front_page()) || is_post_type_archive();
|
35 |
}
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
if(is_singular()) {
|
39 |
-
return
|
|
|
|
|
|
|
40 |
}
|
41 |
global $post_type;
|
42 |
-
|
43 |
// Home has post as default post type
|
44 |
if(!$post_type) $post_type = 'post';
|
45 |
-
return
|
|
|
|
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
public function meta_box_content() {
|
49 |
global $post;
|
50 |
|
51 |
foreach ($this->_get_post_types() as $post_type) {
|
52 |
-
echo '<h4><a href="#">' . $post_type->label . '</a></h4>'."\n";
|
53 |
-
echo '<div class="cas-rule-content" id="cas-' . $this->id . '-' . $post_type->name . '">'."\n";
|
54 |
-
$meta = get_post_meta($post->ID, ContentAwareSidebars::prefix . 'post_types', false);
|
55 |
-
$current = $meta != '' ? $meta : array();
|
56 |
-
|
57 |
-
$exclude = array();
|
58 |
-
if ($post_type->name == 'page' && 'page' == get_option('show_on_front')) {
|
59 |
-
$exclude[] = get_option('page_on_front');
|
60 |
-
$exclude[] = get_option('page_for_posts');
|
61 |
-
}
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
if($post_type->hierarchical) {
|
72 |
-
echo '<
|
73 |
-
echo '<label><input type="checkbox" name="
|
74 |
-
echo '</
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
-
//WP3.1.4 does not support $post_type->labels->all_items
|
77 |
-
echo '<p>' . "\n";
|
78 |
-
echo '<label><input class="cas-chk-all" type="checkbox" name="post_types[]" value="' . $post_type->name . '"' . checked(in_array($post_type->name, $current), true, false) . ' /> ' . sprintf(__('Show with All %s', 'content-aware-sidebars'), $post_type->label) . '</label>' . "\n";
|
79 |
-
echo '</p>' . "\n";
|
80 |
|
81 |
-
if (!$
|
82 |
echo '<p>' . __('No items.') . '</p>';
|
83 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
<ul id="posttype-<?php echo $post_type->name; ?>-tabs" class="category-tabs">
|
88 |
-
<li class="tabs"><a href="#<?php echo $post_type->name; ?>-all" tabindex="3"><?php _e('View All'); ?></a></li>
|
89 |
-
</ul>
|
90 |
-
<div id="<?php echo $post_type->name; ?>-all" class="tabs-panel" style="min-height:100%;">
|
91 |
-
<ul id="<?php echo $post_type->name; ?>checklist" class="list:<?php echo $post_type->name ?> categorychecklist form-no-clear">
|
92 |
-
<?php cas_posts_checklist($post->ID, array('post_type' => $post_type, 'posts' => $posts)); ?>
|
93 |
-
</ul>
|
94 |
-
</div>
|
95 |
-
</div>
|
96 |
-
<?php
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
echo '</div>';
|
|
|
100 |
}
|
101 |
}
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
}
|
110 |
-
|
|
|
|
|
111 |
}
|
|
|
112 |
|
113 |
/**
|
114 |
-
*
|
115 |
-
* @param
|
116 |
-
* @param
|
117 |
-
* @param
|
|
|
118 |
*/
|
119 |
public function post_ancestry_check($new_status, $old_status, $post) {
|
120 |
|
121 |
-
if($post->post_type !=
|
122 |
|
123 |
$status = array('publish','private','future');
|
124 |
// Only new posts are relevant
|
@@ -129,16 +363,16 @@ class CASModule_post_type extends CASModule {
|
|
129 |
|
130 |
// Get sidebars with post ancestor wanting to auto-select post
|
131 |
$sidebars = new WP_Query(array(
|
132 |
-
'post_type' =>
|
133 |
'meta_query' => array(
|
134 |
'relation' => 'AND',
|
135 |
array(
|
136 |
-
'key' => ContentAwareSidebars::
|
137 |
-
'value' => '
|
138 |
'compare' => '='
|
139 |
),
|
140 |
array(
|
141 |
-
'key' => ContentAwareSidebars::
|
142 |
'value' => get_ancestors($post->ID,$post->post_type),
|
143 |
'type' => 'numeric',
|
144 |
'compare' => 'IN'
|
@@ -147,15 +381,12 @@ class CASModule_post_type extends CASModule {
|
|
147 |
));
|
148 |
if($sidebars) {
|
149 |
foreach($sidebars as $sidebar) {
|
150 |
-
add_post_meta($sidebar->ID, ContentAwareSidebars::
|
151 |
}
|
152 |
}
|
153 |
-
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
}
|
160 |
|
161 |
}
|
15 |
*/
|
16 |
class CASModule_post_type extends CASModule {
|
17 |
|
18 |
+
/**
|
19 |
+
* Registered public post types
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
private $post_type_objects;
|
23 |
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*/
|
27 |
public function __construct() {
|
28 |
+
parent::__construct('post_types',__('Post Types',ContentAwareSidebars::DOMAIN), true);
|
29 |
+
$this->type_display = true;
|
30 |
+
$this->searchable = true;
|
31 |
|
32 |
add_action('transition_post_status', array(&$this,'post_ancestry_check'),10,3);
|
33 |
+
|
34 |
+
add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
|
35 |
+
|
36 |
}
|
37 |
|
38 |
+
/**
|
39 |
+
* Get registered post types
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
protected function _get_content($args = array()) {
|
43 |
+
$args = wp_parse_args($args, array(
|
44 |
+
'include' => '',
|
45 |
+
'post_type' => 'post',
|
46 |
+
'orderby' => 'date',
|
47 |
+
'order' => 'DESC',
|
48 |
+
'paged' => 1
|
49 |
+
|
50 |
+
));
|
51 |
+
extract($args);
|
52 |
+
|
53 |
+
$exclude = array();
|
54 |
+
if ($post_type == 'page' && 'page' == get_option('show_on_front')) {
|
55 |
+
$exclude[] = get_option('page_on_front');
|
56 |
+
$exclude[] = get_option('page_for_posts');
|
57 |
+
}
|
58 |
+
|
59 |
+
//WP3.1 does not support (array) as post_status
|
60 |
+
$query = new WP_Query(array(
|
61 |
+
'posts_per_page' => 20,
|
62 |
+
'post_type' => $post_type,
|
63 |
+
'post_status' => 'publish,private,future',
|
64 |
+
'post__in' => $include,
|
65 |
+
'exclude' => $exclude,
|
66 |
+
'orderby' => $orderby,
|
67 |
+
'order' => $order,
|
68 |
+
'paged' => $paged,
|
69 |
+
'ignore_sticky_posts' => true
|
70 |
+
));
|
71 |
+
$this->pagination = array(
|
72 |
+
'paged' => $paged,
|
73 |
+
'per_page' => 20,
|
74 |
+
'total_pages' => $query->max_num_pages,
|
75 |
+
'total_items' => $query->found_posts
|
76 |
+
);
|
77 |
+
wp_reset_postdata();
|
78 |
+
return $query->posts;
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _get_post_types() {
|
82 |
+
if (empty($this->post_type_objects)) {
|
83 |
+
// List public post types
|
84 |
+
foreach (get_post_types(array('public' => true), 'objects') as $post_type) {
|
85 |
+
$this->post_type_objects[$post_type->name] = $post_type;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
return $this->post_type_objects;
|
89 |
+
}
|
90 |
+
|
91 |
+
public function print_group_data($post_id) {
|
92 |
+
$ids = get_post_custom_values(ContentAwareSidebars::PREFIX . $this->id, $post_id);
|
93 |
|
94 |
+
if($ids) {
|
95 |
+
$lookup = array_flip((array)$ids);
|
96 |
+
foreach($this->_get_post_types() as $post_type) {
|
97 |
+
$posts =$this->_get_content(array('include' => $ids, 'posts_per_page' => -1, 'post_type' => $post_type->name));
|
98 |
+
if($posts || isset($lookup[$post_type->name]) || isset($lookup[ContentAwareSidebars::PREFIX.'sub_' . $post_type->name])) {
|
99 |
+
echo '<div class="cas-condition cas-condition-'.$this->id.'-'.$post_type->name.'">';
|
100 |
+
echo '<strong>'.$post_type->label.'</strong>';
|
101 |
+
echo '<ul>';
|
102 |
+
if(isset($lookup[ContentAwareSidebars::PREFIX.'sub_' . $post_type->name])) {
|
103 |
+
echo '<li><label><input type="checkbox" name="post_types[]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $post_type->name . '" checked="checked" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label></li>' . "\n";
|
104 |
+
}
|
105 |
+
if(isset($lookup[$post_type->name])) {
|
106 |
+
echo '<li><label><input type="checkbox" name="post_types[]" value="'.$post_type->name.'" checked="checked" /> '.$post_type->labels->all_items.'</label></li>' . "\n";
|
107 |
+
}
|
108 |
+
if($posts) {
|
109 |
+
echo $this->post_checklist($post_type, $posts, false, $ids);
|
110 |
+
}
|
111 |
+
echo '</ul>';
|
112 |
+
echo '</div>';
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
}
|
119 |
|
120 |
+
/**
|
121 |
+
* Determine if content is relevant
|
122 |
+
* @return boolean
|
123 |
+
*/
|
124 |
+
public function in_context() {
|
125 |
return ((is_singular() || is_home()) && !is_front_page()) || is_post_type_archive();
|
126 |
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Get data from context
|
130 |
+
* @author Joachim Jensen <jv@intox.dk>
|
131 |
+
* @since 2.0
|
132 |
+
* @return array
|
133 |
+
*/
|
134 |
+
public function get_context_data() {
|
135 |
if(is_singular()) {
|
136 |
+
return array(
|
137 |
+
get_post_type(),
|
138 |
+
get_the_ID()
|
139 |
+
);
|
140 |
}
|
141 |
global $post_type;
|
|
|
142 |
// Home has post as default post type
|
143 |
if(!$post_type) $post_type = 'post';
|
144 |
+
return array(
|
145 |
+
$post_type
|
146 |
+
);
|
147 |
}
|
148 |
|
149 |
+
/**
|
150 |
+
* Meta box content
|
151 |
+
* @global object $post
|
152 |
+
* @global object $wpdb
|
153 |
+
* @return void
|
154 |
+
*/
|
155 |
public function meta_box_content() {
|
156 |
global $post;
|
157 |
|
158 |
foreach ($this->_get_post_types() as $post_type) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
+
echo '<li class="control-section accordion-section">';
|
161 |
+
echo '<h3 class="accordion-section-title" title="'.$post_type->label.'" tabindex="0">'.$post_type->label.'</h3>'."\n";
|
162 |
+
echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-' . $this->id . '-' . $post_type->name . '">'."\n";
|
163 |
+
|
164 |
+
$recent_posts = $this->_get_content(array('post_type' => $post_type->name));
|
165 |
+
|
166 |
+
|
|
|
167 |
if($post_type->hierarchical) {
|
168 |
+
echo '<ul><li>' . "\n";
|
169 |
+
echo '<label><input type="checkbox" name="'.$this->id.'[]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $post_type->name . '" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label>' . "\n";
|
170 |
+
echo '</li></ul>' . "\n";
|
171 |
+
}
|
172 |
+
|
173 |
+
if($this->type_display) {
|
174 |
+
echo '<ul><li>' . "\n";
|
175 |
+
echo '<label><input class="cas-chk-all" type="checkbox" name="'.$this->id.'[]" value="' . $post_type->name . '" /> ' . sprintf(__('Display with %s', ContentAwareSidebars::DOMAIN), $post_type->labels->all_items) . '</label>' . "\n";
|
176 |
+
echo '</li></ul>' . "\n";
|
177 |
}
|
|
|
|
|
|
|
|
|
178 |
|
179 |
+
if (!$recent_posts) {
|
180 |
echo '<p>' . __('No items.') . '</p>';
|
181 |
} else {
|
182 |
+
//No need to use two queries before knowing there are items
|
183 |
+
if(count($recent_posts) < 20) {
|
184 |
+
$posts = $recent_posts;
|
185 |
+
} else {
|
186 |
+
$posts = $this->_get_content(array('post_type' => $post_type->name, 'orderby' => 'title', 'order' => 'ASC'));
|
187 |
+
}
|
188 |
+
|
189 |
+
$tabs = array();
|
190 |
+
$tabs['most-recent'] = array(
|
191 |
+
'title' => __('Most Recent'),
|
192 |
+
'status' => true,
|
193 |
+
'content' => $this->post_checklist($post_type, $recent_posts)
|
194 |
+
);
|
195 |
+
$tabs['all'] = array(
|
196 |
+
'title' => __('View All'),
|
197 |
+
'status' => false,
|
198 |
+
'content' => $this->post_checklist($post_type, $posts, true)
|
199 |
+
);
|
200 |
+
if($this->searchable) {
|
201 |
+
$tabs['search'] = array(
|
202 |
+
'title' => __('Search'),
|
203 |
+
'status' => false,
|
204 |
+
'content' => '',
|
205 |
+
'content_before' => '<p><input class="cas-autocomplete-' . $this->id . ' cas-autocomplete quick-search" id="cas-autocomplete-' . $this->id . '-' . $post_type->name . '" type="search" name="cas-autocomplete" value="" placeholder="'.__('Search').'" autocomplete="off" /><span class="spinner"></span></p>'
|
206 |
+
);
|
207 |
+
}
|
208 |
|
209 |
+
echo $this->create_tab_panels($this->id . '-' . $post_type->name,$tabs);
|
210 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
|
213 |
+
echo '<p class="button-controls">';
|
214 |
+
|
215 |
+
echo '<span class="add-to-group"><input data-cas-condition="'.$this->id.'-'.$post_type->name.'" type="button" name="" id="cas-' . $this->id . '-' . $post_type->name . '-add" class="js-cas-condition-add button" value="'.__('Add to Group',ContentAwareSidebars::DOMAIN).'"></span>';
|
216 |
+
|
217 |
+
echo '</p>';
|
218 |
+
|
219 |
echo '</div>';
|
220 |
+
echo '</li>';
|
221 |
}
|
222 |
}
|
223 |
|
224 |
+
/**
|
225 |
+
* Show posts from a specific post type
|
226 |
+
* @param int $post_id
|
227 |
+
* @param object $post_type
|
228 |
+
* @param array $posts
|
229 |
+
* @param array $selected_ids
|
230 |
+
* @return void
|
231 |
+
*/
|
232 |
+
private function post_checklist($post_type, $posts, $pagination = false, $selected_ids = array()) {
|
233 |
+
|
234 |
+
$walker = new CAS_Walker_Checklist('post',array('parent' => 'post_parent', 'id' => 'ID'));
|
235 |
+
|
236 |
+
$args = array(
|
237 |
+
'post_type' => $post_type,
|
238 |
+
'selected_terms' => $selected_ids
|
239 |
+
);
|
240 |
+
|
241 |
+
$return = call_user_func_array(array(&$walker, 'walk'), array($posts, 0, $args));
|
242 |
+
|
243 |
+
if($pagination) {
|
244 |
+
$paginate = paginate_links(array(
|
245 |
+
'base' => admin_url( 'admin-ajax.php').'%_%',
|
246 |
+
'format' => '?paged=%#%',
|
247 |
+
'total' => $this->pagination['total_pages'],
|
248 |
+
'current' => $this->pagination['paged'],
|
249 |
+
'mid_size' => 2,
|
250 |
+
'end_size' => 1,
|
251 |
+
'prev_next' => true,
|
252 |
+
'prev_text' => 'prev',
|
253 |
+
'next_text' => 'next',
|
254 |
+
'add_args' => array('item_object'=>$post_type->name),
|
255 |
+
));
|
256 |
+
$return = $paginate.$return.$paginate;
|
257 |
+
}
|
258 |
+
|
259 |
+
return $return;
|
260 |
+
}
|
261 |
+
|
262 |
+
public function ajax_get_content() {
|
263 |
+
|
264 |
+
//validation
|
265 |
+
$paged = isset($_POST['paged']) ? $_POST['paged'] : 1;
|
266 |
+
$search = isset($_POST['search']) ? $_POST['search'] : false;
|
267 |
+
$post_type = get_post_type_object($_POST['item_object']);
|
268 |
+
|
269 |
+
$posts = $this->_get_content(array('post_type' => $_POST['item_object'], 'orderby' => 'title', 'order' => 'ASC', 'paged' => $paged));
|
270 |
+
$response = $this->post_checklist($post_type, $posts, true);
|
271 |
+
//$response = $_POST['paged'];
|
272 |
+
echo json_encode($response);
|
273 |
+
die();
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Get posts with AJAX search
|
278 |
+
* @return void
|
279 |
+
*/
|
280 |
+
public function ajax_content_search() {
|
281 |
+
global $wpdb;
|
282 |
+
|
283 |
+
if(!isset($_POST['sidebar_id'])) {
|
284 |
+
die(-1);
|
285 |
+
}
|
286 |
+
|
287 |
+
// Verify request
|
288 |
+
check_ajax_referer(ContentAwareSidebars::SIDEBAR_PREFIX.$_POST['sidebar_id'],'nonce');
|
289 |
+
|
290 |
+
$suggestions = array();
|
291 |
+
if ( preg_match('/cas-autocomplete-'.$this->id.'-([a-zA-Z_-]*\b)/', $_REQUEST['type'], $matches) ) {
|
292 |
+
if(get_post_type_object( $matches[1] )) {
|
293 |
+
$exclude = array();
|
294 |
+
$exclude_query = "";
|
295 |
+
if ($matches[1] == 'page' && 'page' == get_option('show_on_front')) {
|
296 |
+
$exclude[] = get_option('page_on_front');
|
297 |
+
$exclude[] = get_option('page_for_posts');
|
298 |
+
$exclude_query = " AND ID NOT IN (".implode(",", $exclude).")";
|
299 |
+
}
|
300 |
+
|
301 |
+
//WordPress searches in title and content by default
|
302 |
+
//We want to search in title and slug
|
303 |
+
//Using unprepared (safe) exclude because WP is not good at parsing arrays
|
304 |
+
$posts = $wpdb->get_results($wpdb->prepare("
|
305 |
+
SELECT ID, post_title, post_type
|
306 |
+
FROM $wpdb->posts
|
307 |
+
WHERE post_type = '%s' AND (post_title LIKE '%s' OR post_name LIKE '%s') AND post_status IN('publish','private','future')
|
308 |
+
".$exclude_query."
|
309 |
+
ORDER BY post_title ASC
|
310 |
+
LIMIT 0,20
|
311 |
+
",
|
312 |
+
$matches[1],
|
313 |
+
"%".$_REQUEST['q']."%",
|
314 |
+
"%".$_REQUEST['q']."%"
|
315 |
+
));
|
316 |
+
|
317 |
+
// $posts = get_posts(array(
|
318 |
+
// 'posts_per_page' => 10,
|
319 |
+
// 'post_type' => $matches[1],
|
320 |
+
// 's' => $_REQUEST['term'],
|
321 |
+
// 'exclude' => $exclude,
|
322 |
+
// 'orderby' => 'title',
|
323 |
+
// 'order' => 'ASC',
|
324 |
+
// 'post_status' => 'publish,private,future'
|
325 |
+
// ));
|
326 |
+
|
327 |
+
foreach($posts as $post) {
|
328 |
+
$suggestions[] = array(
|
329 |
+
'label' => $post->post_title,
|
330 |
+
'value' => $post->ID,
|
331 |
+
'id' => $post->ID,
|
332 |
+
'module' => $this->id,
|
333 |
+
'name' => $this->id,
|
334 |
+
'id2' => $this->id.'-'.$post->post_type,
|
335 |
+
'elem' => $post->post_type.'-'.$post->ID
|
336 |
+
);
|
337 |
+
}
|
338 |
}
|
339 |
}
|
340 |
+
|
341 |
+
echo json_encode($suggestions);
|
342 |
+
die();
|
343 |
}
|
344 |
+
|
345 |
|
346 |
/**
|
347 |
+
* Automatically select child of selected parent
|
348 |
+
* @param string $new_status
|
349 |
+
* @param string $old_status
|
350 |
+
* @param object $post
|
351 |
+
* @return void
|
352 |
*/
|
353 |
public function post_ancestry_check($new_status, $old_status, $post) {
|
354 |
|
355 |
+
if($post->post_type != ContentAwareSidebars::TYPE_SIDEBAR && $post->post_type != ContentAwareSidebars::TYPE_CONDITION_GROUP) {
|
356 |
|
357 |
$status = array('publish','private','future');
|
358 |
// Only new posts are relevant
|
363 |
|
364 |
// Get sidebars with post ancestor wanting to auto-select post
|
365 |
$sidebars = new WP_Query(array(
|
366 |
+
'post_type' => ContentAwareSidebars::TYPE_CONDITION_GROUP,
|
367 |
'meta_query' => array(
|
368 |
'relation' => 'AND',
|
369 |
array(
|
370 |
+
'key' => ContentAwareSidebars::PREFIX . $this->id,
|
371 |
+
'value' => ContentAwareSidebars::PREFIX.'sub_' . $post->post_type,
|
372 |
'compare' => '='
|
373 |
),
|
374 |
array(
|
375 |
+
'key' => ContentAwareSidebars::PREFIX . $this->id,
|
376 |
'value' => get_ancestors($post->ID,$post->post_type),
|
377 |
'type' => 'numeric',
|
378 |
'compare' => 'IN'
|
381 |
));
|
382 |
if($sidebars) {
|
383 |
foreach($sidebars as $sidebar) {
|
384 |
+
add_post_meta($sidebar->ID, ContentAwareSidebars::PREFIX.$this->id, $post->ID);
|
385 |
}
|
386 |
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
|
|
|
|
|
|
390 |
}
|
391 |
|
392 |
}
|
modules/qtranslate.php
CHANGED
@@ -6,43 +6,57 @@
|
|
6 |
|
7 |
/**
|
8 |
*
|
9 |
-
*
|
10 |
*
|
11 |
* Detects if current content is:
|
12 |
-
* a)
|
13 |
*
|
14 |
*/
|
15 |
class CASModule_qtranslate extends CASModule {
|
16 |
|
|
|
|
|
|
|
17 |
public function __construct() {
|
18 |
-
parent::__construct();
|
19 |
-
$this->id = 'language';
|
20 |
-
$this->name = __('Languages','content-aware-sidebars');
|
21 |
-
|
22 |
-
add_filter('manage_edit-sidebar_columns', array(&$this,'admin_column_headers'));
|
23 |
-
|
24 |
}
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
return true;
|
28 |
}
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
global $q_config;
|
41 |
$langs = array();
|
42 |
|
43 |
foreach(get_option('qtranslate_enabled_languages') as $lng) {
|
44 |
$langs[$lng] = $q_config['language_name'][$lng];
|
45 |
}
|
|
|
|
|
|
|
46 |
return $langs;
|
47 |
}
|
48 |
|
6 |
|
7 |
/**
|
8 |
*
|
9 |
+
* qTranslate Module
|
10 |
*
|
11 |
* Detects if current content is:
|
12 |
+
* a) in specific language
|
13 |
*
|
14 |
*/
|
15 |
class CASModule_qtranslate extends CASModule {
|
16 |
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*/
|
20 |
public function __construct() {
|
21 |
+
parent::__construct('language',__('Languages',ContentAwareSidebars::DOMAIN));
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* Determine if content is relevant
|
26 |
+
* @return boolean
|
27 |
+
*/
|
28 |
+
public function in_context() {
|
29 |
return true;
|
30 |
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get data from context
|
34 |
+
* @author Joachim Jensen <jv@intox.dk>
|
35 |
+
* @since 2.0
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
public function get_context_data() {
|
39 |
+
return array(
|
40 |
+
$this->id,
|
41 |
+
qtrans_getLanguage()
|
42 |
+
);
|
43 |
}
|
44 |
|
45 |
+
/**
|
46 |
+
* Get languages
|
47 |
+
* @global array $q_config
|
48 |
+
* @return array
|
49 |
+
*/
|
50 |
+
protected function _get_content($args = array()) {
|
51 |
global $q_config;
|
52 |
$langs = array();
|
53 |
|
54 |
foreach(get_option('qtranslate_enabled_languages') as $lng) {
|
55 |
$langs[$lng] = $q_config['language_name'][$lng];
|
56 |
}
|
57 |
+
if(isset($args['include'])) {
|
58 |
+
$langs = array_intersect_key($langs,array_flip($args['include']));
|
59 |
+
}
|
60 |
return $langs;
|
61 |
}
|
62 |
|
modules/static.php
CHANGED
@@ -16,25 +16,45 @@
|
|
16 |
*/
|
17 |
class CASModule_static extends CASModule {
|
18 |
|
|
|
|
|
|
|
19 |
public function __construct() {
|
20 |
-
parent::__construct();
|
21 |
-
$this->
|
22 |
-
$this->name = __('Static Pages','content-aware-sidebars');
|
23 |
}
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
return is_front_page() || is_search() || is_404();
|
35 |
}
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
if(is_front_page()) {
|
39 |
$val = 'front-page';
|
40 |
} else if(is_search()) {
|
@@ -42,28 +62,32 @@ class CASModule_static extends CASModule {
|
|
42 |
} else {
|
43 |
$val = '404';
|
44 |
}
|
45 |
-
return
|
46 |
-
|
|
|
47 |
}
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
68 |
|
69 |
}
|
16 |
*/
|
17 |
class CASModule_static extends CASModule {
|
18 |
|
19 |
+
/**
|
20 |
+
* Constructor
|
21 |
+
*/
|
22 |
public function __construct() {
|
23 |
+
parent::__construct('static',__('Static Pages',ContentAwareSidebars::DOMAIN));
|
24 |
+
$this->type_display = false;
|
|
|
25 |
}
|
26 |
|
27 |
+
/**
|
28 |
+
* Get static content
|
29 |
+
* @return array
|
30 |
+
*/
|
31 |
+
protected function _get_content($args = array()) {
|
32 |
+
$static = array(
|
33 |
+
'front-page' => __('Front Page', ContentAwareSidebars::DOMAIN),
|
34 |
+
'search' => __('Search Results', ContentAwareSidebars::DOMAIN),
|
35 |
+
'404' => __('404 Page', ContentAwareSidebars::DOMAIN)
|
36 |
+
);
|
37 |
+
if(isset($args['include'])) {
|
38 |
+
$static = array_intersect_key($static, array_flip($args['include']));
|
39 |
+
}
|
40 |
+
return $static;
|
41 |
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Determine if content is relevant
|
45 |
+
* @return boolean
|
46 |
+
*/
|
47 |
+
public function in_context() {
|
48 |
return is_front_page() || is_search() || is_404();
|
49 |
}
|
50 |
|
51 |
+
/**
|
52 |
+
* Get data from context
|
53 |
+
* @author Joachim Jensen <jv@intox.dk>
|
54 |
+
* @since 2.0
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
public function get_context_data() {
|
58 |
if(is_front_page()) {
|
59 |
$val = 'front-page';
|
60 |
} else if(is_search()) {
|
62 |
} else {
|
63 |
$val = '404';
|
64 |
}
|
65 |
+
return array(
|
66 |
+
$val
|
67 |
+
);
|
68 |
}
|
69 |
|
70 |
+
// /**
|
71 |
+
// * Meta box content
|
72 |
+
// * @global object $post
|
73 |
+
// * @return void
|
74 |
+
// */
|
75 |
+
// public function meta_box_content() {
|
76 |
+
// global $post;
|
77 |
+
|
78 |
+
// echo '<li class="control-section accordion-section">';
|
79 |
+
// echo '<h3 class="accordion-section-title" title="'.$this->name.'" tabindex="0">'.$this->name.'</h3>'."\n";
|
80 |
+
// echo '<div class="accordion-section-content cas-rule-content" id="cas-' . $this->id . '">'. "\n";
|
81 |
+
// $meta = get_post_meta($post->ID, ContentAwareSidebars::PREFIX . $this->id, false);
|
82 |
+
// $current = $meta != '' ? $meta : array();
|
83 |
+
|
84 |
+
// echo '<ul id="cas-list-' . $this->id . '" class="cas-contentlist categorychecklist form-no-clear">'. "\n";
|
85 |
+
// foreach ($this->_get_content() as $id => $name) {
|
86 |
+
// echo '<li><label><input type="checkbox" name="' . $this->id . '[]" value="' . $id . '"' . (in_array($id, $current) ? ' checked="checked"' : '') . ' /> ' . $name . '</label></li>' . "\n";
|
87 |
+
// }
|
88 |
+
// echo '</ul>'. "\n";
|
89 |
+
// echo '</div>'. "\n";
|
90 |
+
// echo '</li>';
|
91 |
+
// }
|
92 |
|
93 |
}
|
modules/taxonomy.php
CHANGED
@@ -15,49 +15,85 @@
|
|
15 |
*/
|
16 |
class CASModule_taxonomy extends CASModule {
|
17 |
|
|
|
|
|
|
|
|
|
18 |
private $taxonomy_objects;
|
|
|
|
|
|
|
|
|
|
|
19 |
private $post_terms;
|
20 |
|
|
|
|
|
|
|
21 |
public function __construct() {
|
22 |
-
parent::__construct();
|
23 |
-
$this->
|
24 |
-
$this->
|
25 |
-
|
|
|
26 |
add_action('created_term', array(&$this,'term_ancestry_check'),10,3);
|
|
|
|
|
27 |
|
28 |
}
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
31 |
if(is_singular()) {
|
32 |
// Check if content has any taxonomies supported
|
33 |
-
$taxonomies = get_object_taxonomies(get_post_type());
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
36 |
// Check if content has any actual taxonomy terms
|
37 |
-
|
38 |
-
|
39 |
-
}
|
40 |
}
|
41 |
-
|
42 |
-
return true;
|
43 |
}
|
44 |
-
return
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
47 |
public function db_join() {
|
48 |
global $wpdb;
|
49 |
|
50 |
$joins = "LEFT JOIN $wpdb->term_relationships term ON term.object_id = posts.ID ";
|
51 |
$joins .= "LEFT JOIN $wpdb->term_taxonomy taxonomy ON taxonomy.term_taxonomy_id = term.term_taxonomy_id ";
|
52 |
$joins .= "LEFT JOIN $wpdb->terms terms ON terms.term_id = taxonomy.term_id ";
|
53 |
-
$joins .= "LEFT JOIN $wpdb->postmeta taxonomies ON taxonomies.post_id = posts.ID AND taxonomies.meta_key = '".ContentAwareSidebars::
|
54 |
|
55 |
return $joins;
|
56 |
|
57 |
}
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
|
|
61 |
if(is_singular()) {
|
62 |
$terms = array();
|
63 |
|
@@ -79,84 +115,303 @@ class CASModule_taxonomy extends CASModule {
|
|
79 |
$term = get_queried_object();
|
80 |
|
81 |
return "((taxonomy.taxonomy = '".$term->taxonomy."' AND terms.slug = '".$term->slug."') OR taxonomies.meta_value = '".$term->taxonomy."')";
|
82 |
-
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
85 |
public function db_where2() {
|
86 |
return "terms.slug IS NOT NULL OR taxonomies.meta_value IS NOT NULL";
|
87 |
}
|
88 |
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
public function meta_box_content() {
|
94 |
global $post;
|
95 |
|
96 |
foreach ($this->_get_taxonomies() as $taxonomy) {
|
97 |
-
echo '<h4><a href="#">' . $taxonomy->label . '</a></h4>'."\n";
|
98 |
-
echo '<div class="cas-rule-content" id="cas-' . $this->id . '-' . $taxonomy->name . '">';
|
99 |
|
100 |
-
|
101 |
-
|
|
|
102 |
|
103 |
-
$terms =
|
|
|
104 |
|
105 |
if($taxonomy->hierarchical) {
|
106 |
-
echo '<
|
107 |
-
echo '<label><input type="checkbox" name="taxonomies[]" value="
|
108 |
-
echo '</
|
109 |
}
|
110 |
-
echo '<
|
111 |
-
echo '<label><input class="cas-chk-all" type="checkbox" name="taxonomies[]" value="' . $taxonomy->name . '"
|
112 |
-
echo '</
|
113 |
-
|
114 |
-
if (!$terms
|
115 |
echo '<p>' . __('No items.') . '</p>';
|
116 |
} else {
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
echo '</div>'."\n";
|
|
|
140 |
}
|
141 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
}
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
|
153 |
/**
|
154 |
-
*
|
155 |
* Auto-select children of selected ancestor
|
156 |
-
*
|
157 |
-
* @param
|
158 |
-
* @param
|
159 |
-
* @
|
160 |
*/
|
161 |
public function term_ancestry_check($term_id, $tt_id, $taxonomy) {
|
162 |
|
@@ -166,11 +421,11 @@ class CASModule_taxonomy extends CASModule {
|
|
166 |
if($term->parent != '0') {
|
167 |
// Get sidebars with term ancestor wanting to auto-select term
|
168 |
$posts = new WP_Query(array(
|
169 |
-
'post_type' =>
|
170 |
'meta_query' => array(
|
171 |
array(
|
172 |
-
'key' => ContentAwareSidebars::
|
173 |
-
'value' => '
|
174 |
'compare' => '='
|
175 |
)
|
176 |
),
|
15 |
*/
|
16 |
class CASModule_taxonomy extends CASModule {
|
17 |
|
18 |
+
/**
|
19 |
+
* Registered public taxonomies
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
private $taxonomy_objects;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Terms of a given singular
|
26 |
+
* @var array
|
27 |
+
*/
|
28 |
private $post_terms;
|
29 |
|
30 |
+
/**
|
31 |
+
* Constructor
|
32 |
+
*/
|
33 |
public function __construct() {
|
34 |
+
parent::__construct('taxonomies',__('Taxonomies',ContentAwareSidebars::DOMAIN),true);
|
35 |
+
$this->type_display = true;
|
36 |
+
$this->searchable = true;
|
37 |
+
|
38 |
+
//add_action('init', array(&$this,'add_taxonomies_to_sidebar'),100);
|
39 |
add_action('created_term', array(&$this,'term_ancestry_check'),10,3);
|
40 |
+
|
41 |
+
add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
|
42 |
|
43 |
}
|
44 |
|
45 |
+
/**
|
46 |
+
* Determine if content is relevant
|
47 |
+
* @return boolean
|
48 |
+
*/
|
49 |
+
public function in_context() {
|
50 |
if(is_singular()) {
|
51 |
// Check if content has any taxonomies supported
|
52 |
+
$taxonomies = get_object_taxonomies(get_post_type(),'object');
|
53 |
+
//Only want public taxonomies
|
54 |
+
$taxonomy_names = array();
|
55 |
+
foreach($taxonomies as $taxonomy) {
|
56 |
+
if($taxonomy->public)
|
57 |
+
$taxonomy_names[] = $taxonomy->name;
|
58 |
+
}
|
59 |
+
if(!empty($taxonomy_names)) {
|
60 |
// Check if content has any actual taxonomy terms
|
61 |
+
$this->post_terms = wp_get_object_terms(get_the_ID(),$taxonomy_names);
|
62 |
+
return !empty($this->post_terms);
|
|
|
63 |
}
|
64 |
+
return false;
|
|
|
65 |
}
|
66 |
+
return is_tax() || is_category() || is_tag();
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Query join
|
71 |
+
* @return string
|
72 |
+
*/
|
73 |
public function db_join() {
|
74 |
global $wpdb;
|
75 |
|
76 |
$joins = "LEFT JOIN $wpdb->term_relationships term ON term.object_id = posts.ID ";
|
77 |
$joins .= "LEFT JOIN $wpdb->term_taxonomy taxonomy ON taxonomy.term_taxonomy_id = term.term_taxonomy_id ";
|
78 |
$joins .= "LEFT JOIN $wpdb->terms terms ON terms.term_id = taxonomy.term_id ";
|
79 |
+
$joins .= "LEFT JOIN $wpdb->postmeta taxonomies ON taxonomies.post_id = posts.ID AND taxonomies.meta_key = '".ContentAwareSidebars::PREFIX."taxonomies'";
|
80 |
|
81 |
return $joins;
|
82 |
|
83 |
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Get data from context
|
87 |
+
* @author Joachim Jensen <jv@intox.dk>
|
88 |
+
* @since 2.0
|
89 |
+
* @return array
|
90 |
+
*/
|
91 |
+
public function get_context_data() {
|
92 |
+
// for($i = 0; $i < 5000; $i++) {
|
93 |
+
// add_post_meta(rand(1,5000),'_bogus_key','bogus-'.rand(10000,99999),true);
|
94 |
+
// }
|
95 |
|
96 |
+
|
97 |
if(is_singular()) {
|
98 |
$terms = array();
|
99 |
|
115 |
$term = get_queried_object();
|
116 |
|
117 |
return "((taxonomy.taxonomy = '".$term->taxonomy."' AND terms.slug = '".$term->slug."') OR taxonomies.meta_value = '".$term->taxonomy."')";
|
|
|
118 |
}
|
119 |
|
120 |
+
/**
|
121 |
+
* Query where2
|
122 |
+
* @return string
|
123 |
+
*/
|
124 |
public function db_where2() {
|
125 |
return "terms.slug IS NOT NULL OR taxonomies.meta_value IS NOT NULL";
|
126 |
}
|
127 |
|
128 |
+
/**
|
129 |
+
* Get registered taxonomies
|
130 |
+
* @return array
|
131 |
+
*/
|
132 |
+
protected function _get_content($args = array()) {
|
133 |
+
$args = wp_parse_args($args, array(
|
134 |
+
'include' => '',
|
135 |
+
'taxonomy' => 'category',
|
136 |
+
'number' => 20,
|
137 |
+
'orderby' => 'name',
|
138 |
+
'order' => 'ASC',
|
139 |
+
'offset' => 0
|
140 |
+
));
|
141 |
+
extract($args);
|
142 |
+
|
143 |
+
$terms = get_terms($taxonomy, array(
|
144 |
+
'number' => $number,
|
145 |
+
'hide_empty' => false,
|
146 |
+
'include' => $include,
|
147 |
+
'offset' => ($offset*$number),
|
148 |
+
'orderby' => $orderby,
|
149 |
+
'order' => $order
|
150 |
+
));
|
151 |
+
$total_items = wp_count_terms($taxonomy,array('hide_empty'=>false));
|
152 |
+
$per_page = $number;
|
153 |
+
$this->pagination = array(
|
154 |
+
'paged' => $offset+1,
|
155 |
+
'per_page' => $per_page,
|
156 |
+
'total_pages' => ceil($total_items/$per_page),
|
157 |
+
'total_items' => $total_items
|
158 |
+
);
|
159 |
+
|
160 |
|
161 |
+
return $terms;
|
162 |
+
}
|
163 |
+
|
164 |
+
protected function _get_taxonomies() {
|
165 |
+
// List public taxonomies
|
166 |
+
if (empty($this->taxonomy_objects)) {
|
167 |
+
foreach (get_taxonomies(array('public' => true), 'objects') as $tax) {
|
168 |
+
$this->taxonomy_objects[$tax->name] = $tax;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
return $this->taxonomy_objects;
|
172 |
+
}
|
173 |
+
|
174 |
+
public function print_group_data($post_id) {
|
175 |
+
$ids = array_flip((array)get_post_custom_values(ContentAwareSidebars::PREFIX . $this->id, $post_id));
|
176 |
+
|
177 |
+
foreach($this->_get_taxonomies() as $taxonomy) {
|
178 |
+
|
179 |
+
$posts = wp_get_object_terms( $post_id, $taxonomy->name);
|
180 |
+
if($posts || isset($ids[$taxonomy->name]) || isset($ids[ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name])) {
|
181 |
+
echo '<div class="cas-condition cas-condition-'.$this->id.'-'.$taxonomy->name.'">';
|
182 |
+
echo '<strong>'.$taxonomy->label.'</strong>';
|
183 |
+
echo '<ul>';
|
184 |
+
if(isset($ids[ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name])) {
|
185 |
+
echo '<li class=""><label><input type="checkbox" name="taxonomies[]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name . '" checked="checked" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label></li>' . "\n";
|
186 |
+
}
|
187 |
+
if(isset($ids[$taxonomy->name])) {
|
188 |
+
echo '<li class=""><label><input type="checkbox" name="taxonomies[]" value="'.$taxonomy->name.'" checked="checked" /> '.$taxonomy->labels->all_items.'</label></li>' . "\n";
|
189 |
+
}
|
190 |
+
if($posts) {
|
191 |
+
$selected = wp_get_object_terms($post_id, $taxonomy->name, array('fields' => ($taxonomy->hierarchical ? 'ids' : 'slugs')));
|
192 |
+
echo $this->term_checklist($taxonomy, $posts, $selected);
|
193 |
+
}
|
194 |
+
echo '</ul>';
|
195 |
+
echo '</div>';
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
}
|
200 |
|
201 |
+
/**
|
202 |
+
* Meta box content
|
203 |
+
* @global object $post
|
204 |
+
* @return void
|
205 |
+
*/
|
206 |
public function meta_box_content() {
|
207 |
global $post;
|
208 |
|
209 |
foreach ($this->_get_taxonomies() as $taxonomy) {
|
|
|
|
|
210 |
|
211 |
+
echo '<li class="control-section accordion-section">';
|
212 |
+
echo '<h3 class="accordion-section-title" title="'.$taxonomy->label.'" tabindex="0">'.$taxonomy->label.'</h3>'."\n";
|
213 |
+
echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-' . $this->id . '-' . $taxonomy->name . '">';
|
214 |
|
215 |
+
$terms = $this->_get_content(array('taxonomy' => $taxonomy->name));
|
216 |
+
|
217 |
|
218 |
if($taxonomy->hierarchical) {
|
219 |
+
echo '<ul><li>' . "\n";
|
220 |
+
echo '<label><input type="checkbox" name="taxonomies[]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name . '" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label>' . "\n";
|
221 |
+
echo '</li></ul>' . "\n";
|
222 |
}
|
223 |
+
echo '<ul><li>' . "\n";
|
224 |
+
echo '<label><input class="cas-chk-all" type="checkbox" name="taxonomies[]" value="' . $taxonomy->name . '" /> ' . sprintf(__('Display with %s', ContentAwareSidebars::DOMAIN), $taxonomy->labels->all_items) . '</label>' . "\n";
|
225 |
+
echo '</li></ul>' . "\n";
|
226 |
+
|
227 |
+
if (!$terms) {
|
228 |
echo '<p>' . __('No items.') . '</p>';
|
229 |
} else {
|
230 |
+
|
231 |
+
//No need to use two queries before knowing there are items
|
232 |
+
if(count($terms) < 20) {
|
233 |
+
$popular_terms = $terms;
|
234 |
+
} else {
|
235 |
+
$popular_terms = $this->_get_content(array('taxonomy' => $taxonomy->name, 'orderby' => 'count', 'order' => 'DESC'));
|
236 |
+
}
|
237 |
+
|
238 |
+
|
239 |
+
$tabs = array();
|
240 |
+
$tabs['popular'] = array(
|
241 |
+
'title' => __('Most Used'),
|
242 |
+
'status' => true,
|
243 |
+
'content' => $this->term_checklist($taxonomy, $popular_terms, array(), false)
|
244 |
+
);
|
245 |
+
$tabs['all'] = array(
|
246 |
+
'title' => __('View All'),
|
247 |
+
'status' => false,
|
248 |
+
'content' => $this->term_checklist($taxonomy, $terms, array(), true)
|
249 |
+
);
|
250 |
+
if($this->searchable) {
|
251 |
+
$tabs['search'] = array(
|
252 |
+
'title' => __('Search'),
|
253 |
+
'status' => false,
|
254 |
+
'content' => '',
|
255 |
+
'content_before' => '<p><input class="cas-autocomplete-' . $this->id . ' cas-autocomplete quick-search" id="cas-autocomplete-' . $this->id . '-' . $taxonomy->name . '" type="search" name="cas-autocomplete" value="" placeholder="'.__('Search').'" autocomplete="off" /><span class="spinner"></span></p>'
|
256 |
+
);
|
257 |
+
}
|
258 |
+
|
259 |
+
echo $this->create_tab_panels($this->id . '-' . $taxonomy->name,$tabs);
|
260 |
+
|
261 |
}
|
262 |
+
|
263 |
+
echo '<p class="button-controls">';
|
264 |
+
|
265 |
+
echo '<span class="add-to-group"><input data-cas-condition="'.$this->id.'-'.$taxonomy->name.'" type="button" name="" id="cas-' . $this->id . '-' . $taxonomy->name . '-add" class="js-cas-condition-add button" value="'.__('Add to Group',ContentAwareSidebars::DOMAIN).'"></span>';
|
266 |
+
|
267 |
+
echo '</p>';
|
268 |
+
|
269 |
echo '</div>'."\n";
|
270 |
+
echo '</li>';
|
271 |
}
|
272 |
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Show terms from a specific taxonomy
|
276 |
+
* @param int $post_id
|
277 |
+
* @param object $taxonomy
|
278 |
+
* @param array $terms
|
279 |
+
* @param array $selected_ids
|
280 |
+
* @return void
|
281 |
+
*/
|
282 |
+
private function term_checklist($taxonomy, $terms, $selected_terms = array(), $pagination = false) {
|
283 |
+
|
284 |
+
$walker = new CAS_Walker_Checklist('category',array('parent' => 'parent', 'id' => 'term_id'));
|
285 |
+
|
286 |
+
$args = array(
|
287 |
+
'taxonomy' => $taxonomy,
|
288 |
+
'selected_terms' => $selected_terms
|
289 |
+
);
|
290 |
+
|
291 |
+
$return = call_user_func_array(array(&$walker, 'walk'), array($terms, 0, $args));
|
292 |
+
|
293 |
+
if($pagination) {
|
294 |
+
$paginate = paginate_links(array(
|
295 |
+
'base' => admin_url( 'admin-ajax.php').'%_%',
|
296 |
+
'format' => '?paged=%#%',
|
297 |
+
'total' => $this->pagination['total_pages'],
|
298 |
+
'current' => $this->pagination['paged'],
|
299 |
+
'mid_size' => 2,
|
300 |
+
'end_size' => 1,
|
301 |
+
'prev_next' => true,
|
302 |
+
'prev_text' => 'prev',
|
303 |
+
'next_text' => 'next',
|
304 |
+
'add_args' => array('item_object'=>$taxonomy->name),
|
305 |
+
));
|
306 |
+
$return = $paginate.$return.$paginate;
|
307 |
+
}
|
308 |
+
|
309 |
+
return $return;
|
310 |
+
|
311 |
+
}
|
312 |
+
|
313 |
+
public function ajax_get_content() {
|
314 |
+
|
315 |
+
//validation
|
316 |
+
$paged = (isset($_POST['paged']) ? $_POST['paged'] : 1)-1;
|
317 |
+
$search = isset($_POST['search']) ? $_POST['search'] : false;
|
318 |
+
$taxonomy = get_taxonomy($_POST['item_object']);
|
319 |
+
|
320 |
+
$posts = $this->_get_content(array('taxonomy' => $_POST['item_object'], 'orderby' => 'name', 'order' => 'ASC', 'offset' => $paged));
|
321 |
+
$response = $this->term_checklist($taxonomy, $posts, array(), true);
|
322 |
+
//$response = $_POST['paged'];
|
323 |
+
echo json_encode($response);
|
324 |
+
die();
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Get terms with AJAX search
|
329 |
+
* @return void
|
330 |
+
*/
|
331 |
+
public function ajax_content_search() {
|
332 |
+
|
333 |
+
if(!isset($_POST['sidebar_id'])) {
|
334 |
+
die(-1);
|
335 |
+
}
|
336 |
+
|
337 |
+
// Verify request
|
338 |
+
check_ajax_referer(ContentAwareSidebars::SIDEBAR_PREFIX.$_POST['sidebar_id'],'nonce');
|
339 |
|
340 |
+
$suggestions = array();
|
341 |
+
if ( preg_match('/cas-autocomplete-'.$this->id.'-([a-zA-Z_-]*\b)/', $_REQUEST['type'], $matches) ) {
|
342 |
+
if(($taxonomy = get_taxonomy( $matches[1] ))) {
|
343 |
+
$terms = get_terms($taxonomy->name, array(
|
344 |
+
'number' => 10,
|
345 |
+
'hide_empty' => false,
|
346 |
+
'search' => $_REQUEST['q']
|
347 |
+
));
|
348 |
+
$name = 'tax_input['.$matches[1].']';
|
349 |
+
$value = ($taxonomy->hierarchical ? 'term_id' : 'slug');
|
350 |
+
foreach($terms as $term) {
|
351 |
+
$suggestions[] = array(
|
352 |
+
'label' => $term->name,
|
353 |
+
'value' => $term->$value,
|
354 |
+
'id' => $term->$value,
|
355 |
+
'module' => $this->id,
|
356 |
+
'name' => $name,
|
357 |
+
'id2' => $this->id.'-'.$term->taxonomy,
|
358 |
+
'elem' => $term->taxonomy.'-'.$term->term_id
|
359 |
+
);
|
360 |
+
}
|
361 |
}
|
362 |
}
|
363 |
+
|
364 |
+
echo json_encode($suggestions);
|
365 |
+
die();
|
366 |
+
}
|
367 |
+
|
368 |
+
public function save_data($post_id) {
|
369 |
+
parent::save_data($post_id);
|
370 |
+
|
371 |
+
$tax_input = isset($_POST['tax_input']) ? $_POST['tax_input'] : array();
|
372 |
+
|
373 |
+
//Save terms
|
374 |
+
//Loop through each public taxonomy
|
375 |
+
foreach($this->_get_taxonomies() as $taxonomy) {
|
376 |
+
|
377 |
+
if (current_user_can($taxonomy->cap->assign_terms) ) {
|
378 |
+
|
379 |
+
//If no terms, maybe delete old ones
|
380 |
+
if(!isset($tax_input[$taxonomy->name])) {
|
381 |
+
$terms = null;
|
382 |
+
} else {
|
383 |
+
$terms = $tax_input[$taxonomy->name];
|
384 |
+
|
385 |
+
//Hierarchical taxonomies use ids instead of slugs
|
386 |
+
//see http://codex.wordpress.org/Function_Reference/wp_set_post_terms
|
387 |
+
if($taxonomy->hierarchical) {
|
388 |
+
$terms = array_unique(array_map('intval', $terms));
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
wp_set_object_terms( $post_id, $terms, $taxonomy->name );
|
393 |
+
}
|
394 |
+
|
395 |
+
}
|
396 |
+
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Register taxonomies to sidebar post type
|
401 |
+
* @return void
|
402 |
+
*/
|
403 |
+
public function add_taxonomies_to_sidebar() {
|
404 |
+
foreach($this->_get_taxonomies() as $tax) {
|
405 |
+
register_taxonomy_for_object_type( $tax->name, ContentAwareSidebars::TYPE_SIDEBAR );
|
406 |
+
}
|
407 |
}
|
408 |
|
409 |
/**
|
|
|
410 |
* Auto-select children of selected ancestor
|
411 |
+
* @param int $term_id
|
412 |
+
* @param int $tt_id
|
413 |
+
* @param string $taxonomy
|
414 |
+
* @return void
|
415 |
*/
|
416 |
public function term_ancestry_check($term_id, $tt_id, $taxonomy) {
|
417 |
|
421 |
if($term->parent != '0') {
|
422 |
// Get sidebars with term ancestor wanting to auto-select term
|
423 |
$posts = new WP_Query(array(
|
424 |
+
'post_type' => ContentAwareSidebars::TYPE_CONDITION_GROUP,
|
425 |
'meta_query' => array(
|
426 |
array(
|
427 |
+
'key' => ContentAwareSidebars::PREFIX . $this->id,
|
428 |
+
'value' => ContentAwareSidebars::PREFIX.'sub_' . $taxonomy,
|
429 |
'compare' => '='
|
430 |
)
|
431 |
),
|
modules/transposh.php
CHANGED
@@ -14,28 +14,49 @@
|
|
14 |
*/
|
15 |
class CASModule_transposh extends CASModule {
|
16 |
|
|
|
|
|
|
|
17 |
public function __construct() {
|
18 |
-
parent::__construct();
|
19 |
-
$this->id = 'language';
|
20 |
-
$this->name = __('Languages','content-aware-sidebars');
|
21 |
}
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
return true;
|
25 |
}
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
global $my_transposh_plugin;
|
29 |
-
return
|
30 |
-
|
|
|
|
|
31 |
}
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
34 |
global $my_transposh_plugin;
|
35 |
$langs = array();
|
36 |
foreach(explode(',',$my_transposh_plugin->options->get_viewable_langs()) as $lng) {
|
37 |
$langs[$lng] = transposh_consts::get_language_orig_name($lng);
|
38 |
}
|
|
|
|
|
|
|
39 |
return $langs;
|
40 |
}
|
41 |
|
14 |
*/
|
15 |
class CASModule_transposh extends CASModule {
|
16 |
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*/
|
20 |
public function __construct() {
|
21 |
+
parent::__construct('language',__('Languages',ContentAwareSidebars::DOMAIN));
|
|
|
|
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* Determine if content is relevant
|
26 |
+
* @return boolean
|
27 |
+
*/
|
28 |
+
public function in_context() {
|
29 |
return true;
|
30 |
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get data from context
|
34 |
+
* @author Joachim Jensen <jv@intox.dk>
|
35 |
+
* @since 2.0
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
public function get_context_data() {
|
39 |
global $my_transposh_plugin;
|
40 |
+
return array(
|
41 |
+
$this->id,
|
42 |
+
$my_transposh_plugin->tgl
|
43 |
+
);
|
44 |
}
|
45 |
|
46 |
+
/**
|
47 |
+
* Get languages
|
48 |
+
* @global object $my_transposh_plugin
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
protected function _get_content($args = array()) {
|
52 |
global $my_transposh_plugin;
|
53 |
$langs = array();
|
54 |
foreach(explode(',',$my_transposh_plugin->options->get_viewable_langs()) as $lng) {
|
55 |
$langs[$lng] = transposh_consts::get_language_orig_name($lng);
|
56 |
}
|
57 |
+
if(isset($args['include'])) {
|
58 |
+
$langs = array_intersect_key($langs,array_flip($args['include']));
|
59 |
+
}
|
60 |
return $langs;
|
61 |
}
|
62 |
|
modules/wpml.php
CHANGED
@@ -14,26 +14,47 @@
|
|
14 |
*/
|
15 |
class CASModule_wpml extends CASModule {
|
16 |
|
|
|
|
|
|
|
17 |
public function __construct() {
|
18 |
-
parent::__construct();
|
19 |
-
$this->id = 'language';
|
20 |
-
$this->name = __('Languages','content-aware-sidebars');
|
21 |
}
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
return true;
|
25 |
}
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
$langs = array();
|
33 |
|
34 |
foreach(icl_get_languages('skip_missing=N') as $lng) {
|
35 |
$langs[$lng['language_code']] = $lng['native_name'];
|
36 |
}
|
|
|
|
|
|
|
37 |
return $langs;
|
38 |
}
|
39 |
|
14 |
*/
|
15 |
class CASModule_wpml extends CASModule {
|
16 |
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*/
|
20 |
public function __construct() {
|
21 |
+
parent::__construct('language',__('Languages',ContentAwareSidebars::DOMAIN));
|
|
|
|
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* Determine if content is relevant
|
26 |
+
* @return boolean
|
27 |
+
*/
|
28 |
+
public function in_context() {
|
29 |
return true;
|
30 |
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get data from context
|
34 |
+
* @author Joachim Jensen <jv@intox.dk>
|
35 |
+
* @since 2.0
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
public function get_context_data() {
|
39 |
+
return array(
|
40 |
+
$this->id,
|
41 |
+
ICL_LANGUAGE_CODE
|
42 |
+
);
|
43 |
}
|
44 |
|
45 |
+
/**
|
46 |
+
* Get languages
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
protected function _get_content($args = array()) {
|
50 |
$langs = array();
|
51 |
|
52 |
foreach(icl_get_languages('skip_missing=N') as $lng) {
|
53 |
$langs[$lng['language_code']] = $lng['native_name'];
|
54 |
}
|
55 |
+
if(isset($args['include'])) {
|
56 |
+
$langs = array_intersect_key($langs,array_flip($args['include']));
|
57 |
+
}
|
58 |
return $langs;
|
59 |
}
|
60 |
|
readme.txt
CHANGED
@@ -1,19 +1,27 @@
|
|
1 |
-
=== Plugin Name ===
|
2 |
Contributors: intoxstudio
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KPZHE6A72LEN4&lc=US&item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
-
Tags: sidebar, widget area, content aware, context aware, seo, dynamic, flexible, modular, bbpress, buddypress, qtranslate, polylang, transposh, wpml
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag:
|
8 |
-
License:
|
9 |
|
10 |
Create and display sidebars according to the content being viewed.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Manage an infinite number of sidebars. Make your WordPress site even more dynamic and boost SEO by controlling what content
|
15 |
No extra database tables or table columns will be added.
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
= Features =
|
18 |
|
19 |
* Easy-to-use sidebar manager
|
@@ -31,7 +39,7 @@ No extra database tables or table columns will be added.
|
|
31 |
* Front Page
|
32 |
* bbPress User Profiles
|
33 |
* BuddyPress Member Pages
|
34 |
-
* Languages (qTranslate, Polylang, Transposh, WPML)
|
35 |
* **Any combination of the above**
|
36 |
* Merge new sidebars with others, replace others or simply add them to your theme manually with a template tag
|
37 |
* Create complex content with nested sidebars
|
@@ -50,11 +58,18 @@ No extra database tables or table columns will be added.
|
|
50 |
= Translations =
|
51 |
|
52 |
* Danish (da_DK): [Joachim Jensen](http://www.intox.dk/)
|
|
|
|
|
53 |
* Italian (it_IT): [Luciano Del Fico](http://www.myweb2.it/)
|
|
|
54 |
* Lithuanian (lt_LT): [Vincent G](http://host1free.com/)
|
|
|
|
|
|
|
|
|
55 |
|
56 |
If you have translated the plugin into your language or updated an existing translation, please send the .po and .mo files to jv[at]intox.dk.
|
57 |
-
Download the latest [.
|
58 |
|
59 |
= Contact =
|
60 |
|
@@ -69,19 +84,43 @@ www.intox.dk
|
|
69 |
|
70 |
== Frequently Asked Questions ==
|
71 |
|
72 |
-
If you have any questions not answered here, head to the [Support Forum](http://wordpress.org/tags/content-aware-sidebars?forum_id=10)
|
73 |
|
74 |
= Will Content Aware Sidebars work with my theme? =
|
75 |
|
76 |
-
Yes.
|
|
|
|
|
77 |
If not, it is still possible to create sidebars and then use the function `display_ca_sidebar()` in the theme.
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
= My new sidebar is not displayed where I expect it to? =
|
80 |
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
= How do I use display_ca_sidebar( $args )? =
|
87 |
|
@@ -93,20 +132,106 @@ This function is optional and handles all sidebars that are set to be handled ma
|
|
93 |
'after' => '</ul></div>'
|
94 |
);`
|
95 |
|
96 |
-
|
97 |
If ID's of specific sidebars are passed to `include`, the function will only handle these. The visuals of the content aware sidebars can be modified by passing `before` and `after`.
|
98 |
The function accepts URL-style strings as parameters too, like the standard WordPress Template Tags.
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
== Screenshots ==
|
101 |
|
102 |
-
1. Add a new Content Aware Sidebar to be displayed with all Posts that contains Very Categorized. It replaces `
|
103 |
2. Simple overview of all created Content Aware Sidebars
|
104 |
3. Add widgets to the newly added sidebar
|
105 |
-
4. Viewing front page of site. `
|
106 |
-
5. Viewing a Post that contains Very Categorized. `Very Categorized Posts` sidebar has replaced `
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
= 1.2 =
|
111 |
|
112 |
* Added: polylang support
|
@@ -257,13 +382,18 @@ The function accepts URL-style strings as parameters too, like the standard Word
|
|
257 |
|
258 |
== Upgrade Notice ==
|
259 |
|
|
|
|
|
|
|
|
|
|
|
260 |
= 1.1 =
|
261 |
|
262 |
-
* Content Aware
|
263 |
|
264 |
= 0.8 =
|
265 |
|
266 |
-
* Content Aware
|
267 |
|
268 |
= 0.5 =
|
269 |
|
1 |
+
=== Plugin Name ===
|
2 |
Contributors: intoxstudio
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KPZHE6A72LEN4&lc=US&item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
+
Tags: sidebar, widget area, content aware, context aware, seo, dynamic, flexible, modular, bbpress, buddypress, qtranslate, polylang, transposh, wpml, woocommerce
|
5 |
+
Requires at least: 3.3
|
6 |
+
Tested up to: 3.8
|
7 |
+
Stable tag: 2.0.3
|
8 |
+
License: GPLv3
|
9 |
|
10 |
Create and display sidebars according to the content being viewed.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Manage an infinite number of sidebars. Make your WordPress site even more dynamic and boost SEO by controlling what content your sidebars should be displayed with. Creating flexible, dynamic sidebars has never been easier, and no code is needed at all as everything is easily done in the administration panel.
|
15 |
No extra database tables or table columns will be added.
|
16 |
|
17 |
+
> **New in version 2**
|
18 |
+
>
|
19 |
+
> Condition groups let you display a sidebar together with both associated and distinct content.
|
20 |
+
>
|
21 |
+
> Improved GUI makes it even easier to select content and edit sidebars.
|
22 |
+
>
|
23 |
+
> Improved API for developers who want to extend and manipulate content support.
|
24 |
+
|
25 |
= Features =
|
26 |
|
27 |
* Easy-to-use sidebar manager
|
39 |
* Front Page
|
40 |
* bbPress User Profiles
|
41 |
* BuddyPress Member Pages
|
42 |
+
* Languages (qTranslate, Polylang, Transposh, WPML)
|
43 |
* **Any combination of the above**
|
44 |
* Merge new sidebars with others, replace others or simply add them to your theme manually with a template tag
|
45 |
* Create complex content with nested sidebars
|
58 |
= Translations =
|
59 |
|
60 |
* Danish (da_DK): [Joachim Jensen](http://www.intox.dk/)
|
61 |
+
* German (de_DE): Enno Wulff
|
62 |
+
* Hungarian (hu_HU): Kis Lukács
|
63 |
* Italian (it_IT): [Luciano Del Fico](http://www.myweb2.it/)
|
64 |
+
* Latvian (lv_LV): [Haralds Gribusts](http://www.fireclubllatvia.lv/)
|
65 |
* Lithuanian (lt_LT): [Vincent G](http://host1free.com/)
|
66 |
+
* Slovak (sk_SK): [Branco](http://webhostinggeeks.com/)
|
67 |
+
* Spanish (es_ES): [Analia Jensen](http://www.linkedin.com/in/analiajensen)
|
68 |
+
|
69 |
+
Do you want to see your name here?
|
70 |
|
71 |
If you have translated the plugin into your language or updated an existing translation, please send the .po and .mo files to jv[at]intox.dk.
|
72 |
+
Download the latest [template .po file](http://plugins.svn.wordpress.org/content-aware-sidebars/trunk/lang/content-aware-sidebars.po) or the [.po file in your language](http://plugins.svn.wordpress.org/content-aware-sidebars/trunk/lang/).
|
73 |
|
74 |
= Contact =
|
75 |
|
84 |
|
85 |
== Frequently Asked Questions ==
|
86 |
|
87 |
+
If you have any questions not answered here, head over to the [Support Forum](http://wordpress.org/tags/content-aware-sidebars?forum_id=10).
|
88 |
|
89 |
= Will Content Aware Sidebars work with my theme? =
|
90 |
|
91 |
+
Yes.
|
92 |
+
|
93 |
+
If the theme supports dynamic widget areas/sidebars, new sidebars can be created to replace or merge with those under certain conditions.
|
94 |
If not, it is still possible to create sidebars and then use the function `display_ca_sidebar()` in the theme.
|
95 |
|
96 |
+
= Will Content Aware Sidebars work with/support my plugin? =
|
97 |
+
|
98 |
+
Work with? Yes.
|
99 |
+
|
100 |
+
Support? Most likely.
|
101 |
+
|
102 |
+
If the plugin uses public Custom Post Types or Custom Taxonomies, these will automatically be supported. Additionally, Content Aware Sidebars uses modules with WordPress Hooks that you can control and it features builtin support for some of the most popular plugins in the WordPress Repository.
|
103 |
+
|
104 |
+
Content Aware Sidebars will never alter data used by your plugin.
|
105 |
+
|
106 |
= My new sidebar is not displayed where I expect it to? =
|
107 |
|
108 |
+
As of version 2.0, all types of content added to a condition group will be recognized as associated. The introduction of these groups has made it possible to create extremely focused and at the same time distinct conditions for when to display a sidebar.
|
109 |
+
|
110 |
+
You can have one group with the conditions "All posts containing tag X" and another group with "All pages written by author Y". The sidebar will then be displayed with all posts containing tag X **or** all pages authored by Y.
|
111 |
+
The conditions "All posts containing tag X and written by author Y" in one group are possible as well.
|
112 |
+
|
113 |
+
The downside to this is that, currently, Content Aware Sidebars does not validate that the content you add to a group actually is associated. Creating a group with the conditions "All posts and Search Results" is possible, but it will never be satisfied because the types of content (post type and static page) are incompatible.
|
114 |
|
115 |
+
An empty condition group will cause the sidebar to be displayed with all content.
|
116 |
+
|
117 |
+
Also note the exposure setting as it determines whether the selected content apply to archives, singulars or both.
|
118 |
+
|
119 |
+
= All content items are not listed in the sidebar editor? =
|
120 |
+
|
121 |
+
As of version 2.0, several types of content have pagination in the sidebar editor. Items can also by found with a search function.
|
122 |
+
|
123 |
+
For post types, only public, private and scheduled items are displayed.
|
124 |
|
125 |
= How do I use display_ca_sidebar( $args )? =
|
126 |
|
132 |
'after' => '</ul></div>'
|
133 |
);`
|
134 |
|
|
|
135 |
If ID's of specific sidebars are passed to `include`, the function will only handle these. The visuals of the content aware sidebars can be modified by passing `before` and `after`.
|
136 |
The function accepts URL-style strings as parameters too, like the standard WordPress Template Tags.
|
137 |
|
138 |
+
= What are the minimum requirements? =
|
139 |
+
|
140 |
+
* WordPress 3.3
|
141 |
+
* PHP 5.2.4
|
142 |
+
* MySQL 5
|
143 |
+
|
144 |
== Screenshots ==
|
145 |
|
146 |
+
1. Add a new Content Aware Sidebar to be displayed with all Posts that contains the category Very Categorized. It replaces `Primary Sidebar`
|
147 |
2. Simple overview of all created Content Aware Sidebars
|
148 |
3. Add widgets to the newly added sidebar
|
149 |
+
4. Viewing front page of site. `Primary Sidebar` is displayed
|
150 |
+
5. Viewing a Post that contains Very Categorized. `Very Categorized Posts` sidebar has replaced `Primary Sidebar`
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 2.0.3 =
|
155 |
+
|
156 |
+
* Fixed: taxonomy pagination in sidebar editor
|
157 |
+
* Fixed: categories found in search can now be saved. props Xandoc
|
158 |
+
|
159 |
+
= 2.0.2 =
|
160 |
+
|
161 |
+
* Fixed: terms caused a sidebar to be displayed on all pages
|
162 |
+
|
163 |
+
= 2.0.1 =
|
164 |
+
|
165 |
+
* Fixed: admin menu would in some cases be overwritten by other plugins
|
166 |
+
|
167 |
+
= 2.0 =
|
168 |
+
|
169 |
+
* Added: condition groups
|
170 |
+
* Added: gui and uxd overhaul for sidebar editor
|
171 |
+
* Added: pagination for taxonomies in sidebar editor
|
172 |
+
* Added: pagination for post types in sidebar editor
|
173 |
+
* Added: mysql 5.6+ compatibility
|
174 |
+
* Added: more efficient uninstall process
|
175 |
+
* Added: easier for developers to extend and manipulate content support
|
176 |
+
* Added: wp3.8 and mp6 compatibility
|
177 |
+
* Added: german translation
|
178 |
+
* Added: hungarian translation
|
179 |
+
* Added: latvian translation
|
180 |
+
* Added: spanish translation
|
181 |
+
* Added: all conditions follow a strict logical "and" operator per group
|
182 |
+
* Fixed: scripts and styles only loaded on sidebar administrative pages
|
183 |
+
* Fixed: slovak translation now recognized
|
184 |
+
* Fixed: paths to assets compatible with ssl
|
185 |
+
* Removed: jquery ui autocomplete and accordion
|
186 |
+
|
187 |
+
= 1.3.5 =
|
188 |
+
|
189 |
+
* Fixed: menu would disappear in rare cases. Props grezvany13
|
190 |
+
* Fixed: search function now searches in title and slug (not content) for post types
|
191 |
+
* Added: search function displays at most 20 results instead of 10
|
192 |
+
|
193 |
+
= 1.3.4 =
|
194 |
+
|
195 |
+
* Fixed: cas_walker_checklist now follows walker declaration for wp3.6
|
196 |
+
* Fixed: content list in accordion now not scrollable
|
197 |
+
* Fixed: only terms from public taxonomies are included for content recognition.
|
198 |
+
* Fixed: polylang fully supported again
|
199 |
+
* Fixed: consistent css across wp versions
|
200 |
+
* Removed: flushing rewrite rules on activation/deactivation is needless
|
201 |
+
|
202 |
+
= 1.3.3 =
|
203 |
+
|
204 |
+
* Added: html placeholder in search field
|
205 |
+
* Added: items already displayed in edit page moved to top and checked when found in search
|
206 |
+
* Fixed: private and scheduled singulars included in search results
|
207 |
+
* Fixed: search results displayed in ascending order
|
208 |
+
|
209 |
+
= 1.3.2 =
|
210 |
+
|
211 |
+
* Added: items found in search now added to list directly on select
|
212 |
+
* Fixed: some terms found by search could not be saved
|
213 |
+
* Fixed: widget locations are saved again for each theme
|
214 |
+
|
215 |
+
= 1.3.1 =
|
216 |
+
|
217 |
+
* Added: authors and bbpress user profiles now searchable on edit page
|
218 |
+
* Added: items found in search on edit page are prepended and checked by default
|
219 |
+
* Added: updated edit page gui
|
220 |
+
* Added: search field only visible when quantity is above 20
|
221 |
+
* Fixed: select all checkbox will now disable all input in container
|
222 |
+
* Fixed: host sidebar could sometimes not be found in sidebar list
|
223 |
+
|
224 |
+
= 1.3 =
|
225 |
+
|
226 |
+
* Added: post type posts and taxonomy terms now searchable on edit page
|
227 |
+
* Added: sidebar handle and host shown on widgets page
|
228 |
+
* Added: slovak translation
|
229 |
+
* Fixed: sidebar meta boxes more robust to external modifications
|
230 |
+
* Fixed: admin column headers more robust to external modifications
|
231 |
+
* Fixed: sidebar menu now always hidden for users without right cap
|
232 |
+
* Fixed: code optimization and refactor for performance
|
233 |
+
* Removed: support for sidebar excerpt
|
234 |
+
|
235 |
= 1.2 =
|
236 |
|
237 |
* Added: polylang support
|
382 |
|
383 |
== Upgrade Notice ==
|
384 |
|
385 |
+
= 2.0 =
|
386 |
+
|
387 |
+
* Content Aware Sidebars data in your database will be updated automatically. It is highly recommended to backup this data before updating the plugin.
|
388 |
+
* Minimum WordPress version compatibility is now 3.3.
|
389 |
+
|
390 |
= 1.1 =
|
391 |
|
392 |
+
* Content Aware Sidebars data in your database will be updated automatically. Remember to backup this data before updating the plugin.
|
393 |
|
394 |
= 0.8 =
|
395 |
|
396 |
+
* Content Aware Sidebars data in your database will be updated automatically. Remember to backup this data before updating the plugin.
|
397 |
|
398 |
= 0.5 =
|
399 |
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
uninstall.php
CHANGED
@@ -1,26 +1,20 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Content Aware Sidebars
|
|
|
4 |
*/
|
5 |
|
6 |
if(!defined('WP_UNINSTALL_PLUGIN')) {
|
7 |
exit();
|
8 |
}
|
9 |
|
|
|
|
|
10 |
// Remove db version
|
11 |
delete_option('cas_db_version');
|
12 |
|
13 |
-
//
|
14 |
-
$posts =
|
15 |
-
'numberposts' => -1,
|
16 |
-
'post_type' => 'sidebar',
|
17 |
-
'post_status' => 'any'
|
18 |
-
));
|
19 |
-
foreach($posts as $post) {
|
20 |
-
wp_delete_post($post->ID, true);
|
21 |
-
}
|
22 |
|
23 |
// Remove user meta
|
24 |
-
global $wpdb;
|
25 |
$wpdb->query("DELETE FROM $wpdb->usermeta WHERE meta_key IN('metaboxhidden_sidebar','closedpostboxes_sidebar')");
|
26 |
-
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
*/
|
6 |
|
7 |
if(!defined('WP_UNINSTALL_PLUGIN')) {
|
8 |
exit();
|
9 |
}
|
10 |
|
11 |
+
global $wpdb;
|
12 |
+
|
13 |
// Remove db version
|
14 |
delete_option('cas_db_version');
|
15 |
|
16 |
+
//Remove sidebars, sidebar groups and (if not null) their terms and metadata
|
17 |
+
$wpdb->query("DELETE p.*,pm.*,tr.* FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS pm ON p.ID = pm.post_id LEFT JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id WHERE p.post_type = 'sidebar' OR p.post_type = 'sidebar_group'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
// Remove user meta
|
|
|
20 |
$wpdb->query("DELETE FROM $wpdb->usermeta WHERE meta_key IN('metaboxhidden_sidebar','closedpostboxes_sidebar')");
|
|
update_db.php
CHANGED
@@ -1,58 +1,115 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Content Aware Sidebars
|
|
|
4 |
*/
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
* Run updates
|
9 |
-
*
|
10 |
-
* @
|
11 |
-
* @return boolean
|
12 |
*/
|
13 |
function cas_run_db_update($current_version) {
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
if($installed_version
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
return true;
|
26 |
-
|
27 |
-
$versions = array(0.8,1.1);
|
28 |
-
|
29 |
//Launch updates
|
30 |
foreach($versions as $version) {
|
|
|
31 |
$return = false;
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
$return = $function();
|
38 |
-
|
39 |
-
|
40 |
-
if($return) {
|
41 |
update_option('cas_db_version',$installed_version = $version);
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
}
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
* Version 0.8 -> 1.1
|
53 |
* Serialized metadata gets their own rows
|
54 |
-
*
|
55 |
-
* @param boolean $return
|
56 |
*/
|
57 |
function cas_update_to_11() {
|
58 |
|
@@ -68,7 +125,7 @@ function cas_update_to_11() {
|
|
68 |
// Get all sidebars
|
69 |
$posts = get_posts(array(
|
70 |
'numberposts' => -1,
|
71 |
-
'post_type' =>
|
72 |
'post_status' => 'publish,pending,draft,future,private,trash'
|
73 |
));
|
74 |
|
@@ -76,11 +133,11 @@ function cas_update_to_11() {
|
|
76 |
foreach($posts as $post) {
|
77 |
foreach($moduledata as $field) {
|
78 |
// Remove old serialized data and insert it again properly
|
79 |
-
$old = get_post_meta($post->ID, ContentAwareSidebars::
|
80 |
if($old != '') {
|
81 |
-
delete_post_meta($post->ID, ContentAwareSidebars::
|
82 |
foreach((array)$old as $new_single) {
|
83 |
-
add_post_meta($post->ID, ContentAwareSidebars::
|
84 |
}
|
85 |
}
|
86 |
}
|
@@ -91,19 +148,16 @@ function cas_update_to_11() {
|
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
-
*
|
95 |
* Version 0 -> 0.8
|
96 |
* Introduces database version management, adds preficed keys to metadata
|
97 |
-
*
|
98 |
* @global object $wpdb
|
99 |
-
* @
|
100 |
*/
|
101 |
function cas_update_to_08() {
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
'post_types',
|
107 |
'taxonomies',
|
108 |
'authors',
|
109 |
'page_templates',
|
@@ -112,30 +166,31 @@ function cas_update_to_08() {
|
|
112 |
'handle',
|
113 |
'host',
|
114 |
'merge-pos'
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
",
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
// Clear cache for new meta keys
|
136 |
wp_cache_flush();
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
}
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
*/
|
6 |
|
7 |
/**
|
|
|
8 |
* Run updates
|
9 |
+
* @param float $current_version
|
10 |
+
* @return boolean
|
|
|
11 |
*/
|
12 |
function cas_run_db_update($current_version) {
|
13 |
+
|
14 |
+
if(current_user_can('update_plugins')) {
|
15 |
+
// Get current plugin db version
|
16 |
+
$installed_version = get_option('cas_db_version',0);
|
17 |
+
|
18 |
+
// Database is up to date
|
19 |
+
if($installed_version == $current_version)
|
20 |
+
return true;
|
21 |
+
|
22 |
+
$versions = array('0.8','1.1','2.0');
|
23 |
+
|
|
|
|
|
|
|
|
|
24 |
//Launch updates
|
25 |
foreach($versions as $version) {
|
26 |
+
|
27 |
$return = false;
|
28 |
+
|
29 |
+
if(version_compare($installed_version,$version,'<')) {
|
30 |
+
$function = 'cas_update_to_'.str_replace('.','',$version);
|
31 |
+
if(function_exists($function)) {
|
|
|
32 |
$return = $function();
|
33 |
+
// Update database on success
|
34 |
+
if($return) {
|
|
|
35 |
update_option('cas_db_version',$installed_version = $version);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
}
|
40 |
+
return $return;
|
41 |
+
}
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Version 1.1 -> 2.0
|
47 |
+
* Moves module data for each sidebar to a condition group
|
48 |
+
* @author Joachim Jensen <jv@intox.dk>
|
49 |
+
* @since 2.0
|
50 |
+
* @return boolean
|
51 |
+
*/
|
52 |
+
function cas_update_to_20() {
|
53 |
+
global $wpdb;
|
54 |
+
|
55 |
+
$module_keys = array(
|
56 |
+
'static',
|
57 |
+
'post_types',
|
58 |
+
'authors',
|
59 |
+
'page_templates',
|
60 |
+
'taxonomies',
|
61 |
+
'language',
|
62 |
+
'bb_profile',
|
63 |
+
'bp_member'
|
64 |
+
);
|
65 |
+
|
66 |
+
// Get all sidebars
|
67 |
+
$posts = get_posts(array(
|
68 |
+
'numberposts' => -1,
|
69 |
+
'post_type' => ContentAwareSidebars::TYPE_SIDEBAR,
|
70 |
+
'post_status' => 'publish,pending,draft,future,private,trash'
|
71 |
+
));
|
72 |
+
if(!empty($posts)) {
|
73 |
+
foreach($posts as $post) {
|
74 |
+
|
75 |
+
//Create new condition group
|
76 |
+
$group_id = wp_insert_post(array(
|
77 |
+
'post_status' => $post->post_status,
|
78 |
+
'post_type' => ContentAwareSidebars::TYPE_CONDITION_GROUP,
|
79 |
+
'post_author' => $post->post_author,
|
80 |
+
'post_parent' => $post->ID,
|
81 |
+
));
|
82 |
+
|
83 |
+
if($group_id) {
|
84 |
+
|
85 |
+
//Move module data to condition group
|
86 |
+
$wpdb->query("
|
87 |
+
UPDATE $wpdb->postmeta
|
88 |
+
SET post_id = '".$group_id."'
|
89 |
+
WHERE meta_key IN ('".ContentAwareSidebars::PREFIX.implode("','".ContentAwareSidebars::PREFIX,$module_keys)."')
|
90 |
+
AND post_id = '".$post->ID."'
|
91 |
+
");
|
92 |
+
|
93 |
+
//Move term data to condition group
|
94 |
+
$wpdb->query("
|
95 |
+
UPDATE $wpdb->term_relationships
|
96 |
+
SET object_id = '".$group_id."'
|
97 |
+
WHERE object_id = '".$post->ID."'
|
98 |
+
");
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
return true;
|
106 |
+
|
107 |
}
|
108 |
|
109 |
/**
|
110 |
* Version 0.8 -> 1.1
|
111 |
* Serialized metadata gets their own rows
|
112 |
+
* @return boolean
|
|
|
113 |
*/
|
114 |
function cas_update_to_11() {
|
115 |
|
125 |
// Get all sidebars
|
126 |
$posts = get_posts(array(
|
127 |
'numberposts' => -1,
|
128 |
+
'post_type' => ContentAwareSidebars::TYPE_SIDEBAR,
|
129 |
'post_status' => 'publish,pending,draft,future,private,trash'
|
130 |
));
|
131 |
|
133 |
foreach($posts as $post) {
|
134 |
foreach($moduledata as $field) {
|
135 |
// Remove old serialized data and insert it again properly
|
136 |
+
$old = get_post_meta($post->ID, ContentAwareSidebars::PREFIX.$field, true);
|
137 |
if($old != '') {
|
138 |
+
delete_post_meta($post->ID, ContentAwareSidebars::PREFIX.$field, $old);
|
139 |
foreach((array)$old as $new_single) {
|
140 |
+
add_post_meta($post->ID, ContentAwareSidebars::PREFIX.$field, $new_single);
|
141 |
}
|
142 |
}
|
143 |
}
|
148 |
}
|
149 |
|
150 |
/**
|
|
|
151 |
* Version 0 -> 0.8
|
152 |
* Introduces database version management, adds preficed keys to metadata
|
|
|
153 |
* @global object $wpdb
|
154 |
+
* @return boolean
|
155 |
*/
|
156 |
function cas_update_to_08() {
|
157 |
+
global $wpdb;
|
158 |
+
|
159 |
+
$metadata = array(
|
160 |
+
'post_types',
|
|
|
161 |
'taxonomies',
|
162 |
'authors',
|
163 |
'page_templates',
|
166 |
'handle',
|
167 |
'host',
|
168 |
'merge-pos'
|
169 |
+
);
|
170 |
+
|
171 |
+
// Get all sidebars
|
172 |
+
$posts = $wpdb->get_col($wpdb->prepare("
|
173 |
+
SELECT ID
|
174 |
+
FROM $wpdb->posts
|
175 |
+
WHERE post_type = %s
|
176 |
+
",ContentAwareSidebars::TYPE_SIDEBAR));
|
177 |
+
|
178 |
+
//Check if there is any
|
179 |
+
if(!empty($posts)) {
|
180 |
+
//Update the meta keys
|
181 |
+
foreach($metadata as $meta) {
|
182 |
+
$wpdb->query("
|
183 |
+
UPDATE $wpdb->postmeta
|
184 |
+
SET meta_key = '".ContentAwareSidebars::PREFIX.$meta."'
|
185 |
+
WHERE meta_key = '".$meta."'
|
186 |
+
AND post_id IN(".implode(',',$posts).")
|
187 |
+
");
|
188 |
+
}
|
189 |
// Clear cache for new meta keys
|
190 |
wp_cache_flush();
|
191 |
+
}
|
192 |
+
|
193 |
+
return true;
|
|
|
194 |
}
|
195 |
+
|
196 |
+
//eol
|
walker.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Content Aware Sidebars
|
|
|
4 |
*/
|
5 |
|
6 |
/**
|
@@ -11,8 +12,9 @@
|
|
11 |
class CAS_Walker_Checklist extends Walker {
|
12 |
|
13 |
/**
|
14 |
-
*
|
15 |
-
* @param
|
|
|
16 |
*/
|
17 |
function __construct($tree_type, $db_fields) {
|
18 |
|
@@ -22,225 +24,85 @@ class CAS_Walker_Checklist extends Walker {
|
|
22 |
}
|
23 |
|
24 |
/**
|
25 |
-
*
|
26 |
-
* @param
|
27 |
-
* @param
|
|
|
|
|
28 |
*/
|
29 |
-
public function start_lvl(&$output, $depth, $args) {
|
30 |
$indent = str_repeat("\t", $depth);
|
31 |
-
$output .= "
|
32 |
}
|
33 |
|
34 |
/**
|
35 |
-
*
|
36 |
-
* @param
|
37 |
-
* @param
|
|
|
|
|
38 |
*/
|
39 |
-
public function end_lvl(&$output, $depth, $args) {
|
40 |
$indent = str_repeat("\t", $depth);
|
41 |
-
$output .= "$indent</ul>\n";
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
-
*
|
46 |
-
* @param
|
47 |
-
* @param
|
48 |
-
* @param
|
49 |
-
* @
|
|
|
|
|
50 |
*/
|
51 |
-
public function start_el(&$output, $term, $depth, $args) {
|
52 |
-
extract($args);
|
53 |
|
54 |
if(isset($post_type)) {
|
55 |
-
|
56 |
-
if (
|
57 |
$output .= "\n<li>";
|
58 |
return;
|
59 |
}
|
60 |
-
|
61 |
-
$
|
|
|
|
|
62 |
|
63 |
} else {
|
64 |
-
|
65 |
-
if (
|
66 |
$output .= "\n<li>";
|
67 |
return;
|
68 |
}
|
69 |
-
|
70 |
-
$name = $taxonomy->name == 'category' ? 'post_category' : 'tax_input['.$taxonomy->name.']';
|
71 |
-
$value = $taxonomy->hierarchical ? 'term_id' : 'slug';
|
72 |
-
$class = in_array( $term->term_id, $popular_terms ) ? ' class="popular-category"' : '';
|
73 |
-
|
74 |
-
$output .= "\n".'<li id="'.$taxonomy->name.'-'.$term->term_id.'"'.$class.'><label class="selectit"><input class="cas-taxonomies-'.$taxonomy->name.'" value="'.$term->$value.'" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy->name.'-'.$term->term_id.'"'.checked(in_array($term->term_id,$selected_terms),true,false).disabled(empty($disabled),false,false).'/> '.esc_html( apply_filters('the_category', $term->name )) . '</label>';
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @param string $output
|
82 |
-
* @param type $term
|
83 |
-
* @param type $depth
|
84 |
-
* @param type $args
|
85 |
-
*/
|
86 |
-
public function end_el(&$output, $term, $depth, $args) {
|
87 |
-
$output .= "</li>\n";
|
88 |
-
}
|
89 |
-
|
90 |
-
}
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
*
|
96 |
-
* @param type $post_id
|
97 |
-
* @param type $args
|
98 |
-
*/
|
99 |
-
function cas_terms_checklist($post_id = 0, $args = array()) {
|
100 |
-
$defaults = array(
|
101 |
-
'popular_terms' => false,
|
102 |
-
'taxonomy' => 'category',
|
103 |
-
'terms' => null,
|
104 |
-
'checked_ontop' => true
|
105 |
-
);
|
106 |
-
extract(wp_parse_args($args, $defaults), EXTR_SKIP);
|
107 |
-
|
108 |
-
$walker = new CAS_Walker_Checklist('category',array ('parent' => 'parent', 'id' => 'term_id'));
|
109 |
-
|
110 |
-
if(!is_object($taxonomy))
|
111 |
-
$taxonomy = get_taxonomy($taxonomy);
|
112 |
-
|
113 |
-
$args = array(
|
114 |
-
'taxonomy' => $taxonomy,
|
115 |
-
'disabled' => !current_user_can($taxonomy->cap->assign_terms)
|
116 |
-
);
|
117 |
-
|
118 |
-
if ($post_id)
|
119 |
-
$args['selected_terms'] = wp_get_object_terms($post_id, $taxonomy->name, array_merge($args, array('fields' => 'ids')));
|
120 |
-
else
|
121 |
-
$args['selected_terms'] = array();
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
$args['popular_terms'] = get_terms( $taxonomy->name, array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );
|
127 |
|
128 |
-
if(!$terms)
|
129 |
-
$terms = (array) get_terms($taxonomy->name, array('get' => 'all'));
|
130 |
-
|
131 |
-
if ($checked_ontop) {
|
132 |
-
$checked_terms = array();
|
133 |
-
$keys = array_keys( $terms );
|
134 |
-
|
135 |
-
foreach($keys as $k) {
|
136 |
-
if (in_array($terms[$k]->term_id, $args['selected_terms'])) {
|
137 |
-
$checked_terms[] = $terms[$k];
|
138 |
-
unset($terms[$k]);
|
139 |
-
}
|
140 |
}
|
141 |
|
142 |
-
|
143 |
-
echo call_user_func_array(array(&$walker, 'walk'), array($checked_terms, 0, $args));
|
144 |
-
}
|
145 |
-
// Then the rest of them
|
146 |
-
echo call_user_func_array(array(&$walker, 'walk'), array($terms, 0, $args));
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
*
|
151 |
-
* Show checklist for popular terms
|
152 |
-
*
|
153 |
-
* @global type $post_ID
|
154 |
-
* @param type $taxonomy
|
155 |
-
* @param type $default
|
156 |
-
* @param type $number
|
157 |
-
* @param type $echo
|
158 |
-
* @return type
|
159 |
-
*/
|
160 |
-
function cas_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
|
161 |
-
global $post_ID;
|
162 |
-
|
163 |
-
if ( $post_ID )
|
164 |
-
$checked_terms = wp_get_object_terms($post_ID, $taxonomy->name, array('fields'=>'ids'));
|
165 |
-
else
|
166 |
-
$checked_terms = array();
|
167 |
|
168 |
-
$terms = get_terms( $taxonomy->name, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
|
169 |
-
|
170 |
-
$disabled = current_user_can($taxonomy->cap->assign_terms) ? '' : ' disabled="disabled"';
|
171 |
-
|
172 |
-
$popular_ids = array();
|
173 |
-
foreach ( (array) $terms as $term ) {
|
174 |
-
$popular_ids[] = $term->term_id;
|
175 |
-
if ( !$echo ) // hack for AJAX use
|
176 |
-
continue;
|
177 |
-
$id = "popular-$taxonomy->name-$term->term_id";
|
178 |
-
?>
|
179 |
-
|
180 |
-
<li id="<?php echo $id; ?>" class="popular-category">
|
181 |
-
<label class="selectit">
|
182 |
-
<input class="cas-taxonomies-<?php echo $taxonomy->name; ?>" id="in-<?php echo $id; ?>" type="checkbox"<?php echo in_array( $term->term_id, $checked_terms ) ? ' checked="checked"' : ''; ?> value="<?php echo $term->term_id; ?>"<?php echo $disabled ?>/>
|
183 |
-
<?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
|
184 |
-
</label>
|
185 |
-
</li>
|
186 |
-
|
187 |
-
<?php
|
188 |
}
|
189 |
-
return $popular_ids;
|
190 |
-
}
|
191 |
-
|
192 |
-
/**
|
193 |
-
*
|
194 |
-
* Show posts checklist
|
195 |
-
*
|
196 |
-
* @param type $post_id
|
197 |
-
* @param type $args
|
198 |
-
*/
|
199 |
-
function cas_posts_checklist($post_id = 0, $args = array()) {
|
200 |
-
$defaults = array(
|
201 |
-
'post_type' => 'post',
|
202 |
-
'posts' => null,
|
203 |
-
'checked_ontop' => true
|
204 |
-
);
|
205 |
-
extract(wp_parse_args($args, $defaults), EXTR_SKIP);
|
206 |
-
|
207 |
-
$walker = new CAS_Walker_Checklist('post',array ('parent' => 'post_parent', 'id' => 'ID'));
|
208 |
-
|
209 |
-
if(!is_object($post_type))
|
210 |
-
$post_type = get_post_type_object($post_type);
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
if(!$posts)
|
223 |
-
$posts = get_posts(array(
|
224 |
-
'numberposts' => -1,
|
225 |
-
'post_type' => $post_type->name,
|
226 |
-
'post_status' => array('publish','private','future'),
|
227 |
-
));
|
228 |
-
|
229 |
-
if ( $checked_ontop ) {
|
230 |
-
$checked_posts = array();
|
231 |
-
$keys = array_keys($posts);
|
232 |
-
|
233 |
-
foreach( $keys as $k ) {
|
234 |
-
if (in_array($posts[$k]->ID, $args['selected_cats'])) {
|
235 |
-
$checked_posts[] = $posts[$k];
|
236 |
-
unset($posts[$k]);
|
237 |
-
}
|
238 |
-
}
|
239 |
-
|
240 |
-
//Put checked posts on top
|
241 |
-
echo call_user_func_array(array(&$walker, 'walk'), array($checked_posts, 0, $args));
|
242 |
}
|
243 |
|
244 |
-
// Then the rest of them
|
245 |
-
echo call_user_func_array(array(&$walker, 'walk'), array($posts, 0, $args));
|
246 |
}
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
*/
|
6 |
|
7 |
/**
|
12 |
class CAS_Walker_Checklist extends Walker {
|
13 |
|
14 |
/**
|
15 |
+
* Constructor
|
16 |
+
* @param string $tree_type
|
17 |
+
* @param array $db_fields
|
18 |
*/
|
19 |
function __construct($tree_type, $db_fields) {
|
20 |
|
24 |
}
|
25 |
|
26 |
/**
|
27 |
+
* Start outputting level
|
28 |
+
* @param string $output
|
29 |
+
* @param int $depth
|
30 |
+
* @param array $args
|
31 |
+
* @return void
|
32 |
*/
|
33 |
+
public function start_lvl(&$output, $depth = 0, $args = array()) {
|
34 |
$indent = str_repeat("\t", $depth);
|
35 |
+
$output .= "</li>$indent<li><ul class='children'>\n";
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
+
* End outputting level
|
40 |
+
* @param string $output
|
41 |
+
* @param int $depth
|
42 |
+
* @param array $args
|
43 |
+
* @return void
|
44 |
*/
|
45 |
+
public function end_lvl(&$output, $depth = 0, $args = array()) {
|
46 |
$indent = str_repeat("\t", $depth);
|
47 |
+
$output .= "$indent</ul></li>\n";
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
+
* Start outputting element
|
52 |
+
* @param string $output
|
53 |
+
* @param object $term
|
54 |
+
* @param int $depth
|
55 |
+
* @param array $args
|
56 |
+
* @param int $current_object_id
|
57 |
+
* @return void
|
58 |
*/
|
59 |
+
public function start_el(&$output, $term, $depth = 0, $args = array(), $current_object_id = 0 ) {
|
60 |
+
extract($args);
|
61 |
|
62 |
if(isset($post_type)) {
|
63 |
+
|
64 |
+
if (empty($post_type)) {
|
65 |
$output .= "\n<li>";
|
66 |
return;
|
67 |
}
|
68 |
+
|
69 |
+
$value = $term->ID;
|
70 |
+
$title = $term->post_title;
|
71 |
+
$name = 'post_types[]';
|
72 |
|
73 |
} else {
|
74 |
+
|
75 |
+
if (empty($taxonomy)) {
|
76 |
$output .= "\n<li>";
|
77 |
return;
|
78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
+
//Hierarchical taxonomies use ids instead of slugs
|
81 |
+
//see http://codex.wordpress.org/Function_Reference/wp_set_post_terms
|
82 |
+
$value_var = ($taxonomy->hierarchical ? 'term_id' : 'slug');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
$value = $term->$value_var;
|
85 |
+
$title = $term->name;
|
86 |
+
$name = 'tax_input['.$taxonomy->name.'][]';
|
|
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
|
90 |
+
$output .= "\n".'<li><label class="selectit"><input value="'.$value.'" type="checkbox" title="'.esc_attr( $title ).'" name="'.$name.'"'.checked(in_array($value,$selected_terms),true,false).'/> '.esc_html( $title ).'</label>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
+
/**
|
95 |
+
* End outputting element
|
96 |
+
* @param string $output
|
97 |
+
* @param object $object
|
98 |
+
* @param int $depth
|
99 |
+
* @param array $args
|
100 |
+
* @return void
|
101 |
+
*/
|
102 |
+
public function end_el(&$output, $object, $depth = 0, $args = array() ) {
|
103 |
+
$output .= "</li>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
105 |
|
|
|
|
|
106 |
}
|
107 |
+
|
108 |
+
//eol
|