Content Aware Sidebars – Unlimited Widget Areas - Version 2.2.1

Version Description

  • Fixed: taxonomy archive conditions did not work with other modules properly
  • Fixed: removed display limit of 20 for saved post type conditions
  • Fixed: saved post type conditions ordered alphabetically
Download this release

Release Info

Developer intoxstudio
Plugin Icon 128x128 Content Aware Sidebars – Unlimited Widget Areas
Version 2.2.1
Comparing to
See all releases

Code changes from version 1.3 to 2.2.1

Files changed (56) hide show
  1. content-aware-sidebars.php +745 -416
  2. css/index.php +2 -0
  3. css/style.css +254 -39
  4. img/index.php +2 -0
  5. index.php +1 -1
  6. js/accordion.min.js +1 -0
  7. js/cas_admin.js +605 -79
  8. js/index.php +2 -0
  9. js/jquery.ui.accordion.js +0 -1
  10. js/jquery.ui.autocomplete.js +0 -605
  11. lang/content-aware-sidebars-da_DK.mo +0 -0
  12. lang/content-aware-sidebars-da_DK.po +234 -131
  13. lang/content-aware-sidebars-de_DE.mo +0 -0
  14. lang/content-aware-sidebars-de_DE.po +460 -0
  15. lang/content-aware-sidebars-es_ES.mo +0 -0
  16. lang/content-aware-sidebars-es_ES.po +459 -0
  17. lang/content-aware-sidebars-hu_HU.mo +0 -0
  18. lang/content-aware-sidebars-hu_HU.po +417 -0
  19. lang/content-aware-sidebars-it_IT.mo +0 -0
  20. lang/content-aware-sidebars-it_IT.po +316 -110
  21. lang/content-aware-sidebars-lt_LT.mo +0 -0
  22. lang/content-aware-sidebars-lt_LT.po +33 -33
  23. lang/content-aware-sidebars-lv_LV.mo +0 -0
  24. lang/content-aware-sidebars-lv_LV.po +299 -0
  25. lang/content-aware-sidebars-sk_SK.mo +0 -0
  26. lang/{content-aware-sidebars.pot → content-aware-sidebars-sk_SK.po} +113 -90
  27. lang/content-aware-sidebars-zh_CN.mo +0 -0
  28. lang/content-aware-sidebars-zh_CN.po +409 -0
  29. lang/content-aware-sidebars.po +405 -0
  30. lang/content-aware-sidebars_sk_SK.mo +0 -0
  31. lang/content-aware-sidebars_sk_SK.po +0 -284
  32. lang/index.php +2 -0
  33. license.txt +674 -0
  34. modules/abstract.php +207 -59
  35. modules/author.php +77 -18
  36. modules/bbpress.php +17 -21
  37. modules/bp_member.php +42 -23
  38. modules/index.php +1 -1
  39. modules/page_template.php +20 -12
  40. modules/polylang.php +17 -11
  41. modules/post_type.php +219 -89
  42. modules/qtranslate.php +16 -11
  43. modules/static.php +22 -41
  44. modules/taxonomy.php +246 -110
  45. modules/transposh.php +18 -14
  46. modules/wpml.php +18 -11
  47. readme.txt +162 -65
  48. screenshot-1.png +0 -0
  49. screenshot-2.png +0 -0
  50. screenshot-3.png +0 -0
  51. screenshot-4.png +0 -0
  52. screenshot-5.png +0 -0
  53. uninstall.php +4 -10
  54. update_db.php +74 -11
  55. walker.php +36 -59
  56. wpml-config.xml +10 -0
content-aware-sidebars.php CHANGED
@@ -7,18 +7,20 @@
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: 1.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: GPL2
16
 
17
- Copyright 2011-2013 Joachim Jensen (email : jv@intox.dk)
 
18
 
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License, version 2, as
21
- published by the Free Software Foundation.
 
22
 
23
  This program is distributed in the hope that it will be useful,
24
  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,9 +28,7 @@ License: GPL2
26
  GNU General Public License for more details.
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 {
@@ -36,94 +36,154 @@ final class ContentAwareSidebars {
36
  /**
37
  * Database version for update module
38
  */
39
- const db_version = 1.1;
 
 
 
 
 
40
 
41
  /**
42
  * Prefix for data (keys) stored in database
43
  */
44
- const prefix = '_cas_';
 
 
 
 
 
45
 
46
  /**
47
  * Post Type for sidebars
48
  */
49
- const type_sidebar = 'sidebar';
 
 
 
 
 
50
 
51
  /**
52
  * Language domain
53
  */
54
- const domain = 'content-aware-sidebars';
55
-
56
  /**
57
- * Plugin basename
58
- * @var string
59
  */
60
- private $basename;
61
 
62
  /**
63
  * Sidebar metadata
64
  * @var array
65
  */
66
- private $metadata = array();
 
 
 
 
 
 
67
 
68
  /**
69
  * Sidebars retrieved from database
70
  * @var array
71
  */
72
- private $sidebar_cache = array();
73
 
74
  /**
75
  * Modules for specific content or cases
76
  * @var array
77
  */
78
- private $modules = array();
 
 
 
 
 
 
79
 
80
  /**
81
  * Constructor
82
  */
83
  public function __construct() {
84
 
85
- $this->basename = dirname(plugin_basename(__FILE__));
86
-
87
- register_activation_hook(__FILE__, array(&$this,'plugin_activation'));
88
- register_deactivation_hook(__FILE__, array(&$this,'plugin_deactivation'));
89
 
90
  $this->_load_dependencies();
91
-
92
  // WordPress Hooks. Somewhat ordered by execution
93
 
94
- // On sitewide requests
95
- add_action('plugins_loaded', array(&$this,'deploy_modules'));
96
- add_action('init', array(&$this,'init_sidebar_type'),99);
97
- add_action('widgets_init', array(&$this,'create_sidebars'),99);
98
-
99
- // On admin requests
100
- add_action('admin_enqueue_scripts', array(&$this,'load_admin_scripts'));
101
-
102
- // On post type and taxonomy requests
103
- add_action('delete_post', array(&$this,'remove_sidebar_widgets'));
104
- add_action('save_post', array(&$this,'save_post'));
105
-
106
- // Order not known yet
107
- add_action('add_meta_boxes_'.self::type_sidebar, array(&$this,'create_meta_boxes'));
108
- add_action('in_admin_header', array(&$this,'clear_admin_menu'),99);
109
-
110
- add_filter('default_hidden_meta_boxes', array(&$this,'change_default_hidden'),10,2);
111
- add_filter('manage_edit-'.self::type_sidebar.'_columns', array(&$this,'admin_column_headers'),99);
112
- add_filter('manage_edit-'.self::type_sidebar.'_sortable_columns', array(&$this,'admin_column_sortable_headers'));
113
- add_filter('manage_posts_custom_column', array(&$this,'admin_column_rows'),10,3);
114
- add_filter('post_row_actions', array(&$this,'sidebar_row_actions'),10,2);
115
- add_filter('post_updated_messages', array(&$this,'sidebar_updated_messages'));
116
-
117
- // Sitewide hooks that should not be loaded sitewide here
118
  if(is_admin()) {
119
- add_filter('request', array(&$this,'admin_column_orderby'));
120
 
121
- add_action('wp_loaded', array(&$this,'db_update'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  } else {
123
- add_filter('wp', array(&$this,'replace_sidebar'));
 
 
124
  }
 
 
 
 
 
 
 
125
 
126
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
  /**
129
  * Deploy modules
@@ -131,29 +191,42 @@ final class ContentAwareSidebars {
131
  */
132
  public function deploy_modules() {
133
 
134
- load_plugin_textdomain(self::domain, false, $this->basename.'/lang/');
135
 
136
- // List modules
137
  $modules = array(
138
- 'static' => true,
139
- 'post_type' => true,
140
- 'author' => true,
141
- 'page_template' => true,
142
- 'taxonomy' => true,
143
- 'url' => false,
144
- 'bbpress' => function_exists('bbp_get_version'), // bbPress
145
- 'bp_member' => defined('BP_VERSION'), // BuddyPress
146
- 'polylang' => defined('POLYLANG_VERSION'), // Polylang
147
- 'qtranslate' => defined('QT_SUPPORTED_WP_VERSION'), // qTranslate
148
- 'transposh' => defined('TRANSPOSH_PLUGIN_VER'), // Transposh Translation Filter
149
- 'wpml' => defined('ICL_LANGUAGE_CODE') // WPML Multilingual Blog/CMS
150
  );
 
 
151
 
152
  // Forge modules
153
  foreach($modules as $name => $enabled) {
154
- if($enabled && include('modules/'.$name .'.php')) {
155
- $class = 'CASModule_'.$name;
156
- $this->modules[$name] = new $class;
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
  }
159
 
@@ -175,88 +248,114 @@ final class ContentAwareSidebars {
175
 
176
  // Meta fields
177
  $this->metadata['exposure'] = array(
178
- 'name' => __('Exposure', self::domain),
179
- 'id' => 'exposure',
180
- 'desc' => '',
181
- 'val' => 1,
182
- 'type' => 'select',
183
- 'list' => array(
184
- __('Singular', self::domain),
185
- __('Singular & Archive', self::domain),
186
- __('Archive', self::domain)
187
  )
188
  );
189
  $this->metadata['handle'] = array(
190
- 'name' => _x('Handle','option', self::domain),
191
- 'id' => 'handle',
192
- 'desc' => __('Replace host sidebar, merge with it or add sidebar manually.', self::domain),
193
- 'val' => 0,
194
- 'type' => 'select',
195
- 'list' => array(
196
- __('Replace', self::domain),
197
- __('Merge', self::domain),
198
- __('Manual', self::domain)
 
199
  )
200
  );
201
  $this->metadata['host'] = array(
202
- 'name' => __('Host Sidebar', self::domain),
203
- 'id' => 'host',
204
- 'desc' => '',
205
- 'val' => 'sidebar-1',
206
- 'type' => 'select',
207
- 'list' => $sidebar_list
208
  );
209
  $this->metadata['merge-pos'] = array(
210
- 'name' => __('Merge position', self::domain),
211
- 'id' => 'merge-pos',
212
- 'desc' => __('Place sidebar on top or bottom of host when merging.', self::domain),
213
- 'val' => 1,
214
- 'type' => 'select',
215
- 'list' => array(
216
- __('Top', self::domain),
217
- __('Bottom', self::domain)
218
  )
219
  );
220
 
221
  }
222
 
223
  /**
224
- * Create sidebar post type
225
  * @return void
226
  */
227
  public function init_sidebar_type() {
 
 
 
 
 
 
 
 
 
 
228
 
229
  // Register the sidebar type
230
- register_post_type(self::type_sidebar,array(
231
- 'labels' => array(
232
- 'name' => __('Sidebars', self::domain),
233
- 'singular_name' => __('Sidebar', self::domain),
234
- 'add_new' => _x('Add New', 'sidebar', self::domain),
235
- 'add_new_item' => __('Add New Sidebar', self::domain),
236
- 'edit_item' => __('Edit Sidebar', self::domain),
237
- 'new_item' => __('New Sidebar', self::domain),
238
- 'all_items' => __('All Sidebars', self::domain),
239
- 'view_item' => __('View Sidebar', self::domain),
240
- 'search_items' => __('Search Sidebars', self::domain),
241
- 'not_found' => __('No sidebars found', self::domain),
242
- 'not_found_in_trash' => __('No sidebars found in Trash', self::domain)
243
  ),
244
- 'capabilities' => array(
245
- 'edit_post' => 'edit_theme_options',
246
- 'read_post' => 'edit_theme_options',
247
- 'delete_post' => 'edit_theme_options',
248
- 'edit_posts' => 'edit_theme_options',
249
- 'edit_others_posts' => 'edit_theme_options',
250
- 'publish_posts' => 'edit_theme_options',
251
- 'read_private_posts' => 'edit_theme_options'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  ),
253
- 'show_ui' => true,
254
- 'show_in_menu' => true, //current_user_can('edit_theme_options'),
255
- 'query_var' => false,
256
- 'rewrite' => false,
257
- 'menu_position' => null,
258
- 'supports' => array('title','page-attributes'),
259
- 'menu_icon' => WP_PLUGIN_URL.'/'.$this->basename.'/img/icon-16.png'
260
  ));
261
  }
262
 
@@ -267,67 +366,79 @@ final class ContentAwareSidebars {
267
  * @return array
268
  */
269
  public function sidebar_updated_messages( $messages ) {
270
- global $post;
271
- $messages[self::type_sidebar] = array(
272
  0 => '',
273
- 1 => sprintf(__('Sidebar updated. <a href="%s">Manage widgets</a>',self::domain),'widgets.php'),
274
  2 => '',
275
  3 => '',
276
- 4 => __('Sidebar updated.',self::domain),
277
  5 => '',
278
- 6 => sprintf(__('Sidebar published. <a href="%s">Manage widgets</a>',self::domain), 'widgets.php'),
279
- 7 => __('Sidebar saved.',self::domain),
280
- 8 => sprintf(__('Sidebar submitted. <a href="%s">Manage widgets</a>',self::domain),'widgets.php'),
281
- 9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>. <a href="%2$s">Manage widgets</a>',self::domain),
282
- // translators: Publish box date format, see http://php.net/date
283
- date_i18n(__('M j, Y @ G:i'),strtotime($post->post_date)),'widgets.php'),
284
- 10 => __('Sidebar draft updated.',self::domain),
 
 
285
  );
286
  return $messages;
287
  }
288
-
289
  /**
290
  * Add sidebars to widgets area
291
- * @return void
 
292
  */
293
  public function create_sidebars() {
294
-
295
- //WP3.1 does not support (array) as post_status
296
- $posts = get_posts(array(
297
- 'numberposts' => -1,
298
- 'post_type' => self::type_sidebar,
299
- 'post_status' => 'publish,private,future'
300
  ));
301
 
302
  //Register sidebars to add them to the list
303
- foreach($posts as $post) {
304
  register_sidebar( array(
305
- 'name' => $post->post_title,
306
- 'id' => 'ca-sidebar-'.$post->ID
307
  ));
308
  }
 
 
 
 
 
 
 
309
 
310
  //Init metadata
311
  $this->_init_metadata();
312
 
313
  //Now reregister sidebars with proper content
314
- foreach($posts as $post) {
 
 
 
 
 
 
315
 
316
- $handle = get_post_meta($post->ID, self::prefix . 'handle', true);
317
  $desc = $this->metadata['handle']['list'][$handle];
318
 
319
- if ($handle < 2) {
320
- $host = get_post_meta($post->ID, self::prefix . 'host', true);
321
- $desc .= ": " . (isset($this->metadata['host']['list'][$host]) ? $this->metadata['host']['list'][$host] : __('Please update Host Sidebar', self::domain) );
322
  }
323
  register_sidebar( array(
324
- 'name' => $post->post_title,
325
- 'description' => $desc,
326
- 'id' => 'ca-sidebar-'.$post->ID,
327
- 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
328
- 'after_widget' => '</li>',
329
- 'before_title' => '<h3 class="widget-title">',
330
- 'after_title' => '</h3>',
331
  ));
332
  }
333
  }
@@ -340,12 +451,12 @@ final class ContentAwareSidebars {
340
  public function admin_column_headers($columns) {
341
  // Totally discard current columns and rebuild
342
  return array(
343
- 'cb' => $columns['cb'],
344
- 'title' => $columns['title'],
345
- 'exposure' => __('Exposure', self::domain),
346
- 'handle' => _x('Handle','option', self::domain),
347
- 'merge-pos' => __('Merge position', self::domain),
348
- 'date' => $columns['date']
349
  );
350
  }
351
 
@@ -357,9 +468,9 @@ final class ContentAwareSidebars {
357
  public function admin_column_sortable_headers($columns) {
358
  return array_merge(
359
  array(
360
- 'exposure' => 'exposure',
361
- 'handle' => 'handle',
362
- 'merge-pos' => 'merge-pos'
363
  ), $columns
364
  );
365
  }
@@ -372,8 +483,8 @@ final class ContentAwareSidebars {
372
  public function admin_column_orderby($vars) {
373
  if (isset($vars['orderby']) && in_array($vars['orderby'], array('exposure', 'handle', 'merge-pos'))) {
374
  $vars = array_merge($vars, array(
375
- 'meta_key' => self::prefix . $vars['orderby'],
376
- 'orderby' => 'meta_value'
377
  ));
378
  }
379
  return $vars;
@@ -387,20 +498,27 @@ final class ContentAwareSidebars {
387
  */
388
  public function admin_column_rows($column_name, $post_id) {
389
 
390
- if (get_post_type($post_id) != self::type_sidebar)
391
  return;
392
 
393
  // Load metadata
394
  if (!$this->metadata)
395
  $this->_init_metadata();
396
 
397
- $current = get_post_meta($post_id, self::prefix . $column_name, true);
398
- $current_from_list = $this->metadata[$column_name]['list'][$current];
 
 
 
 
 
 
 
 
 
399
 
400
- if ($column_name == 'handle' && $current < 2) {
401
- $host = get_post_meta($post_id, self::prefix . 'host', true);
402
- $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>');
403
  }
 
404
  echo $current_from_list;
405
  }
406
 
@@ -412,10 +530,10 @@ final class ContentAwareSidebars {
412
  public function remove_sidebar_widgets($post_id) {
413
 
414
  // Authenticate and only continue on sidebar post type
415
- if (!current_user_can('edit_theme_options') || get_post_type($post_id) != self::type_sidebar)
416
  return;
417
 
418
- $id = 'ca-sidebar-' . $post_id;
419
 
420
  //Get widgets
421
  $sidebars_widgets = wp_get_sidebars_widgets();
@@ -439,74 +557,84 @@ final class ContentAwareSidebars {
439
  unset($sidebars_widgets[$id]);
440
  wp_set_sidebars_widgets($sidebars_widgets);
441
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
 
443
  /**
444
  * Add admin rows actions
445
- * @param array $actions
446
- * @param object $post
447
- * @return array
448
  */
449
  public function sidebar_row_actions($actions, $post) {
450
- if ($post->post_type == self::type_sidebar && $post->post_status != 'trash') {
451
-
452
- //View link is still there in WP3.1
453
- unset($actions['view']);
454
-
455
- return array_merge(
456
- array_slice($actions, 0, 2, true), array(
457
- 'mng_widgets' => '<a href="widgets.php" title="' . esc_html(__('Manage Widgets', self::domain)) . '">' . __('Manage Widgets', self::domain) . '</a>'
458
- ), $actions
459
- );
460
  }
461
  return $actions;
462
  }
463
 
464
  /**
465
  * Replace or merge a sidebar with content aware sidebars.
466
- * Handles sidebars with hosts
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
- // TODO
480
- // // Filter out sidebars with dependent content rules not present. Archives not yet decided.
481
- // if(!(is_archive() || (is_home() && !is_front_page()))) {
482
- // $continue = false;
483
- // $continue = apply_filters('cas_exclude_sidebar', $continue, $post, self::prefix);
484
- // if($continue)
485
- // continue;
486
- // }
487
- //
488
- $id = 'ca-sidebar-' . $post->ID;
489
- $host = get_post_meta($post->ID, self::prefix . 'host', true);
490
 
491
  // Check for correct handling and if host exist
492
- if ($post->handle == 2 || !isset($_wp_sidebars_widgets[$host]))
493
  continue;
494
 
495
  // Sidebar might not have any widgets. Get it anyway!
496
- if (!isset($_wp_sidebars_widgets[$id]))
497
- $_wp_sidebars_widgets[$id] = array();
498
 
499
- // If host has already been replaced, merge with it instead. Might change in future.
500
- if ($post->handle || isset($handled_already[$host])) {
501
- if (get_post_meta($post->ID, self::prefix . 'merge-pos', true))
502
- $_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host], $_wp_sidebars_widgets[$id]);
503
  else
504
- $_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id], $_wp_sidebars_widgets[$host]);
505
  } else {
506
- $_wp_sidebars_widgets[$host] = $_wp_sidebars_widgets[$id];
507
  $handled_already[$host] = 1;
508
  }
 
509
  }
 
510
  }
511
 
512
  /**
@@ -521,8 +649,8 @@ final class ContentAwareSidebars {
521
  // Grab args or defaults
522
  $args = wp_parse_args($args, array(
523
  'include' => '',
524
- 'before' => '<div id="sidebar" class="widget-area"><ul class="xoxo">',
525
- 'after' => '</ul></div>'
526
  ));
527
  extract($args, EXTR_SKIP);
528
 
@@ -542,7 +670,7 @@ final class ContentAwareSidebars {
542
  $i = $host = 0;
543
  foreach ($posts as $post) {
544
 
545
- $id = 'ca-sidebar-' . $post->ID;
546
 
547
  // Check for manual handling, if sidebar exists and if id should be included
548
  if ($post->handle != 2 || !isset($_wp_sidebars_widgets[$id]) || (!empty($include) && !isset($include[$post->ID])))
@@ -550,7 +678,7 @@ final class ContentAwareSidebars {
550
 
551
  // Merge if more than one. First one is host.
552
  if ($i > 0) {
553
- if (get_post_meta($post->ID, self::prefix . 'merge-pos', true))
554
  $_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host], $_wp_sidebars_widgets[$id]);
555
  else
556
  $_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id], $_wp_sidebars_widgets[$host]);
@@ -585,46 +713,76 @@ final class ContentAwareSidebars {
585
  else
586
  return $this->sidebar_cache;
587
  }
588
-
589
- $joins = array();
590
- $where = array();
591
- $where2 = array();
592
-
593
- // Get rules
594
- foreach($this->modules as $module) {
595
- if(apply_filters("cas-is-content-".$module->get_id(), $module->is_content())) {
596
- $joins[] = apply_filters("cas-db-join-".$module->get_id(), $module->db_join());
597
- $where[] = apply_filters("cas-db-where-".$module->get_id(), $module->db_where());
598
- $where2[] = $module->db_where2();
599
- }
600
- }
601
-
602
  // Check if there are any rules for this type of content
603
- if(empty($where))
604
  return false;
605
 
606
- // Do query and cache it
607
- $wpdb->query('SET OPTION SQL_BIG_SELECTS = 1');
608
- $this->sidebar_cache = $wpdb->get_results("
 
 
 
 
609
  SELECT
610
- posts.ID,
611
- handle.meta_value handle
612
  FROM $wpdb->posts posts
613
- LEFT JOIN $wpdb->postmeta handle
614
- ON handle.post_id = posts.ID
615
- AND handle.meta_key = '".self::prefix."handle'
616
- LEFT JOIN $wpdb->postmeta exposure
617
- ON exposure.post_id = posts.ID
618
- AND exposure.meta_key = '".self::prefix."exposure'
619
- ".implode(' ',$joins)."
620
  WHERE
621
- posts.post_type = '".self::type_sidebar."' AND
622
- exposure.meta_value ".(is_archive() || is_home() ? '>' : '<')."= '1' AND
623
- posts.post_status ".(current_user_can('read_private_posts') ? "IN('publish','private')" : "= 'publish'")." AND
624
- (".implode(' AND ',$where).($where2 ? ' AND ('.implode(' OR ',$where2).')' : '').")
625
- GROUP BY posts.ID
626
- ORDER BY posts.menu_order ASC, handle.meta_value DESC, posts.post_date DESC
627
- ");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
 
629
  // Return proper cache. If query was empty, tell the cache.
630
  return (empty($this->sidebar_cache) ? $this->sidebar_cache[0] = false : $this->sidebar_cache);
@@ -641,28 +799,29 @@ final class ContentAwareSidebars {
641
  $screen = get_current_screen();
642
 
643
  // Post type not set on all pages in WP3.1
644
- if(!(isset($screen->post_type) && $screen->post_type == self::type_sidebar && $screen->base == 'post'))
645
  return;
646
 
647
  // Names of whitelisted meta boxes
648
  $whitelist = array(
649
- 'cas-spread-words' => 'cas-spread-words',
650
- 'cas-rules' => 'cas-rules',
651
- 'cas-options' => 'cas-options',
652
- 'submitdiv' => 'submitdiv',
653
- 'pageparentdiv' => 'pageparentdiv',
654
- 'slugdiv' => 'slugdiv'
 
655
  );
656
 
657
  // Loop through context (normal,advanced,side)
658
- foreach($wp_meta_boxes[self::type_sidebar] as $context_k => $context_v) {
659
  // Loop through priority (high,core,default,low)
660
  foreach($context_v as $priority_k => $priority_v) {
661
  // Loop through boxes
662
  foreach($priority_v as $box_k => $box_v) {
663
  // If box is not whitelisted, remove it
664
- if(!in_array($box_k,$whitelist)) {
665
- $wp_meta_boxes[self::type_sidebar][$context_k][$priority_k][$box_k] = false;
666
  //unset($whitelist[$box_k]);
667
  }
668
  }
@@ -676,41 +835,50 @@ final class ContentAwareSidebars {
676
  * @return void
677
  */
678
  public function create_meta_boxes() {
679
- global $post;
680
-
681
  // Remove ability to set self to host
682
- if(isset($post))
683
- unset($this->metadata['host']['list']['ca-sidebar-'.$post->ID]);
684
-
685
- // Add boxes
686
- // Module rules
687
- add_meta_box(
688
- 'cas-rules',
689
- __('Content', self::domain),
690
- array(&$this, 'meta_box_rules'),
691
- self::type_sidebar,
692
- 'normal',
693
- 'high'
694
- );
695
 
696
- // Options
697
- add_meta_box(
698
- 'cas-options',
699
- __('Options', self::domain),
700
- array(&$this, 'meta_box_options'),
701
- self::type_sidebar,
702
- 'side'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
703
  );
704
 
705
- // Author Words
706
- add_meta_box(
707
- 'cas-spread-words',
708
- __('Spread the Word',self::domain),
709
- array(&$this, 'meta_box_author_words'),
710
- self::type_sidebar,
711
- 'side',
712
- 'high'
713
- );
 
 
 
714
  }
715
 
716
  /**
@@ -721,14 +889,7 @@ final class ContentAwareSidebars {
721
  */
722
  public function change_default_hidden($hidden, $screen) {
723
 
724
- //WordPress 3.3 has changed get_hidden_meta_boxes().
725
- if (get_bloginfo('version') < 3.3) {
726
- $condition = $screen->base == self::type_sidebar;
727
- } else {
728
- $condition = $screen->post_type == self::type_sidebar;
729
- }
730
-
731
- if ($condition && get_user_option('metaboxhidden_sidebar') === false) {
732
 
733
  $hidden_meta_boxes = array('pageparentdiv');
734
  $hidden = array_merge($hidden, $hidden_meta_boxes);
@@ -738,28 +899,218 @@ final class ContentAwareSidebars {
738
  }
739
  return $hidden;
740
  }
741
-
742
  /**
743
  * Meta box for content rules
744
  * @return void
745
  */
746
  public function meta_box_rules() {
747
- // global $pagenow;
748
- //
749
- // // New sidebar
750
- // if($pagenow == 'post-new.php') {
751
- //
752
- // } else {
753
- //
754
- // }
755
-
756
- echo '<div id="cas-accordion">'."\n";
757
- foreach($this->modules as $module) {
758
- $module->meta_box_content();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  }
 
 
 
 
 
 
 
 
760
  echo '</div>'."\n";
761
 
762
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
 
764
  /**
765
  * Meta box for options
@@ -791,28 +1142,36 @@ final class ContentAwareSidebars {
791
  */
792
  public function meta_box_author_words() {
793
 
794
- // Use nonce for verification
795
- wp_nonce_field(basename(__FILE__), '_ca-sidebar-nonce');
 
796
  ?>
797
- <div style="overflow:hidden;">
798
- <p><?php _e('If you love this plugin, please consider donating to support future development.', self::domain); ?></p>
799
- <p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=KPZHE6A72LEN4&amp;lc=US&amp;item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"
800
- target="_blank" title="PayPal - The safer, easier way to pay online!">
801
- <img align="center" border="0" 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!">
802
- </a></p>
803
- <p><?php _e('Or you could:'); ?></p>
804
- <ul>
805
- <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>
806
- <li><a href="http://wordpress.org/extend/plugins/content-aware-sidebars/" target="_blank"><?php _e('Link to the plugin page',self::domain); ?></a></li>
807
- </ul>
808
- <br />
809
- <p>
810
- <a href="https://twitter.com/intoxstudio" class="twitter-follow-button" data-show-count="false">Follow @intoxstudio</a>
811
- <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>
812
- <p>
813
- <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fintoxstudio&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21&amp;appId=436031373100972" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:21px;" allowTransparency="true"></iframe>
814
- </p>
815
  </div>
 
 
 
 
 
 
 
 
816
  <?php
817
  }
818
 
@@ -823,9 +1182,8 @@ final class ContentAwareSidebars {
823
  * @return void
824
  */
825
  private function _form_field($setting) {
826
- global $post;
827
 
828
- $meta = get_post_meta($post->ID, self::prefix . $setting, true);
829
  $setting = $this->metadata[$setting];
830
  $current = $meta != '' ? $meta : $setting['val'];
831
  switch ($setting['type']) {
@@ -862,15 +1220,15 @@ final class ContentAwareSidebars {
862
  return;
863
 
864
  // Only sidebar type
865
- if (get_post_type($post_id) != self::type_sidebar)
866
  return;
867
 
868
  // Verify nonce
869
- if (!check_admin_referer(basename(__FILE__), '_ca-sidebar-nonce'))
870
  return;
871
 
872
  // Check permissions
873
- if (!current_user_can('edit_theme_options', $post_id))
874
  return;
875
 
876
  // Check autosave
@@ -883,36 +1241,12 @@ final class ContentAwareSidebars {
883
  // Update metadata
884
  foreach ($this->metadata as $field) {
885
  $new = isset($_POST[$field['id']]) ? $_POST[$field['id']] : '';
886
- $old = get_post_meta($post_id, self::prefix . $field['id'], true);
887
 
888
  if ($new != '' && $new != $old) {
889
- update_post_meta($post_id, self::prefix . $field['id'], $new);
890
  } elseif ($new == '' && $old != '') {
891
- delete_post_meta($post_id, self::prefix . $field['id'], $old);
892
- }
893
- }
894
- // Update module data
895
- foreach ($this->modules as $module) {
896
- $new = isset($_POST[$module->get_id()]) ? $_POST[$module->get_id()] : '';
897
- $old = array_flip(get_post_meta($post_id, self::prefix . $module->get_id(), false));
898
-
899
- if (is_array($new)) {
900
- //$new = array_unique($new);
901
- // Skip existing data or insert new data
902
- foreach ($new as $new_single) {
903
- if (isset($old[$new_single])) {
904
- unset($old[$new_single]);
905
- } else {
906
- add_post_meta($post_id, self::prefix . $module->get_id(), $new_single);
907
- }
908
- }
909
- // Remove existing data that have not been skipped
910
- foreach ($old as $old_key => $old_value) {
911
- delete_post_meta($post_id, self::prefix . $module->get_id(), $old_key);
912
- }
913
- } elseif (!empty($old)) {
914
- // Remove any old values when $new is empty
915
- delete_post_meta($post_id, self::prefix . $module->get_id());
916
  }
917
  }
918
  }
@@ -922,7 +1256,7 @@ final class ContentAwareSidebars {
922
  * @return void
923
  */
924
  public function db_update() {
925
- cas_run_db_update(self::db_version);
926
  }
927
 
928
  /**
@@ -932,26 +1266,37 @@ final class ContentAwareSidebars {
932
  */
933
  public function load_admin_scripts($hook) {
934
 
935
- wp_register_script('cas_admin_script', WP_PLUGIN_URL . '/' . $this->basename . '/js/cas_admin.js', array('jquery'), '1.2', true);
936
- wp_register_style('cas_admin_style', WP_PLUGIN_URL . '/' . $this->basename . '/css/style.css', array(), '1.2');
937
 
938
- if ($hook == 'post.php' || $hook == 'post-new.php') {
939
- // WordPress < 3.3 does not have jQuery UI accordion and autocomplete
940
- if (get_bloginfo('version') < 3.3) {
941
- wp_register_script('cas-jquery-ui-autocomplete', WP_PLUGIN_URL . '/' . $this->basename . '/js/jquery.ui.autocomplete.js', array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position'), '1.8.9', true);
942
- wp_register_script('cas-jquery-ui-accordion', WP_PLUGIN_URL . '/' . $this->basename . '/js/jquery.ui.accordion.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9', true);
943
- wp_enqueue_script('cas-jquery-ui-autocomplete');
944
- wp_enqueue_script('cas-jquery-ui-accordion');
945
- } else {
946
- wp_enqueue_script('jquery-ui-accordion');
947
- wp_enqueue_script('jquery-ui-autocomplete');
948
- }
949
- wp_enqueue_script('cas_admin_script');
950
 
951
- wp_enqueue_style('cas_admin_style');
952
- } else if ($hook == 'edit.php') {
953
- wp_enqueue_style('cas_admin_style');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
954
  }
 
955
  }
956
 
957
  /**
@@ -959,40 +1304,24 @@ final class ContentAwareSidebars {
959
  * @return void
960
  */
961
  private function _load_dependencies() {
962
- require('walker.php');
963
- require('update_db.php');
964
- require('modules/abstract.php');
965
- }
966
-
967
- /**
968
- * Flush rewrite rules on plugin activation
969
- * @return void
970
- */
971
- public function plugin_activation() {
972
- $this->init_sidebar_type();
973
- flush_rewrite_rules();
974
  }
975
 
976
- /**
977
- * Flush rewrite rules on plugin deactivation
978
- * @return void
979
- */
980
- public function plugin_deactivation() {
981
- flush_rewrite_rules();
982
- }
983
  }
984
 
985
  // Launch plugin
986
- global $ca_sidebars;
987
- $ca_sidebars = new ContentAwareSidebars();
988
 
989
  /**
990
  * Template wrapper to display content aware sidebars
991
- * @global object $ca_sidebars
992
  * @param array|string $args
993
  * @return void
994
  */
995
  function display_ca_sidebar($args = array()) {
996
- global $ca_sidebars;
997
- $ca_sidebars->manual_sidebar($args);
998
  }
 
 
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.2.1
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
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 {
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.2.1';
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
+ add_action('transition_post_status', array(&$this,'cascade_sidebar_status'),10,3);
129
+
130
+ add_filter('request', array(&$this,'admin_column_orderby'));
131
+ add_filter('default_hidden_meta_boxes', array(&$this,'change_default_hidden'),10,2);
132
+ add_filter('manage_edit-'.self::TYPE_SIDEBAR.'_columns', array(&$this,'admin_column_headers'),99);
133
+ add_filter('manage_edit-'.self::TYPE_SIDEBAR.'_sortable_columns',array(&$this,'admin_column_sortable_headers'));
134
+ add_filter('manage_posts_custom_column', array(&$this,'admin_column_rows'),10,3);
135
+ add_filter('post_row_actions', array(&$this,'sidebar_row_actions'),10,2);
136
+ add_filter('post_updated_messages', array(&$this,'sidebar_updated_messages'));
137
+
138
+ add_action('wp_ajax_cas_add_rule', array(&$this,'add_sidebar_rule_ajax'));
139
+ add_action('wp_ajax_cas_remove_group', array(&$this,'remove_sidebar_group_ajax'));
140
+
141
+ //For frontend
142
  } else {
143
+
144
+
145
+
146
  }
147
+ add_action('sidebars_widgets', array(&$this,'replace_sidebar'));
148
+ add_action('wp_head',array(&$this,'sidebar_notify_theme_customizer'));
149
+ //For both
150
+ add_action('init', array(&$this,'deploy_modules'));
151
+ add_action('init', array(&$this,'init_sidebar_type'),99);
152
+ add_action('widgets_init', array(&$this,'create_sidebars'),99);
153
+ add_action('wp_loaded', array(&$this,'update_sidebars'),99);
154
 
155
  }
156
+
157
+ /**
158
+ * Runs is_active_sidebar for sidebars
159
+ * Widget management in Theme Customizer
160
+ * expects this
161
+ * @author Joachim Jensen <jv@intox.dk>
162
+ * @since 2.2
163
+ * @return void
164
+ */
165
+ public function sidebar_notify_theme_customizer() {
166
+ global $wp_customize;
167
+ if(!empty($wp_customize)) {
168
+ $sidebars = $this->get_sidebars();
169
+ if($sidebars) {
170
+ foreach($sidebars as $sidebar) {
171
+ is_active_sidebar(self::SIDEBAR_PREFIX . $sidebar->ID);
172
+ }
173
+ }
174
+ }
175
+ }
176
+
177
+ /**
178
+ * Instantiates and returns class singleton
179
+ * @return ContentAwareSidebars
180
+ */
181
+ public static function instance() {
182
+ if(!self::$_instance) {
183
+ self::$_instance = new self();
184
+ }
185
+ return self::$_instance;
186
+ }
187
 
188
  /**
189
  * Deploy modules
191
  */
192
  public function deploy_modules() {
193
 
194
+ load_plugin_textdomain(self::DOMAIN, false, dirname(plugin_basename(__FILE__)).'/lang/');
195
 
196
+ // List builtin modules
197
  $modules = array(
198
+ 'static' => true,
199
+ 'post_type' => true,
200
+ 'author' => true,
201
+ 'page_template' => true,
202
+ 'taxonomy' => true,
203
+ 'url' => false,
204
+ 'bbpress' => function_exists('bbp_get_version'), // bbPress
205
+ 'bp_member' => defined('BP_VERSION'), // BuddyPress
206
+ 'polylang' => defined('POLYLANG_VERSION'), // Polylang
207
+ 'qtranslate' => defined('QT_SUPPORTED_WP_VERSION'), // qTranslate
208
+ 'transposh' => defined('TRANSPOSH_PLUGIN_VER'), // Transposh Translation Filter
209
+ 'wpml' => class_exists('SitePress') // WPML Multilingual Blog/CMS
210
  );
211
+ //Let developers remove builtin modules or add their own
212
+ $modules = apply_filters('cas-module-pre-deploy',$modules);
213
 
214
  // Forge modules
215
  foreach($modules as $name => $enabled) {
216
+ if($enabled) {
217
+ if(is_bool($enabled) && include('modules/'.$name .'.php')) {
218
+ $class = 'CASModule_'.$name;
219
+ $obj = new $class;
220
+ } else if(class_exists((string)$enabled)) {
221
+ $obj = new $enabled;
222
+ if(!($obj instanceof CASModule)) {
223
+ continue;
224
+ }
225
+ } else {
226
+ continue;
227
+ }
228
+
229
+ $this->modules[$obj->get_id()] = $obj;
230
  }
231
  }
232
 
248
 
249
  // Meta fields
250
  $this->metadata['exposure'] = array(
251
+ 'name' => __('Exposure', self::DOMAIN),
252
+ 'id' => 'exposure',
253
+ 'desc' => '',
254
+ 'val' => 1,
255
+ 'type' => 'select',
256
+ 'list' => array(
257
+ __('Singular', self::DOMAIN),
258
+ __('Singular & Archive', self::DOMAIN),
259
+ __('Archive', self::DOMAIN)
260
  )
261
  );
262
  $this->metadata['handle'] = array(
263
+ 'name' => _x('Handle','option', self::DOMAIN),
264
+ 'id' => 'handle',
265
+ 'desc' => __('Replace host sidebar, merge with it or add sidebar manually.', self::DOMAIN),
266
+ 'val' => 0,
267
+ 'type' => 'select',
268
+ 'list' => array(
269
+ 0 => __('Replace', self::DOMAIN),
270
+ 1 => __('Merge', self::DOMAIN),
271
+ 2 => __('Manual', self::DOMAIN),
272
+ 3 => __('Forced replace',self::DOMAIN)
273
  )
274
  );
275
  $this->metadata['host'] = array(
276
+ 'name' => __('Host Sidebar', self::DOMAIN),
277
+ 'id' => 'host',
278
+ 'desc' => '',
279
+ 'val' => 'sidebar-1',
280
+ 'type' => 'select',
281
+ 'list' => $sidebar_list
282
  );
283
  $this->metadata['merge-pos'] = array(
284
+ 'name' => __('Merge position', self::DOMAIN),
285
+ 'id' => 'merge-pos',
286
+ 'desc' => __('Place sidebar on top or bottom of host when merging.', self::DOMAIN),
287
+ 'val' => 1,
288
+ 'type' => 'select',
289
+ 'list' => array(
290
+ __('Top', self::DOMAIN),
291
+ __('Bottom', self::DOMAIN)
292
  )
293
  );
294
 
295
  }
296
 
297
  /**
298
+ * Create sidebar post type and filter group post type
299
  * @return void
300
  */
301
  public function init_sidebar_type() {
302
+
303
+ $capabilities = array(
304
+ 'edit_post' => self::CAPABILITY,
305
+ 'read_post' => self::CAPABILITY,
306
+ 'delete_post' => self::CAPABILITY,
307
+ 'edit_posts' => self::CAPABILITY,
308
+ 'edit_others_posts' => self::CAPABILITY,
309
+ 'publish_posts' => self::CAPABILITY,
310
+ 'read_private_posts' => self::CAPABILITY
311
+ );
312
 
313
  // Register the sidebar type
314
+ register_post_type(self::TYPE_SIDEBAR,array(
315
+ 'labels' => array(
316
+ 'name' => __('Sidebars', self::DOMAIN),
317
+ 'singular_name' => __('Sidebar', self::DOMAIN),
318
+ 'add_new' => _x('Add New', 'sidebar', self::DOMAIN),
319
+ 'add_new_item' => __('Add New Sidebar', self::DOMAIN),
320
+ 'edit_item' => __('Edit Sidebar', self::DOMAIN),
321
+ 'new_item' => __('New Sidebar', self::DOMAIN),
322
+ 'all_items' => __('All Sidebars', self::DOMAIN),
323
+ 'view_item' => __('View Sidebar', self::DOMAIN),
324
+ 'search_items' => __('Search Sidebars', self::DOMAIN),
325
+ 'not_found' => __('No sidebars found', self::DOMAIN),
326
+ 'not_found_in_trash' => __('No sidebars found in Trash', self::DOMAIN)
327
  ),
328
+ 'capabilities' => $capabilities,
329
+ 'show_ui' => true,
330
+ 'show_in_menu' => true, //current_user_can(self::CAPABILITY),
331
+ 'query_var' => false,
332
+ 'rewrite' => false,
333
+ 'menu_position' => 25.099, //less probable to be overwritten
334
+ 'supports' => array('title','page-attributes'),
335
+ 'menu_icon' => plugins_url('/img/icon-16.png', __FILE__ )
336
+ ));
337
+
338
+ // Register the condition group type
339
+ register_post_type(self::TYPE_CONDITION_GROUP,array(
340
+ 'labels' => array(
341
+ 'name' => __('Condition Groups', self::DOMAIN),
342
+ 'singular_name' => __('Condition Group', self::DOMAIN),
343
+ 'add_new' => _x('Add New', 'group', self::DOMAIN),
344
+ 'add_new_item' => __('Add New Group', self::DOMAIN),
345
+ 'edit_item' => _x('Edit', 'group', self::DOMAIN),
346
+ 'new_item' => '',
347
+ 'all_items' => '',
348
+ 'view_item' => '',
349
+ 'search_items' => '',
350
+ 'not_found' => '',
351
+ 'not_found_in_trash' => ''
352
  ),
353
+ 'capabilities' => $capabilities,
354
+ 'show_ui' => false,
355
+ 'show_in_menu' => false,
356
+ 'query_var' => false,
357
+ 'rewrite' => false,
358
+ 'supports' => array('author'), //prevents fallback
 
359
  ));
360
  }
361
 
366
  * @return array
367
  */
368
  public function sidebar_updated_messages( $messages ) {
369
+ $messages[self::TYPE_SIDEBAR] = array(
 
370
  0 => '',
371
+ 1 => __('Sidebar updated.',self::DOMAIN).sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets',self::DOMAIN)),
372
  2 => '',
373
  3 => '',
374
+ 4 => __('Sidebar updated.',self::DOMAIN),
375
  5 => '',
376
+ 6 => __('Sidebar published.',self::DOMAIN).sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets',self::DOMAIN)),
377
+ 7 => __('Sidebar saved.',self::DOMAIN),
378
+ 8 => __('Sidebar submitted.',self::DOMAIN).sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets',self::DOMAIN)),
379
+ 9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>.',self::DOMAIN).' <a href="%2$s">%3$s</a>',
380
+ // translators: Publish box date format, see http://php.net/date
381
+ date_i18n(__('M j, Y @ G:i'),strtotime(get_the_ID())),
382
+ 'widgets.php',
383
+ __('Manage widgets',self::DOMAIN)),
384
+ 10 => __('Sidebar draft updated.',self::DOMAIN),
385
  );
386
  return $messages;
387
  }
388
+
389
  /**
390
  * Add sidebars to widgets area
391
+ * Triggered in widgets_init to save location for each theme
392
+ * @return void
393
  */
394
  public function create_sidebars() {
395
+ $this->sidebars = get_posts(array(
396
+ 'numberposts' => -1,
397
+ 'post_type' => self::TYPE_SIDEBAR,
398
+ 'post_status' => array('publish','private','future')
 
 
399
  ));
400
 
401
  //Register sidebars to add them to the list
402
+ foreach($this->sidebars as $post) {
403
  register_sidebar( array(
404
+ 'name' => $post->post_title,
405
+ 'id' => self::SIDEBAR_PREFIX.$post->ID
406
  ));
407
  }
408
+ }
409
+
410
+ /**
411
+ * Update the created sidebars with metadata
412
+ * @return void
413
+ */
414
+ public function update_sidebars() {
415
 
416
  //Init metadata
417
  $this->_init_metadata();
418
 
419
  //Now reregister sidebars with proper content
420
+ foreach($this->sidebars as $post) {
421
+
422
+ $handle = get_post_meta($post->ID,self::PREFIX . 'handle', true);
423
+ //$handle = $post->{self::PREFIX . 'handle'};
424
+ if(!isset($this->metadata['handle']['list'][$handle])) {
425
+ continue;
426
+ }
427
 
 
428
  $desc = $this->metadata['handle']['list'][$handle];
429
 
430
+ if ($handle != 2) {
431
+ $host = get_post_meta($post->ID, self::PREFIX . 'host', true);
432
+ $desc .= ": " . (isset($this->metadata['host']['list'][$host]) ? $this->metadata['host']['list'][$host] : __('Please update Host Sidebar', self::DOMAIN) );
433
  }
434
  register_sidebar( array(
435
+ 'name' => $post->post_title,
436
+ 'description' => $desc,
437
+ 'id' => self::SIDEBAR_PREFIX.$post->ID,
438
+ 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
439
+ 'after_widget' => '</li>',
440
+ 'before_title' => '<h3 class="widget-title">',
441
+ 'after_title' => '</h3>',
442
  ));
443
  }
444
  }
451
  public function admin_column_headers($columns) {
452
  // Totally discard current columns and rebuild
453
  return array(
454
+ 'cb' => $columns['cb'],
455
+ 'title' => $columns['title'],
456
+ 'exposure' => __('Exposure', self::DOMAIN),
457
+ 'handle' => _x('Handle','option', self::DOMAIN),
458
+ 'merge-pos' => __('Merge position', self::DOMAIN),
459
+ 'date' => $columns['date']
460
  );
461
  }
462
 
468
  public function admin_column_sortable_headers($columns) {
469
  return array_merge(
470
  array(
471
+ 'exposure' => 'exposure',
472
+ 'handle' => 'handle',
473
+ 'merge-pos' => 'merge-pos'
474
  ), $columns
475
  );
476
  }
483
  public function admin_column_orderby($vars) {
484
  if (isset($vars['orderby']) && in_array($vars['orderby'], array('exposure', 'handle', 'merge-pos'))) {
485
  $vars = array_merge($vars, array(
486
+ 'meta_key' => self::PREFIX . $vars['orderby'],
487
+ 'orderby' => 'meta_value'
488
  ));
489
  }
490
  return $vars;
498
  */
499
  public function admin_column_rows($column_name, $post_id) {
500
 
501
+ if (get_post_type($post_id) != self::TYPE_SIDEBAR)
502
  return;
503
 
504
  // Load metadata
505
  if (!$this->metadata)
506
  $this->_init_metadata();
507
 
508
+ $current = get_post_meta($post_id, self::PREFIX . $column_name, true);
509
+ $current_from_list = "";
510
+
511
+ if(isset($this->metadata[$column_name]['list'][$current])) {
512
+
513
+ $current_from_list = $this->metadata[$column_name]['list'][$current];
514
+
515
+ if ($column_name == 'handle' && $current != 2) {
516
+ $host = get_post_meta($post_id, self::PREFIX . 'host', true);
517
+ $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>');
518
+ }
519
 
 
 
 
520
  }
521
+
522
  echo $current_from_list;
523
  }
524
 
530
  public function remove_sidebar_widgets($post_id) {
531
 
532
  // Authenticate and only continue on sidebar post type
533
+ if (!current_user_can(self::CAPABILITY) || get_post_type($post_id) != self::TYPE_SIDEBAR)
534
  return;
535
 
536
+ $id = self::SIDEBAR_PREFIX . $post_id;
537
 
538
  //Get widgets
539
  $sidebars_widgets = wp_get_sidebars_widgets();
557
  unset($sidebars_widgets[$id]);
558
  wp_set_sidebars_widgets($sidebars_widgets);
559
  }
560
+
561
+ /**
562
+ * Delete condition groups for
563
+ * a sidebar that is deleted
564
+ * @author Joachim Jensen <jv@intox.dk>
565
+ * @since 2.0
566
+ * @param int $post_id
567
+ * @return void
568
+ */
569
+ public function cascade_sidebar_delete($post_id) {
570
+
571
+ // Authenticate and only continue on sidebar post type
572
+ if (!current_user_can(self::CAPABILITY) || get_post_type($post_id) != self::TYPE_SIDEBAR)
573
+ return;
574
+
575
+ global $wpdb;
576
+ $groups = (array)$wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = '%d'", $post_id));
577
+ foreach($groups as $group_id) {
578
+ //Takes care of metadata and terms too
579
+ wp_delete_post($group_id,true);
580
+ }
581
+
582
+ }
583
 
584
  /**
585
  * Add admin rows actions
586
+ * @param array $actions
587
+ * @param WP_Post $post
588
+ * @return array
589
  */
590
  public function sidebar_row_actions($actions, $post) {
591
+ if ($post->post_type == self::TYPE_SIDEBAR && $post->post_status != 'trash') {
592
+ $new_actions['mng_widgets'] = '<a href="widgets.php" title="' . esc_attr__('Manage Widgets', self::DOMAIN) . '">' . __('Manage Widgets', self::DOMAIN) . '</a>';
593
+ //Append new actions just before trash action
594
+ array_splice($actions, -1, 0, $new_actions);
 
 
 
 
 
 
595
  }
596
  return $actions;
597
  }
598
 
599
  /**
600
  * Replace or merge a sidebar with content aware sidebars.
601
+ * @author Joachim Jensen <jv@intox.dk>
602
+ * @since .
603
+ * @param array $sidebars_widgets
604
+ * @return array
605
  */
606
+ public function replace_sidebar($sidebars_widgets) {
 
607
 
608
  $posts = $this->get_sidebars();
609
  if (!$posts)
610
+ return $sidebars_widgets;
611
 
612
  foreach ($posts as $post) {
613
 
614
+ $id = self::SIDEBAR_PREFIX . $post->ID;
615
+ $host = get_post_meta($post->ID, self::PREFIX . 'host', true);
 
 
 
 
 
 
 
 
 
616
 
617
  // Check for correct handling and if host exist
618
+ if ($post->handle == 2 || !isset($sidebars_widgets[$host]))
619
  continue;
620
 
621
  // Sidebar might not have any widgets. Get it anyway!
622
+ if (!isset($sidebars_widgets[$id]))
623
+ $sidebars_widgets[$id] = array();
624
 
625
+ // If handle is merge or if handle is replace and host has already been replaced
626
+ if ($post->handle == 1 || ($post->handle == 0 && isset($handled_already[$host]))) {
627
+ if (get_post_meta($post->ID, self::PREFIX . 'merge-pos', true))
628
+ $sidebars_widgets[$host] = array_merge($sidebars_widgets[$host], $sidebars_widgets[$id]);
629
  else
630
+ $sidebars_widgets[$host] = array_merge($sidebars_widgets[$id], $sidebars_widgets[$host]);
631
  } else {
632
+ $sidebars_widgets[$host] = $sidebars_widgets[$id];
633
  $handled_already[$host] = 1;
634
  }
635
+
636
  }
637
+ return $sidebars_widgets;
638
  }
639
 
640
  /**
649
  // Grab args or defaults
650
  $args = wp_parse_args($args, array(
651
  'include' => '',
652
+ 'before' => '<div id="sidebar" class="widget-area"><ul class="xoxo">',
653
+ 'after' => '</ul></div>'
654
  ));
655
  extract($args, EXTR_SKIP);
656
 
670
  $i = $host = 0;
671
  foreach ($posts as $post) {
672
 
673
+ $id = self::SIDEBAR_PREFIX . $post->ID;
674
 
675
  // Check for manual handling, if sidebar exists and if id should be included
676
  if ($post->handle != 2 || !isset($_wp_sidebars_widgets[$id]) || (!empty($include) && !isset($include[$post->ID])))
678
 
679
  // Merge if more than one. First one is host.
680
  if ($i > 0) {
681
+ if (get_post_meta($post->ID, self::PREFIX . 'merge-pos', true))
682
  $_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host], $_wp_sidebars_widgets[$id]);
683
  else
684
  $_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id], $_wp_sidebars_widgets[$host]);
713
  else
714
  return $this->sidebar_cache;
715
  }
716
+
717
+ $context_data['WHERE'] = $context_data['JOIN'] = $context_data['EXCLUDE'] = array();
718
+ $context_data = apply_filters('cas-context-data',$context_data);
719
+
 
 
 
 
 
 
 
 
 
 
720
  // Check if there are any rules for this type of content
721
+ if(empty($context_data['WHERE']))
722
  return false;
723
 
724
+ $context_data['WHERE'][] = "posts.post_type = '".self::TYPE_CONDITION_GROUP."'";
725
+ $context_data['WHERE'][] = "posts.post_status ".(current_user_can('read_private_posts') ? "IN('publish','private')" : "= 'publish'")."";
726
+
727
+ //Syntax changed in MySQL 5.6
728
+ $wpdb->query('SET'.(version_compare($wpdb->db_version(), '5.6', '>=') ? '' : ' OPTION').' SQL_BIG_SELECTS = 1');
729
+
730
+ $sidebars_in_context = $wpdb->get_results("
731
  SELECT
732
+ posts.ID, posts.post_parent
 
733
  FROM $wpdb->posts posts
734
+ ".implode(' ',$context_data['JOIN'])."
 
 
 
 
 
 
735
  WHERE
736
+ ".implode(' AND ',$context_data['WHERE'])."
737
+ ",OBJECT_K);
738
+
739
+ $valid = array();
740
+
741
+ //Force update of meta cache to prevent lazy loading
742
+ update_meta_cache('post',array_keys($sidebars_in_context));
743
+
744
+ //Exclude sidebars that have unrelated content in same group
745
+ foreach($sidebars_in_context as $key => $sidebar) {
746
+ $valid[$sidebar->ID] = $sidebar->post_parent;
747
+ //TODO: move to modules
748
+ foreach($context_data['EXCLUDE'] as $exclude) {
749
+ //quick fix to check for taxonomies terms
750
+ if($exclude == 'taxonomies') {
751
+ if($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE object_id = '{$sidebar->ID}'") > 0) {
752
+ unset($valid[$sidebar->ID]);
753
+ break;
754
+ }
755
+ }
756
+ if(get_post_custom_values(self::PREFIX . $exclude, $sidebar->ID) !== null) {
757
+ unset($valid[$sidebar->ID]);
758
+ break;
759
+ }
760
+ }
761
+
762
+ }
763
+
764
+ if(!empty($valid)) {
765
+
766
+ $context_data = array();
767
+ $context_data['JOIN'][] = "INNER JOIN $wpdb->postmeta handle ON handle.post_id = posts.ID AND handle.meta_key = '".self::PREFIX."handle'";
768
+ $context_data['JOIN'][] = "INNER JOIN $wpdb->postmeta exposure ON exposure.post_id = posts.ID AND exposure.meta_key = '".self::PREFIX."exposure'";
769
+ $context_data['WHERE'][] = "posts.post_type = '".self::TYPE_SIDEBAR."'";
770
+ $context_data['WHERE'][] = "exposure.meta_value ".(is_archive() || is_home() ? '>' : '<')."= '1'";
771
+ $context_data['WHERE'][] = "posts.post_status ".(current_user_can('read_private_posts') ? "IN('publish','private')" : "= 'publish'")."";
772
+ $context_data['WHERE'][] = "posts.ID IN(".implode(',',$valid).")";
773
+
774
+ $this->sidebar_cache = $wpdb->get_results("
775
+ SELECT
776
+ posts.ID,
777
+ handle.meta_value handle
778
+ FROM $wpdb->posts posts
779
+ ".implode(' ',$context_data['JOIN'])."
780
+ WHERE
781
+ ".implode(' AND ',$context_data['WHERE'])."
782
+ ORDER BY posts.menu_order ASC, handle.meta_value DESC, posts.post_date DESC
783
+ ");
784
+
785
+ }
786
 
787
  // Return proper cache. If query was empty, tell the cache.
788
  return (empty($this->sidebar_cache) ? $this->sidebar_cache[0] = false : $this->sidebar_cache);
799
  $screen = get_current_screen();
800
 
801
  // Post type not set on all pages in WP3.1
802
+ if(!(isset($screen->post_type) && $screen->post_type == self::TYPE_SIDEBAR && $screen->base == 'post'))
803
  return;
804
 
805
  // Names of whitelisted meta boxes
806
  $whitelist = array(
807
+ 'cas-support' => 'cas-support',
808
+ 'cas-groups' => 'cas-groups',
809
+ 'cas-rules' => 'cas-rules',
810
+ 'cas-options' => 'cas-options',
811
+ 'submitdiv' => 'submitdiv',
812
+ 'pageparentdiv' => 'pageparentdiv',
813
+ 'slugdiv' => 'slugdiv'
814
  );
815
 
816
  // Loop through context (normal,advanced,side)
817
+ foreach($wp_meta_boxes[self::TYPE_SIDEBAR] as $context_k => $context_v) {
818
  // Loop through priority (high,core,default,low)
819
  foreach($context_v as $priority_k => $priority_v) {
820
  // Loop through boxes
821
  foreach($priority_v as $box_k => $box_v) {
822
  // If box is not whitelisted, remove it
823
+ if(!isset($whitelist[$box_k])) {
824
+ $wp_meta_boxes[self::TYPE_SIDEBAR][$context_k][$priority_k][$box_k] = false;
825
  //unset($whitelist[$box_k]);
826
  }
827
  }
835
  * @return void
836
  */
837
  public function create_meta_boxes() {
838
+
 
839
  // Remove ability to set self to host
840
+ if(get_the_ID())
841
+ unset($this->metadata['host']['list'][self::SIDEBAR_PREFIX.get_the_ID()]);
 
 
 
 
 
 
 
 
 
 
 
842
 
843
+ $boxes = array(
844
+ //About
845
+ array(
846
+ 'id' => 'cas-support',
847
+ 'title' => __('Support the Author of Content Aware Sidebars', self::DOMAIN),
848
+ 'callback' => 'meta_box_author_words',
849
+ 'context' => 'normal',
850
+ 'priority' => 'high'
851
+ ),
852
+ //Content
853
+ array(
854
+ 'id' => 'cas-rules',
855
+ 'title' => __('Content', self::DOMAIN),
856
+ 'callback' => 'meta_box_rules',
857
+ 'context' => 'normal',
858
+ 'priority' => 'high'
859
+ ),
860
+ //Options
861
+ array(
862
+ 'id' => 'cas-options',
863
+ 'title' => __('Options', self::DOMAIN),
864
+ 'callback' => 'meta_box_options',
865
+ 'context' => 'side',
866
+ 'priority' => 'default'
867
+ ),
868
  );
869
 
870
+ //Add meta boxes
871
+ foreach($boxes as $box) {
872
+ add_meta_box(
873
+ $box['id'],
874
+ $box['title'],
875
+ array(&$this, $box['callback']),
876
+ self::TYPE_SIDEBAR,
877
+ $box['context'],
878
+ $box['priority']
879
+ );
880
+ }
881
+
882
  }
883
 
884
  /**
889
  */
890
  public function change_default_hidden($hidden, $screen) {
891
 
892
+ if ($screen->post_type == self::TYPE_SIDEBAR && get_user_option('metaboxhidden_sidebar') === false) {
 
 
 
 
 
 
 
893
 
894
  $hidden_meta_boxes = array('pageparentdiv');
895
  $hidden = array_merge($hidden, $hidden_meta_boxes);
899
  }
900
  return $hidden;
901
  }
902
+
903
  /**
904
  * Meta box for content rules
905
  * @return void
906
  */
907
  public function meta_box_rules() {
908
+
909
+ $groups = $this->_get_sidebar_groups(null,false);
910
+
911
+ echo '<div id="cas-container">'."\n";
912
+ echo '<div id="cas-accordion" class="accordion-container postbox">'."\n";
913
+ echo '<ul class="outer-border">';
914
+ do_action('cas-module-admin-box');
915
+ echo '</ul>';
916
+ echo '</div>'."\n";
917
+ echo '<div id="cas-groups" class="postbox'.(empty($groups) ? '' : ' cas-has-groups').'">'."\n";
918
+ 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>';
919
+ 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>';
920
+ echo '<h4>'.__('Display sidebar with',self::DOMAIN).':</h4>';
921
+
922
+ $i = 0;
923
+
924
+ echo '<ul>';
925
+ echo '<li class="cas-no-groups">'.__('No content. Please add at least one condition group to make the sidebar content aware.',self::DOMAIN).'</li>';
926
+ foreach($groups as $group) {
927
+
928
+ echo '<li class="cas-group-single'.($i == 0 ? ' cas-group-active' : '').'">
929
+ <span class="cas-group-control cas-group-control-active">
930
+ <input type="button" class="button js-cas-group-save" value="'.__('Save',self::DOMAIN).'" /> | <a class="js-cas-group-cancel" href="#">'.__('Cancel',self::DOMAIN).'</a>
931
+ </span>
932
+ <span class="cas-group-control">
933
+ <a class="js-cas-group-edit" href="#">'._x('Edit','group',self::DOMAIN).'</a> | <a class="submitdelete js-cas-group-remove" href="#">'.__('Remove',self::DOMAIN).'</a>
934
+ </span>
935
+ <div class="cas-content">';
936
+ do_action('cas-module-print-data',$group->ID);
937
+ echo '</div>
938
+ <input type="hidden" class="cas_group_id" name="cas_group_id" value="'.$group->ID.'" />';
939
+
940
+ echo '</li>';
941
+ $i++;
942
  }
943
+ echo '</ul>';
944
+
945
+
946
+ echo '</div>';
947
+ echo '<div class="cas-groups-footer">';
948
+ echo '<input type="button" class="button button-primary js-cas-group-new" value="'.__('Add New Group',self::DOMAIN).'" />';
949
+ echo '</div>';
950
+ echo '</div>'."\n";
951
  echo '</div>'."\n";
952
 
953
  }
954
+
955
+ /**
956
+ * Insert new condition group for sidebar
957
+ * Uses current sidebar per default
958
+ * @author Joachim Jensen <jv@intox.dk>
959
+ * @since 2.0
960
+ * @param WP_Post|int $post
961
+ * @return int
962
+ */
963
+ private function _add_sidebar_group($post_id = null) {
964
+ $post = get_post($post_id);
965
+
966
+ $status = $post->post_status;
967
+ //Make sure to go from auto-draft to draft
968
+ if($status == 'auto-draft') {
969
+ $status = 'draft';
970
+ wp_update_post( array(
971
+ 'ID' => $post->ID,
972
+ 'post_status' => $status
973
+ ));
974
+ }
975
+
976
+ return wp_insert_post(array(
977
+ 'post_status' => $status,
978
+ 'post_type' => self::TYPE_CONDITION_GROUP,
979
+ 'post_author' => $post->post_author,
980
+ 'post_parent' => $post->ID,
981
+ ));
982
+ }
983
+
984
+ /**
985
+ * Get condition groups for sidebar
986
+ * Uses current sidebar per default
987
+ * Creates the first group if necessary
988
+ * @author Joachim Jensen <jv@intox.dk>
989
+ * @since 2.0
990
+ * @param WP_Post|int $post_id
991
+ * @param boolean $create_first
992
+ * @return array
993
+ */
994
+ private function _get_sidebar_groups($post_id = null, $create_first = false) {
995
+ $post = get_post($post_id);
996
+
997
+ $groups = get_posts(array(
998
+ 'posts_per_page' => -1,
999
+ 'post_type' => self::TYPE_CONDITION_GROUP,
1000
+ 'post_parent' => $post->ID,
1001
+ 'post_status' => 'any',
1002
+ 'order' => 'ASC'
1003
+ ));
1004
+ if($groups == null && $create_first) {
1005
+ $group = $this->_add_sidebar_group($post);
1006
+ $groups[] = get_post($group);
1007
+ }
1008
+
1009
+ return $groups;
1010
+
1011
+ }
1012
+
1013
+ /**
1014
+ * AJAX call to add filters to a group
1015
+ * @author Joachim Jensen <jv@intox.dk>
1016
+ * @since 2.0
1017
+ * @return void
1018
+ */
1019
+ public function add_sidebar_rule_ajax() {
1020
+
1021
+ try {
1022
+ if(!isset($_POST['current_id'])) {
1023
+ _e('Unauthorized request',self::DOMAIN);
1024
+ throw new Exception("Forbidden",403);
1025
+ }
1026
+
1027
+ if(!check_ajax_referer(self::SIDEBAR_PREFIX.$_POST['current_id'],'token',false)) {
1028
+ _e('Unauthorized request',self::DOMAIN);
1029
+ throw new Exception("Forbidden",403);
1030
+ }
1031
+
1032
+ $response = array();
1033
+
1034
+ //Make sure some rules are sent
1035
+ if(!isset($_POST['cas_condition'])) {
1036
+ _e('Condition group cannot be empty',self::DOMAIN);
1037
+ throw new Exception("Internal Server Error",500);
1038
+ }
1039
+
1040
+ //If ID was not sent at this point, it is a new group
1041
+ if(!isset($_POST['cas_group_id'])) {
1042
+ $post_id = $this->_add_sidebar_group(intval($_POST['current_id']));
1043
+ $response['new_post_id'] = $post_id;
1044
+ } else {
1045
+ $post_id = intval($_POST['cas_group_id']);
1046
+ }
1047
+
1048
+ do_action('cas-module-save-data',$post_id);
1049
+
1050
+ $response['message'] = __('Condition group saved',self::DOMAIN);
1051
+
1052
+ echo json_encode($response);
1053
+
1054
+ } catch(Exception $e) {
1055
+ header("HTTP/1.1 ".$e->getCode()." ".$e->getMessage());
1056
+ }
1057
+ die();
1058
+ }
1059
+
1060
+ /**
1061
+ * AJAX call to remove group from a sidebar
1062
+ * @author Joachim Jensen <jv@intox.dk>
1063
+ * @since 2.0
1064
+ * @return void
1065
+ */
1066
+ public function remove_sidebar_group_ajax() {
1067
+
1068
+ try {
1069
+ if(!isset($_POST['current_id'],$_POST['cas_group_id'])) {
1070
+ _e('Unauthorized request',self::DOMAIN);
1071
+ throw new Exception("Forbidden",403);
1072
+ }
1073
+
1074
+ if(!check_ajax_referer(self::SIDEBAR_PREFIX.$_POST['current_id'],'token',false)) {
1075
+ _e('Unauthorized request',self::DOMAIN);
1076
+ throw new Exception("Forbidden",403);
1077
+ }
1078
+
1079
+ if(wp_delete_post(intval($_POST['cas_group_id']), true) === false) {
1080
+ _e('Condition group could not be removed',self::DOMAIN);
1081
+ throw new Exception("Internal Server Error",500);
1082
+ }
1083
+
1084
+ echo json_encode(array(
1085
+ 'message' => __('Condition group removed',self::DOMAIN)
1086
+ ));
1087
+
1088
+ } catch(Exception $e) {
1089
+ header("HTTP/1.1 ".$e->getCode()." ".$e->getMessage());
1090
+ }
1091
+ die();
1092
+ }
1093
+
1094
+ /**
1095
+ * Whenever a sidebar changes post_status
1096
+ * Cascade that status to its groups
1097
+ * @author Joachim Jensen <jv@intox.dk>
1098
+ * @since 2.0
1099
+ * @param string $new_status
1100
+ * @param string $old_status
1101
+ * @param WP_Post $post
1102
+ * @return void
1103
+ */
1104
+ public function cascade_sidebar_status($new_status, $old_status, $post) {
1105
+ if($post->post_type == self::TYPE_SIDEBAR && $old_status != $new_status) {
1106
+ global $wpdb;
1107
+ $wpdb->query("
1108
+ UPDATE $wpdb->posts
1109
+ SET post_status = '".$new_status."'
1110
+ WHERE post_parent = '".$post->ID."' AND post_type = '".self::TYPE_CONDITION_GROUP."'
1111
+ ");
1112
+ }
1113
+ }
1114
 
1115
  /**
1116
  * Meta box for options
1142
  */
1143
  public function meta_box_author_words() {
1144
 
1145
+ // Use nonce for verification. Unique per sidebar
1146
+ wp_nonce_field(self::SIDEBAR_PREFIX.get_the_ID(), '_ca-sidebar-nonce');
1147
+ echo '<input type="hidden" id="current_sidebar" value="'.get_the_ID().'" />';
1148
  ?>
1149
+ <div style="overflow:hidden;">
1150
+ <div style="float:left;width:40%;overflow:hidden">
1151
+ <p><strong><?php _e('If you love this plugin, please consider donating to support future development.', self::DOMAIN); ?></strong></p>
1152
+ <p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=KPZHE6A72LEN4&amp;lc=US&amp;item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"
1153
+ target="_blank" title="PayPal - The safer, easier way to pay online!">
1154
+ <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!">
1155
+ </a>
1156
+
1157
+ </p>
1158
+ </div>
1159
+ <div style="float:left;width:40%;border-left:#ebebeb 1px solid;border-right:#ebebeb 1px solid;box-sizing:border-box;-moz-box-sizing:border-box;">
1160
+ <p><strong><?php _e('Or you could:',self::DOMAIN); ?></strong></p>
1161
+ <ul>
1162
+ <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>
1163
+ <li><a href="http://wordpress.org/extend/plugins/content-aware-sidebars/" target="_blank"><?php _e('Link to the plugin page',self::DOMAIN); ?></a></li>
1164
+ <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>
1165
+ </ul>
 
1166
  </div>
1167
+ <div style="float:left;width:20%;">
1168
+ <p><a href="https://twitter.com/intoxstudio" class="twitter-follow-button" data-show-count="false">Follow @intoxstudio</a>
1169
+ <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>
1170
+ <p>
1171
+ <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fintoxstudio&amp;width=450&amp;height=21&amp;colorscheme=light&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;send=false&amp;appId=436031373100972" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
1172
+ </p>
1173
+ </div>
1174
+ </div>
1175
  <?php
1176
  }
1177
 
1182
  * @return void
1183
  */
1184
  private function _form_field($setting) {
 
1185
 
1186
+ $meta = get_post_meta(get_the_ID(), self::PREFIX . $setting, true);
1187
  $setting = $this->metadata[$setting];
1188
  $current = $meta != '' ? $meta : $setting['val'];
1189
  switch ($setting['type']) {
1220
  return;
1221
 
1222
  // Only sidebar type
1223
+ if (get_post_type($post_id) != self::TYPE_SIDEBAR)
1224
  return;
1225
 
1226
  // Verify nonce
1227
+ if (!check_admin_referer(self::SIDEBAR_PREFIX.$post_id, '_ca-sidebar-nonce'))
1228
  return;
1229
 
1230
  // Check permissions
1231
+ if (!current_user_can(self::CAPABILITY, $post_id))
1232
  return;
1233
 
1234
  // Check autosave
1241
  // Update metadata
1242
  foreach ($this->metadata as $field) {
1243
  $new = isset($_POST[$field['id']]) ? $_POST[$field['id']] : '';
1244
+ $old = get_post_meta($post_id, self::PREFIX . $field['id'], true);
1245
 
1246
  if ($new != '' && $new != $old) {
1247
+ update_post_meta($post_id, self::PREFIX . $field['id'], $new);
1248
  } elseif ($new == '' && $old != '') {
1249
+ delete_post_meta($post_id, self::PREFIX . $field['id'], $old);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1250
  }
1251
  }
1252
  }
1256
  * @return void
1257
  */
1258
  public function db_update() {
1259
+ cas_run_db_update(self::DB_VERSION);
1260
  }
1261
 
1262
  /**
1266
  */
1267
  public function load_admin_scripts($hook) {
1268
 
1269
+ $current_screen = get_current_screen();
 
1270
 
1271
+ if($current_screen->post_type == self::TYPE_SIDEBAR) {
1272
+
1273
+ wp_register_script('cas_admin_script', plugins_url('/js/cas_admin.js', __FILE__), array('jquery'), self::PLUGIN_VERSION, true);
1274
+ wp_register_style('cas_admin_style', plugins_url('/css/style.css', __FILE__), array(), self::PLUGIN_VERSION);
 
 
 
 
 
 
 
 
1275
 
1276
+ //Sidebar editor
1277
+ if ($current_screen->base == 'post') {
1278
+
1279
+ if(!wp_script_is('accordion','registered')) {
1280
+ wp_register_script('accordion', plugins_url('/js/accordion.min.js', __FILE__), array('jquery'), self::PLUGIN_VERSION, true);
1281
+ }
1282
+ wp_enqueue_script('accordion');
1283
+ wp_enqueue_script('cas_admin_script');
1284
+ wp_localize_script( 'cas_admin_script', 'CASAdmin', array(
1285
+ 'save' => __('Save',self::DOMAIN),
1286
+ 'cancel' => __('Cancel',self::DOMAIN),
1287
+ 'edit' => _x('Edit','group',self::DOMAIN),
1288
+ 'remove' => __('Remove',self::DOMAIN),
1289
+ 'confirmRemove' => __('Remove this group and its contents permanently?',self::DOMAIN),
1290
+ 'noResults' => __('No results found.',self::DOMAIN),
1291
+ 'confirmCancel' => __('The current group has unsaved changes. Do you want to continue and discard these changes?', self::DOMAIN)
1292
+ ));
1293
+ wp_enqueue_style('cas_admin_style');
1294
+ //Sidebar overview
1295
+ } else if ($hook == 'edit.php') {
1296
+ wp_enqueue_style('cas_admin_style');
1297
+ }
1298
  }
1299
+
1300
  }
1301
 
1302
  /**
1304
  * @return void
1305
  */
1306
  private function _load_dependencies() {
1307
+ $path = plugin_dir_path( __FILE__ );
1308
+ require($path.'/walker.php');
1309
+ require($path.'/update_db.php');
1310
+ require($path.'/modules/abstract.php');
 
 
 
 
 
 
 
 
1311
  }
1312
 
 
 
 
 
 
 
 
1313
  }
1314
 
1315
  // Launch plugin
1316
+ ContentAwareSidebars::instance();
 
1317
 
1318
  /**
1319
  * Template wrapper to display content aware sidebars
 
1320
  * @param array|string $args
1321
  * @return void
1322
  */
1323
  function display_ca_sidebar($args = array()) {
1324
+ ContentAwareSidebars::instance()->manual_sidebar($args);
 
1325
  }
1326
+
1327
+ //eol
css/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ /**/
css/style.css CHANGED
@@ -7,66 +7,117 @@
7
  background:transparent url('../img/icon-32.png') no-repeat !important;
8
  }
9
 
10
- #cas-rules, .postbox-container, .meta-box-sortables, #cas-rules .inside, .postbox, #normal-sortables {
11
- height:inherit !important;
12
  }
13
 
14
- #cas-rules .inside {
 
 
 
 
 
 
15
  overflow:hidden;
16
  margin:0;
17
  padding:0;
18
  }
19
 
20
- #cas-accordion > h4 {
21
- border-width:1px 0 !important;
22
- border-style:solid;
23
- border-color:#f9f9f9 #f9f9f9 #dfdfdf !important;
 
 
 
 
 
 
 
24
  margin:0;
25
- background-color:#ececec;
26
- display:block;
27
- outline: none;
28
  }
29
 
30
- #cas-accordion > h4:hover {
31
- background-color:#e4e4e4 !important;
 
 
 
 
 
32
  }
33
 
34
- #cas-accordion > h4 a {
35
- display:block;
36
- height:30px;
37
- line-height:30px;
38
- padding:0 30px;
39
- text-decoration: none;
40
  }
41
 
42
- .cas-rule-content {
43
- border-width:1px 0 !important;
44
- border-style:solid;
45
- border-color:#eee #eee #cfcfcf !important;
46
- padding:10px !important;
47
- background-color:#dfdfdf !important;
48
  }
49
 
50
- #cas-accordion .ui-state-default:last-of-type, .cas-rule-content:last-child {
51
- border-width:1px 0 0 !important;
 
 
 
 
52
  }
53
 
54
- #cas-accordion .ui-state-default.ui-state-active, #cas-accordion .ui-state-active {
55
- border-width:1px 0 !important;
56
- background-color:#dfdfdf;
57
- border-color:#c0c0c0 #fff #cfcfcf !important;
58
- box-shadow:inset 0 2px 1px 0 #cfcfcf;
59
  }
60
 
61
- #cas-accordion .tabs, #cas-accordion .tabs-panel {
62
- background-color:#fff;
63
- border-width:1px;
64
- border-style:solid;
65
- border-color:#ccc;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
- #cas-accordion .tabs {
69
- border-color:#ccc #ccc #fff;
 
 
 
 
 
70
  }
71
 
72
  .cas-tick {
@@ -77,4 +128,168 @@
77
 
78
  .cas-contentlist .children li {
79
  padding-left:20px;
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ border-top:none;
47
  }
48
 
49
+ #cas-accordion.accordion-container .accordion-section:last-child,
50
+ #cas-accordion.accordion-container .accordion-section:last-child .accordion-section-content,
51
+ #cas-accordion.accordion-container .bottom,
52
+ #cas-accordion.accordion-container .bottom:not(.open) h3 {
53
+ border-bottom-left-radius: 3px;
54
+ border-bottom-right-radius: 3px;
55
  }
56
 
57
+ .js #cas-accordion .accordion-section-title {
58
+ cursor: pointer;
59
+ border-radius:0!important;
60
+ box-shadow:none!important;
61
+ border-bottom-width: 0;
 
62
  }
63
 
64
+ #cas-accordion .accordion-section-title {
65
+ padding: 10px 20px;
66
+ margin:0!important;
67
+ overflow:hidden;
68
+ border-left:none;
69
+ border-right:none;
70
  }
71
 
72
+ #cas-accordion .control-section.open .accordion-section-title {
73
+ border-bottom:1px solid #DFDFDF;
 
 
 
74
  }
75
 
76
+ #cas-accordion .accordion-section-content {
77
+ padding: 18px 13px;
78
+ font-size: 13px;
79
+ border-left:none;
80
+ border-right:none;
81
+ }
82
+
83
+ #cas-accordion .accordion-section {
84
+ margin:0;
85
+ border-bottom: 1px solid #DFDFDF;
86
+ }
87
+
88
+ .js #cas-accordion .accordion-section:not(.open) .accordion-section-content {
89
+ display:none;
90
+ }
91
+
92
+ #cas-accordion ul.category-tabs {
93
+ width:auto;
94
+ margin: 20px 0 -1px;
95
+ }
96
+
97
+ #cas-accordion ul.category-tabs li {
98
+ padding: 3px 5px 3px 8px;
99
+ border-style: solid;
100
+ border-width: 1px;
101
+ position: relative;
102
+ display: inline-block;
103
+ line-height: 1.35em;
104
+ margin:0;
105
+ border-color: transparent;
106
+ }
107
+
108
+ #cas-accordion ul.category-tabs li.tabs {
109
+ border-color: #DFDFDF #DFDFDF #FDFDFD;
110
+ border-style: solid;
111
+ border-width: 1px;
112
  }
113
 
114
+ #cas-accordion .tabs-panel {
115
+ overflow:auto;
116
+ clear:both;
117
+ }
118
+
119
+ #cas-accordion .button-controls {
120
+ margin:10px 0 0;
121
  }
122
 
123
  .cas-tick {
128
 
129
  .cas-contentlist .children li {
130
  padding-left:20px;
131
+ }
132
+
133
+ #cas-accordion .button-controls {
134
+ overflow:hidden;
135
+ }
136
+
137
+ .add-to-group {
138
+ float:right;
139
+ }
140
+
141
+ #cas-groups {
142
+ box-sizing:border-box;
143
+ -moz-box-sizing:border-box;
144
+ -webkit-box-sizing:border-box;
145
+ -o-box-sizing:border-box;
146
+ -ms-box-sizing:border-box;
147
+ margin-left:300px;
148
+ }
149
+
150
+ #cas-groups h3 {
151
+ cursor:auto;
152
+ display:inline-block;
153
+ border:none;
154
+ padding:0;
155
+ line-height:2;
156
+ background:none;
157
+ box-shadow: none;
158
+ }
159
+
160
+ .cas-groups-header, .cas-groups-footer {
161
+ background: none repeat scroll 0 0 #F5F5F5;
162
+ padding: 6px 10px;
163
+ overflow:hidden;
164
+ }
165
+
166
+ .cas-groups-header .button, .cas-groups-footer .button {
167
+ float:right;
168
+ }
169
+
170
+ .cas-groups-header {
171
+ border-bottom:1px solid #DFDFDF;
172
+ }
173
+
174
+ .cas-groups-footer {
175
+ border-top:1px solid #DFDFDF;
176
+ }
177
+
178
+ .cas-groups-body {
179
+ padding:8px 10px;
180
+ background-color: #fff;
181
+ }
182
+
183
+ .cas-group-single.cas-group-active {
184
+ border-color:#5B9DD9;
185
+ box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
186
+ }
187
+ /*.cas-group-single.cas-group-active .cas-group-control {
188
+ border-color:#555;
189
+ }*/
190
+
191
+ .cas-group-single {
192
+ -webkit-box-sizing:border-box;
193
+ -moz-box-sizing:border-box;
194
+ -ms-box-sizing:border-box;
195
+ box-sizing:border-box;
196
+ border-width:1px;
197
+ border-style:solid;
198
+ border-color:#cfcfcf;
199
+ padding:4px 10px;
200
+ overflow:hidden;
201
+ position:relative;
202
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
203
+ min-height:45px;
204
+ margin-bottom:10px;
205
+ }
206
+
207
+ .cas-group-single .cas-group-control {
208
+ text-align: right;
209
+ display:inline;
210
+ position:absolute;
211
+ top:0;
212
+ right:0;
213
+ line-height:30px;
214
+ padding:5px 10px;
215
+ background-color:#fafafa;
216
+ border-width:0 0 1px 1px;
217
+ border-style:solid;
218
+ border-color:#cfcfcf;
219
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
220
+ }
221
+ .cas-group-single .cas-group-control a {
222
+ text-decoration: none;
223
+ }
224
+ .cas-group-active .cas-group-control {
225
+ display:none;
226
+ }
227
+
228
+ .cas-group-single .cas-group-control-active {
229
+ display:none;
230
+ }
231
+
232
+ .cas-group-active .cas-group-control-active {
233
+ display:inline;
234
+ }
235
+
236
+ .cas-group-single:not(.cas-group-active) label {
237
+ cursor:auto;
238
+ }
239
+
240
+ .cas-group-single:not(.cas-group-active) input[type="checkbox"] {
241
+ display:none;
242
+ }
243
+
244
+ .cas-group-single .submitdelete {
245
+ color:#BC0B0B;
246
+ }
247
+ .cas-group-single .submitdelete:hover {
248
+ color:#fff;
249
+ background-color:#FF0000;
250
+ }
251
+
252
+ .cas-group-single li {
253
+ list-style: disc inside;
254
+ }
255
+
256
+ .cas-group-single li.cas-new {
257
+ background:#F6F3E4;
258
+ }
259
+
260
+ .cas-group-single.cas-group-active li {
261
+ list-style:none;
262
+ }
263
+
264
+ .cas-condition {
265
+ padding:0 0 5px;
266
+ }
267
+
268
+ #cas-groups.cas-has-groups .cas-no-groups {
269
+ display:none;
270
+ }
271
+ #cas-groups:not(.cas-has-groups) .cas-no-groups {
272
+ display:inline;
273
+ }
274
+
275
+ .cas-alert {
276
+ position:fixed;
277
+ top:23px;
278
+ left:50%;
279
+ }
280
+
281
+ .cas-alert > div {
282
+ padding:5px 30px;
283
+ position: relative;
284
+ left: -50%;
285
+ }
286
+
287
+ @media (max-width: 600px), (min-width:850px) and (max-width:1060px) {
288
+ #cas-accordion {
289
+ float:none;
290
+ width:auto;
291
+ }
292
+ #cas-groups {
293
+ margin:0;
294
+ }
295
+ }
img/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ /**/
index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- /**/
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
@@ -5,118 +5,644 @@
5
 
6
  (function($) {
7
 
8
- $( "#cas-accordion" ).accordion({
9
- header: 'h4',
10
- autoHeight: false,
11
- collapsible: true,
12
- heightStyle: 'content'
13
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- var api = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  init: function() {
18
- this.addTickListener();
19
- this.addSelectAllListener();
 
 
 
 
 
 
 
 
 
 
 
20
  this.addHandleListener();
21
  this.addSearchListener();
 
 
 
 
22
  },
23
 
24
  /**
25
- * Set tickers if at least one checkbox is checked
 
 
 
26
  */
27
- addTickListener: function() {
28
- $('.cas-rule-content :input').each( function() {
29
- api.toggleTick(this);
30
- }).change( function() {
31
- api.toggleTick(this);
 
32
  });
33
  },
34
- toggleTick: function(checkbox) {
35
- //Toggle on any selected checkbox
36
- var parent = $(checkbox).parents('.cas-rule-content');
37
- parent.prev().toggleClass('cas-tick',parent.find('input:checked').length > 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  },
 
39
  /**
40
- * Toggle specific checkboxes depending on "show with all" checkbox
 
 
 
41
  */
42
- addSelectAllListener: function() {
43
- $('.cas-rule-content .cas-chk-all').each( function() {
44
- api.toggleSelectAll(this);
45
- }).change( function() {
46
- api.toggleSelectAll(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  });
48
  },
49
- toggleSelectAll: function(checkbox) {
50
- var parent = $(checkbox).parents('.cas-rule-content');
51
- var checkboxes = $(".cas-rule-content ."+parent.attr("id"));
52
- if($(checkbox).is(":checked")) {
53
- $(checkboxes).attr("disabled", true);
54
- } else {
55
- $(checkboxes).removeAttr("disabled");
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  },
58
  /**
59
  * The value of Handle selection will control the
60
  * accessibility of the host sidebar selection
61
  * If Handling is manual, selection of host sidebar will be disabled
 
 
62
  */
63
  addHandleListener: function() {
64
- $("select[name='handle']").each(function(){
65
- api.toggleHostOption($(this));
66
- }).change(function(){
67
- api.toggleHostOption($(this));
68
- });
69
- },
70
- toggleHostOption: function(handle) {
71
- var name = "select[name='host']";
72
- if(handle.val() == 2) {
73
- $(name).hide().attr("disabled", true);
74
- } else {
75
- $(name).show().removeAttr("disabled");
76
- }
 
77
  },
78
  /**
79
  * Use AJAX to search for content from a specific module
80
  */
81
  addSearchListener: function() {
82
- $('input.cas-autocomplete').each(function(i, el) {
83
- $(el).keypress(function(e){
84
- //If Enter (13) is pressed, disregard
85
- if( 13 == e.which ) {
86
- return false;
87
- }
88
- }).autocomplete({
89
- source: ajaxurl+"?action="+$(el).attr('class').split(' ')[0]+"&nonce="+$('#_ca-sidebar-nonce').val()+"&type="+$(el).attr('id'),
90
- minLength: 2,
91
- delay: 500,
92
- select: function(e,ui) {
93
- api.clickToAddSearchResult(e,ui);
94
- }
95
- });
96
- });
 
 
 
97
 
98
  },
99
- clickToAddSearchResult: function(e, ui) {
100
- // Check if an element is found
101
- if(ui.item != null) {
102
- $("input#cas-add-"+ui.item.id2).click( function() {
103
- // Check if element already exists
104
- if($("#"+ui.item.elem).length == 0) {
105
-
106
- var elem = $('<li id="'+ui.item.elem+'"><label class="selectit"><input class="cas-'+ui.item.module+'-'+ui.item.id+' cas-'+ui.item.id2+'" value="'+ui.item.id+'" type="checkbox" name="'+ui.item.name+'[]" /> '+ui.item.label+'</label>').change( function() {
107
- api.toggleTick(this);
108
- });
 
 
 
109
 
110
- //Add element and clean up
111
- $("#cas-list-"+ui.item.id2).append(elem);
112
- $( "input#cas-autocomplete-"+ui.item.id2 ).val('');
113
- $(this).unbind('click');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
- });
116
- }
117
- }
 
 
 
 
 
 
 
118
  }
119
 
120
- $(document).ready(function(){ api.init(); });
121
 
122
  })(jQuery);
5
 
6
  (function($) {
7
 
8
+ /**
9
+ * Condition group management
10
+ * @author Joachim Jensen <jv@intox.dk>
11
+ * @since 2.0
12
+ */
13
+ function GroupHandler() {
14
+ /**
15
+ * Container element
16
+ * @type {Object}
17
+ */
18
+ this._$groupContainer = $('#cas-groups');
19
+
20
+ /**
21
+ * Current condition group
22
+ * @type {Object}
23
+ */
24
+ this._currentGroup = null;
25
+
26
+ /**
27
+ * CSS class for current group
28
+ * @type {string}
29
+ */
30
+ this._activeClass = 'cas-group-active';
31
 
32
+ /**
33
+ * Add a group to gui
34
+ * @author Joachim Jensen <jv@intox.dk>
35
+ * @since 2.1
36
+ * @param {Object} obj
37
+ */
38
+ this.add = function(obj) {
39
+ var canSet = this.setCurrent(obj);
40
+ if(canSet) {
41
+ cas_alert.dismiss();
42
+ if(!this.hasGroups()) {
43
+ this.getGroupContainer().addClass('cas-has-groups');
44
+ }
45
+ $('ul', this._$groupContainer).first().append(obj);
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Remove a group from gui
51
+ * @author Joachim Jensen <jv@intox.dk>
52
+ * @since 2.1
53
+ * @param {Object} obj
54
+ * @return {void}
55
+ */
56
+ this.remove = function(obj) {
57
+ var that = this;
58
+ obj
59
+ .css('background','red')
60
+ .fadeOut('slow', function() {
61
+ obj.remove();
62
+ if(!that.hasGroups()) {
63
+ that.getGroupContainer().removeClass('cas-has-groups');
64
+ }
65
+ });
66
+ }
67
+
68
+ /**
69
+ * Set a group as current group
70
+ * Will reset former current group
71
+ * @author Joachim Jensen <jv@intox.dk>
72
+ * @since 2.1
73
+ * @param {Object} obj
74
+ * @return {Boolean}
75
+ */
76
+ this.setCurrent = function(obj) {
77
+ var retval = true;
78
+
79
+ if(obj.length == 0) {
80
+ retval = false;
81
+ } else if(this.getCurrent()) {
82
+ retval = this.resetCurrent();
83
+ }
84
+
85
+ if(retval) {
86
+ this._currentGroup = obj;
87
+ this._setActive(true);
88
+ }
89
+
90
+ return retval;
91
+ }
92
+
93
+ /**
94
+ * Reset current group if any
95
+ * Will take care of confirmation on unsaved rules
96
+ * and strip unsaved changes
97
+ * @author Joachim Jensen <jv@intox.dk>
98
+ * @since 2.1
99
+ * @return {Boolean}
100
+ */
101
+ this.resetCurrent = function() {
102
+ var retval = true;
103
+ cas_alert.dismiss();
104
+ if(this.getCurrent()) {
105
+
106
+ if(this.isNewGroup()) {
107
+ var remove = true;
108
+ //Confirm if there are unsaved rules
109
+ if(this.hasUnsavedRules()) {
110
+ remove = confirm(CASAdmin.confirmCancel);
111
+ }
112
+ if(remove) {
113
+ this._setActive(false);
114
+ this.remove(this.getCurrent());
115
+ this._currentGroup = null;
116
+ } else {
117
+ retval = false;
118
+ }
119
+
120
+ } else {
121
+
122
+ var remove = true;
123
+ //Confirm if there are unsaved rules
124
+ if(this.hasUnsavedRules()) {
125
+ remove = confirm(CASAdmin.confirmCancel);
126
+ }
127
+ if(remove) {
128
+ //Remove new content that should not be saved
129
+ $("li.cas-new",this.getCurrent()).remove();
130
+ //Remove conditional headlines
131
+ $(".cas-condition",this.getCurrent()).each( function() {
132
+ if($(this).find('input').length == 0) {
133
+ $(this).remove();
134
+ }
135
+ });
136
+ this._setActive(false);
137
+ this._currentGroup = null;
138
+ } else {
139
+ retval = false;
140
+ }
141
+
142
+
143
+ }
144
+
145
+ }
146
+ return retval;
147
+ }
148
+
149
+ /**
150
+ * Get current group
151
+ * @author Joachim Jensen <jv@intox.dk>
152
+ * @since 2.1
153
+ * @return {Object}
154
+ */
155
+ this.getCurrent = function() {
156
+ return this._currentGroup;
157
+ }
158
+
159
+ /**
160
+ * Determines if current group is a new one
161
+ * I.e. it is not saved to database
162
+ * @author Joachim Jensen <jv@intox.dk>
163
+ * @since 2.1
164
+ * @return {Boolean}
165
+ */
166
+ this.isNewGroup = function() {
167
+ return this.getCurrent().find('.cas_group_id').length == 0;
168
+ }
169
+
170
+ /**
171
+ * Determines if current group has unsaved changes
172
+ * @author Joachim Jensen <jv@intox.dk>
173
+ * @since 2.1
174
+ * @return {Boolean}
175
+ */
176
+ this.hasUnsavedRules = function() {
177
+ return this.getCurrent().find('li.cas-new').length > 0;
178
+ }
179
+
180
+ /**
181
+ * Determines if there are any condition groups
182
+ * @author Joachim Jensen <jv@intox.dk>
183
+ * @since 2.1
184
+ * @return {Boolean}
185
+ */
186
+ this.hasGroups = function() {
187
+ return $('.cas-group-single',this.getGroupContainer()).length > 0;
188
+ }
189
+
190
+ /**
191
+ * Manages CSS class for group and
192
+ * the ability to add and edit rules
193
+ * @author Joachim Jensen <jv@intox.dk>
194
+ * @since 2.1
195
+ * @param {Boolean} active
196
+ */
197
+ this._setActive = function(active) {
198
+ $('.js-cas-condition-add').attr('disabled',!active);
199
+ this.getCurrent().toggleClass(this._activeClass,active);
200
+ var checkboxes = $("input:checkbox",this.getCurrent());
201
+ checkboxes.attr('disabled',!active);
202
+ if(active) {
203
+ checkboxes.attr('checked',true);
204
+ }
205
+ }
206
+
207
+ /**
208
+ * Get condition group container
209
+ * @author Joachim Jensen <jv@intox.dk>
210
+ * @since 2.1
211
+ * @return {Object}
212
+ */
213
+ this.getGroupContainer = function() {
214
+ return this._$groupContainer;
215
+ }
216
+ }
217
+
218
+ /**
219
+ * Alert handler for sidebar editor
220
+ * @type {Object}
221
+ */
222
+ var cas_alert = {
223
+
224
+ /**
225
+ * Message object
226
+ * @type {Object}
227
+ */
228
+ _$message: null,
229
+
230
+ /**
231
+ * Set and print alert message
232
+ * @author Joachim Jensen <jv@intox.dk>
233
+ * @since 2.1
234
+ * @param {string} text
235
+ * @param {string} cssClass
236
+ */
237
+ set: function(text,cssClass) {
238
+ if(this._$message) {
239
+ this._$message.remove();
240
+ }
241
+ this._$message = $('<div class="cas-alert"><div class="'+cssClass+'"><p>'+text+'</p></div></div>');
242
+ this._$message
243
+ .fadeIn('slow')
244
+ .appendTo('body');
245
+ },
246
+
247
+ /**
248
+ * Remove a current alert message
249
+ * @author Joachim Jensen <jv@intox.dk>
250
+ * @since 2.1
251
+ * @return {void}
252
+ */
253
+ dismiss: function() {
254
+ if(this._$message) {
255
+ this._$message.fadeOut('slow',function() {
256
+ $(this).remove();
257
+ });
258
+ }
259
+ }
260
+ }
261
+
262
+ var cas_admin = {
263
+
264
+ groups:new GroupHandler(),
265
+ nonce: $('#_ca-sidebar-nonce').val(),
266
+ sidebarID: $('#current_sidebar').val(),
267
 
268
  init: function() {
269
+
270
+ var new_current_group = $('.cas-group-single',this.groups.getGroupContainer()).first()
271
+ if(new_current_group.length == 0) {
272
+ $('.js-cas-condition-add').attr('disabled',true);
273
+ } else {
274
+ this.groups.setCurrent(new_current_group);
275
+ }
276
+
277
+ this.addPaginationListener();
278
+ this.addTabListener();
279
+ this.addPublishListener();
280
+
281
+ //this.addCheckboxListener();
282
  this.addHandleListener();
283
  this.addSearchListener();
284
+ this.addNewGroupListener();
285
+ this.addSetGroupListener();
286
+ this.addAddContentListener();
287
+
288
  },
289
 
290
  /**
291
+ * Listen to publish click to remind
292
+ * user of unsaved changes
293
+ * @author Joachim Jensen <jv@intox.dk>
294
+ * @since 2.1
295
  */
296
+ addPublishListener: function() {
297
+ $('#publish').click( function(e) {
298
+ var canSave = cas_admin.groups.resetCurrent();
299
+ if(!canSave) {
300
+ e.preventDefault();
301
+ }
302
  });
303
  },
304
+
305
+ /**
306
+ * Listen to pagination for select boxes
307
+ * @author Joachim Jensen <jv@intox.dk>
308
+ * @since 2.1
309
+ */
310
+ addPaginationListener: function() {
311
+ $('.cas-contentlist').on('click','.page-numbers', function(e) {
312
+ e.preventDefault();
313
+
314
+ var link = $(this);
315
+ var action = link.closest('.cas-rule-content');
316
+
317
+ $.ajax({
318
+ url: ajaxurl,
319
+ data:link.attr('href').split('?')[1]+'&action=cas-module-'+action.attr('data-cas-module'),
320
+ dataType: 'JSON',
321
+ type: 'POST',
322
+ success:function(data){
323
+ link.closest('.cas-contentlist').html(data);
324
+ },
325
+ error: function(xhr, desc, e) {
326
+ console.log(xhr.responseText);
327
+ }
328
+ });
329
+
330
+ });
331
  },
332
+
333
  /**
334
+ * Listen to and handle adding
335
+ * content to current group
336
+ * @author Joachim Jensen <jv@intox.dk>
337
+ * @since 2.0
338
  */
339
+ addAddContentListener: function() {
340
+ $("#cas-accordion").on("click",".js-cas-condition-add", function(e) {
341
+
342
+ e.preventDefault();
343
+
344
+ if(cas_admin.groups.getCurrent() != null) {
345
+
346
+ var button = $(this);
347
+
348
+ var old_checkboxes = $("input:checkbox:checked", button.closest('.cas-rule-content'));
349
+ var condition_elem = $('.cas-condition-'+button.attr('data-cas-condition'), cas_admin.groups.getCurrent());
350
+ var data = [];
351
+
352
+ if(condition_elem.length == 0) {
353
+ 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>');
354
+ cas_admin.groups.getCurrent().find('.cas-content').append(condition_elem);
355
+ }
356
+
357
+ //Check if checkbox with value already exists
358
+ old_checkboxes.each( function() {
359
+ var elem = $(this);
360
+ if(condition_elem.find("input[value='"+elem.val()+"']").length == 0) {
361
+ var temp = elem.closest('li').clone().addClass('cas-new');
362
+ //jQuery 1.7 fix
363
+ data.push(temp[0]);
364
+ }
365
+ });
366
+ old_checkboxes.attr('checked',false);
367
+
368
+ $('ul',condition_elem).append(data);
369
+ }
370
+
371
  });
372
  },
373
+
374
+ /**
375
+ * Listen to and handle Add New Group clicks
376
+ * Uses AJAX to create a new group
377
+ * @author Joachim Jensen <jv@intox.dk>
378
+ * @since 2.0
379
+ */
380
+ addNewGroupListener: function() {
381
+ this.groups.getGroupContainer().on('click', '.js-cas-group-new', function(e) {
382
+
383
+ e.preventDefault();
384
+
385
+ var group = $('<li>', {class: 'cas-group-single cas-group-single-new', html: '<span class="cas-group-control cas-group-control-active">'+
386
+ '<input type="button" class="button js-cas-group-save" value="'+CASAdmin.save+'" /> | <a class="js-cas-group-cancel" href="#">'+CASAdmin.cancel+'</a>'+
387
+ '</span>'+
388
+ '<span class="cas-group-control">'+
389
+ '<a class="js-cas-group-edit" href="#">'+CASAdmin.edit+'</a> | <a class="submitdelete trash js-cas-group-remove" href="#">'+CASAdmin.remove+'</a>'+
390
+ '</span>'+
391
+ '<div class="cas-content"></div>'});
392
+
393
+ cas_admin.groups.add(group);
394
+ });
395
+ },
396
+
397
+ /**
398
+ * Listen to and manage
399
+ * group saving, editing, removal and cancelling
400
+ * @author Joachim Jensen <jv@intox.dk>
401
+ * @since 2.0
402
+ */
403
+ addSetGroupListener: function() {
404
+ this.groups.getGroupContainer().on("click", ".js-cas-group-save", function(e){
405
+ e.preventDefault();
406
+
407
+ var button = $(this);
408
+ button.attr('disabled',true);
409
+
410
+ var data = cas_admin.groups.getCurrent().find("input").serializeArray();
411
+ data.push({name:"action",value:"cas_add_rule"});
412
+ data.push({name:"token",value:cas_admin.nonce});
413
+ data.push({name:"current_id",value:cas_admin.sidebarID});
414
+
415
+ $.ajax({
416
+ url: ajaxurl,
417
+ data:$.param(data),
418
+ dataType: 'JSON',
419
+ type: 'POST',
420
+ success:function(data){
421
+
422
+ cas_alert.set(data.message,'updated')
423
+
424
+ var content = $("input:checkbox",cas_admin.groups.getCurrent()).closest('li');
425
+ if(content.length > 0) {
426
+ $("input:checkbox:not(:checked)",cas_admin.groups.getCurrent()).closest('li').remove();
427
+ content.removeClass('cas-new');
428
+ }
429
+
430
+ $(".cas-condition",cas_admin.groups.getCurrent()).each( function() {
431
+ if($(this).find('input').length == 0) {
432
+ $(this).remove();
433
+ }
434
+ });
435
+
436
+ if(data.new_post_id) {
437
+ console.log("in");
438
+ cas_admin.groups.getCurrent().append('<input type="hidden" class="cas_group_id" name="cas_group_id" value="'+data.new_post_id+'" />');
439
+ }
440
+ button.attr('disabled',false);
441
+
442
+ },
443
+ error: function(xhr, desc, e) {
444
+ cas_alert.set(xhr.responseText,'error');
445
+ button.attr('disabled',false);
446
+ }
447
+ });
448
+ })
449
+ .on("click", ".js-cas-group-cancel", function(e){
450
+ e.preventDefault();
451
+ cas_admin.groups.resetCurrent();
452
+ })
453
+ .on("click", ".js-cas-group-edit", function(e){
454
+ e.preventDefault();
455
+ cas_admin.groups.setCurrent($(this).parents('.cas-group-single'));
456
+ })
457
+ .on("click", ".js-cas-group-remove", function(e){
458
+ e.preventDefault();
459
+
460
+ if(confirm(CASAdmin.confirmRemove) == true) {
461
+
462
+ var button = $(this);
463
+ button.attr('disabled',true);
464
+ var group = $(this).closest('.cas-group-single');
465
+ $.ajax({
466
+ url: ajaxurl,
467
+ data:{
468
+ action: 'cas_remove_group',
469
+ token: cas_admin.nonce,
470
+ cas_group_id: group.find('.cas_group_id').val(),
471
+ current_id: cas_admin.sidebarID
472
+ },
473
+ dataType: 'JSON',
474
+ type: 'POST',
475
+ success:function(data){
476
+ cas_alert.set(data.message,'updated');
477
+ cas_admin.groups.remove(group);
478
+ button.attr('disabled',false);
479
+ },
480
+ error: function(xhr, desc, e) {
481
+ cas_alert.set(xhr.responseText,'error');
482
+ button.attr('disabled',false);
483
+ }
484
+ });
485
+
486
+ }
487
+ });
488
+ },
489
+
490
+ /**
491
+ * Listen to and manage tab clicks
492
+ * Based on code from WordPress Core
493
+ * @author Joachim Jensen <jv@intox.dk>
494
+ * @since 2.0
495
+ */
496
+ addTabListener: function() {
497
+ var class_active = 'tabs-panel-active',
498
+ class_inactive = 'tabs-panel-inactive';
499
+
500
+ $("#cas-accordion .accordion-section").first().addClass('open');
501
+
502
+ $('.nav-tab-link').on('click', function(e) {
503
+ e.preventDefault();
504
+
505
+ panelId = $(this).data( 'type' );
506
+
507
+ wrapper = $(this).closest('.accordion-section-content');
508
+
509
+ // upon changing tabs, we want to uncheck all checkboxes
510
+ $('input', wrapper).removeAttr('checked');
511
+
512
+ //Change active tab panel
513
+ $('.' + class_active, wrapper).removeClass(class_active).addClass(class_inactive);
514
+ $('#' + panelId, wrapper).removeClass(class_inactive).addClass(class_active);
515
+
516
+ $('.tabs', wrapper).removeClass('tabs');
517
+ $(this).parent().addClass('tabs');
518
+
519
+ // select the search bar
520
+ $('.quick-search', wrapper).focus();
521
+
522
+ });
523
+ },
524
+
525
+ /**
526
+ * Set tickers if at least one checkbox is checked
527
+ */
528
+ addCheckboxListener: function() {
529
+ $('.cas-rule-content :input').change( function() {
530
+ var parent = $(this).parents('.cas-rule-content');
531
+ cas_admin.toggleTick(parent);
532
+ if($(this).attr('class') == 'cas-chk-all')
533
+ cas_admin.toggleSelectAll(this, parent);
534
+ }).change(); //fire change event on page load
535
+ },
536
+ toggleTick: function(parent) {
537
+ //Toggle on any selected checkbox
538
+ parent.prev().toggleClass('cas-tick',parent.find('input:checked').length > 0);
539
+ },
540
+ /**
541
+ * Toggle specific input depending on "show with all" checkbox
542
+ */
543
+ toggleSelectAll: function(checkbox, parent) {
544
+ var checkboxes = parent.find("input[type=checkbox]").not(checkbox);
545
+ checkboxes.attr("disabled", $(checkbox).is(":checked"));
546
  },
547
  /**
548
  * The value of Handle selection will control the
549
  * accessibility of the host sidebar selection
550
  * If Handling is manual, selection of host sidebar will be disabled
551
+ * @author Joachim Jensen <jv@intox.dk>
552
+ * @since 2.1
553
  */
554
  addHandleListener: function() {
555
+ var host = $("select[name='host']");
556
+ var code = $('<code>display_ca_sidebar();</code>');
557
+ host.parent().append(code);
558
+ $("select[name='handle']").change(function(){
559
+ var handle = $(this);
560
+ host.attr("disabled", handle.val() == 2);
561
+ if(handle.val() == 2) {
562
+ host.hide();
563
+ code.show();
564
+ } else {
565
+ host.show();
566
+ code.hide();
567
+ }
568
+ }).change(); //fire change event on page load
569
  },
570
  /**
571
  * Use AJAX to search for content from a specific module
572
  */
573
  addSearchListener: function() {
574
+ var searchTimer;
575
+
576
+ $('.cas-autocomplete').keypress(function(e){
577
+ var t = $(this);
578
+
579
+ //If Enter (13) is pressed, search immediately
580
+ if( 13 == e.which ) {
581
+ cas_admin.updateSearchResults( t );
582
+ return false;
583
+ }
584
+
585
+ //If timer is already in progress, stop it
586
+ if( searchTimer ) clearTimeout(searchTimer);
587
+
588
+ searchTimer = setTimeout(function(){
589
+ cas_admin.updateSearchResults( t );
590
+ }, 400);
591
+ }).attr('autocomplete','off');
592
 
593
  },
594
+ /**
595
+ * Make AJAX request to get results
596
+ * @author Joachim Jensen <jv@intox.dk>
597
+ * @since 2
598
+ * @param {Object} input
599
+ * @return {void}
600
+ */
601
+ updateSearchResults: function(input) {
602
+ var panel,
603
+ minSearchLength = 2,
604
+ q = input.val();
605
+
606
+ if( q.length < minSearchLength ) return;
607
 
608
+ panel = input.parents('.tabs-panel');
609
+ var spinner = $('.spinner', panel);
610
+
611
+ spinner.show();
612
+
613
+ $.ajax({
614
+ url: ajaxurl,
615
+ data:{
616
+ 'action': input.attr('class').split(' ')[0],
617
+ 'response-format': 'JSON',
618
+ 'nonce': cas_admin.nonce,
619
+ 'sidebar_id': cas_admin.sidebarID,
620
+ 'type': input.attr('id'),
621
+ 'q': q
622
+ },
623
+ dataType: 'JSON',
624
+ type: 'POST',
625
+ success:function(response){
626
+ var elements = "";
627
+ if(response.length > 0) {
628
+ $.each(response, function(i,item) {
629
+ elements += '<li><label class="selectit"><input value="'+item.value+'" type="checkbox" name="'+item.name+'[]"/> '+item.label+'</label></li>';
630
+ });
631
+ } else {
632
+ elements = '<li><p>'+CASAdmin.noResults+'</p></li>';
633
  }
634
+
635
+ $('.categorychecklist', panel).html(elements);
636
+ spinner.hide();
637
+ },
638
+ error: function(xhr, desc, e) {
639
+ console.log(xhr.responseText);
640
+ }
641
+ });
642
+
643
+ },
644
  }
645
 
646
+ $(document).ready(function(){ cas_admin.init(); });
647
 
648
  })(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);
 
js/jquery.ui.autocomplete.js DELETED
@@ -1,605 +0,0 @@
1
- /*
2
- * jQuery UI Autocomplete 1.8.9
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Autocomplete
9
- *
10
- * Depends:
11
- * jquery.ui.core.js
12
- * jquery.ui.widget.js
13
- * jquery.ui.position.js
14
- */
15
- (function( $, undefined ) {
16
-
17
- $.widget( "ui.autocomplete", {
18
- options: {
19
- appendTo: "body",
20
- delay: 300,
21
- minLength: 1,
22
- position: {
23
- my: "left top",
24
- at: "left bottom",
25
- collision: "none"
26
- },
27
- source: null
28
- },
29
-
30
- pending: 0,
31
-
32
- _create: function() {
33
- var self = this,
34
- doc = this.element[ 0 ].ownerDocument,
35
- suppressKeyPress;
36
-
37
- this.element
38
- .addClass( "ui-autocomplete-input" )
39
- .attr( "autocomplete", "off" )
40
- // TODO verify these actually work as intended
41
- .attr({
42
- role: "textbox",
43
- "aria-autocomplete": "list",
44
- "aria-haspopup": "true"
45
- })
46
- .bind( "keydown.autocomplete", function( event ) {
47
- if ( self.options.disabled || self.element.attr( "readonly" ) ) {
48
- return;
49
- }
50
-
51
- suppressKeyPress = false;
52
- var keyCode = $.ui.keyCode;
53
- switch( event.keyCode ) {
54
- case keyCode.PAGE_UP:
55
- self._move( "previousPage", event );
56
- break;
57
- case keyCode.PAGE_DOWN:
58
- self._move( "nextPage", event );
59
- break;
60
- case keyCode.UP:
61
- self._move( "previous", event );
62
- // prevent moving cursor to beginning of text field in some browsers
63
- event.preventDefault();
64
- break;
65
- case keyCode.DOWN:
66
- self._move( "next", event );
67
- // prevent moving cursor to end of text field in some browsers
68
- event.preventDefault();
69
- break;
70
- case keyCode.ENTER:
71
- case keyCode.NUMPAD_ENTER:
72
- // when menu is open and has focus
73
- if ( self.menu.active ) {
74
- // #6055 - Opera still allows the keypress to occur
75
- // which causes forms to submit
76
- suppressKeyPress = true;
77
- event.preventDefault();
78
- }
79
- //passthrough - ENTER and TAB both select the current element
80
- case keyCode.TAB:
81
- if ( !self.menu.active ) {
82
- return;
83
- }
84
- self.menu.select( event );
85
- break;
86
- case keyCode.ESCAPE:
87
- self.element.val( self.term );
88
- self.close( event );
89
- break;
90
- default:
91
- // keypress is triggered before the input value is changed
92
- clearTimeout( self.searching );
93
- self.searching = setTimeout(function() {
94
- // only search if the value has changed
95
- if ( self.term != self.element.val() ) {
96
- self.selectedItem = null;
97
- self.search( null, event );
98
- }
99
- }, self.options.delay );
100
- break;
101
- }
102
- })
103
- .bind( "keypress.autocomplete", function( event ) {
104
- if ( suppressKeyPress ) {
105
- suppressKeyPress = false;
106
- event.preventDefault();
107
- }
108
- })
109
- .bind( "focus.autocomplete", function() {
110
- if ( self.options.disabled ) {
111
- return;
112
- }
113
-
114
- self.selectedItem = null;
115
- self.previous = self.element.val();
116
- })
117
- .bind( "blur.autocomplete", function( event ) {
118
- if ( self.options.disabled ) {
119
- return;
120
- }
121
-
122
- clearTimeout( self.searching );
123
- // clicks on the menu (or a button to trigger a search) will cause a blur event
124
- self.closing = setTimeout(function() {
125
- self.close( event );
126
- self._change( event );
127
- }, 150 );
128
- });
129
- this._initSource();
130
- this.response = function() {
131
- return self._response.apply( self, arguments );
132
- };
133
- this.menu = $( "<ul></ul>" )
134
- .addClass( "ui-autocomplete" )
135
- .appendTo( $( this.options.appendTo || "body", doc )[0] )
136
- // prevent the close-on-blur in case of a "slow" click on the menu (long mousedown)
137
- .mousedown(function( event ) {
138
- // clicking on the scrollbar causes focus to shift to the body
139
- // but we can't detect a mouseup or a click immediately afterward
140
- // so we have to track the next mousedown and close the menu if
141
- // the user clicks somewhere outside of the autocomplete
142
- var menuElement = self.menu.element[ 0 ];
143
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
144
- setTimeout(function() {
145
- $( document ).one( 'mousedown', function( event ) {
146
- if ( event.target !== self.element[ 0 ] &&
147
- event.target !== menuElement &&
148
- !$.ui.contains( menuElement, event.target ) ) {
149
- self.close();
150
- }
151
- });
152
- }, 1 );
153
- }
154
-
155
- // use another timeout to make sure the blur-event-handler on the input was already triggered
156
- setTimeout(function() {
157
- clearTimeout( self.closing );
158
- }, 13);
159
- })
160
- .menu({
161
- focus: function( event, ui ) {
162
- var item = ui.item.data( "item.autocomplete" );
163
- if ( false !== self._trigger( "focus", event, { item: item } ) ) {
164
- // use value to match what will end up in the input, if it was a key event
165
- if ( /^key/.test(event.originalEvent.type) ) {
166
- self.element.val( item.value );
167
- }
168
- }
169
- },
170
- selected: function( event, ui ) {
171
- var item = ui.item.data( "item.autocomplete" ),
172
- previous = self.previous;
173
-
174
- // only trigger when focus was lost (click on menu)
175
- if ( self.element[0] !== doc.activeElement ) {
176
- self.element.focus();
177
- self.previous = previous;
178
- // #6109 - IE triggers two focus events and the second
179
- // is asynchronous, so we need to reset the previous
180
- // term synchronously and asynchronously :-(
181
- setTimeout(function() {
182
- self.previous = previous;
183
- self.selectedItem = item;
184
- }, 1);
185
- }
186
-
187
- if ( false !== self._trigger( "select", event, { item: item } ) ) {
188
- self.element.val( item.value );
189
- }
190
- // reset the term after the select event
191
- // this allows custom select handling to work properly
192
- self.term = self.element.val();
193
-
194
- self.close( event );
195
- self.selectedItem = item;
196
- },
197
- blur: function( event, ui ) {
198
- // don't set the value of the text field if it's already correct
199
- // this prevents moving the cursor unnecessarily
200
- if ( self.menu.element.is(":visible") &&
201
- ( self.element.val() !== self.term ) ) {
202
- self.element.val( self.term );
203
- }
204
- }
205
- })
206
- .zIndex( this.element.zIndex() + 1 )
207
- // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
208
- .css({ top: 0, left: 0 })
209
- .hide()
210
- .data( "menu" );
211
- if ( $.fn.bgiframe ) {
212
- this.menu.element.bgiframe();
213
- }
214
- },
215
-
216
- destroy: function() {
217
- this.element
218
- .removeClass( "ui-autocomplete-input" )
219
- .removeAttr( "autocomplete" )
220
- .removeAttr( "role" )
221
- .removeAttr( "aria-autocomplete" )
222
- .removeAttr( "aria-haspopup" );
223
- this.menu.element.remove();
224
- $.Widget.prototype.destroy.call( this );
225
- },
226
-
227
- _setOption: function( key, value ) {
228
- $.Widget.prototype._setOption.apply( this, arguments );
229
- if ( key === "source" ) {
230
- this._initSource();
231
- }
232
- if ( key === "appendTo" ) {
233
- this.menu.element.appendTo( $( value || "body", this.element[0].ownerDocument )[0] )
234
- }
235
- if ( key === "disabled" && value && this.xhr ) {
236
- this.xhr.abort();
237
- }
238
- },
239
-
240
- _initSource: function() {
241
- var self = this,
242
- array,
243
- url;
244
- if ( $.isArray(this.options.source) ) {
245
- array = this.options.source;
246
- this.source = function( request, response ) {
247
- response( $.ui.autocomplete.filter(array, request.term) );
248
- };
249
- } else if ( typeof this.options.source === "string" ) {
250
- url = this.options.source;
251
- this.source = function( request, response ) {
252
- if ( self.xhr ) {
253
- self.xhr.abort();
254
- }
255
- self.xhr = $.ajax({
256
- url: url,
257
- data: request,
258
- dataType: "json",
259
- success: function( data, status, xhr ) {
260
- if ( xhr === self.xhr ) {
261
- response( data );
262
- }
263
- self.xhr = null;
264
- },
265
- error: function( xhr ) {
266
- if ( xhr === self.xhr ) {
267
- response( [] );
268
- }
269
- self.xhr = null;
270
- }
271
- });
272
- };
273
- } else {
274
- this.source = this.options.source;
275
- }
276
- },
277
-
278
- search: function( value, event ) {
279
- value = value != null ? value : this.element.val();
280
-
281
- // always save the actual value, not the one passed as an argument
282
- this.term = this.element.val();
283
-
284
- if ( value.length < this.options.minLength ) {
285
- return this.close( event );
286
- }
287
-
288
- clearTimeout( this.closing );
289
- if ( this._trigger( "search", event ) === false ) {
290
- return;
291
- }
292
-
293
- return this._search( value );
294
- },
295
-
296
- _search: function( value ) {
297
- this.pending++;
298
- this.element.addClass( "ui-autocomplete-loading" );
299
-
300
- this.source( { term: value }, this.response );
301
- },
302
-
303
- _response: function( content ) {
304
- if ( !this.options.disabled && content && content.length ) {
305
- content = this._normalize( content );
306
- this._suggest( content );
307
- this._trigger( "open" );
308
- } else {
309
- this.close();
310
- }
311
- this.pending--;
312
- if ( !this.pending ) {
313
- this.element.removeClass( "ui-autocomplete-loading" );
314
- }
315
- },
316
-
317
- close: function( event ) {
318
- clearTimeout( this.closing );
319
- if ( this.menu.element.is(":visible") ) {
320
- this.menu.element.hide();
321
- this.menu.deactivate();
322
- this._trigger( "close", event );
323
- }
324
- },
325
-
326
- _change: function( event ) {
327
- if ( this.previous !== this.element.val() ) {
328
- this._trigger( "change", event, { item: this.selectedItem } );
329
- }
330
- },
331
-
332
- _normalize: function( items ) {
333
- // assume all items have the right format when the first item is complete
334
- if ( items.length && items[0].label && items[0].value ) {
335
- return items;
336
- }
337
- return $.map( items, function(item) {
338
- if ( typeof item === "string" ) {
339
- return {
340
- label: item,
341
- value: item
342
- };
343
- }
344
- return $.extend({
345
- label: item.label || item.value,
346
- value: item.value || item.label
347
- }, item );
348
- });
349
- },
350
-
351
- _suggest: function( items ) {
352
- var ul = this.menu.element
353
- .empty()
354
- .zIndex( this.element.zIndex() + 1 );
355
- this._renderMenu( ul, items );
356
- // TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate
357
- this.menu.deactivate();
358
- this.menu.refresh();
359
-
360
- // size and position menu
361
- ul.show();
362
- this._resizeMenu();
363
- ul.position( $.extend({
364
- of: this.element
365
- }, this.options.position ));
366
- },
367
-
368
- _resizeMenu: function() {
369
- var ul = this.menu.element;
370
- ul.outerWidth( Math.max(
371
- ul.width( "" ).outerWidth(),
372
- this.element.outerWidth()
373
- ) );
374
- },
375
-
376
- _renderMenu: function( ul, items ) {
377
- var self = this;
378
- $.each( items, function( index, item ) {
379
- self._renderItem( ul, item );
380
- });
381
- },
382
-
383
- _renderItem: function( ul, item) {
384
- return $( "<li></li>" )
385
- .data( "item.autocomplete", item )
386
- .append( $( "<a></a>" ).text( item.label ) )
387
- .appendTo( ul );
388
- },
389
-
390
- _move: function( direction, event ) {
391
- if ( !this.menu.element.is(":visible") ) {
392
- this.search( null, event );
393
- return;
394
- }
395
- if ( this.menu.first() && /^previous/.test(direction) ||
396
- this.menu.last() && /^next/.test(direction) ) {
397
- this.element.val( this.term );
398
- this.menu.deactivate();
399
- return;
400
- }
401
- this.menu[ direction ]( event );
402
- },
403
-
404
- widget: function() {
405
- return this.menu.element;
406
- }
407
- });
408
-
409
- $.extend( $.ui.autocomplete, {
410
- escapeRegex: function( value ) {
411
- return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
412
- },
413
- filter: function(array, term) {
414
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
415
- return $.grep( array, function(value) {
416
- return matcher.test( value.label || value.value || value );
417
- });
418
- }
419
- });
420
-
421
- }( jQuery ));
422
-
423
- /*
424
- * jQuery UI Menu (not officially released)
425
- *
426
- * This widget isn't yet finished and the API is subject to change. We plan to finish
427
- * it for the next release. You're welcome to give it a try anyway and give us feedback,
428
- * as long as you're okay with migrating your code later on. We can help with that, too.
429
- *
430
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
431
- * Dual licensed under the MIT or GPL Version 2 licenses.
432
- * http://jquery.org/license
433
- *
434
- * http://docs.jquery.com/UI/Menu
435
- *
436
- * Depends:
437
- * jquery.ui.core.js
438
- * jquery.ui.widget.js
439
- */
440
- (function($) {
441
-
442
- $.widget("ui.menu", {
443
- _create: function() {
444
- var self = this;
445
- this.element
446
- .addClass("ui-menu ui-widget ui-widget-content ui-corner-all")
447
- .attr({
448
- role: "listbox",
449
- "aria-activedescendant": "ui-active-menuitem"
450
- })
451
- .click(function( event ) {
452
- if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) {
453
- return;
454
- }
455
- // temporary
456
- event.preventDefault();
457
- self.select( event );
458
- });
459
- this.refresh();
460
- },
461
-
462
- refresh: function() {
463
- var self = this;
464
-
465
- // don't refresh list items that are already adapted
466
- var items = this.element.children("li:not(.ui-menu-item):has(a)")
467
- .addClass("ui-menu-item")
468
- .attr("role", "menuitem");
469
-
470
- items.children("a")
471
- .addClass("ui-corner-all")
472
- .attr("tabindex", -1)
473
- // mouseenter doesn't work with event delegation
474
- .mouseenter(function( event ) {
475
- self.activate( event, $(this).parent() );
476
- })
477
- .mouseleave(function() {
478
- self.deactivate();
479
- });
480
- },
481
-
482
- activate: function( event, item ) {
483
- this.deactivate();
484
- if (this.hasScroll()) {
485
- var offset = item.offset().top - this.element.offset().top,
486
- scroll = this.element.attr("scrollTop"),
487
- elementHeight = this.element.height();
488
- if (offset < 0) {
489
- this.element.attr("scrollTop", scroll + offset);
490
- } else if (offset >= elementHeight) {
491
- this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
492
- }
493
- }
494
- this.active = item.eq(0)
495
- .children("a")
496
- .addClass("ui-state-hover")
497
- .attr("id", "ui-active-menuitem")
498
- .end();
499
- this._trigger("focus", event, { item: item });
500
- },
501
-
502
- deactivate: function() {
503
- if (!this.active) { return; }
504
-
505
- this.active.children("a")
506
- .removeClass("ui-state-hover")
507
- .removeAttr("id");
508
- this._trigger("blur");
509
- this.active = null;
510
- },
511
-
512
- next: function(event) {
513
- this.move("next", ".ui-menu-item:first", event);
514
- },
515
-
516
- previous: function(event) {
517
- this.move("prev", ".ui-menu-item:last", event);
518
- },
519
-
520
- first: function() {
521
- return this.active && !this.active.prevAll(".ui-menu-item").length;
522
- },
523
-
524
- last: function() {
525
- return this.active && !this.active.nextAll(".ui-menu-item").length;
526
- },
527
-
528
- move: function(direction, edge, event) {
529
- if (!this.active) {
530
- this.activate(event, this.element.children(edge));
531
- return;
532
- }
533
- var next = this.active[direction + "All"](".ui-menu-item").eq(0);
534
- if (next.length) {
535
- this.activate(event, next);
536
- } else {
537
- this.activate(event, this.element.children(edge));
538
- }
539
- },
540
-
541
- // TODO merge with previousPage
542
- nextPage: function(event) {
543
- if (this.hasScroll()) {
544
- // TODO merge with no-scroll-else
545
- if (!this.active || this.last()) {
546
- this.activate(event, this.element.children(".ui-menu-item:first"));
547
- return;
548
- }
549
- var base = this.active.offset().top,
550
- height = this.element.height(),
551
- result = this.element.children(".ui-menu-item").filter(function() {
552
- var close = $(this).offset().top - base - height + $(this).height();
553
- // TODO improve approximation
554
- return close < 10 && close > -10;
555
- });
556
-
557
- // TODO try to catch this earlier when scrollTop indicates the last page anyway
558
- if (!result.length) {
559
- result = this.element.children(".ui-menu-item:last");
560
- }
561
- this.activate(event, result);
562
- } else {
563
- this.activate(event, this.element.children(".ui-menu-item")
564
- .filter(!this.active || this.last() ? ":first" : ":last"));
565
- }
566
- },
567
-
568
- // TODO merge with nextPage
569
- previousPage: function(event) {
570
- if (this.hasScroll()) {
571
- // TODO merge with no-scroll-else
572
- if (!this.active || this.first()) {
573
- this.activate(event, this.element.children(".ui-menu-item:last"));
574
- return;
575
- }
576
-
577
- var base = this.active.offset().top,
578
- height = this.element.height();
579
- result = this.element.children(".ui-menu-item").filter(function() {
580
- var close = $(this).offset().top - base + height - $(this).height();
581
- // TODO improve approximation
582
- return close < 10 && close > -10;
583
- });
584
-
585
- // TODO try to catch this earlier when scrollTop indicates the last page anyway
586
- if (!result.length) {
587
- result = this.element.children(".ui-menu-item:first");
588
- }
589
- this.activate(event, result);
590
- } else {
591
- this.activate(event, this.element.children(".ui-menu-item")
592
- .filter(!this.active || this.first() ? ":last" : ":first"));
593
- }
594
- },
595
-
596
- hasScroll: function() {
597
- return this.element.height() < this.element.attr("scrollHeight");
598
- },
599
-
600
- select: function( event ) {
601
- this._trigger("selected", event, { item: this.active });
602
- }
603
- });
604
-
605
- }(jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lang/content-aware-sidebars-da_DK.mo CHANGED
Binary file
lang/content-aware-sidebars-da_DK.po CHANGED
@@ -2,178 +2,279 @@
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-03-31 21:23:20+00:00\n"
8
- "PO-Revision-Date: 2013-04-03 20:57+0100\n"
9
- "Last-Translator: Joachim Jensen <jv@intox.dk>\n"
10
- "Language-Team: Intox Studio <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
 
17
- #: content-aware-sidebars.php:178 content-aware-sidebars.php:345
18
  msgid "Exposure"
19
  msgstr "Eksponering"
20
 
21
- #: content-aware-sidebars.php:184
22
  msgid "Singular"
23
  msgstr "Singulær"
24
 
25
- #: content-aware-sidebars.php:185
26
  msgid "Singular & Archive"
27
  msgstr "Singulær og arkiv"
28
 
29
- #: content-aware-sidebars.php:186
30
  msgid "Archive"
31
  msgstr "Arkiv"
32
 
33
- #: content-aware-sidebars.php:190 content-aware-sidebars.php:346
34
  msgctxt "option"
35
  msgid "Handle"
36
  msgstr "Håndtering"
37
 
38
- #: content-aware-sidebars.php:192
39
  msgid "Replace host sidebar, merge with it or add sidebar manually."
40
  msgstr "Erstat værts-sidebar, flet med den eller tilføj denne sidebar manuelt."
41
 
42
- #: content-aware-sidebars.php:196
43
  msgid "Replace"
44
  msgstr "Erstat"
45
 
46
- #: content-aware-sidebars.php:197
47
  msgid "Merge"
48
  msgstr "Flet"
49
 
50
- #: content-aware-sidebars.php:198
51
  msgid "Manual"
52
  msgstr "Manuel"
53
 
54
- #: content-aware-sidebars.php:202
55
  msgid "Host Sidebar"
56
  msgstr "Værts-sidebar"
57
 
58
- #: content-aware-sidebars.php:210 content-aware-sidebars.php:347
59
  msgid "Merge position"
60
  msgstr "Fletteposition"
61
 
62
- #: content-aware-sidebars.php:212
63
  msgid "Place sidebar on top or bottom of host when merging."
64
  msgstr "Flet ind fra oven eller bunden."
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 "Bund"
73
 
74
- #: content-aware-sidebars.php:232
75
  msgid "Sidebars"
76
  msgstr "Sidebars"
77
 
78
- #: content-aware-sidebars.php:233
79
  msgid "Sidebar"
80
  msgstr "Sidebar"
81
 
82
- #: content-aware-sidebars.php:234
83
  msgctxt "sidebar"
84
  msgid "Add New"
85
  msgstr "Tilføj ny"
86
 
87
- #: content-aware-sidebars.php:235
88
  msgid "Add New Sidebar"
89
  msgstr "Tilføj ny sidebar"
90
 
91
- #: content-aware-sidebars.php:236
92
  msgid "Edit Sidebar"
93
  msgstr "Rediger sidebar"
94
 
95
- #: content-aware-sidebars.php:237
96
  msgid "New Sidebar"
97
  msgstr "Ny sidebar"
98
 
99
- #: content-aware-sidebars.php:238
100
  msgid "All Sidebars"
101
  msgstr "Alle sidebars"
102
 
103
- #: content-aware-sidebars.php:239
104
  msgid "View Sidebar"
105
  msgstr "Vis sidebar"
106
 
107
- #: content-aware-sidebars.php:240
108
  msgid "Search Sidebars"
109
  msgstr "Søg sidebars"
110
 
111
- #: content-aware-sidebars.php:241
112
  msgid "No sidebars found"
113
  msgstr "Ingen sidebars fundet"
114
 
115
- #: content-aware-sidebars.php:242
116
  msgid "No sidebars found in Trash"
117
  msgstr "Ingen sidebars fundet i papirkurven"
118
 
119
- #: content-aware-sidebars.php:273
120
- msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
121
- msgstr "Sidebar opdateret. <a href=\"%s\">Håndter widgets</a>"
 
 
 
 
 
 
 
 
 
122
 
123
- #: content-aware-sidebars.php:276
 
 
 
 
 
 
 
 
 
 
 
124
  msgid "Sidebar updated."
125
  msgstr "Sidebar opdateret."
126
 
127
- #: content-aware-sidebars.php:278
128
- msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
129
- msgstr "Sidebar udgivet. <a href=\"%s\">Håndter widgets</a>"
 
 
 
 
 
130
 
131
- #: content-aware-sidebars.php:279
132
  msgid "Sidebar saved."
133
  msgstr "Sidebar gemt."
134
 
135
- #: content-aware-sidebars.php:280
136
- msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
137
- msgstr "Sidebar indsendt. <a href=\"%s\">Håndter widgets</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 planlagt til: <strong>%1$s</strong>. <a href=\"%2$s\">Håndter "
145
- "widgets</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 "j. M, Y @ G:i"
151
 
152
- #: content-aware-sidebars.php:284
153
  msgid "Sidebar draft updated."
154
  msgstr "Sidebar-kladde opdateret."
155
 
156
- #: content-aware-sidebars.php:321 content-aware-sidebars.php:402
157
  msgid "Please update Host Sidebar"
158
  msgstr "Værts-sidebar skal opdateres"
159
 
160
- #: content-aware-sidebars.php:457
161
  msgid "Manage Widgets"
162
  msgstr "Håndter widgets"
163
 
164
- #: content-aware-sidebars.php:688
 
 
 
 
165
  msgid "Content"
166
  msgstr "Indhold"
167
 
168
- #: content-aware-sidebars.php:698
169
  msgid "Options"
170
  msgstr "Indstillinger"
171
 
172
- #: content-aware-sidebars.php:707
173
- msgid "Spread the Word"
174
- msgstr "Spred ordet"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
- #: content-aware-sidebars.php:797
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  msgid ""
178
  "If you love this plugin, please consider donating to support future "
179
  "development."
@@ -181,136 +282,138 @@ msgstr ""
181
  "Hvis du elsker dette plugin, kan du overveje at donere for at støtte den "
182
  "fremtidige udvikling."
183
 
184
- #: content-aware-sidebars.php:802
185
  msgid "Or you could:"
186
  msgstr "Eller du kunne:"
187
 
188
- #: content-aware-sidebars.php:804
189
  msgid "Rate the plugin on WordPress.org"
190
  msgstr "Bedømme pluginnet på WordPress.org"
191
 
192
- #: content-aware-sidebars.php:805
193
  msgid "Link to the plugin page"
194
  msgstr "Linke til plugin-siden"
195
 
196
- #: modules/abstract.php:53 modules/post_type.php:111
197
- msgid "Show with All %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  msgstr "Vis ved alle %s"
199
 
200
- #: modules/abstract.php:57 modules/taxonomy.php:163
 
201
  msgid "View All"
202
  msgstr "Vis alle"
203
 
204
- #: modules/author.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  msgid "Authors"
206
  msgstr "Forfattere"
207
 
208
- #: modules/bbpress.php:23
209
  msgid "bbPress User Profiles"
210
  msgstr "bbPress brugerprofiler"
211
 
212
- #: modules/bp_member.php:23
213
  msgid "BuddyPress Members"
214
  msgstr "BuddyPress medlemmer"
215
 
216
- #: modules/page_template.php:24
217
  msgid "Page Templates"
218
  msgstr "Skabeloner"
219
 
220
- #: modules/polylang.php:23 modules/qtranslate.php:23 modules/transposh.php:23
221
- #: modules/wpml.php:23
222
  msgid "Languages"
223
  msgstr "Sprog"
224
 
225
- #: modules/post_type.php:30
226
  msgid "Post Types"
227
  msgstr "Indholdstyper"
228
 
229
- #: modules/post_type.php:105 modules/taxonomy.php:149
 
230
  msgid "Automatically select new children of a selected ancestor"
231
  msgstr "Vælg automatisk nye børn af den valgte forælder"
232
 
233
- #: modules/post_type.php:115 modules/taxonomy.php:157
 
 
 
 
 
234
  msgid "No items."
235
  msgstr "Ingen elementer."
236
 
237
- #: modules/post_type.php:136 modules/url.php:42
238
- msgid "Search"
239
- msgstr "Søg"
240
-
241
- #: modules/post_type.php:136 modules/url.php:42
242
- msgid "Add"
243
- msgstr "Tilføj"
244
 
245
- #: modules/static.php:25
246
  msgid "Static Pages"
247
  msgstr "Statiske sider"
248
 
249
- #: modules/static.php:34
250
  msgid "Front Page"
251
  msgstr "Forside"
252
 
253
- #: modules/static.php:35
254
  msgid "Search Results"
255
  msgstr "Søgeresultater"
256
 
257
- #: modules/static.php:36
258
  msgid "404 Page"
259
  msgstr "404-side"
260
 
261
- #: modules/taxonomy.php:36
262
  msgid "Taxonomies"
263
  msgstr "Taksonomier"
264
 
265
- #: modules/taxonomy.php:153
266
- msgid "Show with %s"
267
- msgstr "Vis ved %s"
268
-
269
- #: modules/taxonomy.php:162
270
  msgid "Most Used"
271
  msgstr "Mest brugte"
272
 
273
- #: modules/url.php:24
274
  msgid "URLs"
275
  msgstr "URLs"
276
 
277
- #. Plugin Name of the plugin/theme
278
- msgid "Content Aware Sidebars"
279
- msgstr "Content Aware Sidebars"
280
-
281
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.2) #-#-#-#-#
282
- #. Plugin URI of the plugin/theme
283
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.2) #-#-#-#-#
284
- #. Author URI of the plugin/theme
285
- msgid "http://www.intox.dk/"
286
- msgstr "http://www.intox.dk/"
287
-
288
- #. Description of the plugin/theme
289
- msgid "Manage and show sidebars according to the content being viewed."
290
- msgstr "Administrer og vis sidebars i henhold til det indhold, der vises."
291
-
292
- #. Author of the plugin/theme
293
- msgid "Joachim Jensen, Intox Studio"
294
- msgstr "Joachim Jensen, Intox Studio"
295
-
296
- #~ msgid "Words from the author"
297
- #~ msgstr "Et par ord fra forfatteren"
298
-
299
- #~ msgid ""
300
- #~ "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> "
301
- #~ "and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
302
- #~ msgstr ""
303
- #~ "Glem ikke at <a class=\"button\" href=\"%1$s\" target=\"_blank\">vurdere</"
304
- #~ "a> og <a class=\"button\" href=\"%2$s\" target=\"_blank\">dele</a> det!"
305
-
306
- #~ msgid "Check out Content Aware Sidebars for %23WordPress! :)"
307
- #~ msgstr "Jeg bruger Content Aware Sidebars til %23WordPress! :)"
308
-
309
- #~ msgid "Check out Content Aware Sidebars :)"
310
- #~ msgstr "Jeg bruger Content Aware Sidebars :)"
311
-
312
- #~ msgid "bbPress"
313
- #~ msgstr "bbPress"
314
 
315
- #~ msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
316
- #~ msgstr "Sidebar-udkast opdateret. <a href=\"%s\">Håndter widgets</a>"
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.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
7
+ "POT-Creation-Date: 2014-05-01 12:57+0100\n"
8
+ "PO-Revision-Date: 2014-05-01 13:06+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:111
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:112
31
+ msgid "Content Aware Sidebars"
32
+ msgstr "Content Aware Sidebars"
33
 
34
+ #: ../content-aware-sidebars.php:232 ../content-aware-sidebars.php:432
35
  msgid "Exposure"
36
  msgstr "Eksponering"
37
 
38
+ #: ../content-aware-sidebars.php:238
39
  msgid "Singular"
40
  msgstr "Singulær"
41
 
42
+ #: ../content-aware-sidebars.php:239
43
  msgid "Singular & Archive"
44
  msgstr "Singulær og arkiv"
45
 
46
+ #: ../content-aware-sidebars.php:240
47
  msgid "Archive"
48
  msgstr "Arkiv"
49
 
50
+ #: ../content-aware-sidebars.php:244 ../content-aware-sidebars.php:433
51
  msgctxt "option"
52
  msgid "Handle"
53
  msgstr "Håndtering"
54
 
55
+ #: ../content-aware-sidebars.php:246
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:250
60
  msgid "Replace"
61
  msgstr "Erstat"
62
 
63
+ #: ../content-aware-sidebars.php:251
64
  msgid "Merge"
65
  msgstr "Flet"
66
 
67
+ #: ../content-aware-sidebars.php:252
68
  msgid "Manual"
69
  msgstr "Manuel"
70
 
71
+ #: ../content-aware-sidebars.php:256
72
  msgid "Host Sidebar"
73
  msgstr "Værts-sidebar"
74
 
75
+ #: ../content-aware-sidebars.php:264 ../content-aware-sidebars.php:434
76
  msgid "Merge position"
77
  msgstr "Fletteposition"
78
 
79
+ #: ../content-aware-sidebars.php:266
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:270
84
  msgid "Top"
85
  msgstr "Top"
86
 
87
+ #: ../content-aware-sidebars.php:271
88
  msgid "Bottom"
89
  msgstr "Bund"
90
 
91
+ #: ../content-aware-sidebars.php:296
92
  msgid "Sidebars"
93
  msgstr "Sidebars"
94
 
95
+ #: ../content-aware-sidebars.php:297
96
  msgid "Sidebar"
97
  msgstr "Sidebar"
98
 
99
+ #: ../content-aware-sidebars.php:298
100
  msgctxt "sidebar"
101
  msgid "Add New"
102
  msgstr "Tilføj ny"
103
 
104
+ #: ../content-aware-sidebars.php:299
105
  msgid "Add New Sidebar"
106
  msgstr "Tilføj ny sidebar"
107
 
108
+ #: ../content-aware-sidebars.php:300
109
  msgid "Edit Sidebar"
110
  msgstr "Rediger sidebar"
111
 
112
+ #: ../content-aware-sidebars.php:301
113
  msgid "New Sidebar"
114
  msgstr "Ny sidebar"
115
 
116
+ #: ../content-aware-sidebars.php:302
117
  msgid "All Sidebars"
118
  msgstr "Alle sidebars"
119
 
120
+ #: ../content-aware-sidebars.php:303
121
  msgid "View Sidebar"
122
  msgstr "Vis sidebar"
123
 
124
+ #: ../content-aware-sidebars.php:304
125
  msgid "Search Sidebars"
126
  msgstr "Søg sidebars"
127
 
128
+ #: ../content-aware-sidebars.php:305
129
  msgid "No sidebars found"
130
  msgstr "Ingen sidebars fundet"
131
 
132
+ #: ../content-aware-sidebars.php:306
133
  msgid "No sidebars found in Trash"
134
  msgstr "Ingen sidebars fundet i papirkurven"
135
 
136
+ #: ../content-aware-sidebars.php:321 ../content-aware-sidebars.php:892
137
+ msgid "Condition Groups"
138
+ msgstr "Betingelsesgrupper"
139
+
140
+ #: ../content-aware-sidebars.php:322
141
+ msgid "Condition Group"
142
+ msgstr "Betingelsesgruppe"
143
+
144
+ #: ../content-aware-sidebars.php:323
145
+ msgctxt "group"
146
+ msgid "Add New"
147
+ msgstr "Tilføj ny"
148
 
149
+ #: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:892
150
+ #: ../content-aware-sidebars.php:922
151
+ msgid "Add New Group"
152
+ msgstr "Tilføj ny gruppe"
153
+
154
+ #: ../content-aware-sidebars.php:325 ../content-aware-sidebars.php:907
155
+ #: ../content-aware-sidebars.php:1299
156
+ msgctxt "group"
157
+ msgid "Edit"
158
+ msgstr "Rediger"
159
+
160
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:354
161
  msgid "Sidebar updated."
162
  msgstr "Sidebar opdateret."
163
 
164
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:356
165
+ #: ../content-aware-sidebars.php:358 ../content-aware-sidebars.php:363
166
+ msgid "Manage widgets"
167
+ msgstr "Håndter widgets"
168
+
169
+ #: ../content-aware-sidebars.php:356
170
+ msgid "Sidebar published."
171
+ msgstr "Sidebar udgivet."
172
 
173
+ #: ../content-aware-sidebars.php:357
174
  msgid "Sidebar saved."
175
  msgstr "Sidebar gemt."
176
 
177
+ #: ../content-aware-sidebars.php:358
178
+ msgid "Sidebar submitted."
179
+ msgstr "Sidebar indsendt."
180
 
181
+ #: ../content-aware-sidebars.php:359
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:361
 
187
  msgid "M j, Y @ G:i"
188
  msgstr "j. M, Y @ G:i"
189
 
190
+ #: ../content-aware-sidebars.php:364
191
  msgid "Sidebar draft updated."
192
  msgstr "Sidebar-kladde opdateret."
193
 
194
+ #: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:493
195
  msgid "Please update Host Sidebar"
196
  msgstr "Værts-sidebar skal opdateres"
197
 
198
+ #: ../content-aware-sidebars.php:568
199
  msgid "Manage Widgets"
200
  msgstr "Håndter widgets"
201
 
202
+ #: ../content-aware-sidebars.php:821
203
+ msgid "Support the Author of Content Aware Sidebars"
204
+ msgstr "Støt skaberen af Content Aware Sidebars"
205
+
206
+ #: ../content-aware-sidebars.php:829
207
  msgid "Content"
208
  msgstr "Indhold"
209
 
210
+ #: ../content-aware-sidebars.php:837
211
  msgid "Options"
212
  msgstr "Indstillinger"
213
 
214
+ #: ../content-aware-sidebars.php:893
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:894
224
+ msgid "Display sidebar with"
225
+ msgstr "Vis sidebar ved"
226
+
227
+ #: ../content-aware-sidebars.php:899
228
+ msgid ""
229
+ "No content. Please add at least one condition group to make the sidebar "
230
+ "content aware."
231
+ msgstr ""
232
+ "Intet indhold. Tilføj mindst en betingelsesgruppe for at gøre sidebaren "
233
+ "indholdsbevidst."
234
+
235
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1297
236
+ msgid "Save"
237
+ msgstr "Gem"
238
+
239
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1298
240
+ msgid "Cancel"
241
+ msgstr "Annuller"
242
+
243
+ #: ../content-aware-sidebars.php:907 ../content-aware-sidebars.php:1300
244
+ msgid "Remove"
245
+ msgstr "Fjern"
246
 
247
+ #: ../content-aware-sidebars.php:997 ../content-aware-sidebars.php:1002
248
+ #: ../content-aware-sidebars.php:1044 ../content-aware-sidebars.php:1049
249
+ #: ../content-aware-sidebars.php:1082 ../content-aware-sidebars.php:1087
250
+ msgid "Unauthorized request"
251
+ msgstr "Uautoriseret forespørgsel"
252
+
253
+ #: ../content-aware-sidebars.php:1010
254
+ msgid "Condition group cannot be empty"
255
+ msgstr "Betingelsesgruppe må ikke være tom"
256
+
257
+ #: ../content-aware-sidebars.php:1024
258
+ msgid "Condition group saved"
259
+ msgstr "Betingelsesgruppe gemt"
260
+
261
+ #: ../content-aware-sidebars.php:1056
262
+ msgid "Condition group could not be created"
263
+ msgstr "Betingelsesgruppe kunne ikke oprettes"
264
+
265
+ #: ../content-aware-sidebars.php:1061
266
+ msgid "Condition group added"
267
+ msgstr "Betingelsesgruppe tilføjet"
268
+
269
+ #: ../content-aware-sidebars.php:1092
270
+ msgid "Condition group could not be removed"
271
+ msgstr "Betingelsesgruppe kunne ikke fjernes"
272
+
273
+ #: ../content-aware-sidebars.php:1097
274
+ msgid "Condition group removed"
275
+ msgstr "Betingelsesgruppe fjernet"
276
+
277
+ #: ../content-aware-sidebars.php:1163
278
  msgid ""
279
  "If you love this plugin, please consider donating to support future "
280
  "development."
282
  "Hvis du elsker dette plugin, kan du overveje at donere for at støtte den "
283
  "fremtidige udvikling."
284
 
285
+ #: ../content-aware-sidebars.php:1172
286
  msgid "Or you could:"
287
  msgstr "Eller du kunne:"
288
 
289
+ #: ../content-aware-sidebars.php:1174
290
  msgid "Rate the plugin on WordPress.org"
291
  msgstr "Bedømme pluginnet på WordPress.org"
292
 
293
+ #: ../content-aware-sidebars.php:1175
294
  msgid "Link to the plugin page"
295
  msgstr "Linke til plugin-siden"
296
 
297
+ #: ../content-aware-sidebars.php:1176
298
+ msgid "Translate the plugin into your language"
299
+ msgstr "Oversæt dette plugin til dit sprog"
300
+
301
+ #: ../content-aware-sidebars.php:1301
302
+ msgid "Remove this group and its contents permanently?"
303
+ msgstr "Fjern denne gruppe og dens indhold permanent?"
304
+
305
+ #: ../content-aware-sidebars.php:1302
306
+ msgid "No results found."
307
+ msgstr "Ingen resultater fundet."
308
+
309
+ #: ../content-aware-sidebars.php:1303
310
+ msgid ""
311
+ "The current group has unsaved changes. Do you want to continue and discard "
312
+ "these changes?"
313
+ msgstr ""
314
+ "Den nuværende gruppe har ugemte ændringer. Ønsker du at fortsætte og kassere "
315
+ "disse ændringer?"
316
+
317
+ #: ../modules/abstract.php:88
318
+ #, php-format
319
+ msgid "Display with All %s"
320
  msgstr "Vis ved alle %s"
321
 
322
+ #: ../modules/abstract.php:98 ../modules/bp_member.php:104
323
+ #: ../modules/post_type.php:198 ../modules/taxonomy.php:243
324
  msgid "View All"
325
  msgstr "Vis alle"
326
 
327
+ #: ../modules/abstract.php:105 ../modules/abstract.php:108
328
+ #: ../modules/post_type.php:204 ../modules/post_type.php:207
329
+ #: ../modules/taxonomy.php:249 ../modules/taxonomy.php:252
330
+ msgid "Search"
331
+ msgstr "Søg"
332
+
333
+ #: ../modules/abstract.php:116 ../modules/bp_member.php:113
334
+ #: ../modules/post_type.php:217 ../modules/taxonomy.php:262
335
+ msgid "Add to Group"
336
+ msgstr "Tilføj til gruppe"
337
+
338
+ #: ../modules/abstract.php:188
339
+ #, php-format
340
+ msgid "All %s"
341
+ msgstr "Alle %s"
342
+
343
+ #: ../modules/author.php:22
344
  msgid "Authors"
345
  msgstr "Forfattere"
346
 
347
+ #: ../modules/bbpress.php:23
348
  msgid "bbPress User Profiles"
349
  msgstr "bbPress brugerprofiler"
350
 
351
+ #: ../modules/bp_member.php:21
352
  msgid "BuddyPress Members"
353
  msgstr "BuddyPress medlemmer"
354
 
355
+ #: ../modules/page_template.php:22
356
  msgid "Page Templates"
357
  msgstr "Skabeloner"
358
 
359
+ #: ../modules/polylang.php:21 ../modules/qtranslate.php:21
360
+ #: ../modules/transposh.php:21 ../modules/wpml.php:21
361
  msgid "Languages"
362
  msgstr "Sprog"
363
 
364
+ #: ../modules/post_type.php:28
365
  msgid "Post Types"
366
  msgstr "Indholdstyper"
367
 
368
+ #: ../modules/post_type.php:105 ../modules/post_type.php:171
369
+ #: ../modules/taxonomy.php:182 ../modules/taxonomy.php:217
370
  msgid "Automatically select new children of a selected ancestor"
371
  msgstr "Vælg automatisk nye børn af den valgte forælder"
372
 
373
+ #: ../modules/post_type.php:177 ../modules/taxonomy.php:221
374
+ #, php-format
375
+ msgid "Display with %s"
376
+ msgstr "Vis ved %s"
377
+
378
+ #: ../modules/post_type.php:182 ../modules/taxonomy.php:225
379
  msgid "No items."
380
  msgstr "Ingen elementer."
381
 
382
+ #: ../modules/post_type.php:193
383
+ msgid "Most Recent"
384
+ msgstr "Seneste"
 
 
 
 
385
 
386
+ #: ../modules/static.php:23
387
  msgid "Static Pages"
388
  msgstr "Statiske sider"
389
 
390
+ #: ../modules/static.php:33
391
  msgid "Front Page"
392
  msgstr "Forside"
393
 
394
+ #: ../modules/static.php:34
395
  msgid "Search Results"
396
  msgstr "Søgeresultater"
397
 
398
+ #: ../modules/static.php:35
399
  msgid "404 Page"
400
  msgstr "404-side"
401
 
402
+ #: ../modules/taxonomy.php:34
403
  msgid "Taxonomies"
404
  msgstr "Taksonomier"
405
 
406
+ #: ../modules/taxonomy.php:238
 
 
 
 
407
  msgid "Most Used"
408
  msgstr "Mest brugte"
409
 
410
+ #: ../modules/url.php:22
411
  msgid "URLs"
412
  msgstr "URLs"
413
 
414
+ #: ../modules/url.php:40
415
+ msgid "Add"
416
+ msgstr "Tilføj"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
 
418
+ #~ msgid "Show with All %s"
419
+ #~ msgstr "Vis ved alle %s"
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,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 2014-05-01 12:57+0100\n"
8
+ "PO-Revision-Date: 2014-05-05 14:12+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:111
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:112
25
+ msgid "Content Aware Sidebars"
26
+ msgstr "Content Aware Sidebars (Barras Laterales)"
27
+
28
+ #: ../content-aware-sidebars.php:232 ../content-aware-sidebars.php:432
29
+ msgid "Exposure"
30
+ msgstr "Exposición"
31
+
32
+ #: ../content-aware-sidebars.php:238
33
+ msgid "Singular"
34
+ msgstr "Singular"
35
+
36
+ #: ../content-aware-sidebars.php:239
37
+ msgid "Singular & Archive"
38
+ msgstr "Singular y Archivo"
39
+
40
+ #: ../content-aware-sidebars.php:240
41
+ msgid "Archive"
42
+ msgstr "Archivo"
43
+
44
+ #: ../content-aware-sidebars.php:244 ../content-aware-sidebars.php:433
45
+ msgctxt "option"
46
+ msgid "Handle"
47
+ msgstr "Acciones"
48
+
49
+ #: ../content-aware-sidebars.php:246
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:250
56
+ msgid "Replace"
57
+ msgstr "Reemplazar"
58
+
59
+ #: ../content-aware-sidebars.php:251
60
+ msgid "Merge"
61
+ msgstr "Fusionar"
62
+
63
+ #: ../content-aware-sidebars.php:252
64
+ msgid "Manual"
65
+ msgstr "Manualmente"
66
+
67
+ #: ../content-aware-sidebars.php:256
68
+ msgid "Host Sidebar"
69
+ msgstr "Barra lateral huésped"
70
+
71
+ #: ../content-aware-sidebars.php:264 ../content-aware-sidebars.php:434
72
+ msgid "Merge position"
73
+ msgstr "Fusionar en posición"
74
+
75
+ #: ../content-aware-sidebars.php:266
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:270
82
+ msgid "Top"
83
+ msgstr "Arriba"
84
+
85
+ #: ../content-aware-sidebars.php:271
86
+ msgid "Bottom"
87
+ msgstr "Abajo"
88
+
89
+ #: ../content-aware-sidebars.php:296
90
+ msgid "Sidebars"
91
+ msgstr "Barras laterales"
92
+
93
+ #: ../content-aware-sidebars.php:297
94
+ msgid "Sidebar"
95
+ msgstr "Barra lateral"
96
+
97
+ #: ../content-aware-sidebars.php:298
98
+ msgctxt "sidebar"
99
+ msgid "Add New"
100
+ msgstr "Añadir nuevo"
101
+
102
+ #: ../content-aware-sidebars.php:299
103
+ msgid "Add New Sidebar"
104
+ msgstr "Añadir nueva barra lateral"
105
+
106
+ #: ../content-aware-sidebars.php:300
107
+ msgid "Edit Sidebar"
108
+ msgstr "Editar barra lateral"
109
+
110
+ #: ../content-aware-sidebars.php:301
111
+ msgid "New Sidebar"
112
+ msgstr "Nueva barra lateral"
113
+
114
+ #: ../content-aware-sidebars.php:302
115
+ msgid "All Sidebars"
116
+ msgstr "Todas las barras laterales"
117
+
118
+ #: ../content-aware-sidebars.php:303
119
+ msgid "View Sidebar"
120
+ msgstr "Ver barra lateral"
121
+
122
+ #: ../content-aware-sidebars.php:304
123
+ msgid "Search Sidebars"
124
+ msgstr "Buscar barras laterales"
125
+
126
+ #: ../content-aware-sidebars.php:305
127
+ msgid "No sidebars found"
128
+ msgstr "No se encontraron barras laterales"
129
+
130
+ #: ../content-aware-sidebars.php:306
131
+ msgid "No sidebars found in Trash"
132
+ msgstr "Ninguna barra lateral encontradada en la papelera"
133
+
134
+ #: ../content-aware-sidebars.php:321 ../content-aware-sidebars.php:892
135
+ msgid "Condition Groups"
136
+ msgstr "Grupos de condiciones"
137
+
138
+ #: ../content-aware-sidebars.php:322
139
+ msgid "Condition Group"
140
+ msgstr "Grupo de condiciones"
141
+
142
+ #: ../content-aware-sidebars.php:323
143
+ msgctxt "group"
144
+ msgid "Add New"
145
+ msgstr "Añadir nuevo"
146
+
147
+ #: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:892
148
+ #: ../content-aware-sidebars.php:922
149
+ msgid "Add New Group"
150
+ msgstr "Añadir nuevo"
151
+
152
+ #: ../content-aware-sidebars.php:325 ../content-aware-sidebars.php:907
153
+ #: ../content-aware-sidebars.php:1299
154
+ msgctxt "group"
155
+ msgid "Edit"
156
+ msgstr "Editar"
157
+
158
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:354
159
+ msgid "Sidebar updated."
160
+ msgstr "Barra lateral actualizada"
161
+
162
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:356
163
+ #: ../content-aware-sidebars.php:358 ../content-aware-sidebars.php:363
164
+ msgid "Manage widgets"
165
+ msgstr "Administrar los widgets"
166
+
167
+ #: ../content-aware-sidebars.php:356
168
+ msgid "Sidebar published."
169
+ msgstr "Barra lateral publicada."
170
+
171
+ #: ../content-aware-sidebars.php:357
172
+ msgid "Sidebar saved."
173
+ msgstr "Barra lateral guardada."
174
+
175
+ #: ../content-aware-sidebars.php:358
176
+ msgid "Sidebar submitted."
177
+ msgstr "Barra lateral actualizada."
178
+
179
+ #: ../content-aware-sidebars.php:359
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:361
185
+ msgid "M j, Y @ G:i"
186
+ msgstr "j M, Y @ G:i"
187
+
188
+ #: ../content-aware-sidebars.php:364
189
+ msgid "Sidebar draft updated."
190
+ msgstr "Borrador de la barra lateral actualizado"
191
+
192
+ #: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:493
193
+ msgid "Please update Host Sidebar"
194
+ msgstr "Por favor, actualice la barra lateral huésped"
195
+
196
+ #: ../content-aware-sidebars.php:568
197
+ msgid "Manage Widgets"
198
+ msgstr "Administrar los widgets"
199
+
200
+ #: ../content-aware-sidebars.php:821
201
+ msgid "Support the Author of Content Aware Sidebars"
202
+ msgstr "Ayuda al Autor de Content Aware Sidebars"
203
+
204
+ #: ../content-aware-sidebars.php:829
205
+ msgid "Content"
206
+ msgstr "Contenido"
207
+
208
+ #: ../content-aware-sidebars.php:837
209
+ msgid "Options"
210
+ msgstr "Opciónes"
211
+
212
+ #: ../content-aware-sidebars.php:893
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:894
222
+ msgid "Display sidebar with"
223
+ msgstr "Mostrar la barra lateral con"
224
+
225
+ #: ../content-aware-sidebars.php:899
226
+ msgid ""
227
+ "No content. Please add at least one condition group to make the sidebar "
228
+ "content aware."
229
+ msgstr ""
230
+
231
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1297
232
+ msgid "Save"
233
+ msgstr "Guardar"
234
+
235
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1298
236
+ msgid "Cancel"
237
+ msgstr "Cancelar"
238
+
239
+ #: ../content-aware-sidebars.php:907 ../content-aware-sidebars.php:1300
240
+ msgid "Remove"
241
+ msgstr "Eliminar"
242
+
243
+ #: ../content-aware-sidebars.php:997 ../content-aware-sidebars.php:1002
244
+ #: ../content-aware-sidebars.php:1044 ../content-aware-sidebars.php:1049
245
+ #: ../content-aware-sidebars.php:1082 ../content-aware-sidebars.php:1087
246
+ msgid "Unauthorized request"
247
+ msgstr ""
248
+
249
+ #: ../content-aware-sidebars.php:1010
250
+ #, fuzzy
251
+ msgid "Condition group cannot be empty"
252
+ msgstr "Grupos de condiciones"
253
+
254
+ #: ../content-aware-sidebars.php:1024
255
+ #, fuzzy
256
+ msgid "Condition group saved"
257
+ msgstr "Grupos de condiciones"
258
+
259
+ #: ../content-aware-sidebars.php:1056
260
+ msgid "Condition group could not be created"
261
+ msgstr ""
262
+
263
+ #: ../content-aware-sidebars.php:1061
264
+ #, fuzzy
265
+ msgid "Condition group added"
266
+ msgstr "Grupo de condiciones"
267
+
268
+ #: ../content-aware-sidebars.php:1092
269
+ msgid "Condition group could not be removed"
270
+ msgstr ""
271
+
272
+ #: ../content-aware-sidebars.php:1097
273
+ #, fuzzy
274
+ msgid "Condition group removed"
275
+ msgstr "Grupo de condiciones"
276
+
277
+ #: ../content-aware-sidebars.php:1163
278
+ msgid ""
279
+ "If you love this plugin, please consider donating to support future "
280
+ "development."
281
+ msgstr ""
282
+ "Si usted ama este plugin, por favor considere hacer una donación para apoyar "
283
+ "el futuro desarrollo."
284
+
285
+ #: ../content-aware-sidebars.php:1172
286
+ msgid "Or you could:"
287
+ msgstr "O usted podría:"
288
+
289
+ #: ../content-aware-sidebars.php:1174
290
+ msgid "Rate the plugin on WordPress.org"
291
+ msgstr "Calificar el plugin en WordPress.org"
292
+
293
+ #: ../content-aware-sidebars.php:1175
294
+ msgid "Link to the plugin page"
295
+ msgstr "Crear un enlace web refiriendo al plugin"
296
+
297
+ #: ../content-aware-sidebars.php:1176
298
+ msgid "Translate the plugin into your language"
299
+ msgstr "Traducir el plugin a su idioma"
300
+
301
+ #: ../content-aware-sidebars.php:1301
302
+ msgid "Remove this group and its contents permanently?"
303
+ msgstr "Eliminar este grupo y sus contenidos de forma permanente?"
304
+
305
+ #: ../content-aware-sidebars.php:1302
306
+ msgid "No results found."
307
+ msgstr "No se han encontrado resultados."
308
+
309
+ #: ../content-aware-sidebars.php:1303
310
+ msgid ""
311
+ "The current group has unsaved changes. Do you want to continue and discard "
312
+ "these changes?"
313
+ msgstr ""
314
+
315
+ #: ../modules/abstract.php:88
316
+ #, fuzzy, php-format
317
+ msgid "Display with All %s"
318
+ msgstr "Mostrar con %s"
319
+
320
+ #: ../modules/abstract.php:98 ../modules/bp_member.php:104
321
+ #: ../modules/post_type.php:198 ../modules/taxonomy.php:243
322
+ msgid "View All"
323
+ msgstr "Vis alle"
324
+
325
+ #: ../modules/abstract.php:105 ../modules/abstract.php:108
326
+ #: ../modules/post_type.php:204 ../modules/post_type.php:207
327
+ #: ../modules/taxonomy.php:249 ../modules/taxonomy.php:252
328
+ msgid "Search"
329
+ msgstr "Buscar"
330
+
331
+ #: ../modules/abstract.php:116 ../modules/bp_member.php:113
332
+ #: ../modules/post_type.php:217 ../modules/taxonomy.php:262
333
+ msgid "Add to Group"
334
+ msgstr "Añadir al grupo"
335
+
336
+ #: ../modules/abstract.php:188
337
+ #, php-format
338
+ msgid "All %s"
339
+ msgstr ""
340
+
341
+ #: ../modules/author.php:22
342
+ msgid "Authors"
343
+ msgstr "Autores"
344
+
345
+ #: ../modules/bbpress.php:23
346
+ msgid "bbPress User Profiles"
347
+ msgstr "Perfiles de usuario de bbPress"
348
+
349
+ #: ../modules/bp_member.php:21
350
+ msgid "BuddyPress Members"
351
+ msgstr "Miembros de BuddyPress"
352
+
353
+ #: ../modules/page_template.php:22
354
+ msgid "Page Templates"
355
+ msgstr "Plantillas"
356
+
357
+ #: ../modules/polylang.php:21 ../modules/qtranslate.php:21
358
+ #: ../modules/transposh.php:21 ../modules/wpml.php:21
359
+ msgid "Languages"
360
+ msgstr "Idiomas"
361
+
362
+ #: ../modules/post_type.php:28
363
+ msgid "Post Types"
364
+ msgstr "Tipos de contenido"
365
+
366
+ #: ../modules/post_type.php:105 ../modules/post_type.php:171
367
+ #: ../modules/taxonomy.php:182 ../modules/taxonomy.php:217
368
+ msgid "Automatically select new children of a selected ancestor"
369
+ msgstr ""
370
+ "Seleccionar automáticamente nuevos inferiores de los superiores seleccionados"
371
+
372
+ #: ../modules/post_type.php:177 ../modules/taxonomy.php:221
373
+ #, php-format
374
+ msgid "Display with %s"
375
+ msgstr "Mostrar con %s"
376
+
377
+ #: ../modules/post_type.php:182 ../modules/taxonomy.php:225
378
+ msgid "No items."
379
+ msgstr "Ningun elemento."
380
+
381
+ #: ../modules/post_type.php:193
382
+ msgid "Most Recent"
383
+ msgstr "Más reciente"
384
+
385
+ #: ../modules/static.php:23
386
+ msgid "Static Pages"
387
+ msgstr "Páginas estáticas"
388
+
389
+ #: ../modules/static.php:33
390
+ msgid "Front Page"
391
+ msgstr "Página delantera"
392
+
393
+ #: ../modules/static.php:34
394
+ msgid "Search Results"
395
+ msgstr "Resultados de la búsqueda"
396
+
397
+ #: ../modules/static.php:35
398
+ msgid "404 Page"
399
+ msgstr "Página 404"
400
+
401
+ #: ../modules/taxonomy.php:34
402
+ msgid "Taxonomies"
403
+ msgstr "Taxonomias"
404
+
405
+ #: ../modules/taxonomy.php:238
406
+ msgid "Most Used"
407
+ msgstr "Mest brugte"
408
+
409
+ #: ../modules/url.php:22
410
+ msgid "URLs"
411
+ msgstr "URLs"
412
+
413
+ #: ../modules/url.php:40
414
+ msgid "Add"
415
+ msgstr "Añadir"
416
+
417
+ #~ msgid "Show with All %s"
418
+ #~ msgstr "Mostrar con todos %s"
419
+
420
+ #~ msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
421
+ #~ msgstr ""
422
+ #~ "Barra lateral actualizada. <a href=\"%s\">Administrar los widgets</a>"
423
+
424
+ #~ msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
425
+ #~ msgstr "Barra lateral publicada. <a href=\"%s\">Administrar los widgets</a>"
426
+
427
+ #~ msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
428
+ #~ msgstr "Barra lateral enviada. <a href=\"%s\">Administrar los widgets</a>"
429
+
430
+ #~ msgid "Spread the Word"
431
+ #~ msgstr "Ayudar al autor del plugin"
432
+
433
+ #~ msgid "Show with %s"
434
+ #~ msgstr "Mostrar con %s"
435
+
436
+ #~ msgid "http://www.intox.dk/"
437
+ #~ msgstr "http://www.intox.dk/"
438
+
439
+ #~ msgid "Joachim Jensen, Intox Studio"
440
+ #~ msgstr "Joachim Jensen, Intox Studio"
441
+
442
+ #~ msgid "Words from the author"
443
+ #~ msgstr "Et par ord fra forfatteren"
444
+
445
+ #~ msgid ""
446
+ #~ "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> "
447
+ #~ "and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
448
+ #~ msgstr ""
449
+ #~ "Glem ikke at <a class=\"button\" href=\"%1$s\" target=\"_blank\">vurdere</"
450
+ #~ "a> og <a class=\"button\" href=\"%2$s\" target=\"_blank\">dele</a> det!"
451
+
452
+ #~ msgid "Check out Content Aware Sidebars for %23WordPress! :)"
453
+ #~ msgstr "Jeg bruger Content Aware Sidebars til %23WordPress! :)"
454
+
455
+ #~ msgid "bbPress"
456
+ #~ msgstr "bbPress"
457
+
458
+ #~ msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
459
+ #~ 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,417 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
7
+ "POT-Creation-Date: 2014-05-01 12:57+0100\n"
8
+ "PO-Revision-Date: 2014-05-02 14:13+0100\n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: Kis Lukács <kislukacs@gmail.com>\n"
11
+ "Language: hu_HU\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
+ "X-Poedit-SourceCharset: UTF-8\n"
22
+ "X-Poedit-SearchPath-0: .\n"
23
+ "X-Poedit-SearchPath-1: ..\n"
24
+
25
+ #: ../content-aware-sidebars.php:111
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:112
30
+ msgid "Content Aware Sidebars"
31
+ msgstr "Tartalomfüggő oldalsáv"
32
+
33
+ #: ../content-aware-sidebars.php:232 ../content-aware-sidebars.php:432
34
+ msgid "Exposure"
35
+ msgstr "Expozíció"
36
+
37
+ #: ../content-aware-sidebars.php:238
38
+ msgid "Singular"
39
+ msgstr "Egyes szám"
40
+
41
+ #: ../content-aware-sidebars.php:239
42
+ msgid "Singular & Archive"
43
+ msgstr "Egyes szám & archívum"
44
+
45
+ #: ../content-aware-sidebars.php:240
46
+ msgid "Archive"
47
+ msgstr "Archívum"
48
+
49
+ #: ../content-aware-sidebars.php:244 ../content-aware-sidebars.php:433
50
+ msgctxt "option"
51
+ msgid "Handle"
52
+ msgstr "Művelet"
53
+
54
+ #: ../content-aware-sidebars.php:246
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:250
61
+ msgid "Replace"
62
+ msgstr "Helyettesítés"
63
+
64
+ #: ../content-aware-sidebars.php:251
65
+ msgid "Merge"
66
+ msgstr "Egyesítés"
67
+
68
+ #: ../content-aware-sidebars.php:252
69
+ msgid "Manual"
70
+ msgstr "Manuális"
71
+
72
+ #: ../content-aware-sidebars.php:256
73
+ msgid "Host Sidebar"
74
+ msgstr "Eredeti oldalsáv"
75
+
76
+ #: ../content-aware-sidebars.php:264 ../content-aware-sidebars.php:434
77
+ msgid "Merge position"
78
+ msgstr "Egyesítés helye"
79
+
80
+ #: ../content-aware-sidebars.php:266
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:270
86
+ msgid "Top"
87
+ msgstr "Fent"
88
+
89
+ #: ../content-aware-sidebars.php:271
90
+ msgid "Bottom"
91
+ msgstr "Lent"
92
+
93
+ #: ../content-aware-sidebars.php:296
94
+ msgid "Sidebars"
95
+ msgstr "Oldalsávok"
96
+
97
+ #: ../content-aware-sidebars.php:297
98
+ msgid "Sidebar"
99
+ msgstr "Oldalsáv"
100
+
101
+ #: ../content-aware-sidebars.php:298
102
+ msgctxt "sidebar"
103
+ msgid "Add New"
104
+ msgstr "Új hozzáadása"
105
+
106
+ #: ../content-aware-sidebars.php:299
107
+ msgid "Add New Sidebar"
108
+ msgstr "Új oldalsáv hozzáadása"
109
+
110
+ #: ../content-aware-sidebars.php:300
111
+ msgid "Edit Sidebar"
112
+ msgstr "Oldalsáv szerkesztése"
113
+
114
+ #: ../content-aware-sidebars.php:301
115
+ msgid "New Sidebar"
116
+ msgstr "Új oldalsáv"
117
+
118
+ #: ../content-aware-sidebars.php:302
119
+ msgid "All Sidebars"
120
+ msgstr "Összes oldalsáv"
121
+
122
+ #: ../content-aware-sidebars.php:303
123
+ msgid "View Sidebar"
124
+ msgstr "Oldalsáv megtekintése"
125
+
126
+ #: ../content-aware-sidebars.php:304
127
+ msgid "Search Sidebars"
128
+ msgstr "Oldalsáv keresése"
129
+
130
+ #: ../content-aware-sidebars.php:305
131
+ msgid "No sidebars found"
132
+ msgstr "Oldalsáv nem található"
133
+
134
+ #: ../content-aware-sidebars.php:306
135
+ msgid "No sidebars found in Trash"
136
+ msgstr "Oldalsáv nem található a kukában"
137
+
138
+ #: ../content-aware-sidebars.php:321 ../content-aware-sidebars.php:892
139
+ msgid "Condition Groups"
140
+ msgstr "Feltétel csoportok"
141
+
142
+ #: ../content-aware-sidebars.php:322
143
+ msgid "Condition Group"
144
+ msgstr "Feltétel csoport"
145
+
146
+ #: ../content-aware-sidebars.php:323
147
+ msgctxt "group"
148
+ msgid "Add New"
149
+ msgstr "Új hozzáadása"
150
+
151
+ #: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:892
152
+ #: ../content-aware-sidebars.php:922
153
+ msgid "Add New Group"
154
+ msgstr "Új csoport hozzáadása"
155
+
156
+ #: ../content-aware-sidebars.php:325 ../content-aware-sidebars.php:907
157
+ #: ../content-aware-sidebars.php:1299
158
+ msgctxt "group"
159
+ msgid "Edit"
160
+ msgstr "Szerkesztés"
161
+
162
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:354
163
+ msgid "Sidebar updated."
164
+ msgstr "Oldalsáv frissítve."
165
+
166
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:356
167
+ #: ../content-aware-sidebars.php:358 ../content-aware-sidebars.php:363
168
+ msgid "Manage widgets"
169
+ msgstr "Widgetek kezelése"
170
+
171
+ #: ../content-aware-sidebars.php:356
172
+ msgid "Sidebar published."
173
+ msgstr "Oldalsáv közzétéve."
174
+
175
+ #: ../content-aware-sidebars.php:357
176
+ msgid "Sidebar saved."
177
+ msgstr "Oldalsáv mentve."
178
+
179
+ #: ../content-aware-sidebars.php:358
180
+ msgid "Sidebar submitted."
181
+ msgstr "Oldalsáv létrehozva."
182
+
183
+ #: ../content-aware-sidebars.php:359
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:361
189
+ msgid "M j, Y @ G:i"
190
+ msgstr "M j, Y @ G:i"
191
+
192
+ #: ../content-aware-sidebars.php:364
193
+ msgid "Sidebar draft updated."
194
+ msgstr "Oldalsáv vázlat frissítve."
195
+
196
+ #: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:493
197
+ msgid "Please update Host Sidebar"
198
+ msgstr "Kérjük, frissítse az eredeti oldalsávot"
199
+
200
+ #: ../content-aware-sidebars.php:568
201
+ msgid "Manage Widgets"
202
+ msgstr "Widgetek kezelése"
203
+
204
+ #: ../content-aware-sidebars.php:821
205
+ msgid "Support the Author of Content Aware Sidebars"
206
+ msgstr "A szerző támogatása"
207
+
208
+ #: ../content-aware-sidebars.php:829
209
+ msgid "Content"
210
+ msgstr "Tartalom"
211
+
212
+ #: ../content-aware-sidebars.php:837
213
+ msgid "Options"
214
+ msgstr "Beállítások"
215
+
216
+ #: ../content-aware-sidebars.php:893
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:894
226
+ msgid "Display sidebar with"
227
+ msgstr "Oldalsáv megjelenítése ezzel"
228
+
229
+ #: ../content-aware-sidebars.php:899
230
+ msgid ""
231
+ "No content. Please add at least one condition group to make the sidebar "
232
+ "content aware."
233
+ msgstr ""
234
+ "Nincs tartalom. Kérjük, adjon hozzá legalább egy feltétel csoportot, hogy az "
235
+ "oldalsáv tartalomfüggő legyen. "
236
+
237
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1297
238
+ msgid "Save"
239
+ msgstr "Mentés"
240
+
241
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1298
242
+ msgid "Cancel"
243
+ msgstr "Mégse"
244
+
245
+ #: ../content-aware-sidebars.php:907 ../content-aware-sidebars.php:1300
246
+ msgid "Remove"
247
+ msgstr "Eltávolítás"
248
+
249
+ #: ../content-aware-sidebars.php:997 ../content-aware-sidebars.php:1002
250
+ #: ../content-aware-sidebars.php:1044 ../content-aware-sidebars.php:1049
251
+ #: ../content-aware-sidebars.php:1082 ../content-aware-sidebars.php:1087
252
+ msgid "Unauthorized request"
253
+ msgstr "Jogosulatlan kérés"
254
+
255
+ #: ../content-aware-sidebars.php:1010
256
+ msgid "Condition group cannot be empty"
257
+ msgstr "Feltétel csoportot nem leht létrehozni"
258
+
259
+ #: ../content-aware-sidebars.php:1024
260
+ msgid "Condition group saved"
261
+ msgstr "Feltétel csoport mentve"
262
+
263
+ #: ../content-aware-sidebars.php:1056
264
+ msgid "Condition group could not be created"
265
+ msgstr "Feltétel csoportot nem leht létrehozni"
266
+
267
+ #: ../content-aware-sidebars.php:1061
268
+ msgid "Condition group added"
269
+ msgstr "Feltétel csoport hozzáadva"
270
+
271
+ #: ../content-aware-sidebars.php:1092
272
+ msgid "Condition group could not be removed"
273
+ msgstr "Feltétel csoportot nem lehet törölni"
274
+
275
+ #: ../content-aware-sidebars.php:1097
276
+ msgid "Condition group removed"
277
+ msgstr "Feltétel csoport törölve"
278
+
279
+ #: ../content-aware-sidebars.php:1163
280
+ msgid ""
281
+ "If you love this plugin, please consider donating to support future "
282
+ "development."
283
+ msgstr ""
284
+ "Ha tetszik ez a plugin, kérjük támogassa, hogy folytathassuk a fejlesztését."
285
+
286
+ #: ../content-aware-sidebars.php:1172
287
+ msgid "Or you could:"
288
+ msgstr "Vagy esetleg:"
289
+
290
+ #: ../content-aware-sidebars.php:1174
291
+ msgid "Rate the plugin on WordPress.org"
292
+ msgstr "Értékelje a plugint a WordPress.org címen"
293
+
294
+ #: ../content-aware-sidebars.php:1175
295
+ msgid "Link to the plugin page"
296
+ msgstr "Link a plugin oldalra"
297
+
298
+ #: ../content-aware-sidebars.php:1176
299
+ msgid "Translate the plugin into your language"
300
+ msgstr "Plugin lefordítása a saját nyelvre"
301
+
302
+ #: ../content-aware-sidebars.php:1301
303
+ msgid "Remove this group and its contents permanently?"
304
+ msgstr "Csoport és tartalmának eltávolítása véglegesen?"
305
+
306
+ #: ../content-aware-sidebars.php:1302
307
+ msgid "No results found."
308
+ msgstr "Nincs találat."
309
+
310
+ #: ../content-aware-sidebars.php:1303
311
+ msgid ""
312
+ "The current group has unsaved changes. Do you want to continue and discard "
313
+ "these changes?"
314
+ msgstr ""
315
+ "A csoportban vannak nem mentett módosítások. Valóban szeretné elvetni a "
316
+ "módosításokat és szeretne továbblépni?"
317
+
318
+ #: ../modules/abstract.php:88
319
+ #, php-format
320
+ msgid "Display with All %s"
321
+ msgstr "Megjelenítés az összes %s-val/vel"
322
+
323
+ #: ../modules/abstract.php:98 ../modules/bp_member.php:104
324
+ #: ../modules/post_type.php:198 ../modules/taxonomy.php:243
325
+ msgid "View All"
326
+ msgstr "Összes megtekintése"
327
+
328
+ #: ../modules/abstract.php:105 ../modules/abstract.php:108
329
+ #: ../modules/post_type.php:204 ../modules/post_type.php:207
330
+ #: ../modules/taxonomy.php:249 ../modules/taxonomy.php:252
331
+ msgid "Search"
332
+ msgstr "Keresés"
333
+
334
+ #: ../modules/abstract.php:116 ../modules/bp_member.php:113
335
+ #: ../modules/post_type.php:217 ../modules/taxonomy.php:262
336
+ msgid "Add to Group"
337
+ msgstr "Hozzáadás a csoporthoz"
338
+
339
+ #: ../modules/abstract.php:188
340
+ #, php-format
341
+ msgid "All %s"
342
+ msgstr "Összes %s"
343
+
344
+ #: ../modules/author.php:22
345
+ msgid "Authors"
346
+ msgstr "Szerzők"
347
+
348
+ #: ../modules/bbpress.php:23
349
+ msgid "bbPress User Profiles"
350
+ msgstr "bbPress felhasználói fiókok"
351
+
352
+ #: ../modules/bp_member.php:21
353
+ msgid "BuddyPress Members"
354
+ msgstr "BuddyPress felhasználók"
355
+
356
+ #: ../modules/page_template.php:22
357
+ msgid "Page Templates"
358
+ msgstr "Oldal sablonok"
359
+
360
+ #: ../modules/polylang.php:21 ../modules/qtranslate.php:21
361
+ #: ../modules/transposh.php:21 ../modules/wpml.php:21
362
+ msgid "Languages"
363
+ msgstr "Nyelvek"
364
+
365
+ #: ../modules/post_type.php:28
366
+ msgid "Post Types"
367
+ msgstr "Bejegyzés típusok"
368
+
369
+ #: ../modules/post_type.php:105 ../modules/post_type.php:171
370
+ #: ../modules/taxonomy.php:182 ../modules/taxonomy.php:217
371
+ msgid "Automatically select new children of a selected ancestor"
372
+ msgstr "Automatikus utód kiválasztása az ős alapján."
373
+
374
+ #: ../modules/post_type.php:177 ../modules/taxonomy.php:221
375
+ #, php-format
376
+ msgid "Display with %s"
377
+ msgstr "Megjelenítés %s-val/vel."
378
+
379
+ #: ../modules/post_type.php:182 ../modules/taxonomy.php:225
380
+ msgid "No items."
381
+ msgstr "Nincs elem."
382
+
383
+ #: ../modules/post_type.php:193
384
+ msgid "Most Recent"
385
+ msgstr "Legújabb"
386
+
387
+ #: ../modules/static.php:23
388
+ msgid "Static Pages"
389
+ msgstr "Statikus oldal"
390
+
391
+ #: ../modules/static.php:33
392
+ msgid "Front Page"
393
+ msgstr "Kezdőlap"
394
+
395
+ #: ../modules/static.php:34
396
+ msgid "Search Results"
397
+ msgstr "Keresési találatok"
398
+
399
+ #: ../modules/static.php:35
400
+ msgid "404 Page"
401
+ msgstr "404-es oldal"
402
+
403
+ #: ../modules/taxonomy.php:34
404
+ msgid "Taxonomies"
405
+ msgstr "Taxonómiák"
406
+
407
+ #: ../modules/taxonomy.php:238
408
+ msgid "Most Used"
409
+ msgstr "Leggyakrabban használt"
410
+
411
+ #: ../modules/url.php:22
412
+ msgid "URLs"
413
+ msgstr "URL-ek"
414
+
415
+ #: ../modules/url.php:40
416
+ msgid "Add"
417
+ msgstr "Hozzáadás"
lang/content-aware-sidebars-it_IT.mo CHANGED
Binary file
lang/content-aware-sidebars-it_IT.po CHANGED
@@ -4,284 +4,490 @@ 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-01-07 16:09:52+00:00\n"
8
- "PO-Revision-Date: 2013-01-10 14:21+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"
12
  "MIME-Version: 1.0\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.4\n"
17
 
18
- #: content-aware-sidebars.php:150 content-aware-sidebars.php:327
 
 
 
 
 
 
 
 
19
  msgid "Exposure"
20
  msgstr "Tipologia"
21
 
22
- #: content-aware-sidebars.php:156
23
  msgid "Singular"
24
  msgstr "Singola"
25
 
26
- #: content-aware-sidebars.php:157
27
  msgid "Singular & Archive"
28
  msgstr "Singola e archivio"
29
 
30
- #: content-aware-sidebars.php:158
31
  msgid "Archive"
32
  msgstr "Archivio"
33
 
34
- #: content-aware-sidebars.php:162 content-aware-sidebars.php:328
35
  msgctxt "option"
36
  msgid "Handle"
37
  msgstr "Comportamento"
38
 
39
- #: content-aware-sidebars.php:164
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:168
45
  msgid "Replace"
46
  msgstr "Sostituzione"
47
 
48
- #: content-aware-sidebars.php:169
49
  msgid "Merge"
50
  msgstr "Unione"
51
 
52
- #: content-aware-sidebars.php:170
53
  msgid "Manual"
54
  msgstr "Manuale"
55
 
56
- #: content-aware-sidebars.php:174
57
  msgid "Host Sidebar"
58
  msgstr "Sidebar"
59
 
60
- #: content-aware-sidebars.php:182 content-aware-sidebars.php:329
61
  msgid "Merge position"
62
  msgstr "Posizione"
63
 
64
- #: content-aware-sidebars.php:184
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:188
69
  msgid "Top"
70
  msgstr "Alto"
71
 
72
- #: content-aware-sidebars.php:189
73
  msgid "Bottom"
74
  msgstr "Basso"
75
 
76
- #: content-aware-sidebars.php:210
77
  msgid "Sidebars"
78
  msgstr "Sidebars"
79
 
80
- #: content-aware-sidebars.php:211
81
  msgid "Sidebar"
82
  msgstr "Sidebar"
83
 
84
- #: content-aware-sidebars.php:212
85
  msgctxt "sidebar"
86
  msgid "Add New"
87
  msgstr "Aggiungi"
88
 
89
- #: content-aware-sidebars.php:213
90
  msgid "Add New Sidebar"
91
  msgstr "Aggiungi Nuova Sidebar"
92
 
93
- #: content-aware-sidebars.php:214
94
  msgid "Edit Sidebar"
95
  msgstr "Modifica Sidebar"
96
 
97
- #: content-aware-sidebars.php:215
98
  msgid "New Sidebar"
99
  msgstr "Nuova Sidebar"
100
 
101
- #: content-aware-sidebars.php:216
102
  msgid "All Sidebars"
103
  msgstr "Tutte le Sidebars"
104
 
105
- #: content-aware-sidebars.php:217
106
  msgid "View Sidebar"
107
  msgstr "Vedi Sidebar"
108
 
109
- #: content-aware-sidebars.php:218
110
  msgid "Search Sidebars"
111
  msgstr "Cerca Sidebars"
112
 
113
- #: content-aware-sidebars.php:219
114
  msgid "No sidebars found"
115
  msgstr "Nessuna sidebar trovata"
116
 
117
- #: content-aware-sidebars.php:220
118
  msgid "No sidebars found in Trash"
119
  msgstr "nessuna sidebar cancellata"
120
 
121
- #: content-aware-sidebars.php:253
122
- msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
123
- msgstr "Sidebar aggiornata. <a href=\"%s\">Gestione widgets</a>"
 
 
 
 
 
 
 
 
 
124
 
125
- #: content-aware-sidebars.php:256
 
 
 
 
 
 
 
 
 
 
 
126
  msgid "Sidebar updated."
127
  msgstr "Sidebar aggiornata."
128
 
129
- #: content-aware-sidebars.php:258
130
- msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
131
- msgstr "Sidebar publicata. <a href=\"%s\">Gestione widgets</a>"
 
 
 
 
 
132
 
133
- #: content-aware-sidebars.php:259
134
  msgid "Sidebar saved."
135
  msgstr "Sidebar salvata."
136
 
137
- #: content-aware-sidebars.php:260
138
- msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
139
- msgstr "Sidebar inviata. <a href=\"%s\">Gestione widgets</a>"
140
 
141
- #: content-aware-sidebars.php:261
142
- msgid ""
143
- "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage "
144
- "widgets</a>"
145
- msgstr ""
146
- "Sidebar posticipata per: <strong>%1$s</strong>. <a href=\"%2$s\">Gestione "
147
- "widgets</a>"
148
 
149
- #. translators: Publish box date format, see http:php.net/date
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:264
155
  msgid "Sidebar draft updated."
156
  msgstr "Bozza sidebar aggiornata. "
157
 
158
- #: content-aware-sidebars.php:391
159
  msgid "Please update Host Sidebar"
160
  msgstr "Aggiorna Sidebar"
161
 
162
- #: content-aware-sidebars.php:454
163
  msgid "Manage Widgets"
164
  msgstr "Gestione Widgets"
165
 
166
- #: content-aware-sidebars.php:651
167
- msgid "Words from the author"
168
- msgstr "Parole dell'autore"
169
 
170
- #: content-aware-sidebars.php:661
171
  msgid "Content"
172
  msgstr "Contenuto"
173
 
174
- #: content-aware-sidebars.php:671
175
  msgid "Options"
176
  msgstr "Opzioni"
177
 
178
- #: content-aware-sidebars.php:766
179
- msgid "If you love this plugin, please consider donating."
180
- msgstr "Se ti piace questo plugin, considera l'eventualità fare una donazione."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
 
182
- #: content-aware-sidebars.php:768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  msgid ""
184
- "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and "
185
- "<a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
186
  msgstr ""
187
- "Ricorda di <a class=\"button\" href=\"%1$s\" target=\"_blank\">valutarlo</"
188
- "a> e <a class=\"button\" href=\"%2$s\" target=\"_blank\">condiverlo</a>!"
 
 
 
 
 
 
 
 
 
 
 
189
 
190
- #: content-aware-sidebars.php:770
191
- msgid "Check out Content Aware Sidebars for %23WordPress! :)"
192
- msgstr "Verifica Content Aware Sidebars per %23WordPress! :)"
193
 
194
- #: content-aware-sidebars.php:772
195
- msgid "Check out Content Aware Sidebars :)"
196
- msgstr "Verifica Content Aware Sidebars per WordPress! :)"
197
 
198
- #: modules/abstract.php:39 modules/post_type.php:78
199
- msgid "Show with All %s"
200
- msgstr "Seleziona tutto: %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
- #: modules/abstract.php:43 modules/post_type.php:88 modules/taxonomy.php:121
 
203
  msgid "View All"
204
  msgstr "Vedi tutti"
205
 
206
- #: modules/author.php:21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  msgid "Authors"
208
  msgstr "Autori"
209
 
210
- #: modules/bbpress.php:20
211
  msgid "bbPress User Profiles"
212
  msgstr "Profilo utente bbPress"
213
 
214
- #: modules/bp_member.php:20
215
  msgid "BuddyPress Members"
216
  msgstr "Utenti BuddyPress"
217
 
218
- #: modules/page_template.php:21
219
  msgid "Page Templates"
220
- msgstr "Template Pagine"
221
 
222
- #: modules/polylang.php:20 modules/qtranslate.php:20 modules/transposh.php:20
223
- #: modules/wpml.php:20
224
  msgid "Languages"
225
  msgstr "Lingue"
226
 
227
- #: modules/post_type.php:23
228
  msgid "Post Types"
229
  msgstr "Tipi di messaggi"
230
 
231
- #: modules/post_type.php:73 modules/taxonomy.php:107
 
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:82 modules/taxonomy.php:115
 
 
 
 
 
236
  msgid "No items."
237
  msgstr "Nessun oggetto."
238
 
239
- #: modules/static.php:22
 
 
 
 
240
  msgid "Static Pages"
241
  msgstr "Pagine statiche"
242
 
243
- #: modules/static.php:27
244
  msgid "Front Page"
245
  msgstr "Pagina principale"
246
 
247
- #: modules/static.php:28
248
  msgid "Search Results"
249
  msgstr "Risultati di ricerca"
250
 
251
- #: modules/static.php:29
252
  msgid "404 Page"
253
  msgstr "Pagina 404"
254
 
255
- #: modules/taxonomy.php:24
256
  msgid "Taxonomies"
257
  msgstr "Tassonomie"
258
 
259
- #: modules/taxonomy.php:111
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
- #. Plugin Name of the plugin/theme
268
- msgid "Content Aware Sidebars"
269
- msgstr "Content Aware Sidebars"
270
 
271
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
272
- #. Plugin URI of the plugin/theme
273
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
274
- #. Author URI of the plugin/theme
275
- msgid "http://www.intox.dk/"
276
- msgstr "http://www.intox.dk/"
277
 
278
- #. Description of the plugin/theme
279
- msgid "Manage and show sidebars according to the content being viewed."
280
- msgstr "Gestisce e mostra sidebars a seconda del contenuto visualizzato."
 
 
 
 
 
 
 
281
 
282
- #. Author of the plugin/theme
283
- msgid "Joachim Jensen"
284
- msgstr "Joachim Jensen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 2014-05-01 12:57+0100\n"
8
+ "PO-Revision-Date: 2014-05-01 13:19+0100\n"
9
+ "Last-Translator: \n"
10
  "Language-Team: MyWeb2 <info@myweb2.it>\n"
11
  "Language: it_IT\n"
12
  "MIME-Version: 1.0\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.5\n"
17
 
18
+ #: ../content-aware-sidebars.php:111
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:112
23
+ msgid "Content Aware Sidebars"
24
+ msgstr "Content Aware Sidebars"
25
+
26
+ #: ../content-aware-sidebars.php:232 ../content-aware-sidebars.php:432
27
  msgid "Exposure"
28
  msgstr "Tipologia"
29
 
30
+ #: ../content-aware-sidebars.php:238
31
  msgid "Singular"
32
  msgstr "Singola"
33
 
34
+ #: ../content-aware-sidebars.php:239
35
  msgid "Singular & Archive"
36
  msgstr "Singola e archivio"
37
 
38
+ #: ../content-aware-sidebars.php:240
39
  msgid "Archive"
40
  msgstr "Archivio"
41
 
42
+ #: ../content-aware-sidebars.php:244 ../content-aware-sidebars.php:433
43
  msgctxt "option"
44
  msgid "Handle"
45
  msgstr "Comportamento"
46
 
47
+ #: ../content-aware-sidebars.php:246
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:250
53
  msgid "Replace"
54
  msgstr "Sostituzione"
55
 
56
+ #: ../content-aware-sidebars.php:251
57
  msgid "Merge"
58
  msgstr "Unione"
59
 
60
+ #: ../content-aware-sidebars.php:252
61
  msgid "Manual"
62
  msgstr "Manuale"
63
 
64
+ #: ../content-aware-sidebars.php:256
65
  msgid "Host Sidebar"
66
  msgstr "Sidebar"
67
 
68
+ #: ../content-aware-sidebars.php:264 ../content-aware-sidebars.php:434
69
  msgid "Merge position"
70
  msgstr "Posizione"
71
 
72
+ #: ../content-aware-sidebars.php:266
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:270
77
  msgid "Top"
78
  msgstr "Alto"
79
 
80
+ #: ../content-aware-sidebars.php:271
81
  msgid "Bottom"
82
  msgstr "Basso"
83
 
84
+ #: ../content-aware-sidebars.php:296
85
  msgid "Sidebars"
86
  msgstr "Sidebars"
87
 
88
+ #: ../content-aware-sidebars.php:297
89
  msgid "Sidebar"
90
  msgstr "Sidebar"
91
 
92
+ #: ../content-aware-sidebars.php:298
93
  msgctxt "sidebar"
94
  msgid "Add New"
95
  msgstr "Aggiungi"
96
 
97
+ #: ../content-aware-sidebars.php:299
98
  msgid "Add New Sidebar"
99
  msgstr "Aggiungi Nuova Sidebar"
100
 
101
+ #: ../content-aware-sidebars.php:300
102
  msgid "Edit Sidebar"
103
  msgstr "Modifica Sidebar"
104
 
105
+ #: ../content-aware-sidebars.php:301
106
  msgid "New Sidebar"
107
  msgstr "Nuova Sidebar"
108
 
109
+ #: ../content-aware-sidebars.php:302
110
  msgid "All Sidebars"
111
  msgstr "Tutte le Sidebars"
112
 
113
+ #: ../content-aware-sidebars.php:303
114
  msgid "View Sidebar"
115
  msgstr "Vedi Sidebar"
116
 
117
+ #: ../content-aware-sidebars.php:304
118
  msgid "Search Sidebars"
119
  msgstr "Cerca Sidebars"
120
 
121
+ #: ../content-aware-sidebars.php:305
122
  msgid "No sidebars found"
123
  msgstr "Nessuna sidebar trovata"
124
 
125
+ #: ../content-aware-sidebars.php:306
126
  msgid "No sidebars found in Trash"
127
  msgstr "nessuna sidebar cancellata"
128
 
129
+ #: ../content-aware-sidebars.php:321 ../content-aware-sidebars.php:892
130
+ msgid "Condition Groups"
131
+ msgstr "Condizione gruppi "
132
+
133
+ #: ../content-aware-sidebars.php:322
134
+ msgid "Condition Group"
135
+ msgstr "Condizione gruppo "
136
+
137
+ #: ../content-aware-sidebars.php:323
138
+ msgctxt "group"
139
+ msgid "Add New"
140
+ msgstr "Aggiungi"
141
 
142
+ #: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:892
143
+ #: ../content-aware-sidebars.php:922
144
+ msgid "Add New Group"
145
+ msgstr "Aggiungi"
146
+
147
+ #: ../content-aware-sidebars.php:325 ../content-aware-sidebars.php:907
148
+ #: ../content-aware-sidebars.php:1299
149
+ msgctxt "group"
150
+ msgid "Edit"
151
+ msgstr "Modifica"
152
+
153
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:354
154
  msgid "Sidebar updated."
155
  msgstr "Sidebar aggiornata."
156
 
157
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:356
158
+ #: ../content-aware-sidebars.php:358 ../content-aware-sidebars.php:363
159
+ msgid "Manage widgets"
160
+ msgstr "Gestione Widgets"
161
+
162
+ #: ../content-aware-sidebars.php:356
163
+ msgid "Sidebar published."
164
+ msgstr "Sidebar pubblicata."
165
 
166
+ #: ../content-aware-sidebars.php:357
167
  msgid "Sidebar saved."
168
  msgstr "Sidebar salvata."
169
 
170
+ #: ../content-aware-sidebars.php:358
171
+ msgid "Sidebar submitted."
172
+ msgstr "Sidebar aggiornata."
173
 
174
+ #: ../content-aware-sidebars.php:359
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:361
 
180
  msgid "M j, Y @ G:i"
181
  msgstr "M j, Y @ G:i"
182
 
183
+ #: ../content-aware-sidebars.php:364
184
  msgid "Sidebar draft updated."
185
  msgstr "Bozza sidebar aggiornata. "
186
 
187
+ #: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:493
188
  msgid "Please update Host Sidebar"
189
  msgstr "Aggiorna Sidebar"
190
 
191
+ #: ../content-aware-sidebars.php:568
192
  msgid "Manage Widgets"
193
  msgstr "Gestione Widgets"
194
 
195
+ #: ../content-aware-sidebars.php:821
196
+ msgid "Support the Author of Content Aware Sidebars"
197
+ msgstr "Supporta l'autore di Content Aware Sidebars"
198
 
199
+ #: ../content-aware-sidebars.php:829
200
  msgid "Content"
201
  msgstr "Contenuto"
202
 
203
+ #: ../content-aware-sidebars.php:837
204
  msgid "Options"
205
  msgstr "Opzioni"
206
 
207
+ #: ../content-aware-sidebars.php:893
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:894
217
+ msgid "Display sidebar with"
218
+ msgstr "Visualizza larghezza sidebar"
219
+
220
+ #: ../content-aware-sidebars.php:899
221
+ msgid ""
222
+ "No content. Please add at least one condition group to make the sidebar "
223
+ "content aware."
224
+ msgstr ""
225
+ "Nessun contenuto. Si prega di aggiungere almeno una condizione di gruppo per "
226
+ "impostare il il contenuto della sidebar"
227
+
228
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1297
229
+ msgid "Save"
230
+ msgstr "Salva"
231
+
232
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1298
233
+ msgid "Cancel"
234
+ msgstr "Annulla"
235
+
236
+ #: ../content-aware-sidebars.php:907 ../content-aware-sidebars.php:1300
237
+ msgid "Remove"
238
+ msgstr "Elimina"
239
+
240
+ #: ../content-aware-sidebars.php:997 ../content-aware-sidebars.php:1002
241
+ #: ../content-aware-sidebars.php:1044 ../content-aware-sidebars.php:1049
242
+ #: ../content-aware-sidebars.php:1082 ../content-aware-sidebars.php:1087
243
+ msgid "Unauthorized request"
244
+ msgstr "Richiesta non autorizzata"
245
 
246
+ #: ../content-aware-sidebars.php:1010
247
+ msgid "Condition group cannot be empty"
248
+ msgstr "Impossibile creare condizioni di gruppo"
249
+
250
+ #: ../content-aware-sidebars.php:1024
251
+ msgid "Condition group saved"
252
+ msgstr "Condizioni di gruppo salvate"
253
+
254
+ #: ../content-aware-sidebars.php:1056
255
+ msgid "Condition group could not be created"
256
+ msgstr "Impossibile creare condizioni di gruppo"
257
+
258
+ #: ../content-aware-sidebars.php:1061
259
+ msgid "Condition group added"
260
+ msgstr "Aggiunta condizione di gruppo"
261
+
262
+ #: ../content-aware-sidebars.php:1092
263
+ msgid "Condition group could not be removed"
264
+ msgstr "Le condizioni di gruppo non possono essere eliminate"
265
+
266
+ #: ../content-aware-sidebars.php:1097
267
+ msgid "Condition group removed"
268
+ msgstr "Condizione di gruppo eliminata "
269
+
270
+ #: ../content-aware-sidebars.php:1163
271
  msgid ""
272
+ "If you love this plugin, please consider donating to support future "
273
+ "development."
274
  msgstr ""
275
+ "Se ti piace questo plugin, considera l'eventualità di fare una donazione."
276
+
277
+ #: ../content-aware-sidebars.php:1172
278
+ msgid "Or you could:"
279
+ msgstr "Ti potrebbe anche interessare:"
280
+
281
+ #: ../content-aware-sidebars.php:1174
282
+ msgid "Rate the plugin on WordPress.org"
283
+ msgstr "Valutare il plugin su WordPress.org"
284
+
285
+ #: ../content-aware-sidebars.php:1175
286
+ msgid "Link to the plugin page"
287
+ msgstr "Collegarti alla pagina WordPress del plugin"
288
 
289
+ #: ../content-aware-sidebars.php:1176
290
+ msgid "Translate the plugin into your language"
291
+ msgstr "Tradurre questo plugin nella tua lingua"
292
 
293
+ #: ../content-aware-sidebars.php:1301
294
+ msgid "Remove this group and its contents permanently?"
295
+ msgstr "Vuoi eliminare questo gruppo e il suo contenuto in modo permanente?"
296
 
297
+ #: ../content-aware-sidebars.php:1302
298
+ msgid "No results found."
299
+ msgstr "Nessuna sidebar trovata"
300
+
301
+ #: ../content-aware-sidebars.php:1303
302
+ msgid ""
303
+ "The current group has unsaved changes. Do you want to continue and discard "
304
+ "these changes?"
305
+ msgstr ""
306
+ "Il gruppo attuale contiene modifiche non salvate. Vuoi proseguire e "
307
+ "eliminare questi cambiamenti?"
308
+
309
+ #: ../modules/abstract.php:88
310
+ #, php-format
311
+ msgid "Display with All %s"
312
+ msgstr "Visualizza tutte le %s"
313
 
314
+ #: ../modules/abstract.php:98 ../modules/bp_member.php:104
315
+ #: ../modules/post_type.php:198 ../modules/taxonomy.php:243
316
  msgid "View All"
317
  msgstr "Vedi tutti"
318
 
319
+ #: ../modules/abstract.php:105 ../modules/abstract.php:108
320
+ #: ../modules/post_type.php:204 ../modules/post_type.php:207
321
+ #: ../modules/taxonomy.php:249 ../modules/taxonomy.php:252
322
+ msgid "Search"
323
+ msgstr "Cerca"
324
+
325
+ #: ../modules/abstract.php:116 ../modules/bp_member.php:113
326
+ #: ../modules/post_type.php:217 ../modules/taxonomy.php:262
327
+ msgid "Add to Group"
328
+ msgstr "Aggiungi gruppo"
329
+
330
+ #: ../modules/abstract.php:188
331
+ #, php-format
332
+ msgid "All %s"
333
+ msgstr "Tutte le %s"
334
+
335
+ #: ../modules/author.php:22
336
  msgid "Authors"
337
  msgstr "Autori"
338
 
339
+ #: ../modules/bbpress.php:23
340
  msgid "bbPress User Profiles"
341
  msgstr "Profilo utente bbPress"
342
 
343
+ #: ../modules/bp_member.php:21
344
  msgid "BuddyPress Members"
345
  msgstr "Utenti BuddyPress"
346
 
347
+ #: ../modules/page_template.php:22
348
  msgid "Page Templates"
349
+ msgstr "Template pagine"
350
 
351
+ #: ../modules/polylang.php:21 ../modules/qtranslate.php:21
352
+ #: ../modules/transposh.php:21 ../modules/wpml.php:21
353
  msgid "Languages"
354
  msgstr "Lingue"
355
 
356
+ #: ../modules/post_type.php:28
357
  msgid "Post Types"
358
  msgstr "Tipi di messaggi"
359
 
360
+ #: ../modules/post_type.php:105 ../modules/post_type.php:171
361
+ #: ../modules/taxonomy.php:182 ../modules/taxonomy.php:217
362
  msgid "Automatically select new children of a selected ancestor"
363
  msgstr "Seleziona automaticamente nuovi figli di un percorso selezionato"
364
 
365
+ #: ../modules/post_type.php:177 ../modules/taxonomy.php:221
366
+ #, php-format
367
+ msgid "Display with %s"
368
+ msgstr "Larghezza %s"
369
+
370
+ #: ../modules/post_type.php:182 ../modules/taxonomy.php:225
371
  msgid "No items."
372
  msgstr "Nessun oggetto."
373
 
374
+ #: ../modules/post_type.php:193
375
+ msgid "Most Recent"
376
+ msgstr "Più usati"
377
+
378
+ #: ../modules/static.php:23
379
  msgid "Static Pages"
380
  msgstr "Pagine statiche"
381
 
382
+ #: ../modules/static.php:33
383
  msgid "Front Page"
384
  msgstr "Pagina principale"
385
 
386
+ #: ../modules/static.php:34
387
  msgid "Search Results"
388
  msgstr "Risultati di ricerca"
389
 
390
+ #: ../modules/static.php:35
391
  msgid "404 Page"
392
  msgstr "Pagina 404"
393
 
394
+ #: ../modules/taxonomy.php:34
395
  msgid "Taxonomies"
396
  msgstr "Tassonomie"
397
 
398
+ #: ../modules/taxonomy.php:238
 
 
 
 
399
  msgid "Most Used"
400
  msgstr "Più usati"
401
 
402
+ #: ../modules/url.php:22
403
+ msgid "URLs"
404
+ msgstr "URL"
405
 
406
+ #: ../modules/url.php:40
407
+ msgid "Add"
408
+ msgstr "Aggiungi"
 
 
 
409
 
410
+ #~ msgid "Show with All %s"
411
+ #~ msgstr "Seleziona tutto: %s"
412
+
413
+ #, fuzzy
414
+ #~ msgid "New Sidebar Group"
415
+ #~ msgstr "Nuova Sidebar"
416
+
417
+ #, fuzzy
418
+ #~ msgid "Sidebar Groups"
419
+ #~ msgstr "Sidebars"
420
 
421
+ #, fuzzy
422
+ #~ msgid "Sidebar Group"
423
+ #~ msgstr "Sidebar"
424
+
425
+ #, fuzzy
426
+ #~ msgid "Add New Sidebar Group"
427
+ #~ msgstr "Aggiungi Nuova Sidebar"
428
+
429
+ #, fuzzy
430
+ #~ msgid "Edit Sidebar Group"
431
+ #~ msgstr "Modifica Sidebar"
432
+
433
+ #, fuzzy
434
+ #~ msgid "All Sidebar Groups"
435
+ #~ msgstr "Tutte le Sidebars"
436
+
437
+ #, fuzzy
438
+ #~ msgid "View Sidebar Group"
439
+ #~ msgstr "Vedi Sidebar"
440
+
441
+ #, fuzzy
442
+ #~ msgid "Search Sidebar Groups"
443
+ #~ msgstr "Cerca Sidebars"
444
+
445
+ #, fuzzy
446
+ #~ msgid "No sidebar groups found"
447
+ #~ msgstr "Nessuna sidebar trovata"
448
+
449
+ #, fuzzy
450
+ #~ msgid "No sidebar groups found in Trash"
451
+ #~ msgstr "nessuna sidebar cancellata"
452
+
453
+ #~ msgid "http://www.intox.dk/"
454
+ #~ msgstr "http://www.intox.dk/"
455
+
456
+ #~ msgid "Joachim Jensen, Intox Studio"
457
+ #~ msgstr "Joachim Jensen, Intox Studio"
458
+
459
+ #~ msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
460
+ #~ msgstr "Sidebar aggiornata. <a href=\"%s\">Gestione widgets</a>"
461
+
462
+ #~ msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
463
+ #~ msgstr "Sidebar publicata. <a href=\"%s\">Gestione widgets</a>"
464
+
465
+ #~ msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
466
+ #~ msgstr "Sidebar inviata. <a href=\"%s\">Gestione widgets</a>"
467
+
468
+ #~ msgid "Spread the Word"
469
+ #~ msgstr "Spargi la voce"
470
+
471
+ #~ msgid "Show with %s"
472
+ #~ msgstr "Mostra %s"
473
+
474
+ #~ msgid "Words from the author"
475
+ #~ msgstr "Parole dell'autore"
476
+
477
+ #~ msgid ""
478
+ #~ "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> "
479
+ #~ "and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
480
+ #~ msgstr ""
481
+ #~ "Ricorda di <a class=\"button\" href=\"%1$s\" target=\"_blank"
482
+ #~ "\">valutarlo</a> e <a class=\"button\" href=\"%2$s\" target=\"_blank"
483
+ #~ "\">condiverlo</a>!"
484
+
485
+ #~ msgid "Check out Content Aware Sidebars for %23WordPress! :)"
486
+ #~ msgstr "Verifica Content Aware Sidebars per %23WordPress! :)"
487
 
488
  #~ msgid "bbPress"
489
  #~ msgstr "bbPress"
490
+
491
+ #, fuzzy
492
+ #~ msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
493
+ #~ 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
@@ -4,14 +4,14 @@ 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-03-31 21:23:20+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-04-03 20:58+0100\n"
12
  "Last-Translator: Joachim Jensen <jv@intox.dk>\n"
13
  "Language-Team: Host1Free.com <info@host1free.com>\n"
14
  "Language: Lithuanian\n"
 
 
 
15
  "X-Generator: Poedit 1.5.5\n"
16
 
17
  #: content-aware-sidebars.php:178 content-aware-sidebars.php:345
@@ -164,19 +164,19 @@ msgstr "Prašome atnaujinti Serverio Šoninę Juostą"
164
  msgid "Manage Widgets"
165
  msgstr "Tvarkyti Valdiklius"
166
 
167
- #: content-aware-sidebars.php:688
168
  msgid "Content"
169
  msgstr "Turinys"
170
 
171
- #: content-aware-sidebars.php:698
172
  msgid "Options"
173
  msgstr "Parinktys"
174
 
175
- #: content-aware-sidebars.php:707
176
  msgid "Spread the Word"
177
  msgstr "Paskleiskite Žinią"
178
 
179
- #: content-aware-sidebars.php:797
180
  msgid ""
181
  "If you love this plugin, please consider donating to support future "
182
  "development."
@@ -184,25 +184,31 @@ 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:802
188
  msgid "Or you could:"
189
  msgstr "Arba galite:"
190
 
191
- #: content-aware-sidebars.php:804
192
  msgid "Rate the plugin on WordPress.org"
193
  msgstr "Įvertinti papildinį WordPress.org svetainėje"
194
 
195
- #: content-aware-sidebars.php:805
196
  msgid "Link to the plugin page"
197
  msgstr "Nukreipti į papildinio puslapį"
198
 
199
- #: modules/abstract.php:53 modules/post_type.php:111
200
  msgid "Show with All %s"
201
  msgstr "Rodyti su Visais %s"
202
 
203
- #: modules/abstract.php:57 modules/taxonomy.php:163
204
- msgid "View All"
205
- msgstr "Peržiūrėti Visus"
 
 
 
 
 
 
206
 
207
  #: modules/author.php:24
208
  msgid "Authors"
@@ -229,22 +235,14 @@ msgstr "Kalbas"
229
  msgid "Post Types"
230
  msgstr "Įrašų Tipus"
231
 
232
- #: modules/post_type.php:105 modules/taxonomy.php:149
233
  msgid "Automatically select new children of a selected ancestor"
234
  msgstr "Automatiškai pasirinkti naujus pažymėtų savininkų \"vaikus\"."
235
 
236
- #: modules/post_type.php:115 modules/taxonomy.php:157
237
  msgid "No items."
238
  msgstr "Jokių elementų. "
239
 
240
- #: modules/post_type.php:136 modules/url.php:42
241
- msgid "Search"
242
- msgstr "Ieškoti"
243
-
244
- #: modules/post_type.php:136 modules/url.php:42
245
- msgid "Add"
246
- msgstr "Pridėti"
247
-
248
  #: modules/static.php:25
249
  msgid "Static Pages"
250
  msgstr "Statiniai Puslapiai"
@@ -265,14 +263,10 @@ msgstr "404 Puslapis"
265
  msgid "Taxonomies"
266
  msgstr "Taksonomijos"
267
 
268
- #: modules/taxonomy.php:153
269
  msgid "Show with %s"
270
  msgstr "Rodyti su %s"
271
 
272
- #: modules/taxonomy.php:162
273
- msgid "Most Used"
274
- msgstr "Dažniausiai naudoti(os)"
275
-
276
  #: modules/url.php:24
277
  msgid "URLs"
278
  msgstr "Universalieji Adresai"
@@ -281,9 +275,9 @@ msgstr "Universalieji Adresai"
281
  msgid "Content Aware Sidebars"
282
  msgstr "Content Aware Sidebars"
283
 
284
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.2) #-#-#-#-#
285
  #. Plugin URI of the plugin/theme
286
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.2) #-#-#-#-#
287
  #. Author URI of the plugin/theme
288
  msgid "http://www.intox.dk/"
289
  msgstr "http://www.intox.dk/"
@@ -297,3 +291,9 @@ msgstr ""
297
  #. Author of the plugin/theme
298
  msgid "Joachim Jensen, Intox Studio"
299
  msgstr "Joachim Jensen, Intox Studio"
 
 
 
 
 
 
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
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."
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"
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"
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"
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/"
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.pot → content-aware-sidebars-sk_SK.po} RENAMED
@@ -1,268 +1,267 @@
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.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
7
- "POT-Creation-Date: 2013-03-31 21:23:20+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:178 content-aware-sidebars.php:345
16
  msgid "Exposure"
17
- msgstr ""
18
 
19
  #: content-aware-sidebars.php:184
20
  msgid "Singular"
21
- msgstr ""
22
 
23
  #: content-aware-sidebars.php:185
24
  msgid "Singular & Archive"
25
- msgstr ""
26
 
27
  #: content-aware-sidebars.php:186
28
  msgid "Archive"
29
- msgstr ""
30
 
31
  #: content-aware-sidebars.php:190 content-aware-sidebars.php:346
32
  msgctxt "option"
33
  msgid "Handle"
34
- msgstr ""
35
 
36
  #: content-aware-sidebars.php:192
37
  msgid "Replace host sidebar, merge with it or add sidebar manually."
38
  msgstr ""
 
39
 
40
  #: content-aware-sidebars.php:196
41
  msgid "Replace"
42
- msgstr ""
43
 
44
  #: content-aware-sidebars.php:197
45
  msgid "Merge"
46
- msgstr ""
47
 
48
  #: content-aware-sidebars.php:198
49
  msgid "Manual"
50
- msgstr ""
51
 
52
  #: content-aware-sidebars.php:202
53
  msgid "Host Sidebar"
54
- msgstr ""
55
 
56
  #: content-aware-sidebars.php:210 content-aware-sidebars.php:347
57
  msgid "Merge position"
58
- msgstr ""
59
 
60
  #: content-aware-sidebars.php:212
61
  msgid "Place sidebar on top or bottom of host when merging."
62
- msgstr ""
63
 
64
  #: content-aware-sidebars.php:216
65
  msgid "Top"
66
- msgstr ""
67
 
68
  #: content-aware-sidebars.php:217
69
  msgid "Bottom"
70
- msgstr ""
71
 
72
  #: content-aware-sidebars.php:232
73
  msgid "Sidebars"
74
- msgstr ""
75
 
76
  #: content-aware-sidebars.php:233
77
  msgid "Sidebar"
78
- msgstr ""
79
 
80
  #: content-aware-sidebars.php:234
81
  msgctxt "sidebar"
82
  msgid "Add New"
83
- msgstr ""
84
 
85
  #: content-aware-sidebars.php:235
86
  msgid "Add New Sidebar"
87
- msgstr ""
88
 
89
  #: content-aware-sidebars.php:236
90
  msgid "Edit Sidebar"
91
- msgstr ""
92
 
93
  #: content-aware-sidebars.php:237
94
  msgid "New Sidebar"
95
- msgstr ""
96
 
97
  #: content-aware-sidebars.php:238
98
  msgid "All Sidebars"
99
- msgstr ""
100
 
101
  #: content-aware-sidebars.php:239
102
  msgid "View Sidebar"
103
- msgstr ""
104
 
105
  #: content-aware-sidebars.php:240
106
  msgid "Search Sidebars"
107
- msgstr ""
108
 
109
  #: content-aware-sidebars.php:241
110
  msgid "No sidebars found"
111
- msgstr ""
112
 
113
  #: content-aware-sidebars.php:242
114
  msgid "No sidebars found in Trash"
115
- msgstr ""
116
 
117
  #: content-aware-sidebars.php:273
118
  msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
119
- msgstr ""
120
 
121
  #: content-aware-sidebars.php:276
122
  msgid "Sidebar updated."
123
- msgstr ""
124
 
125
  #: content-aware-sidebars.php:278
126
  msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
127
- msgstr ""
128
 
129
  #: content-aware-sidebars.php:279
130
  msgid "Sidebar saved."
131
- msgstr ""
132
 
133
  #: content-aware-sidebars.php:280
134
  msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
135
- msgstr ""
136
 
137
  #: content-aware-sidebars.php:281
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:283
145
  msgid "M j, Y @ G:i"
146
- msgstr ""
147
 
148
  #: content-aware-sidebars.php:284
149
  msgid "Sidebar draft updated."
150
- msgstr ""
151
 
152
  #: content-aware-sidebars.php:321 content-aware-sidebars.php:402
153
  msgid "Please update Host Sidebar"
154
- msgstr ""
155
 
156
  #: content-aware-sidebars.php:457
157
  msgid "Manage Widgets"
158
- msgstr ""
159
 
160
- #: content-aware-sidebars.php:688
161
  msgid "Content"
162
- msgstr ""
163
 
164
- #: content-aware-sidebars.php:698
165
  msgid "Options"
166
- msgstr ""
167
 
168
- #: content-aware-sidebars.php:707
169
  msgid "Spread the Word"
170
  msgstr ""
171
 
172
- #: content-aware-sidebars.php:797
 
173
  msgid ""
174
  "If you love this plugin, please consider donating to support future "
175
  "development."
176
- msgstr ""
177
 
178
- #: content-aware-sidebars.php:802
179
  msgid "Or you could:"
180
  msgstr ""
181
 
182
- #: content-aware-sidebars.php:804
183
  msgid "Rate the plugin on WordPress.org"
184
  msgstr ""
185
 
186
- #: content-aware-sidebars.php:805
187
  msgid "Link to the plugin page"
188
  msgstr ""
189
 
190
- #: modules/abstract.php:53 modules/post_type.php:111
191
  msgid "Show with All %s"
192
- msgstr ""
 
 
 
 
 
193
 
194
- #: modules/abstract.php:57 modules/taxonomy.php:163
195
- msgid "View All"
 
196
  msgstr ""
197
 
198
  #: modules/author.php:24
199
  msgid "Authors"
200
- msgstr ""
201
 
202
  #: modules/bbpress.php:23
203
  msgid "bbPress User Profiles"
204
- msgstr ""
205
 
206
  #: modules/bp_member.php:23
207
  msgid "BuddyPress Members"
208
- msgstr ""
209
 
210
  #: modules/page_template.php:24
211
  msgid "Page Templates"
212
- msgstr ""
213
 
214
  #: modules/polylang.php:23 modules/qtranslate.php:23 modules/transposh.php:23
215
  #: modules/wpml.php:23
216
  msgid "Languages"
217
- msgstr ""
218
 
219
  #: modules/post_type.php:30
220
  msgid "Post Types"
221
- msgstr ""
222
 
223
- #: modules/post_type.php:105 modules/taxonomy.php:149
224
  msgid "Automatically select new children of a selected ancestor"
225
- msgstr ""
226
 
227
- #: modules/post_type.php:115 modules/taxonomy.php:157
228
  msgid "No items."
229
- msgstr ""
230
-
231
- #: modules/post_type.php:136 modules/url.php:42
232
- msgid "Search"
233
- msgstr ""
234
-
235
- #: modules/post_type.php:136 modules/url.php:42
236
- msgid "Add"
237
- msgstr ""
238
 
239
  #: modules/static.php:25
240
  msgid "Static Pages"
241
- msgstr ""
242
 
243
  #: modules/static.php:34
244
  msgid "Front Page"
245
- msgstr ""
246
 
247
  #: modules/static.php:35
248
  msgid "Search Results"
249
- msgstr ""
250
 
251
  #: modules/static.php:36
252
  msgid "404 Page"
253
- msgstr ""
254
 
255
  #: modules/taxonomy.php:36
256
  msgid "Taxonomies"
257
- msgstr ""
258
 
259
- #: modules/taxonomy.php:153
260
  msgid "Show with %s"
261
- msgstr ""
262
-
263
- #: modules/taxonomy.php:162
264
- msgid "Most Used"
265
- msgstr ""
266
 
267
  #: modules/url.php:24
268
  msgid "URLs"
@@ -270,19 +269,43 @@ msgstr ""
270
 
271
  #. Plugin Name of the plugin/theme
272
  msgid "Content Aware Sidebars"
273
- msgstr ""
274
 
275
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.2) #-#-#-#-#
276
  #. Plugin URI of the plugin/theme
277
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.2) #-#-#-#-#
278
  #. Author URI of the plugin/theme
279
  msgid "http://www.intox.dk/"
280
- msgstr ""
281
 
282
  #. Description of the plugin/theme
283
  msgid "Manage and show sidebars according to the content being viewed."
284
- msgstr ""
285
 
286
  #. Author of the plugin/theme
287
  msgid "Joachim Jensen, Intox Studio"
288
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"
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-zh_CN.mo ADDED
Binary file
lang/content-aware-sidebars-zh_CN.po ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
7
+ "POT-Creation-Date: 2014-05-01 12:57+0100\n"
8
+ "PO-Revision-Date: 2014-05-01 13:12+0100\n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "Language: zh_CN\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
+ "X-Poedit-SourceCharset: UTF-8\n"
22
+ "Plural-Forms: nplurals=1; plural=0;\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+ "X-Poedit-SearchPath-1: ..\n"
25
+
26
+ #: ../content-aware-sidebars.php:111
27
+ msgid "Manage and show sidebars according to the content being viewed."
28
+ msgstr "根据页面内容管理和显示边栏"
29
+
30
+ #: ../content-aware-sidebars.php:112
31
+ msgid "Content Aware Sidebars"
32
+ msgstr "自由定制边栏"
33
+
34
+ #: ../content-aware-sidebars.php:232 ../content-aware-sidebars.php:432
35
+ msgid "Exposure"
36
+ msgstr "显示于"
37
+
38
+ #: ../content-aware-sidebars.php:238
39
+ msgid "Singular"
40
+ msgstr "文章页"
41
+
42
+ #: ../content-aware-sidebars.php:239
43
+ msgid "Singular & Archive"
44
+ msgstr "文章页和列表页"
45
+
46
+ #: ../content-aware-sidebars.php:240
47
+ msgid "Archive"
48
+ msgstr "列表页"
49
+
50
+ #: ../content-aware-sidebars.php:244 ../content-aware-sidebars.php:433
51
+ msgctxt "option"
52
+ msgid "Handle"
53
+ msgstr "处理方式"
54
+
55
+ #: ../content-aware-sidebars.php:246
56
+ msgid "Replace host sidebar, merge with it or add sidebar manually."
57
+ msgstr "替换主边栏, 合并或者手动添加边栏"
58
+
59
+ #: ../content-aware-sidebars.php:250
60
+ msgid "Replace"
61
+ msgstr "替换"
62
+
63
+ #: ../content-aware-sidebars.php:251
64
+ msgid "Merge"
65
+ msgstr "合并"
66
+
67
+ #: ../content-aware-sidebars.php:252
68
+ msgid "Manual"
69
+ msgstr "手动"
70
+
71
+ #: ../content-aware-sidebars.php:256
72
+ msgid "Host Sidebar"
73
+ msgstr "主边栏"
74
+
75
+ #: ../content-aware-sidebars.php:264 ../content-aware-sidebars.php:434
76
+ msgid "Merge position"
77
+ msgstr "合并位置"
78
+
79
+ #: ../content-aware-sidebars.php:266
80
+ msgid "Place sidebar on top or bottom of host when merging."
81
+ msgstr "合并时将边栏放置在主边栏的顶部或底部"
82
+
83
+ #: ../content-aware-sidebars.php:270
84
+ msgid "Top"
85
+ msgstr "顶部"
86
+
87
+ #: ../content-aware-sidebars.php:271
88
+ msgid "Bottom"
89
+ msgstr "底部"
90
+
91
+ #: ../content-aware-sidebars.php:296
92
+ msgid "Sidebars"
93
+ msgstr "边栏"
94
+
95
+ #: ../content-aware-sidebars.php:297
96
+ msgid "Sidebar"
97
+ msgstr "边栏"
98
+
99
+ #: ../content-aware-sidebars.php:298
100
+ msgctxt "sidebar"
101
+ msgid "Add New"
102
+ msgstr "新建"
103
+
104
+ #: ../content-aware-sidebars.php:299
105
+ msgid "Add New Sidebar"
106
+ msgstr "添加边栏"
107
+
108
+ #: ../content-aware-sidebars.php:300
109
+ msgid "Edit Sidebar"
110
+ msgstr "编辑边栏"
111
+
112
+ #: ../content-aware-sidebars.php:301
113
+ msgid "New Sidebar"
114
+ msgstr "新建边栏"
115
+
116
+ #: ../content-aware-sidebars.php:302
117
+ msgid "All Sidebars"
118
+ msgstr "全部边栏"
119
+
120
+ #: ../content-aware-sidebars.php:303
121
+ msgid "View Sidebar"
122
+ msgstr "查看边栏"
123
+
124
+ #: ../content-aware-sidebars.php:304
125
+ msgid "Search Sidebars"
126
+ msgstr "搜索边栏"
127
+
128
+ #: ../content-aware-sidebars.php:305
129
+ msgid "No sidebars found"
130
+ msgstr "未找到边栏"
131
+
132
+ #: ../content-aware-sidebars.php:306
133
+ msgid "No sidebars found in Trash"
134
+ msgstr "回收站中未找到边栏"
135
+
136
+ #: ../content-aware-sidebars.php:321 ../content-aware-sidebars.php:892
137
+ msgid "Condition Groups"
138
+ msgstr "显示条件组"
139
+
140
+ #: ../content-aware-sidebars.php:322
141
+ msgid "Condition Group"
142
+ msgstr "显示条件组"
143
+
144
+ #: ../content-aware-sidebars.php:323
145
+ msgctxt "group"
146
+ msgid "Add New"
147
+ msgstr "新建"
148
+
149
+ #: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:892
150
+ #: ../content-aware-sidebars.php:922
151
+ msgid "Add New Group"
152
+ msgstr "新建组"
153
+
154
+ #: ../content-aware-sidebars.php:325 ../content-aware-sidebars.php:907
155
+ #: ../content-aware-sidebars.php:1299
156
+ msgctxt "group"
157
+ msgid "Edit"
158
+ msgstr "编辑"
159
+
160
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:354
161
+ msgid "Sidebar updated."
162
+ msgstr "边栏已更新."
163
+
164
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:356
165
+ #: ../content-aware-sidebars.php:358 ../content-aware-sidebars.php:363
166
+ msgid "Manage widgets"
167
+ msgstr "管理小工具"
168
+
169
+ #: ../content-aware-sidebars.php:356
170
+ msgid "Sidebar published."
171
+ msgstr "已发布边栏"
172
+
173
+ #: ../content-aware-sidebars.php:357
174
+ msgid "Sidebar saved."
175
+ msgstr "边栏已保存."
176
+
177
+ #: ../content-aware-sidebars.php:358
178
+ msgid "Sidebar submitted."
179
+ msgstr "已提交边栏"
180
+
181
+ #: ../content-aware-sidebars.php:359
182
+ #, php-format
183
+ msgid "Sidebar scheduled for: <strong>%1$s</strong>."
184
+ msgstr "已为 <strong>%1$s</strong> 设置了边栏计划"
185
+
186
+ #: ../content-aware-sidebars.php:361
187
+ msgid "M j, Y @ G:i"
188
+ msgstr "M j, Y @ G:i"
189
+
190
+ #: ../content-aware-sidebars.php:364
191
+ msgid "Sidebar draft updated."
192
+ msgstr "边栏草稿已更新."
193
+
194
+ #: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:493
195
+ msgid "Please update Host Sidebar"
196
+ msgstr "请更新主边栏"
197
+
198
+ #: ../content-aware-sidebars.php:568
199
+ msgid "Manage Widgets"
200
+ msgstr "管理小工具"
201
+
202
+ #: ../content-aware-sidebars.php:821
203
+ msgid "Support the Author of Content Aware Sidebars"
204
+ msgstr "支持Content Aware Sidebars"
205
+
206
+ #: ../content-aware-sidebars.php:829
207
+ msgid "Content"
208
+ msgstr "内容"
209
+
210
+ #: ../content-aware-sidebars.php:837
211
+ msgid "Options"
212
+ msgstr "选项"
213
+
214
+ #: ../content-aware-sidebars.php:893
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
+ "点击修改或新建组。选择左侧内容添加到组中。在每组中,你可以组合不同的有关内"
220
+ "容。"
221
+
222
+ #: ../content-aware-sidebars.php:894
223
+ msgid "Display sidebar with"
224
+ msgstr "边栏显示在"
225
+
226
+ #: ../content-aware-sidebars.php:899
227
+ msgid ""
228
+ "No content. Please add at least one condition group to make the sidebar "
229
+ "content aware."
230
+ msgstr "没有内容。请至少选择一项内容组以定制边栏"
231
+
232
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1297
233
+ msgid "Save"
234
+ msgstr "保存"
235
+
236
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1298
237
+ msgid "Cancel"
238
+ msgstr "取消"
239
+
240
+ #: ../content-aware-sidebars.php:907 ../content-aware-sidebars.php:1300
241
+ msgid "Remove"
242
+ msgstr "删除"
243
+
244
+ #: ../content-aware-sidebars.php:997 ../content-aware-sidebars.php:1002
245
+ #: ../content-aware-sidebars.php:1044 ../content-aware-sidebars.php:1049
246
+ #: ../content-aware-sidebars.php:1082 ../content-aware-sidebars.php:1087
247
+ msgid "Unauthorized request"
248
+ msgstr "未授权请求"
249
+
250
+ #: ../content-aware-sidebars.php:1010
251
+ msgid "Condition group cannot be empty"
252
+ msgstr "未能创建条件组"
253
+
254
+ #: ../content-aware-sidebars.php:1024
255
+ msgid "Condition group saved"
256
+ msgstr "已保存条件组"
257
+
258
+ #: ../content-aware-sidebars.php:1056
259
+ msgid "Condition group could not be created"
260
+ msgstr "未能创建条件组"
261
+
262
+ #: ../content-aware-sidebars.php:1061
263
+ msgid "Condition group added"
264
+ msgstr "已添加条件组"
265
+
266
+ #: ../content-aware-sidebars.php:1092
267
+ msgid "Condition group could not be removed"
268
+ msgstr "未能删除条件组"
269
+
270
+ #: ../content-aware-sidebars.php:1097
271
+ msgid "Condition group removed"
272
+ msgstr "已删除条件组"
273
+
274
+ #: ../content-aware-sidebars.php:1163
275
+ msgid ""
276
+ "If you love this plugin, please consider donating to support future "
277
+ "development."
278
+ msgstr "如果你喜欢这个插件, 请考虑捐赠."
279
+
280
+ #: ../content-aware-sidebars.php:1172
281
+ msgid "Or you could:"
282
+ msgstr "或者你可以:"
283
+
284
+ #: ../content-aware-sidebars.php:1174
285
+ msgid "Rate the plugin on WordPress.org"
286
+ msgstr "在WordPress.org为此插件评分"
287
+
288
+ #: ../content-aware-sidebars.php:1175
289
+ msgid "Link to the plugin page"
290
+ msgstr "链接到插件页面"
291
+
292
+ #: ../content-aware-sidebars.php:1176
293
+ msgid "Translate the plugin into your language"
294
+ msgstr "翻译此插件"
295
+
296
+ #: ../content-aware-sidebars.php:1301
297
+ msgid "Remove this group and its contents permanently?"
298
+ msgstr "永久删除此组和它的内容?"
299
+
300
+ #: ../content-aware-sidebars.php:1302
301
+ msgid "No results found."
302
+ msgstr "未找到结果"
303
+
304
+ #: ../content-aware-sidebars.php:1303
305
+ msgid ""
306
+ "The current group has unsaved changes. Do you want to continue and discard "
307
+ "these changes?"
308
+ msgstr "当前修改未保存,放弃修改吗?"
309
+
310
+ #: ../modules/abstract.php:88
311
+ #, php-format
312
+ msgid "Display with All %s"
313
+ msgstr "在所有%s显示"
314
+
315
+ #: ../modules/abstract.php:98 ../modules/bp_member.php:104
316
+ #: ../modules/post_type.php:198 ../modules/taxonomy.php:243
317
+ msgid "View All"
318
+ msgstr "查看全部"
319
+
320
+ #: ../modules/abstract.php:105 ../modules/abstract.php:108
321
+ #: ../modules/post_type.php:204 ../modules/post_type.php:207
322
+ #: ../modules/taxonomy.php:249 ../modules/taxonomy.php:252
323
+ msgid "Search"
324
+ msgstr "搜索"
325
+
326
+ #: ../modules/abstract.php:116 ../modules/bp_member.php:113
327
+ #: ../modules/post_type.php:217 ../modules/taxonomy.php:262
328
+ msgid "Add to Group"
329
+ msgstr "添加到组"
330
+
331
+ #: ../modules/abstract.php:188
332
+ #, php-format
333
+ msgid "All %s"
334
+ msgstr "全部%s"
335
+
336
+ #: ../modules/author.php:22
337
+ msgid "Authors"
338
+ msgstr "作者"
339
+
340
+ #: ../modules/bbpress.php:23
341
+ msgid "bbPress User Profiles"
342
+ msgstr "bbPress用户资料"
343
+
344
+ #: ../modules/bp_member.php:21
345
+ msgid "BuddyPress Members"
346
+ msgstr "BuddyPress用户"
347
+
348
+ #: ../modules/page_template.php:22
349
+ msgid "Page Templates"
350
+ msgstr "页面模板"
351
+
352
+ #: ../modules/polylang.php:21 ../modules/qtranslate.php:21
353
+ #: ../modules/transposh.php:21 ../modules/wpml.php:21
354
+ msgid "Languages"
355
+ msgstr "语言"
356
+
357
+ #: ../modules/post_type.php:28
358
+ msgid "Post Types"
359
+ msgstr "文章类型"
360
+
361
+ #: ../modules/post_type.php:105 ../modules/post_type.php:171
362
+ #: ../modules/taxonomy.php:182 ../modules/taxonomy.php:217
363
+ msgid "Automatically select new children of a selected ancestor"
364
+ msgstr "自动为选中的父级选择新子级"
365
+
366
+ #: ../modules/post_type.php:177 ../modules/taxonomy.php:221
367
+ #, php-format
368
+ msgid "Display with %s"
369
+ msgstr "在%s显示"
370
+
371
+ #: ../modules/post_type.php:182 ../modules/taxonomy.php:225
372
+ msgid "No items."
373
+ msgstr "没有项目."
374
+
375
+ #: ../modules/post_type.php:193
376
+ msgid "Most Recent"
377
+ msgstr "最新"
378
+
379
+ #: ../modules/static.php:23
380
+ msgid "Static Pages"
381
+ msgstr "静态页面"
382
+
383
+ #: ../modules/static.php:33
384
+ msgid "Front Page"
385
+ msgstr "首页"
386
+
387
+ #: ../modules/static.php:34
388
+ msgid "Search Results"
389
+ msgstr "搜索结果"
390
+
391
+ #: ../modules/static.php:35
392
+ msgid "404 Page"
393
+ msgstr "404页面"
394
+
395
+ #: ../modules/taxonomy.php:34
396
+ msgid "Taxonomies"
397
+ msgstr "分类"
398
+
399
+ #: ../modules/taxonomy.php:238
400
+ msgid "Most Used"
401
+ msgstr "最常用"
402
+
403
+ #: ../modules/url.php:22
404
+ msgid "URLs"
405
+ msgstr "网址"
406
+
407
+ #: ../modules/url.php:40
408
+ msgid "Add"
409
+ msgstr "新建"
lang/content-aware-sidebars.po ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
7
+ "POT-Creation-Date: 2014-05-01 12:57+0100\n"
8
+ "PO-Revision-Date: 2014-05-01 12:58+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:111
25
+ msgid "Manage and show sidebars according to the content being viewed."
26
+ msgstr ""
27
+
28
+ #: ../content-aware-sidebars.php:112
29
+ msgid "Content Aware Sidebars"
30
+ msgstr ""
31
+
32
+ #: ../content-aware-sidebars.php:232 ../content-aware-sidebars.php:432
33
+ msgid "Exposure"
34
+ msgstr ""
35
+
36
+ #: ../content-aware-sidebars.php:238
37
+ msgid "Singular"
38
+ msgstr ""
39
+
40
+ #: ../content-aware-sidebars.php:239
41
+ msgid "Singular & Archive"
42
+ msgstr ""
43
+
44
+ #: ../content-aware-sidebars.php:240
45
+ msgid "Archive"
46
+ msgstr ""
47
+
48
+ #: ../content-aware-sidebars.php:244 ../content-aware-sidebars.php:433
49
+ msgctxt "option"
50
+ msgid "Handle"
51
+ msgstr ""
52
+
53
+ #: ../content-aware-sidebars.php:246
54
+ msgid "Replace host sidebar, merge with it or add sidebar manually."
55
+ msgstr ""
56
+
57
+ #: ../content-aware-sidebars.php:250
58
+ msgid "Replace"
59
+ msgstr ""
60
+
61
+ #: ../content-aware-sidebars.php:251
62
+ msgid "Merge"
63
+ msgstr ""
64
+
65
+ #: ../content-aware-sidebars.php:252
66
+ msgid "Manual"
67
+ msgstr ""
68
+
69
+ #: ../content-aware-sidebars.php:256
70
+ msgid "Host Sidebar"
71
+ msgstr ""
72
+
73
+ #: ../content-aware-sidebars.php:264 ../content-aware-sidebars.php:434
74
+ msgid "Merge position"
75
+ msgstr ""
76
+
77
+ #: ../content-aware-sidebars.php:266
78
+ msgid "Place sidebar on top or bottom of host when merging."
79
+ msgstr ""
80
+
81
+ #: ../content-aware-sidebars.php:270
82
+ msgid "Top"
83
+ msgstr ""
84
+
85
+ #: ../content-aware-sidebars.php:271
86
+ msgid "Bottom"
87
+ msgstr ""
88
+
89
+ #: ../content-aware-sidebars.php:296
90
+ msgid "Sidebars"
91
+ msgstr ""
92
+
93
+ #: ../content-aware-sidebars.php:297
94
+ msgid "Sidebar"
95
+ msgstr ""
96
+
97
+ #: ../content-aware-sidebars.php:298
98
+ msgctxt "sidebar"
99
+ msgid "Add New"
100
+ msgstr ""
101
+
102
+ #: ../content-aware-sidebars.php:299
103
+ msgid "Add New Sidebar"
104
+ msgstr ""
105
+
106
+ #: ../content-aware-sidebars.php:300
107
+ msgid "Edit Sidebar"
108
+ msgstr ""
109
+
110
+ #: ../content-aware-sidebars.php:301
111
+ msgid "New Sidebar"
112
+ msgstr ""
113
+
114
+ #: ../content-aware-sidebars.php:302
115
+ msgid "All Sidebars"
116
+ msgstr ""
117
+
118
+ #: ../content-aware-sidebars.php:303
119
+ msgid "View Sidebar"
120
+ msgstr ""
121
+
122
+ #: ../content-aware-sidebars.php:304
123
+ msgid "Search Sidebars"
124
+ msgstr ""
125
+
126
+ #: ../content-aware-sidebars.php:305
127
+ msgid "No sidebars found"
128
+ msgstr ""
129
+
130
+ #: ../content-aware-sidebars.php:306
131
+ msgid "No sidebars found in Trash"
132
+ msgstr ""
133
+
134
+ #: ../content-aware-sidebars.php:321 ../content-aware-sidebars.php:892
135
+ msgid "Condition Groups"
136
+ msgstr ""
137
+
138
+ #: ../content-aware-sidebars.php:322
139
+ msgid "Condition Group"
140
+ msgstr ""
141
+
142
+ #: ../content-aware-sidebars.php:323
143
+ msgctxt "group"
144
+ msgid "Add New"
145
+ msgstr ""
146
+
147
+ #: ../content-aware-sidebars.php:324 ../content-aware-sidebars.php:892
148
+ #: ../content-aware-sidebars.php:922
149
+ msgid "Add New Group"
150
+ msgstr ""
151
+
152
+ #: ../content-aware-sidebars.php:325 ../content-aware-sidebars.php:907
153
+ #: ../content-aware-sidebars.php:1299
154
+ msgctxt "group"
155
+ msgid "Edit"
156
+ msgstr ""
157
+
158
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:354
159
+ msgid "Sidebar updated."
160
+ msgstr ""
161
+
162
+ #: ../content-aware-sidebars.php:351 ../content-aware-sidebars.php:356
163
+ #: ../content-aware-sidebars.php:358 ../content-aware-sidebars.php:363
164
+ msgid "Manage widgets"
165
+ msgstr ""
166
+
167
+ #: ../content-aware-sidebars.php:356
168
+ msgid "Sidebar published."
169
+ msgstr ""
170
+
171
+ #: ../content-aware-sidebars.php:357
172
+ msgid "Sidebar saved."
173
+ msgstr ""
174
+
175
+ #: ../content-aware-sidebars.php:358
176
+ msgid "Sidebar submitted."
177
+ msgstr ""
178
+
179
+ #: ../content-aware-sidebars.php:359
180
+ #, php-format
181
+ msgid "Sidebar scheduled for: <strong>%1$s</strong>."
182
+ msgstr ""
183
+
184
+ #: ../content-aware-sidebars.php:361
185
+ msgid "M j, Y @ G:i"
186
+ msgstr ""
187
+
188
+ #: ../content-aware-sidebars.php:364
189
+ msgid "Sidebar draft updated."
190
+ msgstr ""
191
+
192
+ #: ../content-aware-sidebars.php:408 ../content-aware-sidebars.php:493
193
+ msgid "Please update Host Sidebar"
194
+ msgstr ""
195
+
196
+ #: ../content-aware-sidebars.php:568
197
+ msgid "Manage Widgets"
198
+ msgstr ""
199
+
200
+ #: ../content-aware-sidebars.php:821
201
+ msgid "Support the Author of Content Aware Sidebars"
202
+ msgstr ""
203
+
204
+ #: ../content-aware-sidebars.php:829
205
+ msgid "Content"
206
+ msgstr ""
207
+
208
+ #: ../content-aware-sidebars.php:837
209
+ msgid "Options"
210
+ msgstr ""
211
+
212
+ #: ../content-aware-sidebars.php:893
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:894
219
+ msgid "Display sidebar with"
220
+ msgstr ""
221
+
222
+ #: ../content-aware-sidebars.php:899
223
+ msgid ""
224
+ "No content. Please add at least one condition group to make the sidebar "
225
+ "content aware."
226
+ msgstr ""
227
+
228
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1297
229
+ msgid "Save"
230
+ msgstr ""
231
+
232
+ #: ../content-aware-sidebars.php:904 ../content-aware-sidebars.php:1298
233
+ msgid "Cancel"
234
+ msgstr ""
235
+
236
+ #: ../content-aware-sidebars.php:907 ../content-aware-sidebars.php:1300
237
+ msgid "Remove"
238
+ msgstr ""
239
+
240
+ #: ../content-aware-sidebars.php:997 ../content-aware-sidebars.php:1002
241
+ #: ../content-aware-sidebars.php:1044 ../content-aware-sidebars.php:1049
242
+ #: ../content-aware-sidebars.php:1082 ../content-aware-sidebars.php:1087
243
+ msgid "Unauthorized request"
244
+ msgstr ""
245
+
246
+ #: ../content-aware-sidebars.php:1010
247
+ msgid "Condition group cannot be empty"
248
+ msgstr ""
249
+
250
+ #: ../content-aware-sidebars.php:1024
251
+ msgid "Condition group saved"
252
+ msgstr ""
253
+
254
+ #: ../content-aware-sidebars.php:1056
255
+ msgid "Condition group could not be created"
256
+ msgstr ""
257
+
258
+ #: ../content-aware-sidebars.php:1061
259
+ msgid "Condition group added"
260
+ msgstr ""
261
+
262
+ #: ../content-aware-sidebars.php:1092
263
+ msgid "Condition group could not be removed"
264
+ msgstr ""
265
+
266
+ #: ../content-aware-sidebars.php:1097
267
+ msgid "Condition group removed"
268
+ msgstr ""
269
+
270
+ #: ../content-aware-sidebars.php:1163
271
+ msgid ""
272
+ "If you love this plugin, please consider donating to support future "
273
+ "development."
274
+ msgstr ""
275
+
276
+ #: ../content-aware-sidebars.php:1172
277
+ msgid "Or you could:"
278
+ msgstr ""
279
+
280
+ #: ../content-aware-sidebars.php:1174
281
+ msgid "Rate the plugin on WordPress.org"
282
+ msgstr ""
283
+
284
+ #: ../content-aware-sidebars.php:1175
285
+ msgid "Link to the plugin page"
286
+ msgstr ""
287
+
288
+ #: ../content-aware-sidebars.php:1176
289
+ msgid "Translate the plugin into your language"
290
+ msgstr ""
291
+
292
+ #: ../content-aware-sidebars.php:1301
293
+ msgid "Remove this group and its contents permanently?"
294
+ msgstr ""
295
+
296
+ #: ../content-aware-sidebars.php:1302
297
+ msgid "No results found."
298
+ msgstr ""
299
+
300
+ #: ../content-aware-sidebars.php:1303
301
+ msgid ""
302
+ "The current group has unsaved changes. Do you want to continue and discard "
303
+ "these changes?"
304
+ msgstr ""
305
+
306
+ #: ../modules/abstract.php:88
307
+ #, php-format
308
+ msgid "Display with All %s"
309
+ msgstr ""
310
+
311
+ #: ../modules/abstract.php:98 ../modules/bp_member.php:104
312
+ #: ../modules/post_type.php:198 ../modules/taxonomy.php:243
313
+ msgid "View All"
314
+ msgstr ""
315
+
316
+ #: ../modules/abstract.php:105 ../modules/abstract.php:108
317
+ #: ../modules/post_type.php:204 ../modules/post_type.php:207
318
+ #: ../modules/taxonomy.php:249 ../modules/taxonomy.php:252
319
+ msgid "Search"
320
+ msgstr ""
321
+
322
+ #: ../modules/abstract.php:116 ../modules/bp_member.php:113
323
+ #: ../modules/post_type.php:217 ../modules/taxonomy.php:262
324
+ msgid "Add to Group"
325
+ msgstr ""
326
+
327
+ #: ../modules/abstract.php:188
328
+ #, php-format
329
+ msgid "All %s"
330
+ msgstr ""
331
+
332
+ #: ../modules/author.php:22
333
+ msgid "Authors"
334
+ msgstr ""
335
+
336
+ #: ../modules/bbpress.php:23
337
+ msgid "bbPress User Profiles"
338
+ msgstr ""
339
+
340
+ #: ../modules/bp_member.php:21
341
+ msgid "BuddyPress Members"
342
+ msgstr ""
343
+
344
+ #: ../modules/page_template.php:22
345
+ msgid "Page Templates"
346
+ msgstr ""
347
+
348
+ #: ../modules/polylang.php:21 ../modules/qtranslate.php:21
349
+ #: ../modules/transposh.php:21 ../modules/wpml.php:21
350
+ msgid "Languages"
351
+ msgstr ""
352
+
353
+ #: ../modules/post_type.php:28
354
+ msgid "Post Types"
355
+ msgstr ""
356
+
357
+ #: ../modules/post_type.php:105 ../modules/post_type.php:171
358
+ #: ../modules/taxonomy.php:182 ../modules/taxonomy.php:217
359
+ msgid "Automatically select new children of a selected ancestor"
360
+ msgstr ""
361
+
362
+ #: ../modules/post_type.php:177 ../modules/taxonomy.php:221
363
+ #, php-format
364
+ msgid "Display with %s"
365
+ msgstr ""
366
+
367
+ #: ../modules/post_type.php:182 ../modules/taxonomy.php:225
368
+ msgid "No items."
369
+ msgstr ""
370
+
371
+ #: ../modules/post_type.php:193
372
+ msgid "Most Recent"
373
+ msgstr ""
374
+
375
+ #: ../modules/static.php:23
376
+ msgid "Static Pages"
377
+ msgstr ""
378
+
379
+ #: ../modules/static.php:33
380
+ msgid "Front Page"
381
+ msgstr ""
382
+
383
+ #: ../modules/static.php:34
384
+ msgid "Search Results"
385
+ msgstr ""
386
+
387
+ #: ../modules/static.php:35
388
+ msgid "404 Page"
389
+ msgstr ""
390
+
391
+ #: ../modules/taxonomy.php:34
392
+ msgid "Taxonomies"
393
+ msgstr ""
394
+
395
+ #: ../modules/taxonomy.php:238
396
+ msgid "Most Used"
397
+ msgstr ""
398
+
399
+ #: ../modules/url.php:22
400
+ msgid "URLs"
401
+ msgstr ""
402
+
403
+ #: ../modules/url.php:40
404
+ msgid "Add"
405
+ msgstr ""
lang/content-aware-sidebars_sk_SK.mo DELETED
Binary file
lang/content-aware-sidebars_sk_SK.po DELETED
@@ -1,284 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: \n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: \n"
6
- "Last-Translator: \n"
7
- "Language-Team: \n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=iso-8859-1\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.5.4\n"
12
-
13
- # Copyright (C) 2013 Content Aware Sidebars
14
- # This file is distributed under the same license as the Content Aware Sidebars package.
15
-
16
-
17
- #: content-aware-sidebars.php:150 content-aware-sidebars.php:327
18
- msgid "Exposure"
19
- msgstr "Expozicie"
20
-
21
- #: content-aware-sidebars.php:156
22
- msgid "Singular"
23
- msgstr "Singularni"
24
-
25
- #: content-aware-sidebars.php:157
26
- msgid "Singular & Archive"
27
- msgstr "Singularni & Archiv"
28
-
29
- #: content-aware-sidebars.php:158
30
- msgid "Archive"
31
- msgstr "Archiv"
32
-
33
- #: content-aware-sidebars.php:162 content-aware-sidebars.php:328
34
- msgctxt "option"
35
- msgid "Handle"
36
- msgstr "Rukovat"
37
-
38
- #: content-aware-sidebars.php:164
39
- msgid "Replace host sidebar, merge with it or add sidebar manually."
40
- msgstr ""
41
- "Nahradit hostitela sidebar, zlucit s nim alebo manualne pridat sidebar."
42
-
43
- #: content-aware-sidebars.php:168
44
- msgid "Replace"
45
- msgstr "Nahradit"
46
-
47
- #: content-aware-sidebars.php:169
48
- msgid "Merge"
49
- msgstr "Zlucit"
50
-
51
- #: content-aware-sidebars.php:170
52
- msgid "Manual"
53
- msgstr "Manual"
54
-
55
- #: content-aware-sidebars.php:174
56
- msgid "Host Sidebar"
57
- msgstr "Hostitel Sidebar"
58
-
59
- #: content-aware-sidebars.php:182 content-aware-sidebars.php:329
60
- msgid "Merge position"
61
- msgstr "Zlucit pozicie"
62
-
63
- #: content-aware-sidebars.php:184
64
- msgid "Place sidebar on top or bottom of host when merging."
65
- msgstr "Miesto sidebar na hornej alebo dolnej casti hostitela pri zlucovani."
66
-
67
- #: content-aware-sidebars.php:188
68
- msgid "Top"
69
- msgstr "Top"
70
-
71
- #: content-aware-sidebars.php:189
72
- msgid "Bottom"
73
- msgstr "Dno"
74
-
75
- #: content-aware-sidebars.php:210
76
- msgid "Sidebars"
77
- msgstr "Bocne panely"
78
-
79
- #: content-aware-sidebars.php:211
80
- msgid "Sidebar"
81
- msgstr "Bocny panel"
82
-
83
- #: content-aware-sidebars.php:212
84
- msgctxt "sidebar"
85
- msgid "Add New"
86
- msgstr "Pridat nove"
87
-
88
- #: content-aware-sidebars.php:213
89
- msgid "Add New Sidebar"
90
- msgstr "Pridat novy bocny panel"
91
-
92
- #: content-aware-sidebars.php:214
93
- msgid "Edit Sidebar"
94
- msgstr "Upravit Sidebar"
95
-
96
- #: content-aware-sidebars.php:215
97
- msgid "New Sidebar"
98
- msgstr "Novy bocny panel"
99
-
100
- #: content-aware-sidebars.php:216
101
- msgid "All Sidebars"
102
- msgstr "Vsetci postranne"
103
-
104
- #: content-aware-sidebars.php:217
105
- msgid "View Sidebar"
106
- msgstr "Zobrazit bocny panel"
107
-
108
- #: content-aware-sidebars.php:218
109
- msgid "Search Sidebars"
110
- msgstr "Hladat Sidebars"
111
-
112
- #: content-aware-sidebars.php:219
113
- msgid "No sidebars found"
114
- msgstr "C sidebars nasiel"
115
-
116
- #: content-aware-sidebars.php:220
117
- msgid "No sidebars found in Trash"
118
- msgstr "Ziadne sidebars, nachadza v kosi"
119
-
120
- #: content-aware-sidebars.php:253
121
- msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
122
- msgstr "Sidebar aktualizovane. <a href=\"%s\">Spravovat widgety</a>"
123
-
124
- #: content-aware-sidebars.php:256
125
- msgid "Sidebar updated."
126
- msgstr "Sidebar aktualizovane."
127
-
128
- #: content-aware-sidebars.php:258
129
- msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
130
- msgstr "Bocny panel publikoval. <a href=\"%s\">Spravovat widgety</a>"
131
-
132
- #: content-aware-sidebars.php:259
133
- msgid "Sidebar saved."
134
- msgstr "Sidebar ulozene."
135
-
136
- #: content-aware-sidebars.php:260
137
- msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
138
- msgstr "Bocnom paneli posielaju. <a href=\"%s\">Spravovat widgety</a>"
139
-
140
- #: content-aware-sidebars.php:261
141
- msgid ""
142
- "this-is-translatedSidebar scheduled for: <strong>%1$s</strong>. <a href="
143
- "\"%2$s\">Manage widgets</a>"
144
- msgstr ""
145
- "Sidebar naplanovane na: <strong>%1$</strong>. <a href=\"%2$s\">Spravovat "
146
- "widgety</a>"
147
-
148
- #. translators: Publish box date format, see http:php.net/date
149
- #: content-aware-sidebars.php:263
150
- msgid "M j, Y @ G:i"
151
- msgstr "M j, Y @ G:i"
152
-
153
- #: content-aware-sidebars.php:264
154
- msgid "Sidebar draft updated."
155
- msgstr "Sidebar navrh aktualizovane."
156
-
157
- #: content-aware-sidebars.php:391
158
- msgid "Please update Host Sidebar"
159
- msgstr "Prosim aktualizujte hostitela Sidebar"
160
-
161
- #: content-aware-sidebars.php:454
162
- msgid "Manage Widgets"
163
- msgstr "Spravovat widgety"
164
-
165
- #: content-aware-sidebars.php:651
166
- msgid "Words from the author"
167
- msgstr "Slov od autora"
168
-
169
- #: content-aware-sidebars.php:661
170
- msgid "Content"
171
- msgstr "Obsah"
172
-
173
- #: content-aware-sidebars.php:671
174
- msgid "Options"
175
- msgstr "Moznosti"
176
-
177
- #: content-aware-sidebars.php:766
178
- msgid "If you love this plugin, please consider donating."
179
- msgstr "Ak mate radi tento plugin, prosim zvazte darovanie."
180
-
181
- #: content-aware-sidebars.php:768
182
- msgid ""
183
- "this-is-translatedRemember to <a class=\"button\" href=\"%1$s\" target="
184
- "\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank"
185
- "\">share</a> it too!"
186
- msgstr ""
187
- "Nezabudnite <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and "
188
- "<a class=\"button\" href=\"%2$s\" target=\"_blank\">zdielat</a> to taky!"
189
-
190
- #: content-aware-sidebars.php:770
191
- msgid "Check out Content Aware Sidebars for %23WordPress! :)"
192
- msgstr "Pozrite sa na obsah vedomi postrehov pre % 23WordPress! :)"
193
-
194
- #: content-aware-sidebars.php:772
195
- msgid "Check out Content Aware Sidebars :)"
196
- msgstr "Pozrite sa na obsah vedomi Sidebars:)"
197
-
198
- #: modules/abstract.php:39 modules/post_type.php:78
199
- msgid "Show with All %s"
200
- msgstr "Zobrazit s vsetky %s"
201
-
202
- #: modules/abstract.php:43 modules/post_type.php:88 modules/taxonomy.php:121
203
- msgid "View All"
204
- msgstr "Zobrazit vsetky"
205
-
206
- #: modules/author.php:21
207
- msgid "Authors"
208
- msgstr "Autori"
209
-
210
- #: modules/bbpress.php:20
211
- msgid "bbPress User Profiles"
212
- msgstr "bbPress pouzivatelske profily"
213
-
214
- #: modules/bp_member.php:20
215
- msgid "BuddyPress Members"
216
- msgstr "BuddyPress clenov"
217
-
218
- #: modules/page_template.php:21
219
- msgid "Page Templates"
220
- msgstr "Stranky sablony"
221
-
222
- #: modules/polylang.php:20 modules/qtranslate.php:20 modules/transposh.php:20
223
- #: modules/wpml.php:20
224
- msgid "Languages"
225
- msgstr "Jazyky"
226
-
227
- #: modules/post_type.php:23
228
- msgid "Post Types"
229
- msgstr "Prispevok typy"
230
-
231
- #: modules/post_type.php:73 modules/taxonomy.php:107
232
- msgid "Automatically select new children of a selected ancestor"
233
- msgstr "Automaticky vybrat nove deti z vybranych predok"
234
-
235
- #: modules/post_type.php:82 modules/taxonomy.php:115
236
- msgid "No items."
237
- msgstr "Ziadne polozky."
238
-
239
- #: modules/static.php:22
240
- msgid "Static Pages"
241
- msgstr "Staticke stranky"
242
-
243
- #: modules/static.php:27
244
- msgid "Front Page"
245
- msgstr "Predna strana"
246
-
247
- #: modules/static.php:28
248
- msgid "Search Results"
249
- msgstr "Vysledky hladania"
250
-
251
- #: modules/static.php:29
252
- msgid "404 Page"
253
- msgstr "404 Stranka"
254
-
255
- #: modules/taxonomy.php:24
256
- msgid "Taxonomies"
257
- msgstr "Taxonomie"
258
-
259
- #: modules/taxonomy.php:111
260
- msgid "Show with %s"
261
- msgstr "Zobrazit s %s"
262
-
263
- #: modules/taxonomy.php:120
264
- msgid "Most Used"
265
- msgstr "Najpouzivanejsie"
266
-
267
- #. Plugin Name of the plugin/theme
268
- msgid "Content Aware Sidebars"
269
- msgstr "Obsah vedomi Sidebars"
270
-
271
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
272
- #. Plugin URI of the plugin/theme
273
- #. #-#-#-#-# plugin.pot (Content Aware Sidebars 1.1.2) #-#-#-#-#
274
- #. Author URI of the plugin/theme
275
- msgid "http://www.intox.dk/"
276
- msgstr "http://www.Intox.dk/"
277
-
278
- #. Description of the plugin/theme
279
- msgid "Manage and show sidebars according to the content being viewed."
280
- msgstr "Spravovat a Zobrazit sidebars podla obsahu je prezerana."
281
-
282
- #. Author of the plugin/theme
283
- msgid "Joachim Jensen"
284
- msgstr "Joachim Jensen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lang/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ /**/
license.txt ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
modules/abstract.php CHANGED
@@ -22,14 +22,51 @@ abstract class CASModule {
22
  * @var string
23
  */
24
  protected $name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  /**
27
  *
28
  * Constructor
29
  *
30
  */
31
- public function __construct() {
32
- $this->id = substr(get_class($this),strpos(get_class($this),'_')+1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  /**
@@ -39,35 +76,51 @@ abstract class CASModule {
39
  */
40
  public function meta_box_content() {
41
  global $post;
 
 
42
 
43
- if(!$this->_get_content())
44
  return;
45
-
46
- echo '<h4><a href="#">'.$this->name.'</a></h4>'."\n";
47
- echo '<div class="cas-rule-content" id="cas-'.$this->id.'">';
48
- $field = $this->id;
49
- $meta = get_post_meta($post->ID, ContentAwareSidebars::prefix.$field, false);
50
- $current = $meta != '' ? $meta : array();
51
- ?>
52
- <p>
53
- <label><input class="cas-chk-all" type="checkbox" name="<?php echo $field; ?>[]" value="<?php echo $field; ?>" <?php checked(in_array($field, $current), true, true); ?> /> <?php printf(__('Show with All %s',ContentAwareSidebars::domain),$this->name); ?></label>
54
- </p>
55
- <div id="list-<?php echo $field; ?>" class="categorydiv" style="min-height:100%;">
56
- <ul id="<?php echo $field; ?>-tabs" class="category-tabs">
57
- <li class="tabs"><a href="#<?php echo $field; ?>-all" tabindex="3"><?php _e('View All'); ?></a></li>
58
- </ul>
59
- <div id="<?php echo $field; ?>-all" class="tabs-panel" style="min-height:100%;">
60
- <ul id="authorlistchecklist" class="list:<?php echo $field; ?> categorychecklist form-no-clear">
61
- <?php
62
- foreach($this->_get_content() as $id => $name) {
63
- echo '<li><label><input class="cas-' . $this->id . '" type="checkbox" name="'.$field.'[]" value="'.$id.'"'.checked(in_array($id,$current), true, false).' /> '.$name.'</label></li>'."\n";
64
- }
65
- ?>
66
- </ul>
67
- </div>
68
- </div>
69
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  echo '</div>';
 
71
  }
72
 
73
  /**
@@ -77,60 +130,155 @@ abstract class CASModule {
77
  */
78
  public function db_join() {
79
  global $wpdb;
80
- return "LEFT JOIN $wpdb->postmeta {$this->id} ON {$this->id}.post_id = posts.ID AND {$this->id}.meta_key = '".ContentAwareSidebars::prefix.$this->id."' ";
81
  }
82
 
83
  /**
84
- * Exclude sidebar. TODO: revise
85
- * @param boolean $continue
86
- * @param object $post
87
- * @param string $prefix
88
- * @return boolean
89
  */
90
- public function exclude_sidebar($continue, $post, $prefix) {
91
- if(!$continue) {
92
- //print_r($this->id."<br />");
93
- if (get_post_meta($post->ID, $prefix.$this->id, true) != '') {
94
- //print_r($this->id." has<br />");
95
- $continue = true;
96
- }
97
- }
98
- return $continue;
99
-
100
  }
101
-
102
  /**
103
- * Default where2 query
104
- * @return string
 
105
  */
106
- public function db_where2() {
107
- return "{$this->id}.meta_value IS NOT NULL";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  }
109
-
110
  /**
111
- * Idenficiation getter
112
- * @return string
 
 
 
113
  */
114
- public function get_id() {
115
- return $this->id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  }
117
 
118
  /**
119
  * Get content for sidebar edit screen
120
  * @return array
121
  */
122
- abstract protected function _get_content();
123
 
124
  /**
125
  * Determine if current content is relevant
126
  * @return boolean
127
  */
128
- abstract public function is_content();
129
 
130
  /**
131
- * Where query
132
- * @return string
 
 
 
 
 
 
 
 
133
  */
134
- abstract public function db_where();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  }
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
+ if(is_admin()) {
57
+
58
+ add_action('cas-module-admin-box', array(&$this,'meta_box_content'));
59
+ add_action('cas-module-save-data', array(&$this,'save_data'));
60
+
61
+ add_filter('cas-module-print-data', array(&$this,'print_group_data'),10,2);
62
+
63
+ if($this->ajax) {
64
+ add_action('wp_ajax_cas-module-'.$this->id, array(&$this,'ajax_get_content'));
65
+ }
66
+ }
67
+
68
+ add_filter('cas-context-data', array(&$this,'parse_context_data'));
69
+
70
  }
71
 
72
  /**
76
  */
77
  public function meta_box_content() {
78
  global $post;
79
+
80
+ $data = $this->_get_content();
81
 
82
+ if(!$data)
83
  return;
84
+
85
+ echo '<li class="control-section accordion-section">';
86
+ echo '<h3 class="accordion-section-title" title="'.$this->name.'" tabindex="0">'.$this->name.'</h3>'."\n";
87
+ echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-'.$this->id.'">';
88
+
89
+ if($this->type_display) {
90
+ echo '<ul><li><label><input class="cas-chk-all" type="checkbox" name="cas_condition['.$this->id.'][]" value="'.$this->id.'" /> '.sprintf(__('Display with All %s',ContentAwareSidebars::DOMAIN),$this->name).'</label></li></ul>'."\n";
91
+ }
92
+
93
+ $content = "";
94
+ foreach($data as $id => $name) {
95
+ $content .= '<li class="cas-'.$this->id.'-'.$id.'"><label><input class="cas-' . $this->id . '" type="checkbox" name="cas_condition['.$this->id.'][]" title="'.$name.'" value="'.$id.'" /> '.$name.'</label></li>'."\n";
96
+ }
97
+
98
+ $tabs = array();
99
+ $tabs['all'] = array(
100
+ 'title' => __('View All'),
101
+ 'status' => true,
102
+ 'content' => $content
103
+ );
104
+
105
+ if($this->searchable) {
106
+ $tabs['search'] = array(
107
+ 'title' => __('Search'),
108
+ 'status' => false,
109
+ 'content' => '',
110
+ '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>'
111
+ );
112
+ }
113
+
114
+ echo $this->create_tab_panels($this->id,$tabs);
115
+
116
+ echo '<p class="button-controls">';
117
+
118
+ 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>';
119
+
120
+ echo '</p>';
121
+
122
  echo '</div>';
123
+ echo '</li>';
124
  }
125
 
126
  /**
130
  */
131
  public function db_join() {
132
  global $wpdb;
133
+ return "LEFT JOIN $wpdb->postmeta {$this->id} ON {$this->id}.post_id = posts.ID AND {$this->id}.meta_key = '".ContentAwareSidebars::PREFIX.$this->id."' ";
134
  }
135
 
136
  /**
137
+ * Idenficiation getter
138
+ * @return string
 
 
 
139
  */
140
+ final public function get_id() {
141
+ return $this->id;
 
 
 
 
 
 
 
 
142
  }
143
+
144
  /**
145
+ * Save data on POST
146
+ * @param int $post_id
147
+ * @return void
148
  */
149
+ public function save_data($post_id) {
150
+ $meta_key = ContentAwareSidebars::PREFIX . $this->id;
151
+ $new = isset($_POST['cas_condition'][$this->id]) ? $_POST['cas_condition'][$this->id] : '';
152
+ $old = array_flip(get_post_meta($post_id, $meta_key, false));
153
+
154
+ if (is_array($new)) {
155
+ //$new = array_unique($new);
156
+ // Skip existing data or insert new data
157
+ foreach ($new as $new_single) {
158
+ if (isset($old[$new_single])) {
159
+ unset($old[$new_single]);
160
+ } else {
161
+ add_post_meta($post_id, $meta_key, $new_single);
162
+ }
163
+ }
164
+ // Remove existing data that have not been skipped
165
+ foreach ($old as $old_key => $old_value) {
166
+ delete_post_meta($post_id, $meta_key, $old_key);
167
+ }
168
+ } elseif (!empty($old)) {
169
+ // Remove any old values when $new is empty
170
+ delete_post_meta($post_id, $meta_key);
171
+ }
172
  }
173
+
174
  /**
175
+ * Print saved condition data for a group
176
+ * @author Joachim Jensen <jv@intox.dk>
177
+ * @since 2
178
+ * @param int $post_id
179
+ * @return void
180
  */
181
+ public function print_group_data($post_id) {
182
+ $data = get_post_custom_values(ContentAwareSidebars::PREFIX . $this->id, $post_id);
183
+ if($data) {
184
+ echo '<div class="cas-condition cas-condition-'.$this->id.'">';
185
+
186
+ echo '<strong>'.$this->name.'</strong>';
187
+ echo '<ul>';
188
+
189
+ if(in_array($this->id,$data)) {
190
+ echo '<li><label><input type="checkbox" name="cas_condition['.$this->id.'][]" value="'.$this->id.'" checked="checked" /> '.sprintf(__('All %s',ContentAwareSidebars::DOMAIN),$this->name).'</label></li>';
191
+ }
192
+
193
+ foreach($this->_get_content(array('include' => $data)) as $id => $name) {
194
+ echo '<li><label><input type="checkbox" name="cas_condition['.$this->id.'][]" value="'.$id.'" checked="checked" /> '.$name.'</label></li>'."\n";
195
+ }
196
+ echo '</ul>';
197
+ echo '</div>';
198
+ }
199
  }
200
 
201
  /**
202
  * Get content for sidebar edit screen
203
  * @return array
204
  */
205
+ abstract protected function _get_content($args = array());
206
 
207
  /**
208
  * Determine if current content is relevant
209
  * @return boolean
210
  */
211
+ abstract public function in_context();
212
 
213
  /**
214
+ * Get data from current content
215
+ * @author Joachim Jensen <jv@intox.dk>
216
+ * @since 2.0
217
+ * @return array|string
218
+ */
219
+ abstract public function get_context_data();
220
+
221
+ /**
222
+ * Parse context data together with
223
+ * table query
224
  */
225
+ final public function parse_context_data($data) {
226
+ if(apply_filters("cas-is-content-{$this->id}", $this->in_context())) {
227
+ $data['JOIN'][$this->id] = apply_filters("cas-db-join-{$this->id}", $this->db_join());
228
+
229
+ $context_data = $this->get_context_data();
230
+
231
+ if(is_array($context_data)) {
232
+ $context_data = "({$this->id}.meta_value IS NULL OR {$this->id}.meta_value IN ('".implode("','",$context_data) ."'))";
233
+ }
234
+ $data['WHERE'][$this->id] = apply_filters("cas-db-where-{$this->id}", $context_data);
235
+
236
+
237
+ } else {
238
+ $data['EXCLUDE'][] = $this->id;
239
+ }
240
+ return $data;
241
+ }
242
+
243
+ /**
244
+ * Create tab panels for administrative meta boxes
245
+ * @author Joachim Jensen <jv@intox.dk>
246
+ * @since 2
247
+ * @param string $id
248
+ * @param array $args
249
+ * @return string
250
+ */
251
+ final protected function create_tab_panels($id, $args) {
252
+ $return = '<div id="'.$id.'" class="posttypediv">';
253
+
254
+ $content = '';
255
+ $tabs = '';
256
+
257
+ $count = count($args);
258
+ foreach($args as $key => $tab) {
259
+ if($count > 1) {
260
+ $tabs .= '<li'.($tab['status'] ? ' class="tabs"' : '').'>';
261
+ $tabs .= '<a class="nav-tab-link" href="#tabs-panel-' . $id . '-'.$key.'" data-type="tabs-panel-' . $id . '-'.$key.'"> '.$tab['title'].' </a>';
262
+ $tabs .= '</li>';
263
+ }
264
+ $content .= '<div id="tabs-panel-' . $id . '-'.$key.'" class="tabs-panel'.($tab['status'] ? ' tabs-panel-active' : ' tabs-panel-inactive').'">';
265
+ if(isset($tab['content_before'])) {
266
+ $content .= $tab['content_before'];
267
+ }
268
+ $content .= '<ul id="cas-list-' . $id . '" class="cas-contentlist categorychecklist form-no-clear">'."\n";
269
+ $content .= $tab['content'];
270
+ $content .= '</ul>'."\n";
271
+ $content .= '</div>';
272
+ }
273
+
274
+ if($tabs) {
275
+ $return .= '<ul class="category-tabs">'.$tabs.'</ul>';
276
+ }
277
+ $return .= $content;
278
+
279
+ $return .'</div>';
280
+
281
+ return $return;
282
+ }
283
 
284
  }
modules/author.php CHANGED
@@ -19,43 +19,102 @@ class CASModule_author extends CASModule {
19
  * Constructor
20
  */
21
  public function __construct() {
22
- parent::__construct();
23
- $this->id = 'authors';
24
- $this->name = __('Authors',ContentAwareSidebars::domain);
 
 
 
 
 
 
25
  }
26
 
27
  /**
28
  * Determine if content is relevant
29
  * @return boolean
30
  */
31
- public function is_content() {
32
  return (is_singular() && !is_front_page()) || is_author();
33
  }
34
-
35
  /**
36
- * Query where
37
- * @global object $post
38
- * @return string
 
39
  */
40
- public function db_where() {
41
  global $post;
42
- $author = (string)(is_singular() ? $post->post_author : get_query_var('author'));
43
- return "(authors.meta_value IS NULL OR authors.meta_value IN('authors','".$author."'))";
44
-
 
45
  }
46
 
47
  /**
48
  * Get authors
49
- * @global object $wpdb
50
- * @return array
 
 
51
  */
52
- protected function _get_content() {
53
- global $wpdb;
 
 
 
 
 
54
  $author_list = array();
55
- foreach($wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID ASC LIMIT 0,200") as $user) {
56
- $author_list[$user->ID] = $user->display_name;
 
 
57
  }
58
  return $author_list;
59
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  }
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
+ if(is_admin()) {
28
+ add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
29
+ }
30
+
31
  }
32
 
33
  /**
34
  * Determine if content is relevant
35
  * @return boolean
36
  */
37
+ public function in_context() {
38
  return (is_singular() && !is_front_page()) || is_author();
39
  }
40
+
41
  /**
42
+ * Get data from context
43
+ * @author Joachim Jensen <jv@intox.dk>
44
+ * @since 2.0
45
+ * @return array
46
  */
47
+ public function get_context_data() {
48
  global $post;
49
+ return array(
50
+ $this->id,
51
+ (string)(is_singular() ? $post->post_author : get_query_var('author'))
52
+ );
53
  }
54
 
55
  /**
56
  * Get authors
57
+ * @author Joachim Jensen <jv@intox.dk>
58
+ * @since
59
+ * @param array $args
60
+ * @return array
61
  */
62
+ protected function _get_content($args = array()) {
63
+
64
+ $args['number'] = 20;
65
+ $args['fields'] = array('ID','display_name');
66
+
67
+ $user_query = new WP_User_Query( $args );
68
+
69
  $author_list = array();
70
+ if($user_query->results) {
71
+ foreach($user_query->results as $user) {
72
+ $author_list[$user->ID] = $user->display_name;
73
+ }
74
  }
75
  return $author_list;
76
  }
77
+
78
+ /**
79
+ * Get authors with AJAX search
80
+ * @return void
81
+ */
82
+ public function ajax_content_search() {
83
+ global $wpdb;
84
+
85
+ if(!isset($_POST['sidebar_id'])) {
86
+ die(-1);
87
+ }
88
+
89
+ // Verify request
90
+ check_ajax_referer(ContentAwareSidebars::SIDEBAR_PREFIX.$_POST['sidebar_id'],'nonce');
91
+
92
+ $suggestions = array();
93
+
94
+ $authors =$wpdb->get_results($wpdb->prepare("
95
+ SELECT ID, display_name
96
+ FROM $wpdb->users
97
+ WHERE display_name
98
+ LIKE '%s'
99
+ ORDER BY display_name ASC
100
+ LIMIT 0,10
101
+ ",
102
+ '%'.$_REQUEST['q'].'%'));
103
+
104
+ foreach($authors as $user) {
105
+ $suggestions[] = array(
106
+ 'label' => $user->display_name,
107
+ 'value' => $user->ID,
108
+ 'id' => $user->ID,
109
+ 'module' => $this->id,
110
+ 'name' => $this->id,
111
+ 'id2' => $this->id,
112
+ 'elem' => $this->id.'-'.$user->ID
113
+ );
114
+ }
115
+
116
+ echo json_encode($suggestions);
117
+ die();
118
+ }
119
 
120
  }
modules/bbpress.php CHANGED
@@ -12,7 +12,7 @@
12
  * a) any or specific bbpress user profile
13
  *
14
  */
15
- class CASModule_bbpress extends CASModule {
16
 
17
  /**
18
  * Constructor
@@ -20,39 +20,35 @@ class CASModule_bbpress extends CASModule {
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
  }
27
 
28
  /**
29
  * Determine if content is relevant
30
  * @return boolean
31
  */
32
- public function is_content() {
33
  return bbp_is_single_user();
34
  }
35
-
36
- /**
37
- * Query where
38
- * @return string
39
- */
40
- public function db_where() {
41
- return "(bb_profile.meta_value = 'bb_profile' OR bb_profile.meta_value = '".bbp_get_displayed_user_id()."')";
42
- }
43
 
44
  /**
45
- * Get authors
46
- * @global object $wpdb
47
- * @return array
 
48
  */
49
- protected function _get_content() {
50
- global $wpdb;
51
- $author_list = array();
52
- foreach($wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID ASC LIMIT 0,200") as $user) {
53
- $author_list[$user->ID] = $user->display_name;
54
- }
55
- return $author_list;
56
  }
57
 
58
  /**
12
  * a) any or specific bbpress user profile
13
  *
14
  */
15
+ class CASModule_bbpress extends CASModule_author {
16
 
17
  /**
18
  * Constructor
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
+
27
+ if(is_admin()) {
28
+ add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
29
+ }
30
+
31
  }
32
 
33
  /**
34
  * Determine if content is relevant
35
  * @return boolean
36
  */
37
+ public function in_context() {
38
  return bbp_is_single_user();
39
  }
 
 
 
 
 
 
 
 
40
 
41
  /**
42
+ * Get data from context
43
+ * @author Joachim Jensen <jv@intox.dk>
44
+ * @since 2.0
45
+ * @return array
46
  */
47
+ public function get_context_data() {
48
+ return array(
49
+ $this->id,
50
+ bbp_get_displayed_user_id()
51
+ );
 
 
52
  }
53
 
54
  /**
modules/bp_member.php CHANGED
@@ -18,9 +18,7 @@ class CASModule_bp_member extends CASModule {
18
  * Constructor
19
  */
20
  public function __construct() {
21
- parent::__construct();
22
- $this->id = 'bp_member';
23
- $this->name = __('BuddyPress Members',ContentAwareSidebars::domain);
24
 
25
  add_filter('cas-is-content-static', array(&$this,'static_is_content'));
26
 
@@ -31,7 +29,7 @@ class CASModule_bp_member extends CASModule {
31
  * @global object $bp
32
  * @return array
33
  */
34
- protected function _get_content() {
35
  global $bp;
36
 
37
  $components = $bp->loaded_components;
@@ -42,6 +40,9 @@ class CASModule_bp_member extends CASModule {
42
  foreach((array)$components as $name) {
43
  $content[$name] = ucfirst($name);
44
  }
 
 
 
45
 
46
  return $content;
47
  }
@@ -51,20 +52,23 @@ class CASModule_bp_member extends CASModule {
51
  * @global object $bp
52
  * @return boolean
53
  */
54
- public function is_content() {
55
  global $bp;
56
  return $bp->displayed_user->domain != null;
57
  }
58
-
59
  /**
60
- * Query where
61
- * @global object $bp
62
- * @return string
 
63
  */
64
- public function db_where() {
65
  global $bp;
66
- return "(bp_member.meta_value IS NULL OR bp_member.meta_value IN ('".$bp->current_component."','".$bp->current_component."-".$bp->current_action."'))";
67
-
 
 
68
  }
69
 
70
  /**
@@ -76,27 +80,42 @@ class CASModule_bp_member extends CASModule {
76
  public function meta_box_content() {
77
  global $post, $bp;
78
 
79
- echo '<h4><a href="#">'.$this->name.'</a></h4>'."\n";
80
- echo '<div class="cas-rule-content" id="cas-' . $this->id . '">'."\n";
 
 
81
  $field = $this->id;
82
- $meta = get_post_meta($post->ID, ContentAwareSidebars::prefix . $field, false);
83
- $current = $meta != '' ? $meta : array();
84
 
85
- echo '<ul class="cas-contentlist categorychecklist form-no-clear">'."\n";
 
86
  foreach ($this->_get_content() as $id => $name) {
87
- echo '<li><label class="selectit"><input type="checkbox" name="' . $field . '[]" value="' . $id . '"' . (in_array($id, $current) ? ' checked="checked"' : '') . ' /> ' . $name . '</label></li>' . "\n";
88
  if(isset($bp->bp_options_nav[$id])) {
89
- echo '<ul class="children">';
90
  foreach($bp->bp_options_nav[$id] as $child) {
91
- echo '<li><label class="selectit"><input type="checkbox" name="' . $field . '[]" value="' . $id . '-'. $child['slug'].'"' . (in_array($id . '-'. $child['slug'], $current) ? ' checked="checked"' : '') . ' /> ' . $child['name'] . '</label></li>' . "\n";
92
  }
93
- echo '</ul>';
94
  }
95
 
96
  }
97
 
98
- echo '</ul>'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  echo '</div>'."\n";
 
100
  }
101
 
102
  /**
@@ -106,7 +125,7 @@ class CASModule_bp_member extends CASModule {
106
  * @return boolean
107
  */
108
  public function static_is_content($content) {
109
- return $content && !$this->is_content();
110
  }
111
 
112
  }
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
 
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
  }
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
  /**
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="cas_condition[' . $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="cas_condition[' . $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
  /**
125
  * @return boolean
126
  */
127
  public function static_is_content($content) {
128
+ return $content && !$this->in_context();
129
  }
130
 
131
  }
modules/index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- /**/
1
  <?php
2
+ /**/
modules/page_template.php CHANGED
@@ -19,38 +19,46 @@ class CASModule_page_template extends CASModule {
19
  * Constructor
20
  */
21
  public function __construct() {
22
- parent::__construct();
23
- $this->id = 'page_templates';
24
- $this->name = __('Page Templates',ContentAwareSidebars::domain);
25
  }
26
 
27
  /**
28
  * Determine if content is relevant
29
  * @return boolean
30
  */
31
- public function is_content() {
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
- * Query where
41
- * @return string
 
 
42
  */
43
- public function db_where() {
44
- $template = get_post_meta(get_the_ID(),'_wp_page_template',true);
45
- return "(page_templates.meta_value IS NULL OR page_templates.meta_value IN('page_templates','".$template."'))";
 
 
46
  }
47
 
48
  /**
49
  * Get page templates
50
  * @return array
51
  */
52
- protected function _get_content() {
53
- return array_flip(get_page_templates());
 
 
 
 
54
  }
55
 
56
  }
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
@@ -18,9 +18,7 @@ class CASModule_polylang extends CASModule {
18
  * Constructor
19
  */
20
  public function __construct() {
21
- parent::__construct();
22
- $this->id = 'language';
23
- $this->name = __('Languages',ContentAwareSidebars::domain);
24
 
25
  add_filter('pll_get_post_types', array(&$this,'remove_sidebar_multilingual'));
26
 
@@ -30,16 +28,21 @@ class CASModule_polylang extends CASModule {
30
  * Determine if content is relevant
31
  * @return boolean
32
  */
33
- public function is_content() {
34
  return true;
35
  }
36
-
37
  /**
38
- * Query where
39
- * @return string
 
 
40
  */
41
- public function db_where() {
42
- return "(language.meta_value IS NULL OR language.meta_value IN('language','".pll_current_language()."'))";
 
 
 
43
  }
44
 
45
  /**
@@ -47,13 +50,16 @@ class CASModule_polylang extends CASModule {
47
  * @global object $polylang
48
  * @return array
49
  */
50
- protected function _get_content() {
51
  global $polylang;
52
  $langs = array();
53
 
54
  foreach($polylang->get_languages_list() as $lng) {
55
  $langs[$lng->slug] = $lng->name;
56
  }
 
 
 
57
  return $langs;
58
  }
59
 
@@ -63,7 +69,7 @@ class CASModule_polylang extends CASModule {
63
  * @return array
64
  */
65
  public function remove_sidebar_multilingual($post_types) {
66
- unset($post_types[ContentAwareSidebars::type_sidebar]);
67
  return $post_types;
68
  }
69
 
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
 
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
  /**
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
 
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
@@ -25,13 +25,15 @@ class CASModule_post_type extends CASModule {
25
  * Constructor
26
  */
27
  public function __construct() {
28
- parent::__construct();
29
- $this->id = 'post_types';
30
- $this->name = __('Post Types',ContentAwareSidebars::domain);
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_posts_search'));
 
 
35
 
36
  }
37
 
@@ -39,38 +41,112 @@ class CASModule_post_type extends CASModule {
39
  * Get registered post types
40
  * @return array
41
  */
42
- protected function _get_content() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  if (empty($this->post_type_objects)) {
44
  // List public post types
45
  foreach (get_post_types(array('public' => true), 'objects') as $post_type) {
46
  $this->post_type_objects[$post_type->name] = $post_type;
47
  }
48
  }
49
- return $this->post_type_objects;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
52
  /**
53
  * Determine if content is relevant
54
  * @return boolean
55
  */
56
- public function is_content() {
57
  return ((is_singular() || is_home()) && !is_front_page()) || is_post_type_archive();
58
  }
59
-
60
  /**
61
- * Query where
62
- * @global string $post_type
63
- * @return string
 
64
  */
65
- public function db_where() {
66
  if(is_singular()) {
67
- return "(post_types.meta_value IS NULL OR post_types.meta_value IN('".get_post_type()."','".get_the_ID()."'))";
 
 
 
68
  }
69
  global $post_type;
70
-
71
  // Home has post as default post type
72
  if(!$post_type) $post_type = 'post';
73
- return "(post_types.meta_value IS NULL OR post_types.meta_value = '".$post_type."')";
 
 
74
  }
75
 
76
  /**
@@ -80,65 +156,71 @@ class CASModule_post_type extends CASModule {
80
  * @return void
81
  */
82
  public function meta_box_content() {
83
- global $post, $wpdb;
84
-
85
- foreach ($this->_get_content() as $post_type) {
86
 
87
- echo '<h4><a href="#">' . $post_type->label . '</a></h4>'."\n";
88
- echo '<div class="cas-rule-content" id="cas-' . $this->id . '-' . $post_type->name . '">'."\n";
89
- $meta = get_post_meta($post->ID, ContentAwareSidebars::prefix . 'post_types', false);
90
- $current = $meta != '' ? $meta : array();
91
 
92
- $exclude = array();
93
- if ($post_type->name == 'page' && 'page' == get_option('show_on_front')) {
94
- $exclude[] = get_option('page_on_front');
95
- $exclude[] = get_option('page_for_posts');
96
- }
97
 
98
- $number_of_posts = (int)$wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = '{$post_type->name}' AND post_status IN('publish','private','future')");
99
 
100
- echo '<div style="min-height:100%;">'."\n";
101
 
102
  if($post_type->hierarchical) {
103
- echo '<p>' . "\n";
104
- echo '<label><input type="checkbox" name="post_types[]" value="'.ContentAwareSidebars::prefix.'sub_' . $post_type->name . '"' . checked(in_array(ContentAwareSidebars::prefix."sub_" . $post_type->name, $current), true, false) . ' /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::domain) . '</label>' . "\n";
105
- echo '</p>' . "\n";
106
  }
107
 
108
- //WP3.1.4 does not support $post_type->labels->all_items
109
- echo '<p>' . "\n";
110
- 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', ContentAwareSidebars::domain), $post_type->label) . '</label>' . "\n";
111
- echo '</p>' . "\n";
 
112
 
113
- if (!$number_of_posts) {
114
  echo '<p>' . __('No items.') . '</p>';
115
  } else {
116
-
117
- //WP3.1 does not support (array) as post_status
118
- $posts = get_posts(array(
119
- 'posts_per_page' => 20,
120
- 'post_type' => $post_type->name,
121
- 'post_status' => 'publish,private,future',
122
- 'exclude' => array_merge($exclude,$current),
123
- ));
124
- if(!empty($current)) {
125
- $selected = get_posts(array(
126
- 'include' => $current,
127
- 'post_type' => $post_type->name
128
- ));
129
  } else {
130
- $selected = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
 
133
- echo __('Search',ContentAwareSidebars::domain).' <input class="cas-autocomplete-' . $this->id . ' cas-autocomplete" id="cas-autocomplete-' . $this->id . '-' . $post_type->name . '" type="text" name="cas-autocomplete" value="" /> <input type="button" id="cas-add-' . $this->id . '-' . $post_type->name . '" class="button" value="'.__('Add',ContentAwareSidebars::domain).'"/>'."\n";
134
- echo '<ul id="cas-list-' . $this->id . '-' . $post_type->name . '" class="cas-contentlist categorychecklist form-no-clear">'."\n";
135
- $this->post_checklist($post->ID, $post_type, array_merge($selected,$posts), $current);
136
- echo '</ul>'."\n";
137
 
138
  }
139
 
 
 
 
 
 
 
140
  echo '</div>';
141
- echo '</div>';
142
  }
143
  }
144
 
@@ -150,60 +232,108 @@ class CASModule_post_type extends CASModule {
150
  * @param array $selected_ids
151
  * @return void
152
  */
153
- private function post_checklist($post_id = 0, $post_type, $posts, $selected_ids) {
154
 
155
- $walker = new CAS_Walker_Checklist('post',array ('parent' => 'post_parent', 'id' => 'ID'));
156
 
157
  $args = array(
158
  'post_type' => $post_type,
159
- 'selected_cats' => $post_id ? $selected_ids : array()
160
  );
161
-
162
- $checked_posts = array();
163
-
164
- foreach( $posts as $key => $value ) {
165
- if (in_array($posts[$key]->ID, $args['selected_cats'])) {
166
- $checked_posts[] = $posts[$key];
167
- unset($posts[$key]);
168
- }
 
 
 
 
 
 
 
 
 
169
  }
170
 
171
- //Put checked posts on top
172
- echo call_user_func_array(array(&$walker, 'walk'), array($checked_posts, 0, $args));
173
- // Then the rest of them
174
- echo call_user_func_array(array(&$walker, 'walk'), array($posts, 0, $args));
 
 
 
 
 
 
 
 
 
 
 
175
  }
176
 
177
  /**
178
  * Get posts with AJAX search
179
  * @return void
180
  */
181
- public function ajax_posts_search() {
 
 
 
 
 
182
 
183
  // Verify request
184
- check_ajax_referer(basename('content-aware-sidebars.php'),'nonce');
185
 
186
  $suggestions = array();
187
  if ( preg_match('/cas-autocomplete-'.$this->id.'-([a-zA-Z_-]*\b)/', $_REQUEST['type'], $matches) ) {
188
  if(get_post_type_object( $matches[1] )) {
189
  $exclude = array();
 
190
  if ($matches[1] == 'page' && 'page' == get_option('show_on_front')) {
191
  $exclude[] = get_option('page_on_front');
192
  $exclude[] = get_option('page_for_posts');
 
193
  }
194
- $posts = get_posts(array(
195
- 'posts_per_page' => 10,
196
- 'post_type' => $matches[1],
197
- 's' => $_REQUEST['term'],
198
- 'exclude' => $exclude
 
 
 
 
 
 
 
 
 
 
199
  ));
 
 
 
 
 
 
 
 
 
 
 
200
  foreach($posts as $post) {
201
  $suggestions[] = array(
202
  'label' => $post->post_title,
203
- 'value' => $post->post_title,
204
  'id' => $post->ID,
205
  'module' => $this->id,
206
- 'name' => $this->id,
207
  'id2' => $this->id.'-'.$post->post_type,
208
  'elem' => $post->post_type.'-'.$post->ID
209
  );
@@ -225,7 +355,7 @@ class CASModule_post_type extends CASModule {
225
  */
226
  public function post_ancestry_check($new_status, $old_status, $post) {
227
 
228
- if($post->post_type != ContentAwareSidebars::type_sidebar) {
229
 
230
  $status = array('publish','private','future');
231
  // Only new posts are relevant
@@ -235,26 +365,26 @@ class CASModule_post_type extends CASModule {
235
  if($post_type->hierarchical && $post_type->public && $post->parent != '0') {
236
 
237
  // Get sidebars with post ancestor wanting to auto-select post
238
- $sidebars = new WP_Query(array(
239
- 'post_type' => ContentAwareSidebars::type_sidebar,
240
  'meta_query' => array(
241
  'relation' => 'AND',
242
  array(
243
- 'key' => ContentAwareSidebars::prefix . $this->id,
244
- 'value' => ContentAwareSidebars::prefix.'sub_' . $post->post_type,
245
  'compare' => '='
246
  ),
247
  array(
248
- 'key' => ContentAwareSidebars::prefix . $this->id,
249
  'value' => get_ancestors($post->ID,$post->post_type),
250
  'type' => 'numeric',
251
  'compare' => 'IN'
252
  )
253
  )
254
  ));
255
- if($sidebars) {
256
- foreach($sidebars as $sidebar) {
257
- add_post_meta($sidebar->ID, ContentAwareSidebars::prefix.$this->id, $post->ID);
258
  }
259
  }
260
  }
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
+ if(is_admin()) {
35
+ add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
36
+ }
37
 
38
  }
39
 
41
  * Get registered post types
42
  * @return array
43
  */
44
+ protected function _get_content($args = array()) {
45
+ $args = wp_parse_args($args, array(
46
+ 'include' => '',
47
+ 'post_type' => 'post',
48
+ 'orderby' => 'date',
49
+ 'order' => 'DESC',
50
+ 'paged' => 1,
51
+ 'posts_per_page' => 20
52
+ ));
53
+ extract($args);
54
+
55
+ $exclude = array();
56
+ if ($post_type == 'page' && 'page' == get_option('show_on_front')) {
57
+ $exclude[] = get_option('page_on_front');
58
+ $exclude[] = get_option('page_for_posts');
59
+ }
60
+
61
+ //WP3.1 does not support (array) as post_status
62
+ $query = new WP_Query(array(
63
+ 'posts_per_page' => $posts_per_page,
64
+ 'post_type' => $post_type,
65
+ 'post_status' => 'publish,private,future',
66
+ 'post__in' => $include,
67
+ 'exclude' => $exclude,
68
+ 'orderby' => $orderby,
69
+ 'order' => $order,
70
+ 'paged' => $paged,
71
+ 'ignore_sticky_posts' => true,
72
+ 'update_post_term_cache' => false
73
+ ));
74
+ $this->pagination = array(
75
+ 'paged' => $paged,
76
+ 'per_page' => 20,
77
+ 'total_pages' => $query->max_num_pages,
78
+ 'total_items' => $query->found_posts
79
+ );
80
+ //wp_reset_postdata();
81
+ return $query->posts;
82
+ }
83
+
84
+ protected function _get_post_types() {
85
  if (empty($this->post_type_objects)) {
86
  // List public post types
87
  foreach (get_post_types(array('public' => true), 'objects') as $post_type) {
88
  $this->post_type_objects[$post_type->name] = $post_type;
89
  }
90
  }
91
+ return $this->post_type_objects;
92
+ }
93
+
94
+ public function print_group_data($post_id) {
95
+ $ids = get_post_custom_values(ContentAwareSidebars::PREFIX . $this->id, $post_id);
96
+
97
+ if($ids) {
98
+ $lookup = array_flip((array)$ids);
99
+ foreach($this->_get_post_types() as $post_type) {
100
+ $posts =$this->_get_content(array('include' => $ids, 'posts_per_page' => -1, 'post_type' => $post_type->name, 'orderby' => 'title', 'order' => 'ASC'));
101
+ if($posts || isset($lookup[$post_type->name]) || isset($lookup[ContentAwareSidebars::PREFIX.'sub_' . $post_type->name])) {
102
+ echo '<div class="cas-condition cas-condition-'.$this->id.'-'.$post_type->name.'">';
103
+ echo '<strong>'.$post_type->label.'</strong>';
104
+ echo '<ul>';
105
+ if(isset($lookup[ContentAwareSidebars::PREFIX.'sub_' . $post_type->name])) {
106
+ echo '<li><label><input type="checkbox" name="cas_condition[post_types][]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $post_type->name . '" checked="checked" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label></li>' . "\n";
107
+ }
108
+ if(isset($lookup[$post_type->name])) {
109
+ echo '<li><label><input type="checkbox" name="cas_condition[post_types][]" value="'.$post_type->name.'" checked="checked" /> '.$post_type->labels->all_items.'</label></li>' . "\n";
110
+ }
111
+ if($posts) {
112
+ echo $this->post_checklist($post_type, $posts, false, $ids);
113
+ }
114
+ echo '</ul>';
115
+ echo '</div>';
116
+ }
117
+ }
118
+
119
+ }
120
+
121
  }
122
 
123
  /**
124
  * Determine if content is relevant
125
  * @return boolean
126
  */
127
+ public function in_context() {
128
  return ((is_singular() || is_home()) && !is_front_page()) || is_post_type_archive();
129
  }
130
+
131
  /**
132
+ * Get data from context
133
+ * @author Joachim Jensen <jv@intox.dk>
134
+ * @since 2.0
135
+ * @return array
136
  */
137
+ public function get_context_data() {
138
  if(is_singular()) {
139
+ return array(
140
+ get_post_type(),
141
+ get_the_ID()
142
+ );
143
  }
144
  global $post_type;
 
145
  // Home has post as default post type
146
  if(!$post_type) $post_type = 'post';
147
+ return array(
148
+ $post_type
149
+ );
150
  }
151
 
152
  /**
156
  * @return void
157
  */
158
  public function meta_box_content() {
159
+ global $post;
 
 
160
 
161
+ foreach ($this->_get_post_types() as $post_type) {
 
 
 
162
 
163
+ echo '<li class="control-section accordion-section">';
164
+ echo '<h3 class="accordion-section-title" title="'.$post_type->label.'" tabindex="0">'.$post_type->label.'</h3>'."\n";
165
+ echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-' . $this->id . '-' . $post_type->name . '">'."\n";
 
 
166
 
167
+ $recent_posts = $this->_get_content(array('post_type' => $post_type->name));
168
 
 
169
 
170
  if($post_type->hierarchical) {
171
+ echo '<ul><li>' . "\n";
172
+ echo '<label><input type="checkbox" name="cas_condition['.$this->id.'][]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $post_type->name . '" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label>' . "\n";
173
+ echo '</li></ul>' . "\n";
174
  }
175
 
176
+ if($this->type_display) {
177
+ echo '<ul><li>' . "\n";
178
+ echo '<label><input class="cas-chk-all" type="checkbox" name="cas_condition['.$this->id.'][]" value="' . $post_type->name . '" /> ' . sprintf(__('Display with %s', ContentAwareSidebars::DOMAIN), $post_type->labels->all_items) . '</label>' . "\n";
179
+ echo '</li></ul>' . "\n";
180
+ }
181
 
182
+ if (!$recent_posts) {
183
  echo '<p>' . __('No items.') . '</p>';
184
  } else {
185
+ //No need to use two queries before knowing there are items
186
+ if(count($recent_posts) < 20) {
187
+ $posts = $recent_posts;
 
 
 
 
 
 
 
 
 
 
188
  } else {
189
+ $posts = $this->_get_content(array('post_type' => $post_type->name, 'orderby' => 'title', 'order' => 'ASC'));
190
+ }
191
+
192
+ $tabs = array();
193
+ $tabs['most-recent'] = array(
194
+ 'title' => __('Most Recent'),
195
+ 'status' => true,
196
+ 'content' => $this->post_checklist($post_type, $recent_posts)
197
+ );
198
+ $tabs['all'] = array(
199
+ 'title' => __('View All'),
200
+ 'status' => false,
201
+ 'content' => $this->post_checklist($post_type, $posts, true)
202
+ );
203
+ if($this->searchable) {
204
+ $tabs['search'] = array(
205
+ 'title' => __('Search'),
206
+ 'status' => false,
207
+ 'content' => '',
208
+ '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>'
209
+ );
210
  }
211
 
212
+ echo $this->create_tab_panels($this->id . '-' . $post_type->name,$tabs);
 
 
 
213
 
214
  }
215
 
216
+ echo '<p class="button-controls">';
217
+
218
+ 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>';
219
+
220
+ echo '</p>';
221
+
222
  echo '</div>';
223
+ echo '</li>';
224
  }
225
  }
226
 
232
  * @param array $selected_ids
233
  * @return void
234
  */
235
+ private function post_checklist($post_type, $posts, $pagination = false, $selected_ids = array()) {
236
 
237
+ $walker = new CAS_Walker_Checklist('post',array('parent' => 'post_parent', 'id' => 'ID'));
238
 
239
  $args = array(
240
  'post_type' => $post_type,
241
+ 'selected_terms' => $selected_ids
242
  );
243
+
244
+ $return = call_user_func_array(array(&$walker, 'walk'), array($posts, 0, $args));
245
+
246
+ if($pagination) {
247
+ $paginate = paginate_links(array(
248
+ 'base' => admin_url( 'admin-ajax.php').'%_%',
249
+ 'format' => '?paged=%#%',
250
+ 'total' => $this->pagination['total_pages'],
251
+ 'current' => $this->pagination['paged'],
252
+ 'mid_size' => 2,
253
+ 'end_size' => 1,
254
+ 'prev_next' => true,
255
+ 'prev_text' => 'prev',
256
+ 'next_text' => 'next',
257
+ 'add_args' => array('item_object'=>$post_type->name),
258
+ ));
259
+ $return = $paginate.$return.$paginate;
260
  }
261
 
262
+ return $return;
263
+ }
264
+
265
+ public function ajax_get_content() {
266
+
267
+ //validation
268
+ $paged = isset($_POST['paged']) ? $_POST['paged'] : 1;
269
+ $search = isset($_POST['search']) ? $_POST['search'] : false;
270
+ $post_type = get_post_type_object($_POST['item_object']);
271
+
272
+ $posts = $this->_get_content(array('post_type' => $_POST['item_object'], 'orderby' => 'title', 'order' => 'ASC', 'paged' => $paged));
273
+ $response = $this->post_checklist($post_type, $posts, true);
274
+ //$response = $_POST['paged'];
275
+ echo json_encode($response);
276
+ die();
277
  }
278
 
279
  /**
280
  * Get posts with AJAX search
281
  * @return void
282
  */
283
+ public function ajax_content_search() {
284
+ global $wpdb;
285
+
286
+ if(!isset($_POST['sidebar_id'])) {
287
+ die(-1);
288
+ }
289
 
290
  // Verify request
291
+ check_ajax_referer(ContentAwareSidebars::SIDEBAR_PREFIX.$_POST['sidebar_id'],'nonce');
292
 
293
  $suggestions = array();
294
  if ( preg_match('/cas-autocomplete-'.$this->id.'-([a-zA-Z_-]*\b)/', $_REQUEST['type'], $matches) ) {
295
  if(get_post_type_object( $matches[1] )) {
296
  $exclude = array();
297
+ $exclude_query = "";
298
  if ($matches[1] == 'page' && 'page' == get_option('show_on_front')) {
299
  $exclude[] = get_option('page_on_front');
300
  $exclude[] = get_option('page_for_posts');
301
+ $exclude_query = " AND ID NOT IN (".implode(",", $exclude).")";
302
  }
303
+
304
+ //WordPress searches in title and content by default
305
+ //We want to search in title and slug
306
+ //Using unprepared (safe) exclude because WP is not good at parsing arrays
307
+ $posts = $wpdb->get_results($wpdb->prepare("
308
+ SELECT ID, post_title, post_type
309
+ FROM $wpdb->posts
310
+ WHERE post_type = '%s' AND (post_title LIKE '%s' OR post_name LIKE '%s') AND post_status IN('publish','private','future')
311
+ ".$exclude_query."
312
+ ORDER BY post_title ASC
313
+ LIMIT 0,20
314
+ ",
315
+ $matches[1],
316
+ "%".$_REQUEST['q']."%",
317
+ "%".$_REQUEST['q']."%"
318
  ));
319
+
320
+ // $posts = get_posts(array(
321
+ // 'posts_per_page' => 10,
322
+ // 'post_type' => $matches[1],
323
+ // 's' => $_REQUEST['term'],
324
+ // 'exclude' => $exclude,
325
+ // 'orderby' => 'title',
326
+ // 'order' => 'ASC',
327
+ // 'post_status' => 'publish,private,future'
328
+ // ));
329
+
330
  foreach($posts as $post) {
331
  $suggestions[] = array(
332
  'label' => $post->post_title,
333
+ 'value' => $post->ID,
334
  'id' => $post->ID,
335
  'module' => $this->id,
336
+ 'name' => 'cas_condition['.$this->id.']',
337
  'id2' => $this->id.'-'.$post->post_type,
338
  'elem' => $post->post_type.'-'.$post->ID
339
  );
355
  */
356
  public function post_ancestry_check($new_status, $old_status, $post) {
357
 
358
+ if($post->post_type != ContentAwareSidebars::TYPE_SIDEBAR && $post->post_type != ContentAwareSidebars::TYPE_CONDITION_GROUP) {
359
 
360
  $status = array('publish','private','future');
361
  // Only new posts are relevant
365
  if($post_type->hierarchical && $post_type->public && $post->parent != '0') {
366
 
367
  // Get sidebars with post ancestor wanting to auto-select post
368
+ $query = new WP_Query(array(
369
+ 'post_type' => ContentAwareSidebars::TYPE_CONDITION_GROUP,
370
  'meta_query' => array(
371
  'relation' => 'AND',
372
  array(
373
+ 'key' => ContentAwareSidebars::PREFIX . $this->id,
374
+ 'value' => ContentAwareSidebars::PREFIX.'sub_' . $post->post_type,
375
  'compare' => '='
376
  ),
377
  array(
378
+ 'key' => ContentAwareSidebars::PREFIX . $this->id,
379
  'value' => get_ancestors($post->ID,$post->post_type),
380
  'type' => 'numeric',
381
  'compare' => 'IN'
382
  )
383
  )
384
  ));
385
+ if($query && $query->found_posts) {
386
+ foreach($query->posts as $sidebar) {
387
+ add_post_meta($sidebar->ID, ContentAwareSidebars::PREFIX.$this->id, $post->ID);
388
  }
389
  }
390
  }
modules/qtranslate.php CHANGED
@@ -18,26 +18,28 @@ class CASModule_qtranslate extends CASModule {
18
  * Constructor
19
  */
20
  public function __construct() {
21
- parent::__construct();
22
- $this->id = 'language';
23
- $this->name = __('Languages',ContentAwareSidebars::domain);
24
-
25
  }
26
 
27
  /**
28
  * Determine if content is relevant
29
  * @return boolean
30
  */
31
- public function is_content() {
32
  return true;
33
  }
34
-
35
  /**
36
- * Where query
37
- * @return string
 
 
38
  */
39
- public function db_where() {
40
- return "(language.meta_value IS NULL OR language.meta_value IN('language','".qtrans_getLanguage()."'))";
 
 
 
41
  }
42
 
43
  /**
@@ -45,13 +47,16 @@ class CASModule_qtranslate extends CASModule {
45
  * @global array $q_config
46
  * @return array
47
  */
48
- protected function _get_content() {
49
  global $q_config;
50
  $langs = array();
51
 
52
  foreach(get_option('qtranslate_enabled_languages') as $lng) {
53
  $langs[$lng] = $q_config['language_name'][$lng];
54
  }
 
 
 
55
  return $langs;
56
  }
57
 
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
  /**
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
@@ -20,36 +20,41 @@ class CASModule_static extends CASModule {
20
  * Constructor
21
  */
22
  public function __construct() {
23
- parent::__construct();
24
- $this->id = 'static';
25
- $this->name = __('Static Pages',ContentAwareSidebars::domain);
26
  }
27
 
28
  /**
29
  * Get static content
30
  * @return array
31
  */
32
- protected function _get_content() {
33
- return array(
34
- 'front-page' => __('Front Page', ContentAwareSidebars::domain),
35
- 'search' => __('Search Results', ContentAwareSidebars::domain),
36
- '404' => __('404 Page', ContentAwareSidebars::domain)
37
- );
 
 
 
 
38
  }
39
-
40
  /**
41
  * Determine if content is relevant
42
  * @return boolean
43
  */
44
- public function is_content() {
45
  return is_front_page() || is_search() || is_404();
46
  }
47
 
48
  /**
49
- * Where query
50
- * @return string
 
 
51
  */
52
- public function db_where() {
53
  if(is_front_page()) {
54
  $val = 'front-page';
55
  } else if(is_search()) {
@@ -57,33 +62,9 @@ class CASModule_static extends CASModule {
57
  } else {
58
  $val = '404';
59
  }
60
- return "(static.meta_value IS NULL OR static.meta_value = '".$val."')";
61
-
62
- }
63
-
64
- /**
65
- * Meta box content
66
- * @global object $post
67
- * @return void
68
- */
69
- public function meta_box_content() {
70
- global $post;
71
-
72
- echo '<h4><a href="#">'.$this->name.'</a></h4>'."\n";
73
- echo '<div class="cas-rule-content" id="cas-' . $this->id . '">';
74
- $field = $this->id;
75
- $meta = get_post_meta($post->ID, ContentAwareSidebars::prefix . $field, false);
76
- $current = $meta != '' ? $meta : array();
77
- ?>
78
- <ul class="list:<?php echo $field; ?> categorychecklist form-no-clear">
79
- <?php
80
- foreach ($this->_get_content() as $id => $name) {
81
- echo '<li><label><input type="checkbox" name="' . $field . '[]" value="' . $id . '"' . (in_array($id, $current) ? ' checked="checked"' : '') . ' /> ' . $name . '</label></li>' . "\n";
82
- }
83
- ?>
84
- </ul>
85
- <?php
86
- echo '</div>';
87
  }
88
 
89
  }
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
  }
modules/taxonomy.php CHANGED
@@ -19,7 +19,7 @@ class CASModule_taxonomy extends CASModule {
19
  * Registered public taxonomies
20
  * @var array
21
  */
22
- private $taxonomy_objects;
23
 
24
  /**
25
  * Terms of a given singular
@@ -31,15 +31,15 @@ class CASModule_taxonomy extends CASModule {
31
  * Constructor
32
  */
33
  public function __construct() {
34
- parent::__construct();
35
- $this->id = 'taxonomies';
36
- $this->name = __('Taxonomies',ContentAwareSidebars::domain);
37
 
38
- add_action('init', array(&$this,'add_taxonomies_to_sidebar'),100);
39
- add_action('admin_menu',array(&$this,'clear_admin_menu'));
40
  add_action('created_term', array(&$this,'term_ancestry_check'),10,3);
41
 
42
- add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_terms_search'));
 
 
43
 
44
  }
45
 
@@ -47,13 +47,19 @@ class CASModule_taxonomy extends CASModule {
47
  * Determine if content is relevant
48
  * @return boolean
49
  */
50
- public function is_content() {
51
  if(is_singular()) {
52
  // Check if content has any taxonomies supported
53
- $taxonomies = get_object_taxonomies(get_post_type());
54
- if($taxonomies) {
 
 
 
 
 
 
55
  // Check if content has any actual taxonomy terms
56
- $this->post_terms = wp_get_object_terms(get_the_ID(),$taxonomies);
57
  return !empty($this->post_terms);
58
  }
59
  return false;
@@ -68,21 +74,23 @@ class CASModule_taxonomy extends CASModule {
68
  public function db_join() {
69
  global $wpdb;
70
 
71
- $joins = "LEFT JOIN $wpdb->term_relationships term ON term.object_id = posts.ID ";
72
  $joins .= "LEFT JOIN $wpdb->term_taxonomy taxonomy ON taxonomy.term_taxonomy_id = term.term_taxonomy_id ";
73
  $joins .= "LEFT JOIN $wpdb->terms terms ON terms.term_id = taxonomy.term_id ";
74
- $joins .= "LEFT JOIN $wpdb->postmeta taxonomies ON taxonomies.post_id = posts.ID AND taxonomies.meta_key = '".ContentAwareSidebars::prefix."taxonomies'";
75
 
76
  return $joins;
77
 
78
  }
79
-
80
  /**
81
- * Query where
82
- * @return string
 
 
83
  */
84
- public function db_where() {
85
-
86
  if(is_singular()) {
87
  $terms = array();
88
 
@@ -102,9 +110,8 @@ class CASModule_taxonomy extends CASModule {
102
 
103
  }
104
  $term = get_queried_object();
105
-
106
- return "((taxonomy.taxonomy = '".$term->taxonomy."' AND terms.slug = '".$term->slug."') OR taxonomies.meta_value = '".$term->taxonomy."')";
107
-
108
  }
109
 
110
  /**
@@ -119,7 +126,43 @@ class CASModule_taxonomy extends CASModule {
119
  * Get registered taxonomies
120
  * @return array
121
  */
122
- protected function _get_content() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  // List public taxonomies
124
  if (empty($this->taxonomy_objects)) {
125
  foreach (get_taxonomies(array('public' => true), 'objects') as $tax) {
@@ -129,6 +172,41 @@ class CASModule_taxonomy extends CASModule {
129
  return $this->taxonomy_objects;
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /**
133
  * Meta box content
134
  * @global object $post
@@ -137,48 +215,68 @@ class CASModule_taxonomy extends CASModule {
137
  public function meta_box_content() {
138
  global $post;
139
 
140
- foreach ($this->_get_content() as $taxonomy) {
141
- echo '<h4><a href="#">' . $taxonomy->label . '</a></h4>'."\n";
142
- echo '<div class="cas-rule-content" id="cas-' . $this->id . '-' . $taxonomy->name . '">';
143
 
144
- $meta = get_post_meta($post->ID, ContentAwareSidebars::prefix . 'taxonomies', false);
145
- $current = $meta != '' ? $meta : array();
 
146
 
147
- $number_of_terms = wp_count_terms($taxonomy->name,array('hide_empty'=>false));
 
148
 
149
  if($taxonomy->hierarchical) {
150
- echo '<p>' . "\n";
151
- echo '<label><input type="checkbox" name="taxonomies[]" value="'.ContentAwareSidebars::prefix.'sub_' . $taxonomy->name . '"' . checked(in_array(ContentAwareSidebars::prefix."_sub_" . $taxonomy->name, $current), true, false) . ' /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::domain) . '</label>' . "\n";
152
- echo '</p>' . "\n";
153
  }
154
- echo '<p>' . "\n";
155
- echo '<label><input class="cas-chk-all" type="checkbox" name="taxonomies[]" value="' . $taxonomy->name . '"' . checked(in_array($taxonomy->name, $current), true, false) . ' /> ' . sprintf(__('Show with %s', ContentAwareSidebars::domain), $taxonomy->labels->all_items) . '</label>' . "\n";
156
- echo '</p>' . "\n";
157
-
158
- if (!$number_of_terms) {
159
  echo '<p>' . __('No items.') . '</p>';
160
  } else {
161
-
162
- $selected_ids = array();
163
- if(($selected = wp_get_object_terms($post->ID, $taxonomy->name))) {
164
- $selected_ids = wp_get_object_terms($post->ID, $taxonomy->name, array('fields' => 'ids'));
165
  } else {
166
- $selected = array();
167
  }
168
- $terms = get_terms($taxonomy->name, array(
169
- 'number' => 20,
170
- 'hide_empty' => false,
171
- 'exclude' => $selected_ids
172
- ));
173
 
174
- echo __('Search',ContentAwareSidebars::domain).' <input class="cas-autocomplete-' . $this->id . ' cas-autocomplete" id="cas-autocomplete-' . $this->id . '-' . $taxonomy->name . '" type="text" name="cas-autocomplete" value="" /> <input type="button" id="cas-add-' . $this->id . '-' . $taxonomy->name . '" class="button" value="'.__('Add',ContentAwareSidebars::domain).'"/>'."\n";
175
- echo '<ul id="cas-list-' . $this->id . '-' . $taxonomy->name . '" class="cas-contentlist categorychecklist form-no-clear">'."\n";
176
- echo '<input type="hidden" name="'.($taxonomy->name == "category" ? "post_category[]" : "tax_input[".$taxonomy->name."]").'" value="0" />';
177
- $this->term_checklist($post->ID, $taxonomy, array_merge($selected,$terms), $selected_ids);
178
- echo '</ul>'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
 
 
 
180
  }
 
 
 
 
 
 
 
181
  echo '</div>'."\n";
 
182
  }
183
  }
184
 
@@ -190,58 +288,83 @@ class CASModule_taxonomy extends CASModule {
190
  * @param array $selected_ids
191
  * @return void
192
  */
193
- private function term_checklist($post_id = 0, $taxonomy, $terms, $selected_ids) {
194
 
195
- $walker = new CAS_Walker_Checklist('category',array ('parent' => 'parent', 'id' => 'term_id'));
196
 
197
  $args = array(
198
  'taxonomy' => $taxonomy,
199
- 'selected_terms' => $post_id ? $selected_ids : array()
200
  );
201
-
202
- $checked_terms = array();
203
-
204
- foreach( $terms as $key => $value ) {
205
- if (in_array($terms[$key]->term_id, $args['selected_terms'])) {
206
- $checked_terms[] = $terms[$key];
207
- unset($terms[$key]);
208
- }
 
 
 
 
 
 
 
 
 
209
  }
210
-
211
- //Put checked posts on top
212
- echo call_user_func_array(array(&$walker, 'walk'), array($checked_terms, 0, $args));
213
- // Then the rest of them
214
- echo call_user_func_array(array(&$walker, 'walk'), array($terms, 0, $args));
 
 
 
 
 
 
 
 
 
 
 
 
215
  }
216
 
217
  /**
218
  * Get terms with AJAX search
219
  * @return void
220
  */
221
- public function ajax_terms_search() {
 
 
 
 
222
 
223
  // Verify request
224
- check_ajax_referer(basename('content-aware-sidebars.php'),'nonce');
225
 
226
  $suggestions = array();
227
  if ( preg_match('/cas-autocomplete-'.$this->id.'-([a-zA-Z_-]*\b)/', $_REQUEST['type'], $matches) ) {
228
  if(($taxonomy = get_taxonomy( $matches[1] ))) {
229
  $terms = get_terms($taxonomy->name, array(
230
- 'number' => 10,
231
  'hide_empty' => false,
232
- 'search' => $_REQUEST['term']
233
  ));
234
- $name = ($taxonomy->name == 'category' ? 'post_category' : 'tax_input['.$matches[1].']');
235
  $value = ($taxonomy->hierarchical ? 'term_id' : 'slug');
236
  foreach($terms as $term) {
237
  $suggestions[] = array(
238
- 'label' => $term->name,
239
- 'value' => $term->name,
240
- 'id' => $term->$value,
241
  'module' => $this->id,
242
- 'name' => $name,
243
- 'id2' => $this->id.'-'.$term->taxonomy,
244
- 'elem' => $term->taxonomy.'-'.$term->term_id
245
  );
246
  }
247
  }
@@ -251,31 +374,44 @@ class CASModule_taxonomy extends CASModule {
251
  die();
252
  }
253
 
254
- /**
255
- * Register taxonomies to sidebar post type
256
- * @return void
257
- */
258
- public function add_taxonomies_to_sidebar() {
259
- foreach($this->_get_content() as $tax) {
260
- register_taxonomy_for_object_type( $tax->name, ContentAwareSidebars::type_sidebar );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  }
262
- }
263
 
 
264
 
265
  /**
266
- * Remove taxonomy shortcuts from menu and standard meta boxes.
267
- * @return void
268
  */
269
- public function clear_admin_menu() {
270
- if(current_user_can('edit_theme_options')) {
271
- foreach($this->_get_content() as $tax) {
272
- remove_submenu_page('edit.php?post_type='.ContentAwareSidebars::type_sidebar,'edit-tags.php?taxonomy='.$tax->name.'&amp;post_type='.ContentAwareSidebars::type_sidebar);
273
- }
274
- } else {
275
- // Remove those taxonomies left in the menu when it should be hidden
276
- foreach($this->_get_content() as $tax) {
277
- remove_menu_page('edit-tags.php?taxonomy='.$tax->name.'&amp;post_type='.ContentAwareSidebars::type_sidebar);
278
- }
279
  }
280
  }
281
 
@@ -293,26 +429,26 @@ class CASModule_taxonomy extends CASModule {
293
 
294
  if($term->parent != '0') {
295
  // Get sidebars with term ancestor wanting to auto-select term
296
- $posts = new WP_Query(array(
297
- 'post_type' => ContentAwareSidebars::type_sidebar,
298
- 'meta_query' => array(
299
  array(
300
- 'key' => ContentAwareSidebars::prefix . $this->id,
301
- 'value' => ContentAwareSidebars::prefix.'sub_' . $taxonomy,
302
- 'compare' => '='
303
  )
304
  ),
305
  'tax_query' => array(
306
  array(
307
- 'taxonomy' => $taxonomy,
308
- 'field' => 'id',
309
- 'terms' => get_ancestors($term_id, $taxonomy),
310
- 'include_children' => false
311
  )
312
  )
313
  ));
314
- if($posts) {
315
- foreach($posts as $post) {
316
  wp_set_post_terms($post->ID, $term_id, $taxonomy, true);
317
  }
318
  }
19
  * Registered public taxonomies
20
  * @var array
21
  */
22
+ private $taxonomy_objects = array();
23
 
24
  /**
25
  * Terms of a given singular
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('created_term', array(&$this,'term_ancestry_check'),10,3);
39
 
40
+ if(is_admin()) {
41
+ add_action('wp_ajax_cas-autocomplete-'.$this->id, array(&$this,'ajax_content_search'));
42
+ }
43
 
44
  }
45
 
47
  * Determine if content is relevant
48
  * @return boolean
49
  */
50
+ public function in_context() {
51
  if(is_singular()) {
52
  // Check if content has any taxonomies supported
53
+ $taxonomies = get_object_taxonomies(get_post_type(),'object');
54
+ //Only want public taxonomies
55
+ $taxonomy_names = array();
56
+ foreach($taxonomies as $taxonomy) {
57
+ if($taxonomy->public)
58
+ $taxonomy_names[] = $taxonomy->name;
59
+ }
60
+ if(!empty($taxonomy_names)) {
61
  // Check if content has any actual taxonomy terms
62
+ $this->post_terms = wp_get_object_terms(get_the_ID(),$taxonomy_names);
63
  return !empty($this->post_terms);
64
  }
65
  return false;
74
  public function db_join() {
75
  global $wpdb;
76
 
77
+ $joins = "LEFT JOIN $wpdb->term_relationships term ON term.object_id = posts.ID ";
78
  $joins .= "LEFT JOIN $wpdb->term_taxonomy taxonomy ON taxonomy.term_taxonomy_id = term.term_taxonomy_id ";
79
  $joins .= "LEFT JOIN $wpdb->terms terms ON terms.term_id = taxonomy.term_id ";
80
+ $joins .= "LEFT JOIN $wpdb->postmeta taxonomies ON taxonomies.post_id = posts.ID AND taxonomies.meta_key = '".ContentAwareSidebars::PREFIX."taxonomies'";
81
 
82
  return $joins;
83
 
84
  }
85
+
86
  /**
87
+ * Get data from context
88
+ * @author Joachim Jensen <jv@intox.dk>
89
+ * @since 2.0
90
+ * @return array
91
  */
92
+ public function get_context_data() {
93
+
94
  if(is_singular()) {
95
  $terms = array();
96
 
110
 
111
  }
112
  $term = get_queried_object();
113
+
114
+ return "(terms.slug IS NULL OR (taxonomy.taxonomy = '".$term->taxonomy."' AND terms.slug = '".$term->slug."')) AND (taxonomies.meta_value IS NULL OR taxonomies.meta_value = '".$term->taxonomy."')";
 
115
  }
116
 
117
  /**
126
  * Get registered taxonomies
127
  * @return array
128
  */
129
+ protected function _get_content($args = array()) {
130
+ $args = wp_parse_args($args, array(
131
+ 'include' => '',
132
+ 'taxonomy' => 'category',
133
+ 'number' => 20,
134
+ 'orderby' => 'name',
135
+ 'order' => 'ASC',
136
+ 'offset' => 0
137
+ ));
138
+ extract($args);
139
+ $total_items = wp_count_terms($taxonomy,array('hide_empty'=>false));
140
+ if(!$total_items) {
141
+ $terms = array();
142
+ } else {
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
+ }
152
+
153
+ $per_page = $number;
154
+ $this->pagination = array(
155
+ 'paged' => $offset+1,
156
+ 'per_page' => $per_page,
157
+ 'total_pages' => ceil($total_items/$per_page),
158
+ 'total_items' => $total_items
159
+ );
160
+
161
+
162
+ return $terms;
163
+ }
164
+
165
+ protected function _get_taxonomies() {
166
  // List public taxonomies
167
  if (empty($this->taxonomy_objects)) {
168
  foreach (get_taxonomies(array('public' => true), 'objects') as $tax) {
172
  return $this->taxonomy_objects;
173
  }
174
 
175
+ public function print_group_data($post_id) {
176
+ $ids = array_flip((array)get_post_custom_values(ContentAwareSidebars::PREFIX . $this->id, $post_id));
177
+
178
+ //Fetch all terms and group by tax to prevent lazy loading
179
+ $terms = wp_get_object_terms( $post_id, array_keys($this->_get_taxonomies()));
180
+ $terms_by_tax = array();
181
+ foreach($terms as $term) {
182
+ $terms_by_tax[$term->taxonomy][] = $term;
183
+ }
184
+
185
+ foreach($this->_get_taxonomies() as $taxonomy) {
186
+
187
+ $posts = isset($terms_by_tax[$taxonomy->name]) ? $terms_by_tax[$taxonomy->name] : 0;
188
+
189
+ //$posts = wp_get_object_terms( $post_id, $taxonomy->name);
190
+ if($posts || isset($ids[$taxonomy->name]) || isset($ids[ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name])) {
191
+ echo '<div class="cas-condition cas-condition-'.$this->id.'-'.$taxonomy->name.'">';
192
+ echo '<strong>'.$taxonomy->label.'</strong>';
193
+ echo '<ul>';
194
+ if(isset($ids[ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name])) {
195
+ echo '<li class=""><label><input type="checkbox" name="cas_condition[taxonomies][]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name . '" checked="checked" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label></li>' . "\n";
196
+ }
197
+ if(isset($ids[$taxonomy->name])) {
198
+ echo '<li class=""><label><input type="checkbox" name="cas_condition[taxonomies][]" value="'.$taxonomy->name.'" checked="checked" /> '.$taxonomy->labels->all_items.'</label></li>' . "\n";
199
+ }
200
+ if($posts) {
201
+ echo $this->term_checklist($taxonomy, $posts);
202
+ }
203
+ echo '</ul>';
204
+ echo '</div>';
205
+ }
206
+ }
207
+
208
+ }
209
+
210
  /**
211
  * Meta box content
212
  * @global object $post
215
  public function meta_box_content() {
216
  global $post;
217
 
218
+ foreach ($this->_get_taxonomies() as $taxonomy) {
 
 
219
 
220
+ echo '<li class="control-section accordion-section">';
221
+ echo '<h3 class="accordion-section-title" title="'.$taxonomy->label.'" tabindex="0">'.$taxonomy->label.'</h3>'."\n";
222
+ echo '<div class="accordion-section-content cas-rule-content" data-cas-module="'.$this->id.'" id="cas-' . $this->id . '-' . $taxonomy->name . '">';
223
 
224
+ $terms = $this->_get_content(array('taxonomy' => $taxonomy->name));
225
+
226
 
227
  if($taxonomy->hierarchical) {
228
+ echo '<ul><li>' . "\n";
229
+ echo '<label><input type="checkbox" name="cas_condition[taxonomies][]" value="'.ContentAwareSidebars::PREFIX.'sub_' . $taxonomy->name . '" /> ' . __('Automatically select new children of a selected ancestor', ContentAwareSidebars::DOMAIN) . '</label>' . "\n";
230
+ echo '</li></ul>' . "\n";
231
  }
232
+ echo '<ul><li>' . "\n";
233
+ echo '<label><input class="cas-chk-all" type="checkbox" name="cas_condition[taxonomies][]" value="' . $taxonomy->name . '" /> ' . sprintf(__('Display with %s', ContentAwareSidebars::DOMAIN), $taxonomy->labels->all_items) . '</label>' . "\n";
234
+ echo '</li></ul>' . "\n";
235
+
236
+ if (!$terms) {
237
  echo '<p>' . __('No items.') . '</p>';
238
  } else {
239
+
240
+ //No need to use two queries before knowing there are items
241
+ if(count($terms) < 20) {
242
+ $popular_terms = $terms;
243
  } else {
244
+ $popular_terms = $this->_get_content(array('taxonomy' => $taxonomy->name, 'orderby' => 'count', 'order' => 'DESC'));
245
  }
246
+
 
 
 
 
247
 
248
+ $tabs = array();
249
+ $tabs['popular'] = array(
250
+ 'title' => __('Most Used'),
251
+ 'status' => true,
252
+ 'content' => $this->term_checklist($taxonomy, $popular_terms)
253
+ );
254
+ $tabs['all'] = array(
255
+ 'title' => __('View All'),
256
+ 'status' => false,
257
+ 'content' => $this->term_checklist($taxonomy, $terms, false, true)
258
+ );
259
+ if($this->searchable) {
260
+ $tabs['search'] = array(
261
+ 'title' => __('Search'),
262
+ 'status' => false,
263
+ 'content' => '',
264
+ '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>'
265
+ );
266
+ }
267
 
268
+ echo $this->create_tab_panels($this->id . '-' . $taxonomy->name,$tabs);
269
+
270
  }
271
+
272
+ echo '<p class="button-controls">';
273
+
274
+ 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>';
275
+
276
+ echo '</p>';
277
+
278
  echo '</div>'."\n";
279
+ echo '</li>';
280
  }
281
  }
282
 
288
  * @param array $selected_ids
289
  * @return void
290
  */
291
+ private function term_checklist($taxonomy, $terms, $selected_terms = false, $pagination = false) {
292
 
293
+ $walker = new CAS_Walker_Checklist('category',array('parent' => 'parent', 'id' => 'term_id'));
294
 
295
  $args = array(
296
  'taxonomy' => $taxonomy,
297
+ 'selected_terms' => $selected_terms
298
  );
299
+
300
+ $return = call_user_func_array(array(&$walker, 'walk'), array($terms, 0, $args));
301
+
302
+ if($pagination) {
303
+ $paginate = paginate_links(array(
304
+ 'base' => admin_url( 'admin-ajax.php').'%_%',
305
+ 'format' => '?paged=%#%',
306
+ 'total' => $this->pagination['total_pages'],
307
+ 'current' => $this->pagination['paged'],
308
+ 'mid_size' => 2,
309
+ 'end_size' => 1,
310
+ 'prev_next' => true,
311
+ 'prev_text' => 'prev',
312
+ 'next_text' => 'next',
313
+ 'add_args' => array('item_object'=>$taxonomy->name),
314
+ ));
315
+ $return = $paginate.$return.$paginate;
316
  }
317
+
318
+ return $return;
319
+
320
+ }
321
+
322
+ public function ajax_get_content() {
323
+
324
+ //validation
325
+ $paged = (isset($_POST['paged']) ? $_POST['paged'] : 1)-1;
326
+ $search = isset($_POST['search']) ? $_POST['search'] : false;
327
+ $taxonomy = get_taxonomy($_POST['item_object']);
328
+
329
+ $posts = $this->_get_content(array('taxonomy' => $_POST['item_object'], 'orderby' => 'name', 'order' => 'ASC', 'offset' => $paged));
330
+ $response = $this->term_checklist($taxonomy, $posts, array(), true);
331
+ //$response = $_POST['paged'];
332
+ echo json_encode($response);
333
+ die();
334
  }
335
 
336
  /**
337
  * Get terms with AJAX search
338
  * @return void
339
  */
340
+ public function ajax_content_search() {
341
+
342
+ if(!isset($_POST['sidebar_id'])) {
343
+ die(-1);
344
+ }
345
 
346
  // Verify request
347
+ check_ajax_referer(ContentAwareSidebars::SIDEBAR_PREFIX.$_POST['sidebar_id'],'nonce');
348
 
349
  $suggestions = array();
350
  if ( preg_match('/cas-autocomplete-'.$this->id.'-([a-zA-Z_-]*\b)/', $_REQUEST['type'], $matches) ) {
351
  if(($taxonomy = get_taxonomy( $matches[1] ))) {
352
  $terms = get_terms($taxonomy->name, array(
353
+ 'number' => 10,
354
  'hide_empty' => false,
355
+ 'search' => $_REQUEST['q']
356
  ));
357
+ $name = 'cas_condition[tax_input]['.$matches[1].']';
358
  $value = ($taxonomy->hierarchical ? 'term_id' : 'slug');
359
  foreach($terms as $term) {
360
  $suggestions[] = array(
361
+ 'label' => $term->name,
362
+ 'value' => $term->$value,
363
+ 'id' => $term->$value,
364
  'module' => $this->id,
365
+ 'name' => $name,
366
+ 'id2' => $this->id.'-'.$term->taxonomy,
367
+ 'elem' => $term->taxonomy.'-'.$term->term_id
368
  );
369
  }
370
  }
374
  die();
375
  }
376
 
377
+ public function save_data($post_id) {
378
+ parent::save_data($post_id);
379
+
380
+ $tax_input = isset($_POST['cas_condition']['tax_input']) ? $_POST['cas_condition']['tax_input'] : array();
381
+
382
+ //Save terms
383
+ //Loop through each public taxonomy
384
+ foreach($this->_get_taxonomies() as $taxonomy) {
385
+
386
+ if (current_user_can($taxonomy->cap->assign_terms) ) {
387
+
388
+ //If no terms, maybe delete old ones
389
+ if(!isset($tax_input[$taxonomy->name])) {
390
+ $terms = null;
391
+ } else {
392
+ $terms = $tax_input[$taxonomy->name];
393
+
394
+ //Hierarchical taxonomies use ids instead of slugs
395
+ //see http://codex.wordpress.org/Function_Reference/wp_set_post_terms
396
+ if($taxonomy->hierarchical) {
397
+ $terms = array_unique(array_map('intval', $terms));
398
+ }
399
+ }
400
+
401
+ wp_set_object_terms( $post_id, $terms, $taxonomy->name );
402
+ }
403
+
404
  }
 
405
 
406
+ }
407
 
408
  /**
409
+ * Register taxonomies to sidebar post type
410
+ * @return void
411
  */
412
+ public function add_taxonomies_to_sidebar() {
413
+ foreach($this->_get_taxonomies() as $tax) {
414
+ register_taxonomy_for_object_type( $tax->name, ContentAwareSidebars::TYPE_SIDEBAR );
 
 
 
 
 
 
 
415
  }
416
  }
417
 
429
 
430
  if($term->parent != '0') {
431
  // Get sidebars with term ancestor wanting to auto-select term
432
+ $query = new WP_Query(array(
433
+ 'post_type' => ContentAwareSidebars::TYPE_CONDITION_GROUP,
434
+ 'meta_query' => array(
435
  array(
436
+ 'key' => ContentAwareSidebars::PREFIX . $this->id,
437
+ 'value' => ContentAwareSidebars::PREFIX.'sub_' . $taxonomy,
438
+ 'compare' => '='
439
  )
440
  ),
441
  'tax_query' => array(
442
  array(
443
+ 'taxonomy' => $taxonomy,
444
+ 'field' => 'id',
445
+ 'terms' => get_ancestors($term_id, $taxonomy),
446
+ 'include_children' => false
447
  )
448
  )
449
  ));
450
+ if($query && $query->found_posts) {
451
+ foreach($query->posts as $post) {
452
  wp_set_post_terms($post->ID, $term_id, $taxonomy, true);
453
  }
454
  }
modules/transposh.php CHANGED
@@ -18,28 +18,28 @@ class CASModule_transposh extends CASModule {
18
  * Constructor
19
  */
20
  public function __construct() {
21
- parent::__construct();
22
- $this->id = 'language';
23
- $this->name = __('Languages',ContentAwareSidebars::domain);
24
  }
25
 
26
  /**
27
  * Determine if content is relevant
28
  * @return boolean
29
  */
30
- public function is_content() {
31
  return true;
32
  }
33
-
34
  /**
35
- * Where query
36
- * @global object $my_transposh_plugin
37
- * @return string
 
38
  */
39
- public function db_where() {
40
- global $my_transposh_plugin;
41
- return "(language.meta_value IS NULL OR language.meta_value IN('language','".$my_transposh_plugin->tgl."'))";
42
-
 
43
  }
44
 
45
  /**
@@ -47,12 +47,16 @@ class CASModule_transposh extends CASModule {
47
  * @global object $my_transposh_plugin
48
  * @return array
49
  */
50
- protected function _get_content() {
51
  global $my_transposh_plugin;
52
  $langs = array();
53
- foreach(explode(',',$my_transposh_plugin->options->get_viewable_langs()) as $lng) {
 
54
  $langs[$lng] = transposh_consts::get_language_orig_name($lng);
55
  }
 
 
 
56
  return $langs;
57
  }
58
 
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
+ transposh_get_current_language()
42
+ );
43
  }
44
 
45
  /**
47
  * @global object $my_transposh_plugin
48
  * @return array
49
  */
50
+ protected function _get_content($args = array()) {
51
  global $my_transposh_plugin;
52
  $langs = array();
53
+
54
+ foreach(explode(',',$my_transposh_plugin->options->viewable_languages) 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
@@ -18,36 +18,43 @@ class CASModule_wpml extends CASModule {
18
  * Constructor
19
  */
20
  public function __construct() {
21
- parent::__construct();
22
- $this->id = 'language';
23
- $this->name = __('Languages',ContentAwareSidebars::domain);
24
  }
25
 
26
  /**
27
  * Determine if content is relevant
28
  * @return boolean
29
  */
30
- public function is_content() {
31
  return true;
32
  }
33
-
34
  /**
35
- * Where query
36
- * @return string
 
 
37
  */
38
- public function db_where() {
39
- return "(language.meta_value IS NULL OR language.meta_value IN('language','".ICL_LANGUAGE_CODE."'))";
 
 
 
40
  }
41
 
42
  /**
43
  * Get languages
44
  * @return array
45
  */
46
- protected function _get_content() {
47
  $langs = array();
48
-
49
  foreach(icl_get_languages('skip_missing=N') as $lng) {
50
  $langs[$lng['language_code']] = $lng['native_name'];
 
 
 
 
51
  }
52
  return $langs;
53
  }
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
+
56
+ if(isset($args['include'])) {
57
+ $langs = array_intersect_key($langs,array_flip($args['include']));
58
  }
59
  return $langs;
60
  }
readme.txt CHANGED
@@ -1,42 +1,58 @@
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&currency_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.1
6
- Tested up to: 3.6
7
- Stable tag: 1.3
8
- License: GPL2
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 the 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
  = Features =
18
 
19
- * Easy-to-use sidebar manager
 
20
  * Display sidebars with all or specific:
21
- * Singulars - e.g. some posts or pages
22
  * (Custom) Post Types
23
- * Singulars with given (custom) taxonomies or taxonomy terms
24
  * Singulars by a given author
25
  * Page Templates
 
26
  * Post Type Archives
27
  * Author Archives
28
  * (Custom) Taxonomy Archives or Taxonomy Term Archives
29
- * Search results
30
  * 404 Page
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
38
  * Private sidebars only for members
39
  * Schedule sidebars for later publishing
 
40
 
41
  = Builtin Plugin Support =
42
 
@@ -44,22 +60,29 @@ No extra database tables or table columns will be added.
44
  * BuddyPress (v1.6.2+)
45
  * qTranslate (v2.5.29+)
46
  * Polylang (v0.9.6+)
47
- * Transposh Translation Filter (v0.8.2+)
48
- * WPML Multilingual Blog/CMS (v2.4.3+)
49
 
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
  * Slovak (sk_SK): [Branco](http://webhostinggeeks.com/)
 
 
 
56
 
57
  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.
58
- Download the latest [.pot file](http://plugins.svn.wordpress.org/content-aware-sidebars/trunk/lang/content-aware-sidebars.pot) or the [.po file in your language](http://plugins.svn.wordpress.org/content-aware-sidebars/trunk/lang/).
59
 
60
- = Contact =
61
 
62
- www.intox.dk
63
 
64
  == Installation ==
65
 
@@ -70,44 +93,141 @@ www.intox.dk
70
 
71
  == Frequently Asked Questions ==
72
 
73
- If you have any questions not answered here, head to the [Support Forum](http://wordpress.org/tags/content-aware-sidebars?forum_id=10) or [contact me directly](http://www.intox.dk/kontakt/).
 
 
 
 
 
 
 
 
74
 
75
- = Will Content Aware Sidebars work with my theme? =
76
 
77
- Yes. If the theme supports dynamic widget areas/sidebars, new sidebars can be created to replace or merge with those.
78
- If not, it is still possible to create sidebars and then use the function `display_ca_sidebar()` in the theme.
79
 
80
- = My new sidebar is not displayed where I expect it to? =
 
81
 
82
- All content rules are dependent of each other (when they collide), which makes it possible to create extremely focused rules for where to display a sidebar; e.g. with posts written by a given author and with a given category.
83
- However, this also means that it currently is not possible to create a single sidebar that should be displayed with posts by a given author or posts with a given category.
84
 
85
- Note the exposure setting as it determines whether the selected rules apply to archives, singulars or both.
86
 
87
- = How do I use display_ca_sidebar( $args )? =
88
 
89
- This function is optional and handles all sidebars that are set to be handled manually. It can be inserted anywhere on your site in any quantity, either as it is, or with the following parameters:
90
 
91
- `$args = array(
92
- 'include' => '',
93
- 'before' => '<div id="sidebar" class="widget-area"><ul class="xoxo">',
94
- 'after' => '</ul></div>'
95
- );`
96
 
 
97
 
98
- 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`.
99
- The function accepts URL-style strings as parameters too, like the standard WordPress Template Tags.
100
 
101
- == Screenshots ==
102
 
103
- 1. Add a new Content Aware Sidebar to be displayed with all Posts that contains Very Categorized. It replaces `Main Sidebar`
104
- 2. Simple overview of all created Content Aware Sidebars
105
- 3. Add widgets to the newly added sidebar
106
- 4. Viewing front page of site. `Main Sidebar` is displayed
107
- 5. Viewing a Post that contains Very Categorized. `Very Categorized Posts` sidebar has replaced `Main Sidebar`
108
 
109
  == Changelog ==
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  = 1.3 =
112
 
113
  * Added: post type posts and taxonomy terms now searchable on edit page
@@ -266,26 +386,3 @@ The function accepts URL-style strings as parameters too, like the standard Word
266
  = 0.1 =
267
 
268
  * First stable release
269
-
270
- == Upgrade Notice ==
271
-
272
- = 1.1 =
273
-
274
- * Content Aware Sidebar data in your database will be updated automatically. Remember to backup this data before updating the plugin.
275
-
276
- = 0.8 =
277
-
278
- * Content Aware Sidebar data in your database will be updated automatically. Remember to backup this data before updating the plugin.
279
-
280
- = 0.5 =
281
-
282
- * Note that the plugin now requires at least WordPress 3.1 because of post type archives.
283
-
284
- = 0.4 =
285
-
286
- * All current custom sidebars have to be updated after plugin upgrade due to the new archive rules
287
-
288
- = 0.1 =
289
-
290
- * Hello World
291
-
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&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
4
+ Tags: sidebar, widget, widget area, content aware, context aware, conditional, seo, dynamic, bbpress, buddypress, qtranslate, polylang, transposh, wpml, woocommerce
5
+ Requires at least: 3.3
6
+ Tested up to: 3.9
7
+ Stable tag: 2.2.1
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.
15
+ Boost on-site SEO with better Calls to Action by controlling what content your sidebars should be displayed with.
16
+ The sidebar manager makes it incredibly easy for anyone to create flexible, dynamic sidebars without the need of code.
17
+ Developed with speed and performance in mind and will add no extra database tables or table columns.
18
+
19
+ > **New in version 2**
20
+ >
21
+ > Manage widgets for your created sidebars in the Theme Customizer.
22
+ >
23
+ > Condition groups let you display a sidebar together with both associated and distinct content.
24
+ >
25
+ > Improved GUI makes it even easier to select content and edit sidebars.
26
+ >
27
+ > Improved API for developers who want to extend and manipulate content support.
28
+ >
29
 
30
  = Features =
31
 
32
+ * Easy-to-use Sidebar Manager
33
+ * Widget management integration in Theme Customizer (WP3.9+)
34
  * Display sidebars with all or specific:
35
+ * Singulars - e.g. posts or pages
36
  * (Custom) Post Types
37
+ * Singulars with given (custom) taxonomies or taxonomy terms - e.g. categories or tags
38
  * Singulars by a given author
39
  * Page Templates
40
+ * Post Formats
41
  * Post Type Archives
42
  * Author Archives
43
  * (Custom) Taxonomy Archives or Taxonomy Term Archives
44
+ * Search Results
45
  * 404 Page
46
  * Front Page
47
  * bbPress User Profiles
48
  * BuddyPress Member Pages
49
+ * Languages (qTranslate, Polylang, Transposh, WPML)
50
  * **Any combination of the above**
51
+ * Sidebars can automatically merge with or replace others
52
  * Create complex content with nested sidebars
53
  * Private sidebars only for members
54
  * Schedule sidebars for later publishing
55
+ * Template Tag to display content aware sidebars anywhere in your theme
56
 
57
  = Builtin Plugin Support =
58
 
60
  * BuddyPress (v1.6.2+)
61
  * qTranslate (v2.5.29+)
62
  * Polylang (v0.9.6+)
63
+ * Transposh Translation Filter (v0.9.5+)
64
+ * [WPML Multilingual Blog/CMS (v2.4.3+) Tested and certified](http://wpml.org/plugin/content-aware-sidebars/)
65
 
66
  = Translations =
67
 
68
+ * Chinese (zh_CN): [Joe Tze](http://tkjune.com)
69
  * Danish (da_DK): [Joachim Jensen](http://www.intox.dk/)
70
+ * German (de_DE): Enno Wulff
71
+ * Hungarian (hu_HU): Kis Lukács
72
  * Italian (it_IT): [Luciano Del Fico](http://www.myweb2.it/)
73
+ * Latvian (lv_LV): [Haralds Gribusts](http://www.fireclubllatvia.lv/)
74
  * Lithuanian (lt_LT): [Vincent G](http://host1free.com/)
75
  * Slovak (sk_SK): [Branco](http://webhostinggeeks.com/)
76
+ * Spanish (es_ES): [Analia Jensen](http://www.linkedin.com/in/analiajensen)
77
+
78
+ Do you want to see your name here?
79
 
80
  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.
81
+ 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/).
82
 
83
+ = More information =
84
 
85
+ [Documentation](http://www.intox.dk/en/plugin/content-aware-sidebars-en/)
86
 
87
  == Installation ==
88
 
93
 
94
  == Frequently Asked Questions ==
95
 
96
+ [Click here to go to the official FAQ page](http://www.intox.dk/en/plugin/content-aware-sidebars-en/faq/).
97
+
98
+ == Screenshots ==
99
+
100
+ 1. Add a new Content Aware Sidebar to be displayed with all Posts that contains the category Very Categorized. It replaces `Primary Sidebar`
101
+ 2. Simple overview of all created Content Aware Sidebars
102
+ 3. Add widgets to the newly added sidebar
103
+ 4. Viewing front page of site. `Primary Sidebar` is displayed
104
+ 5. Viewing a Post that contains Very Categorized. `Very Categorized Posts` sidebar has replaced `Primary Sidebar`
105
 
106
+ == Upgrade Notice ==
107
 
108
+ = 2.0 =
 
109
 
110
+ * Content Aware Sidebars data in your database will be updated automatically. It is highly recommended to backup this data before updating the plugin.
111
+ * Minimum WordPress version compatibility is now 3.3.
112
 
113
+ = 1.1 =
 
114
 
115
+ * Content Aware Sidebars data in your database will be updated automatically. Remember to backup this data before updating the plugin.
116
 
117
+ = 0.8 =
118
 
119
+ * Content Aware Sidebars data in your database will be updated automatically. Remember to backup this data before updating the plugin.
120
 
121
+ = 0.5 =
 
 
 
 
122
 
123
+ * Note that the plugin now requires at least WordPress 3.1 because of post type archives.
124
 
125
+ = 0.4 =
 
126
 
127
+ * All current custom sidebars have to be updated after plugin upgrade due to the new archive rules
128
 
129
+ = 0.1 =
130
+
131
+ * Hello World
 
 
132
 
133
  == Changelog ==
134
 
135
+ = 2.2.1 =
136
+
137
+ * Fixed: taxonomy archive conditions did not work with other modules properly
138
+ * Fixed: removed display limit of 20 for saved post type conditions
139
+ * Fixed: saved post type conditions ordered alphabetically
140
+
141
+ = 2.2 =
142
+
143
+ * Added: sidebar displayed in theme customizer (wp3.4+)
144
+ * Added: widget management integration in theme customizer (wp3.9+)
145
+ * Added: handle for forced replace
146
+ * Fixed: reduced database queries in sidebar editor
147
+ * Fixed: disable all add to group buttons before creating first condition group
148
+
149
+ = 2.1 =
150
+
151
+ * Added: empty condition groups cannot be saved
152
+ * Added: confirmation on various condition group actions in sidebar editor
153
+ * Added: improved ux design for sidebar editor
154
+ * Added: chinese translation
155
+ * Added: wp3.9 compatibility
156
+ * Fixed: transposh compatibility now 0.9.5+
157
+ * Fixed: removed warnings for auto-select new children functionality
158
+ * Fixed: unprivileged users could in theory make, but never successfully execute, ajax requests for sidebar editor
159
+ * Fixed: removed warning in widgets screen when handle is not set
160
+
161
+ = 2.0.3 =
162
+
163
+ * Fixed: taxonomy pagination in sidebar editor
164
+ * Fixed: categories found in search can now be saved. props Xandoc
165
+
166
+ = 2.0.2 =
167
+
168
+ * Fixed: terms caused a sidebar to be displayed on all pages
169
+
170
+ = 2.0.1 =
171
+
172
+ * Fixed: admin menu would in some cases be overwritten by other plugins
173
+
174
+ = 2.0 =
175
+
176
+ * Added: condition groups
177
+ * Added: gui and uxd overhaul for sidebar editor
178
+ * Added: pagination for taxonomies in sidebar editor
179
+ * Added: pagination for post types in sidebar editor
180
+ * Added: mysql 5.6+ compatibility
181
+ * Added: more efficient uninstall process
182
+ * Added: easier for developers to extend and manipulate content support
183
+ * Added: wp3.8 and mp6 compatibility
184
+ * Added: german translation
185
+ * Added: hungarian translation
186
+ * Added: latvian translation
187
+ * Added: spanish translation
188
+ * Added: all conditions follow a strict logical "and" operator per group
189
+ * Fixed: scripts and styles only loaded on sidebar administrative pages
190
+ * Fixed: slovak translation now recognized
191
+ * Fixed: paths to assets compatible with ssl
192
+ * Removed: jquery ui autocomplete and accordion
193
+
194
+ = 1.3.5 =
195
+
196
+ * Fixed: menu would disappear in rare cases. Props grezvany13
197
+ * Fixed: search function now searches in title and slug (not content) for post types
198
+ * Added: search function displays at most 20 results instead of 10
199
+
200
+ = 1.3.4 =
201
+
202
+ * Fixed: cas_walker_checklist now follows walker declaration for wp3.6
203
+ * Fixed: content list in accordion now not scrollable
204
+ * Fixed: only terms from public taxonomies are included for content recognition.
205
+ * Fixed: polylang fully supported again
206
+ * Fixed: consistent css across wp versions
207
+ * Removed: flushing rewrite rules on activation/deactivation is needless
208
+
209
+ = 1.3.3 =
210
+
211
+ * Added: html placeholder in search field
212
+ * Added: items already displayed in edit page moved to top and checked when found in search
213
+ * Fixed: private and scheduled singulars included in search results
214
+ * Fixed: search results displayed in ascending order
215
+
216
+ = 1.3.2 =
217
+
218
+ * Added: items found in search now added to list directly on select
219
+ * Fixed: some terms found by search could not be saved
220
+ * Fixed: widget locations are saved again for each theme
221
+
222
+ = 1.3.1 =
223
+
224
+ * Added: authors and bbpress user profiles now searchable on edit page
225
+ * Added: items found in search on edit page are prepended and checked by default
226
+ * Added: updated edit page gui
227
+ * Added: search field only visible when quantity is above 20
228
+ * Fixed: select all checkbox will now disable all input in container
229
+ * Fixed: host sidebar could sometimes not be found in sidebar list
230
+
231
  = 1.3 =
232
 
233
  * Added: post type posts and taxonomy terms now searchable on edit page
386
  = 0.1 =
387
 
388
  * First stable release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -8,19 +8,13 @@ if(!defined('WP_UNINSTALL_PLUGIN')) {
8
  exit();
9
  }
10
 
 
 
11
  // Remove db version
12
  delete_option('cas_db_version');
13
 
14
- // Remove all sidebars
15
- $posts = get_posts(array(
16
- 'numberposts' => -1,
17
- 'post_type' => 'sidebar',
18
- 'post_status' => 'any'
19
- ));
20
- foreach($posts as $post) {
21
- wp_delete_post($post->ID, true);
22
- }
23
 
24
  // Remove user meta
25
- global $wpdb;
26
  $wpdb->query("DELETE FROM $wpdb->usermeta WHERE meta_key IN('metaboxhidden_sidebar','closedpostboxes_sidebar')");
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
@@ -13,16 +13,13 @@ 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');
17
-
18
- if($installed_version === false)
19
- $installed_version = 0;
20
 
21
  // Database is up to date
22
  if($installed_version == $current_version)
23
  return true;
24
 
25
- $versions = array(0.8,1.1);
26
 
27
  //Launch updates
28
  foreach($versions as $version) {
@@ -45,6 +42,70 @@ function cas_run_db_update($current_version) {
45
  return false;
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Version 0.8 -> 1.1
50
  * Serialized metadata gets their own rows
@@ -64,7 +125,7 @@ function cas_update_to_11() {
64
  // Get all sidebars
65
  $posts = get_posts(array(
66
  'numberposts' => -1,
67
- 'post_type' => ContentAwareSidebars::type_sidebar,
68
  'post_status' => 'publish,pending,draft,future,private,trash'
69
  ));
70
 
@@ -72,11 +133,11 @@ function cas_update_to_11() {
72
  foreach($posts as $post) {
73
  foreach($moduledata as $field) {
74
  // Remove old serialized data and insert it again properly
75
- $old = get_post_meta($post->ID, ContentAwareSidebars::prefix.$field, true);
76
  if($old != '') {
77
- delete_post_meta($post->ID, ContentAwareSidebars::prefix.$field, $old);
78
  foreach((array)$old as $new_single) {
79
- add_post_meta($post->ID, ContentAwareSidebars::prefix.$field, $new_single);
80
  }
81
  }
82
  }
@@ -112,7 +173,7 @@ function cas_update_to_08() {
112
  SELECT ID
113
  FROM $wpdb->posts
114
  WHERE post_type = %s
115
- ",ContentAwareSidebars::type_sidebar));
116
 
117
  //Check if there is any
118
  if(!empty($posts)) {
@@ -120,7 +181,7 @@ function cas_update_to_08() {
120
  foreach($metadata as $meta) {
121
  $wpdb->query("
122
  UPDATE $wpdb->postmeta
123
- SET meta_key = '".ContentAwareSidebars::prefix.$meta."'
124
  WHERE meta_key = '".$meta."'
125
  AND post_id IN(".implode(',',$posts).")
126
  ");
@@ -131,3 +192,5 @@ function cas_update_to_08() {
131
 
132
  return true;
133
  }
 
 
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) {
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
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
  }
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)) {
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
  ");
192
 
193
  return true;
194
  }
195
+
196
+ //eol
walker.php CHANGED
@@ -30,9 +30,9 @@ class CAS_Walker_Checklist extends Walker {
30
  * @param array $args
31
  * @return void
32
  */
33
- public function start_lvl(&$output, $depth, $args) {
34
  $indent = str_repeat("\t", $depth);
35
- $output .= "$indent<ul class='children'>\n";
36
  }
37
 
38
  /**
@@ -42,9 +42,9 @@ class CAS_Walker_Checklist extends Walker {
42
  * @param array $args
43
  * @return void
44
  */
45
- public function end_lvl(&$output, $depth, $args) {
46
  $indent = str_repeat("\t", $depth);
47
- $output .= "$indent</ul>\n";
48
  }
49
 
50
  /**
@@ -53,85 +53,62 @@ class CAS_Walker_Checklist extends Walker {
53
  * @param object $term
54
  * @param int $depth
55
  * @param array $args
 
56
  * @return void
57
  */
58
- public function start_el(&$output, $term, $depth, $args) {
59
- extract($args);
60
 
61
  if(isset($post_type)) {
62
-
63
- if ( empty($post_type) ) {
64
  $output .= "\n<li>";
65
  return;
66
  }
67
-
68
- $output .= "\n".'<li id="'.$post_type->name.'-'.$term->ID.'"><label class="selectit"><input class="cas-post_types-'.$term->ID.' cas-post_types-'.$post_type->name.'" value="'.$term->ID.'" type="checkbox" name="post_types[]"'.checked(in_array($term->ID,$selected_cats),true,false).'/> '.esc_html( $term->post_title ).'</label>';
 
 
69
 
70
  } else {
71
-
72
- if ( empty($taxonomy) ) {
73
  $output .= "\n<li>";
74
  return;
75
  }
76
-
77
- $name = ($taxonomy->name == 'category' ? 'post_category' : 'tax_input['.$taxonomy->name.']');
78
- $value = ($taxonomy->hierarchical ? 'term_id' : 'slug');
79
-
80
- $output .= "\n".'<li id="'.$taxonomy->name.'-'.$term->term_id.'"><label class="selectit"><input class="cas-taxonomies-'.$taxonomy->name.'" value="'.$term->$value.'" type="checkbox" name="'.$name.'[]"'.checked(in_array($term->term_id,$selected_terms),true,false).'/> '.esc_html( $term->name ) . '</label>';
81
-
 
 
 
82
  }
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  /**
86
  * End outputting element
87
  * @param string $output
88
- * @param object $term
89
  * @param int $depth
90
  * @param array $args
91
  * @return void
92
  */
93
- public function end_el(&$output, $term, $depth, $args) {
94
  $output .= "</li>\n";
95
  }
96
 
97
  }
98
 
99
- /**
100
- * Show checklist for popular terms
101
- * @global int $post_ID
102
- * @param object $taxonomy
103
- * @param int $default
104
- * @param int $number
105
- * @param boolean $echo
106
- * @return array
107
- */
108
- function cas_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
109
- global $post_ID;
110
-
111
- if ( $post_ID )
112
- $checked_terms = wp_get_object_terms($post_ID, $taxonomy->name, array('fields'=>'ids'));
113
- else
114
- $checked_terms = array();
115
-
116
- $terms = get_terms( $taxonomy->name, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
117
- $disabled = current_user_can($taxonomy->cap->assign_terms) ? '' : ' disabled="disabled"';
118
- $popular_ids = array();
119
-
120
- foreach ( (array) $terms as $term ) {
121
- $popular_ids[] = $term->term_id;
122
- if ( !$echo ) // hack for AJAX use
123
- continue;
124
- $id = "popular-$taxonomy->name-$term->term_id";
125
- ?>
126
-
127
- <li id="<?php echo $id; ?>" class="popular-category">
128
- <label class="selectit">
129
- <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 ?>/>
130
- <?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
131
- </label>
132
- </li>
133
-
134
- <?php
135
- }
136
- return $popular_ids;
137
- }
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
  /**
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
  /**
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 = 'cas_condition[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 = 'cas_condition[tax_input]['.$taxonomy->name.'][]';
87
+
88
  }
89
+
90
+ if(is_array($selected_terms)) {
91
+ $selected = checked(in_array($value,$selected_terms),true,false);
92
+ } else {
93
+ $selected = checked($selected_terms,true,false);
94
+ }
95
+
96
+ $output .= "\n".'<li><label class="selectit"><input value="'.$value.'" type="checkbox" title="'.esc_attr( $title ).'" name="'.$name.'"'.$selected.'/> '.esc_html( $title ).'</label>';
97
+
98
  }
99
 
100
  /**
101
  * End outputting element
102
  * @param string $output
103
+ * @param object $object
104
  * @param int $depth
105
  * @param array $args
106
  * @return void
107
  */
108
+ public function end_el(&$output, $object, $depth = 0, $args = array() ) {
109
  $output .= "</li>\n";
110
  }
111
 
112
  }
113
 
114
+ //eol
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wpml-config.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <custom-fields>
3
+ <custom-field action="ignore">_cas_post_types</custom-field>
4
+ <custom-field action="ignore">_cas_taxonomies</custom-fields>
5
+ </custom-fields>
6
+ <custom-types>
7
+ <custom-type translate="0">sidebar</custom-type>
8
+ <custom-type translate="0">sidebar_group</custom-type>
9
+ </custom-types>
10
+ </wpml-config>