Version Description
- Added: plugin rewritten to flexible modular system
- Added: builtin support for bbpress, qtranslate, transposh, wpml
- Added: lithuanian translation
- Fixed: all present rules now dependent of each other
- Fixed: sidebar update messages
- Fixed: specific hooks now not sitewide
- Fixed: better use of meta cache
- Fixed: dir structure
- Fixed: unexpected output notice on plugin activation
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 1.0 |
Comparing to | |
See all releases |
Code changes from version 0.8.3 to 1.0
- content-aware-sidebars.php +280 -328
- css/style.css +6 -0
- icon-16.png → img/icon-16.png +0 -0
- icon-32.png → img/icon-32.png +0 -0
- index.php +1 -0
- js/cas_admin.js +2 -0
- lang/content-aware-sidebars-da_DK.mo +0 -0
- lang/content-aware-sidebars-da_DK.po +104 -90
- lang/content-aware-sidebars-it_IT.mo +0 -0
- lang/content-aware-sidebars-it_IT.po +110 -97
- lang/content-aware-sidebars-lt_LT.mo +0 -0
- lang/content-aware-sidebars-lt_LT.po +252 -0
- lang/content-aware-sidebars.pot +88 -82
- modules/abstract.php +76 -0
- modules/author.php +63 -0
- modules/bbpress.php +36 -0
- modules/page_template.php +59 -0
- modules/post_type.php +72 -0
- modules/qtranslate.php +69 -0
- modules/static.php +54 -0
- modules/taxonomy.php +117 -0
- modules/transposh.php +59 -0
- modules/wpml.php +57 -0
- readme.txt +40 -13
- style.css +0 -6
- uninstall.php +4 -1
- update_db.php +13 -3
- walker.php +37 -2
content-aware-sidebars.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
Plugin Name: Content Aware Sidebars
|
7 |
Plugin URI: http://www.intox.dk/
|
8 |
Description: Manage and show sidebars according to the content being viewed.
|
9 |
-
Version: 0
|
10 |
Author: Joachim Jensen
|
11 |
Author URI: http://www.intox.dk/
|
12 |
Text Domain: content-aware-sidebars
|
@@ -29,17 +29,15 @@ License: GPL2
|
|
29 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
30 |
|
31 |
*/
|
32 |
-
|
|
|
33 |
|
34 |
const db_version = '0.8';
|
35 |
const prefix = '_cas_';
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
protected $taxonomies = array();
|
41 |
-
protected $taxonomy_objects = array();
|
42 |
-
protected $sidebar_cache = array();
|
43 |
|
44 |
/**
|
45 |
*
|
@@ -48,31 +46,76 @@ class ContentAwareSidebars {
|
|
48 |
*/
|
49 |
public function __construct() {
|
50 |
|
|
|
|
|
|
|
51 |
$this->_load_dependencies();
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
add_filter('manage_edit-sidebar_sortable_columns', array(&$this,'admin_column_sortable_headers'));
|
58 |
-
add_filter('manage_posts_custom_column', array(&$this,'admin_column_rows'),10,3);
|
59 |
-
add_filter('post_row_actions', array(&$this,'sidebar_row_actions'),10,2);
|
60 |
-
add_filter('post_updated_messages', array(&$this,'sidebar_updated_messages'));
|
61 |
-
|
62 |
add_action('init', array(&$this,'init_sidebar_type'),99);
|
63 |
add_action('widgets_init', array(&$this,'create_sidebars'));
|
64 |
-
|
65 |
-
|
66 |
add_action('admin_menu', array(&$this,'clear_admin_menu'));
|
|
|
67 |
add_action('admin_print_scripts-edit.php', array(&$this,'load_admin_scripts'));
|
68 |
add_action('admin_print_scripts-post-new.php', array(&$this,'load_admin_scripts'));
|
69 |
add_action('admin_print_scripts-post.php', array(&$this,'load_admin_scripts'));
|
70 |
-
|
|
|
71 |
add_action('delete_post', array(&$this,'remove_sidebar_widgets'));
|
72 |
-
add_action('
|
73 |
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
}
|
78 |
|
@@ -80,10 +123,12 @@ class ContentAwareSidebars {
|
|
80 |
*
|
81 |
* Create post meta fields
|
82 |
*
|
|
|
|
|
83 |
*/
|
84 |
private function _init_metadata() {
|
85 |
-
global $post, $wp_registered_sidebars
|
86 |
-
|
87 |
// List of sidebars
|
88 |
$sidebar_list = array();
|
89 |
foreach($wp_registered_sidebars as $sidebar) {
|
@@ -91,102 +136,54 @@ class ContentAwareSidebars {
|
|
91 |
$sidebar_list[$sidebar['id']] = $sidebar['name'];
|
92 |
}
|
93 |
|
94 |
-
// List of authors
|
95 |
-
$author_list = array();
|
96 |
-
foreach($wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID ASC") as $user) {
|
97 |
-
$author_list[$user->ID] = $user->display_name;
|
98 |
-
}
|
99 |
-
|
100 |
// Meta fields
|
101 |
-
$this->metadata = array(
|
102 |
-
'
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
'
|
119 |
-
|
120 |
-
'
|
121 |
-
'
|
122 |
-
'
|
123 |
-
'type' => 'checkbox',
|
124 |
-
'list' => $author_list
|
125 |
-
),
|
126 |
-
'page_templates'=> array(
|
127 |
-
'name' => __('Page Templates', 'content-aware-sidebars'),
|
128 |
-
'id' => 'page_templates',
|
129 |
-
'desc' => '',
|
130 |
-
'val' => array(),
|
131 |
-
'type' => 'checkbox',
|
132 |
-
'list' => array_flip(get_page_templates())
|
133 |
-
),
|
134 |
-
'static' => array(
|
135 |
-
'name' => __('Static Pages', 'content-aware-sidebars'),
|
136 |
-
'id' => 'static',
|
137 |
-
'desc' => '',
|
138 |
-
'val' => array(),
|
139 |
-
'type' => 'checkbox',
|
140 |
-
'list' => array(
|
141 |
-
'front-page' => __('Front Page', 'content-aware-sidebars'),
|
142 |
-
'search' => __('Search Results', 'content-aware-sidebars'),
|
143 |
-
'404' => __('404 Page', 'content-aware-sidebars')
|
144 |
-
)
|
145 |
-
),
|
146 |
-
'exposure' => array(
|
147 |
-
'name' => __('Exposure', 'content-aware-sidebars'),
|
148 |
-
'id' => 'exposure',
|
149 |
-
'desc' => '',
|
150 |
-
'val' => 1,
|
151 |
-
'type' => 'select',
|
152 |
-
'list' => array(
|
153 |
-
__('Singular', 'content-aware-sidebars'),
|
154 |
-
__('Singular & Archive', 'content-aware-sidebars'),
|
155 |
-
__('Archive', 'content-aware-sidebars')
|
156 |
-
)
|
157 |
-
),
|
158 |
-
'handle' => array(
|
159 |
-
'name' => _x('Handle','option', 'content-aware-sidebars'),
|
160 |
-
'id' => 'handle',
|
161 |
-
'desc' => __('Replace host sidebar, merge with it or add sidebar manually.', 'content-aware-sidebars'),
|
162 |
-
'val' => 0,
|
163 |
-
'type' => 'select',
|
164 |
-
'list' => array(
|
165 |
-
__('Replace', 'content-aware-sidebars'),
|
166 |
-
__('Merge', 'content-aware-sidebars'),
|
167 |
-
__('Manual', 'content-aware-sidebars')
|
168 |
-
)
|
169 |
-
),
|
170 |
-
'host' => array(
|
171 |
-
'name' => __('Host Sidebar', 'content-aware-sidebars'),
|
172 |
-
'id' => 'host',
|
173 |
-
'desc' => '',
|
174 |
-
'val' => 'sidebar-1',
|
175 |
-
'type' => 'select',
|
176 |
-
'list' => $sidebar_list
|
177 |
-
),
|
178 |
-
'merge-pos' => array(
|
179 |
-
'name' => __('Merge position', 'content-aware-sidebars'),
|
180 |
-
'id' => 'merge-pos',
|
181 |
-
'desc' => __('Place sidebar on top or bottom of host when merging.', 'content-aware-sidebars'),
|
182 |
-
'val' => 1,
|
183 |
-
'type' => 'select',
|
184 |
-
'list' => array(
|
185 |
-
__('Top', 'content-aware-sidebars'),
|
186 |
-
__('Bottom', 'content-aware-sidebars')
|
187 |
-
)
|
188 |
)
|
189 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
|
192 |
/**
|
@@ -198,16 +195,9 @@ class ContentAwareSidebars {
|
|
198 |
|
199 |
load_plugin_textdomain('content-aware-sidebars', false, dirname( plugin_basename(__FILE__)).'/lang/');
|
200 |
|
201 |
-
// List public post types
|
202 |
-
foreach(get_post_types(array('public'=>true),'objects') as $post_type) {
|
203 |
-
$this->post_types[$post_type->name] = $post_type->label;
|
204 |
-
$this->post_type_objects[$post_type->name] = $post_type;
|
205 |
-
}
|
206 |
-
|
207 |
// List public taxonomies
|
208 |
-
foreach(get_taxonomies(array('public'=>true),'
|
209 |
-
$this->taxonomies[
|
210 |
-
$this->taxonomy_objects[$tax->name] = $tax;
|
211 |
}
|
212 |
|
213 |
// Register the sidebar type
|
@@ -229,9 +219,9 @@ class ContentAwareSidebars {
|
|
229 |
'query_var' => false,
|
230 |
'rewrite' => false,
|
231 |
'menu_position' => null,
|
232 |
-
'supports' => array('title','
|
233 |
-
'taxonomies' =>
|
234 |
-
'menu_icon' => WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/icon-16.png'
|
235 |
));
|
236 |
}
|
237 |
|
@@ -239,6 +229,9 @@ class ContentAwareSidebars {
|
|
239 |
*
|
240 |
* Create update messages
|
241 |
*
|
|
|
|
|
|
|
242 |
*/
|
243 |
public function sidebar_updated_messages( $messages ) {
|
244 |
global $post;
|
@@ -255,7 +248,7 @@ class ContentAwareSidebars {
|
|
255 |
9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>. <a href="%2$s">Manage widgets</a>','content-aware-sidebars'),
|
256 |
// translators: Publish box date format, see http://php.net/date
|
257 |
date_i18n(__('M j, Y @ G:i'),strtotime($post->post_date)),'widgets.php'),
|
258 |
-
10 =>
|
259 |
);
|
260 |
return $messages;
|
261 |
}
|
@@ -266,10 +259,10 @@ class ContentAwareSidebars {
|
|
266 |
*
|
267 |
*/
|
268 |
public function clear_admin_menu() {
|
269 |
-
foreach($this->taxonomies as $
|
270 |
-
remove_submenu_page('edit.php?post_type=sidebar','edit-tags.php?taxonomy='.$
|
271 |
-
remove_meta_box('tagsdiv-'.$
|
272 |
-
remove_meta_box($
|
273 |
}
|
274 |
}
|
275 |
|
@@ -302,10 +295,14 @@ class ContentAwareSidebars {
|
|
302 |
/**
|
303 |
*
|
304 |
* Add admin column headers
|
305 |
-
*
|
|
|
|
|
306 |
*/
|
307 |
public function admin_column_headers($columns) {
|
|
|
308 |
unset($columns['categories'],$columns['tags']);
|
|
|
309 |
return array_merge(
|
310 |
array_slice($columns, 0, 2, true),
|
311 |
array(
|
@@ -321,6 +318,8 @@ class ContentAwareSidebars {
|
|
321 |
*
|
322 |
* Make some columns sortable
|
323 |
*
|
|
|
|
|
324 |
*/
|
325 |
public function admin_column_sortable_headers($columns) {
|
326 |
return array_merge(
|
@@ -337,6 +336,8 @@ class ContentAwareSidebars {
|
|
337 |
*
|
338 |
* Manage custom column sorting
|
339 |
*
|
|
|
|
|
340 |
*/
|
341 |
public function admin_column_orderby($vars) {
|
342 |
if (isset($vars['orderby']) && in_array($vars['orderby'],array('exposure','handle','merge-pos'))) {
|
@@ -352,6 +353,9 @@ class ContentAwareSidebars {
|
|
352 |
*
|
353 |
* Add admin column rows
|
354 |
*
|
|
|
|
|
|
|
355 |
*/
|
356 |
public function admin_column_rows($column_name,$post_id) {
|
357 |
|
@@ -375,6 +379,8 @@ class ContentAwareSidebars {
|
|
375 |
*
|
376 |
* Remove widget when its sidebar is removed
|
377 |
*
|
|
|
|
|
378 |
*/
|
379 |
public function remove_sidebar_widgets($post_id) {
|
380 |
|
@@ -413,11 +419,17 @@ class ContentAwareSidebars {
|
|
413 |
*
|
414 |
* Add admin rows actions
|
415 |
*
|
|
|
|
|
|
|
416 |
*/
|
417 |
public function sidebar_row_actions($actions, $post) {
|
418 |
if($post->post_type == 'sidebar' && $post->post_status != 'trash') {
|
|
|
419 |
//View link is still there in WP3.1
|
420 |
-
if(isset($actions['view']))
|
|
|
|
|
421 |
return array_merge(
|
422 |
array_slice($actions, 0, 2, true),
|
423 |
array(
|
@@ -434,6 +446,8 @@ class ContentAwareSidebars {
|
|
434 |
* Replace or merge a sidebar with content aware sidebars
|
435 |
* Handles content aware sidebars with hosts
|
436 |
*
|
|
|
|
|
437 |
*/
|
438 |
public function replace_sidebar() {
|
439 |
global $_wp_sidebars_widgets;
|
@@ -444,10 +458,19 @@ class ContentAwareSidebars {
|
|
444 |
|
445 |
foreach($posts as $post) {
|
446 |
|
447 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
|
449 |
// Check for correct handling and if host exist
|
450 |
-
if ($post->handle == 2 || !isset($_wp_sidebars_widgets[$
|
451 |
continue;
|
452 |
|
453 |
// Sidebar might not have any widgets. Get it anyway!
|
@@ -455,14 +478,14 @@ class ContentAwareSidebars {
|
|
455 |
$_wp_sidebars_widgets[$id] = array();
|
456 |
|
457 |
// If host has already been replaced, merge with it instead. Might change in future.
|
458 |
-
if($post->handle || isset($handled_already[$
|
459 |
-
if($post->
|
460 |
-
$_wp_sidebars_widgets[$
|
461 |
else
|
462 |
-
$_wp_sidebars_widgets[$
|
463 |
} else {
|
464 |
-
$_wp_sidebars_widgets[$
|
465 |
-
$handled_already[$
|
466 |
}
|
467 |
}
|
468 |
}
|
@@ -470,11 +493,12 @@ class ContentAwareSidebars {
|
|
470 |
/**
|
471 |
*
|
472 |
* Query sidebars according to content
|
473 |
-
*
|
474 |
-
*
|
|
|
475 |
*/
|
476 |
public function get_sidebars() {
|
477 |
-
global $wpdb
|
478 |
|
479 |
// Return cache if present
|
480 |
if(!empty($this->sidebar_cache)) {
|
@@ -483,163 +507,48 @@ class ContentAwareSidebars {
|
|
483 |
else
|
484 |
return $this->sidebar_cache;
|
485 |
}
|
486 |
-
|
487 |
-
$joins = "";
|
488 |
-
$where = "";
|
489 |
-
|
490 |
-
// Front page
|
491 |
-
if(is_front_page()) {
|
492 |
-
|
493 |
-
$joins .= "LEFT JOIN $wpdb->postmeta static ON static.post_id = posts.ID AND static.meta_key = '".self::prefix."static' ";
|
494 |
-
|
495 |
-
$where .= "(static.meta_value LIKE '%front-page%') AND ";
|
496 |
-
$where .= "exposure.meta_value <= '1' AND ";
|
497 |
-
|
498 |
-
// Single content
|
499 |
-
} elseif(is_singular()) {
|
500 |
-
|
501 |
-
// Check if content has any taxonomies supported
|
502 |
-
$post_taxonomies = get_object_taxonomies(get_post_type());
|
503 |
-
if($post_taxonomies) {
|
504 |
-
$post_terms = wp_get_object_terms(get_the_ID(),$post_taxonomies);
|
505 |
-
// Check if content has any actual taxonomy terms
|
506 |
-
if($post_terms) {
|
507 |
-
$terms = array();
|
508 |
-
$taxonomies = array();
|
509 |
-
|
510 |
-
$where .= "(";
|
511 |
-
|
512 |
-
//Grab posts terms and make where rules for taxonomies.
|
513 |
-
foreach($post_terms as $term) {
|
514 |
-
$terms[] = $term->slug;
|
515 |
-
if(!isset($taxonomies[$term->taxonomy])) {
|
516 |
-
$where .= "post_tax.meta_value LIKE '%".$taxonomies[$term->taxonomy] = $term->taxonomy."%' OR ";
|
517 |
-
}
|
518 |
-
}
|
519 |
-
|
520 |
-
$joins .= "LEFT JOIN $wpdb->term_relationships term ON term.object_id = posts.ID ";
|
521 |
-
$joins .= "LEFT JOIN $wpdb->term_taxonomy taxonomy ON taxonomy.term_taxonomy_id = term.term_taxonomy_id ";
|
522 |
-
$joins .= "LEFT JOIN $wpdb->terms terms ON terms.term_id = taxonomy.term_id ";
|
523 |
-
$joins .= "LEFT JOIN $wpdb->postmeta post_tax ON post_tax.post_id = posts.ID AND post_tax.meta_key = '".self::prefix."taxonomies'";
|
524 |
-
|
525 |
-
$where .= "terms.slug IN('".implode("','",$terms)."') ";
|
526 |
-
$where .= ") OR ";
|
527 |
-
}
|
528 |
-
}
|
529 |
-
|
530 |
-
// Post Type
|
531 |
-
$joins .= "LEFT JOIN $wpdb->postmeta post_types ON post_types.post_id = posts.ID AND post_types.meta_key = '".self::prefix."post_types' ";
|
532 |
-
$where .= "((post_types.meta_value IS NULL OR (post_types.meta_value LIKE '%".serialize(get_post_type())."%' OR post_types.meta_value LIKE '%".serialize((string)get_the_ID())."%'))";
|
533 |
-
$where2 = "AND (post_types.meta_value IS NOT NULL";
|
534 |
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
$where2 .= " OR authors.meta_value IS NOT NULL";
|
539 |
-
|
540 |
-
//Page Template
|
541 |
-
$template = get_post_meta(get_the_ID(),'_wp_page_template',true);
|
542 |
-
if($template && $template != 'default') {
|
543 |
-
$joins .= "LEFT JOIN $wpdb->postmeta page_templates ON page_templates.post_id = posts.ID AND page_templates.meta_key = '".self::prefix."page_templates' ";
|
544 |
-
$where .= " AND (page_templates.meta_value IS NULL OR (page_templates.meta_value LIKE '%page_templates%' OR page_templates.meta_value LIKE '%".$template."%'))";
|
545 |
-
$where2 .= " OR page_templates.meta_value IS NOT NULL";
|
546 |
-
}
|
547 |
-
|
548 |
-
$where2 .= ")";
|
549 |
-
|
550 |
-
$where .= $where2.") AND ";
|
551 |
-
$where .= "exposure.meta_value <= '1' AND ";
|
552 |
-
|
553 |
-
// Taxonomy archives
|
554 |
-
} elseif(is_tax() || is_category() || is_tag()) {
|
555 |
-
|
556 |
-
$term = get_queried_object();
|
557 |
-
|
558 |
-
$joins .= "LEFT JOIN $wpdb->term_relationships term ON term.object_id = posts.ID ";
|
559 |
-
$joins .= "LEFT JOIN $wpdb->term_taxonomy taxonomy ON taxonomy.term_taxonomy_id = term.term_taxonomy_id ";
|
560 |
-
$joins .= "LEFT JOIN $wpdb->terms terms ON terms.term_id = taxonomy.term_id ";
|
561 |
-
$joins .= "LEFT JOIN $wpdb->postmeta post_tax ON post_tax.post_id = posts.ID AND post_tax.meta_key = '".self::prefix."taxonomies'";
|
562 |
-
|
563 |
-
$where .= "(terms.slug = '$term->slug'";
|
564 |
-
$where .= " OR post_tax.meta_value LIKE '%".serialize($term->taxonomy)."%'";
|
565 |
-
$where .= ") AND ";
|
566 |
-
$where .= "exposure.meta_value >= '1' AND ";
|
567 |
-
|
568 |
-
// Post Type archives
|
569 |
-
} elseif(is_post_type_archive() || is_home()) {
|
570 |
-
|
571 |
-
// Home has post as default post type
|
572 |
-
if(!$post_type) $post_type = 'post';
|
573 |
-
|
574 |
-
$joins .= "LEFT JOIN $wpdb->postmeta post_types ON post_types.post_id = posts.ID AND post_types.meta_key = '".self::prefix."post_types' ";
|
575 |
-
$where .= "(post_types.meta_value LIKE '%".serialize($post_type)."%') AND ";
|
576 |
-
$where .= "exposure.meta_value >= '1' AND ";
|
577 |
|
578 |
-
//
|
579 |
-
|
580 |
-
|
581 |
-
$joins .= "LEFT JOIN $wpdb->postmeta authors ON authors.post_id = posts.ID AND authors.meta_key = '".self::prefix."authors' ";
|
582 |
-
$where .= "(authors.meta_value LIKE '%authors%' OR authors.meta_value LIKE '%".serialize((string)get_query_var('author'))."%') AND ";
|
583 |
-
$where .= "exposure.meta_value >= '1' AND ";
|
584 |
|
585 |
-
//
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
$where .= "(static.meta_value LIKE '%search%') AND ";
|
590 |
-
$where .= "exposure.meta_value <= '1' AND ";
|
591 |
-
|
592 |
-
// 404
|
593 |
-
} elseif(is_404()) {
|
594 |
-
|
595 |
-
$joins .= "LEFT JOIN $wpdb->postmeta static ON static.post_id = posts.ID AND static.meta_key = '".self::prefix."static' ";
|
596 |
-
$where .= "(static.meta_value LIKE '%404%') AND ";
|
597 |
-
$where .= "exposure.meta_value <= '1' AND ";
|
598 |
-
|
599 |
-
}
|
600 |
|
601 |
// Check if there are any rules for this type of content
|
602 |
-
if(
|
603 |
return false;
|
604 |
-
|
605 |
-
// Show private sidebars or not
|
606 |
-
if(current_user_can('read_private_posts'))
|
607 |
-
$post_status = "IN('publish','private')";
|
608 |
-
else
|
609 |
-
$post_status = "= 'publish'";
|
610 |
-
$where .= "posts.post_status ".$post_status."";
|
611 |
-
|
612 |
// Do query and cache it
|
613 |
$wpdb->query('SET OPTION SQL_BIG_SELECTS = 1');
|
614 |
$this->sidebar_cache = $wpdb->get_results("
|
615 |
SELECT
|
616 |
posts.ID,
|
617 |
-
handle.meta_value handle
|
618 |
-
host.meta_value host,
|
619 |
-
merge_pos.meta_value merge_pos
|
620 |
FROM $wpdb->posts posts
|
621 |
LEFT JOIN $wpdb->postmeta handle
|
622 |
ON handle.post_id = posts.ID
|
623 |
AND handle.meta_key = '".self::prefix."handle'
|
624 |
-
LEFT JOIN $wpdb->postmeta host
|
625 |
-
ON host.post_id = posts.ID
|
626 |
-
AND host.meta_key = '".self::prefix."host'
|
627 |
-
LEFT JOIN $wpdb->postmeta merge_pos
|
628 |
-
ON merge_pos.post_id = posts.ID
|
629 |
-
AND merge_pos.meta_key = '".self::prefix."merge-pos'
|
630 |
LEFT JOIN $wpdb->postmeta exposure
|
631 |
ON exposure.post_id = posts.ID
|
632 |
AND exposure.meta_key = '".self::prefix."exposure'
|
633 |
-
|
634 |
WHERE
|
635 |
posts.post_type = 'sidebar' AND
|
636 |
-
|
|
|
|
|
637 |
GROUP BY posts.ID
|
638 |
ORDER BY posts.menu_order ASC, handle.meta_value DESC, posts.post_date DESC
|
639 |
");
|
640 |
|
641 |
// Return proper cache. If query was empty, tell the cache.
|
642 |
-
return empty($this->sidebar_cache) ? $this->sidebar_cache[0] = false : $this->sidebar_cache;
|
643 |
|
644 |
}
|
645 |
|
@@ -652,55 +561,20 @@ class ContentAwareSidebars {
|
|
652 |
|
653 |
// Load metadata
|
654 |
$this->_init_metadata();
|
655 |
-
|
656 |
// Add boxes
|
657 |
// Author Words
|
658 |
add_meta_box(
|
659 |
-
'ca-sidebar-
|
660 |
__('Words from the author', 'content-aware-sidebars'),
|
661 |
array(&$this,'meta_box_author_words'),
|
662 |
'sidebar',
|
663 |
'side',
|
664 |
'high'
|
665 |
);
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
'ca-sidebar-post-type-'.$post_type->name,
|
670 |
-
$post_type->label,
|
671 |
-
array(&$this,'meta_box_post_type'),
|
672 |
-
'sidebar',
|
673 |
-
'normal',
|
674 |
-
'high',
|
675 |
-
$post_type
|
676 |
-
);
|
677 |
-
}
|
678 |
-
// Taxonomies
|
679 |
-
foreach($this->taxonomy_objects as $tax) {
|
680 |
-
add_meta_box(
|
681 |
-
'ca-sidebar-tax-'.$tax->name,
|
682 |
-
$tax->label,
|
683 |
-
array(&$this,'meta_box_taxonomy'),
|
684 |
-
'sidebar',
|
685 |
-
'side',
|
686 |
-
'default',
|
687 |
-
$tax
|
688 |
-
);
|
689 |
-
}
|
690 |
-
|
691 |
-
// Author and Page Template lists
|
692 |
-
$checkbox_meta_boxes = array('authors','page_templates');
|
693 |
-
foreach($checkbox_meta_boxes as $meta_box) {
|
694 |
-
add_meta_box(
|
695 |
-
'ca-sidebar-'.$meta_box,
|
696 |
-
$this->metadata[$meta_box]['name'],
|
697 |
-
array(&$this,'meta_box_checkboxes'),
|
698 |
-
'sidebar',
|
699 |
-
'side',
|
700 |
-
'default',
|
701 |
-
$meta_box
|
702 |
-
);
|
703 |
-
}
|
704 |
|
705 |
// Options
|
706 |
add_meta_box(
|
@@ -718,6 +592,10 @@ class ContentAwareSidebars {
|
|
718 |
*
|
719 |
* Hide some meta boxes from start
|
720 |
*
|
|
|
|
|
|
|
|
|
721 |
*/
|
722 |
public function change_default_hidden( $hidden, $screen ) {
|
723 |
global $wp_version;
|
@@ -747,6 +625,7 @@ class ContentAwareSidebars {
|
|
747 |
*
|
748 |
*/
|
749 |
public function meta_box_content() {
|
|
|
750 |
$columns = array(
|
751 |
'static',
|
752 |
'exposure',
|
@@ -754,6 +633,14 @@ class ContentAwareSidebars {
|
|
754 |
'merge-pos'
|
755 |
);
|
756 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
echo '<table class="form-table">';
|
758 |
foreach($columns as $key => $value) {
|
759 |
|
@@ -766,6 +653,13 @@ class ContentAwareSidebars {
|
|
766 |
echo '</td></tr>';
|
767 |
}
|
768 |
echo '</table>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
}
|
770 |
|
771 |
/**
|
@@ -774,6 +668,7 @@ class ContentAwareSidebars {
|
|
774 |
*
|
775 |
*/
|
776 |
public function meta_box_author_words() {
|
|
|
777 |
// Use nonce for verification
|
778 |
wp_nonce_field(basename(__FILE__),'_ca-sidebar-nonce');
|
779 |
?>
|
@@ -788,10 +683,20 @@ class ContentAwareSidebars {
|
|
788 |
'http://wordpress.org/extend/plugins/content-aware-sidebars/',
|
789 |
'http://twitter.com/?status='.__('Check out Content Aware Sidebars for %23WordPress! :)','content-aware-sidebars').' http://tiny.cc/ca-sidebars'
|
790 |
); ?></p>
|
|
|
|
|
|
|
791 |
</div>
|
792 |
<?php
|
793 |
}
|
794 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
public function meta_box_taxonomy($post, $box) {
|
796 |
$meta = get_post_meta($post->ID, self::prefix.'taxonomies', true);
|
797 |
$current = $meta != '' ? $meta : array();
|
@@ -833,6 +738,13 @@ class ContentAwareSidebars {
|
|
833 |
|
834 |
}
|
835 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
836 |
public function meta_box_post_type($post, $box) {
|
837 |
$meta = get_post_meta($post->ID, self::prefix.'post_types', true);
|
838 |
$current = $meta != '' ? $meta : array();
|
@@ -877,6 +789,13 @@ class ContentAwareSidebars {
|
|
877 |
|
878 |
}
|
879 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
880 |
public function meta_box_checkboxes($post, $box) {
|
881 |
$field = $box['args'];
|
882 |
$meta = get_post_meta($post->ID, self::prefix.$field, true);
|
@@ -906,6 +825,8 @@ class ContentAwareSidebars {
|
|
906 |
*
|
907 |
* Create form field for metadata
|
908 |
*
|
|
|
|
|
909 |
*/
|
910 |
private function _form_field($setting) {
|
911 |
global $post;
|
@@ -939,8 +860,12 @@ class ContentAwareSidebars {
|
|
939 |
*
|
940 |
* Save meta values for post
|
941 |
*
|
|
|
|
|
|
|
942 |
*/
|
943 |
public function save_post($post_id) {
|
|
|
944 |
|
945 |
// Save button pressed
|
946 |
if(!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
@@ -968,14 +893,15 @@ class ContentAwareSidebars {
|
|
968 |
// Update metadata
|
969 |
foreach ($this->metadata as $field) {
|
970 |
$old = get_post_meta($post_id, self::prefix.$field['id'], true);
|
971 |
-
$new = isset($_POST[$field['id']]) ? $_POST[$field['id']] : '';
|
972 |
|
973 |
-
if ($new != '' && $new != $old) {
|
974 |
-
update_post_meta($post_id, self::prefix.$field['id'], $new);
|
|
|
975 |
} elseif ($new == '' && $old != '') {
|
976 |
delete_post_meta($post_id, self::prefix.$field['id'], $old);
|
977 |
}
|
978 |
-
}
|
979 |
}
|
980 |
|
981 |
/**
|
@@ -991,10 +917,12 @@ class ContentAwareSidebars {
|
|
991 |
*
|
992 |
* Load scripts and styles for administration
|
993 |
*
|
|
|
994 |
*/
|
995 |
public function load_admin_scripts() {
|
996 |
global $pagenow;
|
997 |
if($pagenow != 'edit.php') {
|
|
|
998 |
wp_enqueue_script('cas_admin_script');
|
999 |
}
|
1000 |
wp_enqueue_style('cas_admin_style');
|
@@ -1007,7 +935,7 @@ class ContentAwareSidebars {
|
|
1007 |
*/
|
1008 |
public function prepare_admin_scripts_styles() {
|
1009 |
wp_register_script('cas_admin_script', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/js/cas_admin.js', array('jquery'), '0.1');
|
1010 |
-
wp_register_style('cas_admin_style', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/style.css', false, '0.1');
|
1011 |
}
|
1012 |
|
1013 |
/**
|
@@ -1019,9 +947,25 @@ class ContentAwareSidebars {
|
|
1019 |
|
1020 |
require_once('walker.php');
|
1021 |
require_once('update_db.php');
|
|
|
1022 |
|
1023 |
}
|
1024 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1025 |
/**
|
1026 |
*
|
1027 |
* Flush rewrite rules on plugin activation
|
@@ -1047,7 +991,15 @@ class ContentAwareSidebars {
|
|
1047 |
global $ca_sidebars;
|
1048 |
$ca_sidebars = new ContentAwareSidebars();
|
1049 |
|
1050 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1051 |
function display_ca_sidebar($args = array()) {
|
1052 |
global $ca_sidebars, $_wp_sidebars_widgets;
|
1053 |
|
@@ -1084,7 +1036,7 @@ function display_ca_sidebar($args = array()) {
|
|
1084 |
|
1085 |
// Merge if more than one. First one is host.
|
1086 |
if($i > 0) {
|
1087 |
-
if($post->
|
1088 |
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host],$_wp_sidebars_widgets[$id]);
|
1089 |
else
|
1090 |
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id],$_wp_sidebars_widgets[$host]);
|
6 |
Plugin Name: Content Aware Sidebars
|
7 |
Plugin URI: http://www.intox.dk/
|
8 |
Description: Manage and show sidebars according to the content being viewed.
|
9 |
+
Version: 1.0
|
10 |
Author: Joachim Jensen
|
11 |
Author URI: http://www.intox.dk/
|
12 |
Text Domain: content-aware-sidebars
|
29 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
30 |
|
31 |
*/
|
32 |
+
|
33 |
+
final class ContentAwareSidebars {
|
34 |
|
35 |
const db_version = '0.8';
|
36 |
const prefix = '_cas_';
|
37 |
|
38 |
+
private $metadata = array();
|
39 |
+
private $taxonomies = array();
|
40 |
+
private $sidebar_cache = array();
|
|
|
|
|
|
|
41 |
|
42 |
/**
|
43 |
*
|
46 |
*/
|
47 |
public function __construct() {
|
48 |
|
49 |
+
register_activation_hook(__FILE__, array(&$this,'plugin_activation'));
|
50 |
+
register_deactivation_hook(__FILE__, array(&$this,'plugin_deactivation'));
|
51 |
+
|
52 |
$this->_load_dependencies();
|
53 |
|
54 |
+
// WordPress Hooks. Somewhat ordered by execution
|
55 |
+
|
56 |
+
// On sitewide requests
|
57 |
+
add_action('plugins_loaded', array(&$this,'deploy_modules'));
|
|
|
|
|
|
|
|
|
|
|
58 |
add_action('init', array(&$this,'init_sidebar_type'),99);
|
59 |
add_action('widgets_init', array(&$this,'create_sidebars'));
|
60 |
+
|
61 |
+
// On admin requests
|
62 |
add_action('admin_menu', array(&$this,'clear_admin_menu'));
|
63 |
+
add_action('admin_init', array(&$this,'prepare_admin_scripts_styles'));
|
64 |
add_action('admin_print_scripts-edit.php', array(&$this,'load_admin_scripts'));
|
65 |
add_action('admin_print_scripts-post-new.php', array(&$this,'load_admin_scripts'));
|
66 |
add_action('admin_print_scripts-post.php', array(&$this,'load_admin_scripts'));
|
67 |
+
|
68 |
+
// On post type and taxonomy requests
|
69 |
add_action('delete_post', array(&$this,'remove_sidebar_widgets'));
|
70 |
+
add_action('save_post', array(&$this,'save_post'));
|
71 |
|
72 |
+
// Order not known yet
|
73 |
+
add_action('add_meta_boxes_sidebar', array(&$this,'create_meta_boxes'));
|
74 |
+
|
75 |
+
add_filter('default_hidden_meta_boxes', array(&$this,'change_default_hidden'),10,2);
|
76 |
+
add_filter('manage_edit-sidebar_columns', array(&$this,'admin_column_headers'));
|
77 |
+
add_filter('manage_edit-sidebar_sortable_columns', array(&$this,'admin_column_sortable_headers'));
|
78 |
+
add_filter('manage_posts_custom_column', array(&$this,'admin_column_rows'),10,3);
|
79 |
+
add_filter('post_row_actions', array(&$this,'sidebar_row_actions'),10,2);
|
80 |
+
add_filter('post_updated_messages', array(&$this,'sidebar_updated_messages'));
|
81 |
+
|
82 |
+
|
83 |
+
// Sitewide hooks that should not be loaded sitewide here
|
84 |
+
if(is_admin()) {
|
85 |
+
add_filter('request', array(&$this,'admin_column_orderby'));
|
86 |
+
|
87 |
+
add_action('wp_loaded', array(&$this,'db_update'));
|
88 |
+
} else {
|
89 |
+
add_filter('wp', array(&$this,'replace_sidebar'));
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
*
|
96 |
+
* Deploy modules
|
97 |
+
*
|
98 |
+
*/
|
99 |
+
public function deploy_modules() {
|
100 |
+
|
101 |
+
// List modules
|
102 |
+
$modules = array(
|
103 |
+
'static' => true,
|
104 |
+
'post_type' => true,
|
105 |
+
'author' => true,
|
106 |
+
'page_template' => true,
|
107 |
+
'taxonomy' => true,
|
108 |
+
'bbpress' => function_exists('bbp_get_version'), // bbPress
|
109 |
+
'qtranslate' => defined('QT_SUPPORTED_WP_VERSION'), // qTranslate
|
110 |
+
'transposh' => defined('TRANSPOSH_PLUGIN_VER'), // Transposh Translation Filter
|
111 |
+
'wpml' => defined('ICL_LANGUAGE_CODE') // WPML Multilingual Blog/CMS
|
112 |
+
);
|
113 |
+
|
114 |
+
// Fire!
|
115 |
+
foreach($modules as $name => $enabled) {
|
116 |
+
if($enabled)
|
117 |
+
$this->_forge_module($name);
|
118 |
+
}
|
119 |
|
120 |
}
|
121 |
|
123 |
*
|
124 |
* Create post meta fields
|
125 |
*
|
126 |
+
* @global int $post
|
127 |
+
* @global array $wp_registered_sidebars
|
128 |
*/
|
129 |
private function _init_metadata() {
|
130 |
+
global $post, $wp_registered_sidebars;
|
131 |
+
|
132 |
// List of sidebars
|
133 |
$sidebar_list = array();
|
134 |
foreach($wp_registered_sidebars as $sidebar) {
|
136 |
$sidebar_list[$sidebar['id']] = $sidebar['name'];
|
137 |
}
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
// Meta fields
|
140 |
+
$this->metadata['exposure'] = array(
|
141 |
+
'name' => __('Exposure', 'content-aware-sidebars'),
|
142 |
+
'id' => 'exposure',
|
143 |
+
'desc' => '',
|
144 |
+
'val' => 1,
|
145 |
+
'type' => 'select',
|
146 |
+
'list' => array(
|
147 |
+
__('Singular', 'content-aware-sidebars'),
|
148 |
+
__('Singular & Archive', 'content-aware-sidebars'),
|
149 |
+
__('Archive', 'content-aware-sidebars')
|
150 |
+
)
|
151 |
+
);
|
152 |
+
$this->metadata['handle'] = array(
|
153 |
+
'name' => _x('Handle','option', 'content-aware-sidebars'),
|
154 |
+
'id' => 'handle',
|
155 |
+
'desc' => __('Replace host sidebar, merge with it or add sidebar manually.', 'content-aware-sidebars'),
|
156 |
+
'val' => 0,
|
157 |
+
'type' => 'select',
|
158 |
+
'list' => array(
|
159 |
+
__('Replace', 'content-aware-sidebars'),
|
160 |
+
__('Merge', 'content-aware-sidebars'),
|
161 |
+
__('Manual', 'content-aware-sidebars')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
)
|
163 |
);
|
164 |
+
$this->metadata['host'] = array(
|
165 |
+
'name' => __('Host Sidebar', 'content-aware-sidebars'),
|
166 |
+
'id' => 'host',
|
167 |
+
'desc' => '',
|
168 |
+
'val' => 'sidebar-1',
|
169 |
+
'type' => 'select',
|
170 |
+
'list' => $sidebar_list
|
171 |
+
);
|
172 |
+
$this->metadata['merge-pos'] = array(
|
173 |
+
'name' => __('Merge position', 'content-aware-sidebars'),
|
174 |
+
'id' => 'merge-pos',
|
175 |
+
'desc' => __('Place sidebar on top or bottom of host when merging.', 'content-aware-sidebars'),
|
176 |
+
'val' => 1,
|
177 |
+
'type' => 'select',
|
178 |
+
'list' => array(
|
179 |
+
__('Top', 'content-aware-sidebars'),
|
180 |
+
__('Bottom', 'content-aware-sidebars')
|
181 |
+
)
|
182 |
+
);
|
183 |
+
|
184 |
+
// Get metadata from modules
|
185 |
+
$this->metadata = apply_filters('cas_metadata',$this->metadata);
|
186 |
+
|
187 |
}
|
188 |
|
189 |
/**
|
195 |
|
196 |
load_plugin_textdomain('content-aware-sidebars', false, dirname( plugin_basename(__FILE__)).'/lang/');
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
// List public taxonomies
|
199 |
+
foreach(get_taxonomies(array('public'=>true),'names') as $tax) {
|
200 |
+
$this->taxonomies[] = $tax;
|
|
|
201 |
}
|
202 |
|
203 |
// Register the sidebar type
|
219 |
'query_var' => false,
|
220 |
'rewrite' => false,
|
221 |
'menu_position' => null,
|
222 |
+
'supports' => array('title','page-attributes','excerpt'),
|
223 |
+
'taxonomies' => $this->taxonomies,
|
224 |
+
'menu_icon' => WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/img/icon-16.png'
|
225 |
));
|
226 |
}
|
227 |
|
229 |
*
|
230 |
* Create update messages
|
231 |
*
|
232 |
+
* @global type $post
|
233 |
+
* @param array $messages
|
234 |
+
* @return array
|
235 |
*/
|
236 |
public function sidebar_updated_messages( $messages ) {
|
237 |
global $post;
|
248 |
9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>. <a href="%2$s">Manage widgets</a>','content-aware-sidebars'),
|
249 |
// translators: Publish box date format, see http://php.net/date
|
250 |
date_i18n(__('M j, Y @ G:i'),strtotime($post->post_date)),'widgets.php'),
|
251 |
+
10 => __('Sidebar draft updated.','content-aware-sidebars'),
|
252 |
);
|
253 |
return $messages;
|
254 |
}
|
259 |
*
|
260 |
*/
|
261 |
public function clear_admin_menu() {
|
262 |
+
foreach($this->taxonomies as $name) {
|
263 |
+
remove_submenu_page('edit.php?post_type=sidebar','edit-tags.php?taxonomy='.$name.'&post_type=sidebar');
|
264 |
+
remove_meta_box('tagsdiv-'.$name, 'sidebar', 'side');
|
265 |
+
remove_meta_box($name.'div', 'sidebar', 'side');
|
266 |
}
|
267 |
}
|
268 |
|
295 |
/**
|
296 |
*
|
297 |
* Add admin column headers
|
298 |
+
*
|
299 |
+
* @param array $columns
|
300 |
+
* @return array
|
301 |
*/
|
302 |
public function admin_column_headers($columns) {
|
303 |
+
|
304 |
unset($columns['categories'],$columns['tags']);
|
305 |
+
|
306 |
return array_merge(
|
307 |
array_slice($columns, 0, 2, true),
|
308 |
array(
|
318 |
*
|
319 |
* Make some columns sortable
|
320 |
*
|
321 |
+
* @param array $columns
|
322 |
+
* @return array
|
323 |
*/
|
324 |
public function admin_column_sortable_headers($columns) {
|
325 |
return array_merge(
|
336 |
*
|
337 |
* Manage custom column sorting
|
338 |
*
|
339 |
+
* @param array $vars
|
340 |
+
* @return array
|
341 |
*/
|
342 |
public function admin_column_orderby($vars) {
|
343 |
if (isset($vars['orderby']) && in_array($vars['orderby'],array('exposure','handle','merge-pos'))) {
|
353 |
*
|
354 |
* Add admin column rows
|
355 |
*
|
356 |
+
* @param string $column_name
|
357 |
+
* @param int $post_id
|
358 |
+
* @return type
|
359 |
*/
|
360 |
public function admin_column_rows($column_name,$post_id) {
|
361 |
|
379 |
*
|
380 |
* Remove widget when its sidebar is removed
|
381 |
*
|
382 |
+
* @param int $post_id
|
383 |
+
* @return type
|
384 |
*/
|
385 |
public function remove_sidebar_widgets($post_id) {
|
386 |
|
419 |
*
|
420 |
* Add admin rows actions
|
421 |
*
|
422 |
+
* @param array $actions
|
423 |
+
* @param object $post
|
424 |
+
* @return type
|
425 |
*/
|
426 |
public function sidebar_row_actions($actions, $post) {
|
427 |
if($post->post_type == 'sidebar' && $post->post_status != 'trash') {
|
428 |
+
|
429 |
//View link is still there in WP3.1
|
430 |
+
if(isset($actions['view']))
|
431 |
+
unset($actions['view']);
|
432 |
+
|
433 |
return array_merge(
|
434 |
array_slice($actions, 0, 2, true),
|
435 |
array(
|
446 |
* Replace or merge a sidebar with content aware sidebars
|
447 |
* Handles content aware sidebars with hosts
|
448 |
*
|
449 |
+
* @global array $_wp_sidebars_widgets
|
450 |
+
* @return type
|
451 |
*/
|
452 |
public function replace_sidebar() {
|
453 |
global $_wp_sidebars_widgets;
|
458 |
|
459 |
foreach($posts as $post) {
|
460 |
|
461 |
+
// // Filter out sidebars with dependent content rules not present. Archives not yet decided.
|
462 |
+
// if(!(is_archive() || (is_home() && !is_front_page()))) {
|
463 |
+
// $continue = false;
|
464 |
+
// $continue = apply_filters('cas_exclude_sidebar', $continue, $post, self::prefix);
|
465 |
+
// if($continue)
|
466 |
+
// continue;
|
467 |
+
// }
|
468 |
+
//
|
469 |
+
$id = 'ca-sidebar-'.$post->ID;
|
470 |
+
$host = get_post_meta($post->ID, self::prefix.'host', true);
|
471 |
|
472 |
// Check for correct handling and if host exist
|
473 |
+
if ($post->handle == 2 || !isset($_wp_sidebars_widgets[$host]))
|
474 |
continue;
|
475 |
|
476 |
// Sidebar might not have any widgets. Get it anyway!
|
478 |
$_wp_sidebars_widgets[$id] = array();
|
479 |
|
480 |
// If host has already been replaced, merge with it instead. Might change in future.
|
481 |
+
if($post->handle || isset($handled_already[$host])) {
|
482 |
+
if(get_post_meta($post->ID, self::prefix.'merge-pos', true))
|
483 |
+
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host],$_wp_sidebars_widgets[$id]);
|
484 |
else
|
485 |
+
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id],$_wp_sidebars_widgets[$host]);
|
486 |
} else {
|
487 |
+
$_wp_sidebars_widgets[$host] = $_wp_sidebars_widgets[$id];
|
488 |
+
$handled_already[$host] = 1;
|
489 |
}
|
490 |
}
|
491 |
}
|
493 |
/**
|
494 |
*
|
495 |
* Query sidebars according to content
|
496 |
+
*
|
497 |
+
* @global type $wpdb
|
498 |
+
* @return array|boolean
|
499 |
*/
|
500 |
public function get_sidebars() {
|
501 |
+
global $wpdb;
|
502 |
|
503 |
// Return cache if present
|
504 |
if(!empty($this->sidebar_cache)) {
|
507 |
else
|
508 |
return $this->sidebar_cache;
|
509 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
|
511 |
+
$joins = array();
|
512 |
+
$where = array();
|
513 |
+
$where2 = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
|
515 |
+
// Run hooks for query
|
516 |
+
do_action('cas_sidebar_db');
|
|
|
|
|
|
|
|
|
517 |
|
518 |
+
// Apply hooks for db
|
519 |
+
$joins = apply_filters('cas_sidebar_db_join', $joins, self::prefix);
|
520 |
+
$where = apply_filters('cas_sidebar_db_where', $where);
|
521 |
+
$where2 = apply_filters('cas_sidebar_db_where2', $where2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
|
523 |
// Check if there are any rules for this type of content
|
524 |
+
if(empty($where))
|
525 |
return false;
|
526 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
// Do query and cache it
|
528 |
$wpdb->query('SET OPTION SQL_BIG_SELECTS = 1');
|
529 |
$this->sidebar_cache = $wpdb->get_results("
|
530 |
SELECT
|
531 |
posts.ID,
|
532 |
+
handle.meta_value handle
|
|
|
|
|
533 |
FROM $wpdb->posts posts
|
534 |
LEFT JOIN $wpdb->postmeta handle
|
535 |
ON handle.post_id = posts.ID
|
536 |
AND handle.meta_key = '".self::prefix."handle'
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
LEFT JOIN $wpdb->postmeta exposure
|
538 |
ON exposure.post_id = posts.ID
|
539 |
AND exposure.meta_key = '".self::prefix."exposure'
|
540 |
+
".implode(' ',$joins)."
|
541 |
WHERE
|
542 |
posts.post_type = 'sidebar' AND
|
543 |
+
exposure.meta_value ".(is_archive() || is_home() ? '>' : '<')."= '1' AND
|
544 |
+
posts.post_status ".(current_user_can('read_private_posts') ? "IN('publish','private')" : "= 'publish'")." AND
|
545 |
+
(".implode(' AND ',$where).($where2 ? ' AND ('.implode(' OR ',$where2).')' : '').")
|
546 |
GROUP BY posts.ID
|
547 |
ORDER BY posts.menu_order ASC, handle.meta_value DESC, posts.post_date DESC
|
548 |
");
|
549 |
|
550 |
// Return proper cache. If query was empty, tell the cache.
|
551 |
+
return (empty($this->sidebar_cache) ? $this->sidebar_cache[0] = false : $this->sidebar_cache);
|
552 |
|
553 |
}
|
554 |
|
561 |
|
562 |
// Load metadata
|
563 |
$this->_init_metadata();
|
564 |
+
|
565 |
// Add boxes
|
566 |
// Author Words
|
567 |
add_meta_box(
|
568 |
+
'ca-sidebar-dev-words',
|
569 |
__('Words from the author', 'content-aware-sidebars'),
|
570 |
array(&$this,'meta_box_author_words'),
|
571 |
'sidebar',
|
572 |
'side',
|
573 |
'high'
|
574 |
);
|
575 |
+
|
576 |
+
// Add module boxes
|
577 |
+
do_action('cas_admin_gui',$this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
578 |
|
579 |
// Options
|
580 |
add_meta_box(
|
592 |
*
|
593 |
* Hide some meta boxes from start
|
594 |
*
|
595 |
+
* @global type $wp_version
|
596 |
+
* @param array $hidden
|
597 |
+
* @param object $screen
|
598 |
+
* @return array
|
599 |
*/
|
600 |
public function change_default_hidden( $hidden, $screen ) {
|
601 |
global $wp_version;
|
625 |
*
|
626 |
*/
|
627 |
public function meta_box_content() {
|
628 |
+
|
629 |
$columns = array(
|
630 |
'static',
|
631 |
'exposure',
|
633 |
'merge-pos'
|
634 |
);
|
635 |
|
636 |
+
//echo '<div id="cas_tabs">';
|
637 |
+
//
|
638 |
+
//echo '<ul>';
|
639 |
+
//echo '<li class="nav-tab"><a href="#_cas_settings">Settings</a></li>';
|
640 |
+
//echo '<li><a href="#_cas_test">Settings</a></li>';
|
641 |
+
//echo '</ul>';
|
642 |
+
//
|
643 |
+
//echo '<div id="_cas_settings">';
|
644 |
echo '<table class="form-table">';
|
645 |
foreach($columns as $key => $value) {
|
646 |
|
653 |
echo '</td></tr>';
|
654 |
}
|
655 |
echo '</table>';
|
656 |
+
//echo '</div>';
|
657 |
+
//
|
658 |
+
//echo '<div id="_cas_test">';
|
659 |
+
//echo 'hello';
|
660 |
+
//echo '</div>';
|
661 |
+
//
|
662 |
+
//echo '</div>';
|
663 |
}
|
664 |
|
665 |
/**
|
668 |
*
|
669 |
*/
|
670 |
public function meta_box_author_words() {
|
671 |
+
|
672 |
// Use nonce for verification
|
673 |
wp_nonce_field(basename(__FILE__),'_ca-sidebar-nonce');
|
674 |
?>
|
683 |
'http://wordpress.org/extend/plugins/content-aware-sidebars/',
|
684 |
'http://twitter.com/?status='.__('Check out Content Aware Sidebars for %23WordPress! :)','content-aware-sidebars').' http://tiny.cc/ca-sidebars'
|
685 |
); ?></p>
|
686 |
+
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wordpress.org/extend/plugins/content-aware-sidebars/" data-text="<?php _e('Check out Content Aware Sidebars :)','content-aware-sidebars') ?>" data-hashtags="WordPress">Tweet</a>
|
687 |
+
<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>
|
688 |
+
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwordpress.org%2Fextend%2Fplugins%2Fcontent-aware-sidebars%2F&send=false&layout=button_count&width=150&show_faces=false&action=like&colorscheme=light&font&height=21&appId=200775686659011" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe>
|
689 |
</div>
|
690 |
<?php
|
691 |
}
|
692 |
|
693 |
+
/**
|
694 |
+
*
|
695 |
+
* Taxonomy content
|
696 |
+
*
|
697 |
+
* @param object $post
|
698 |
+
* @param array $box
|
699 |
+
*/
|
700 |
public function meta_box_taxonomy($post, $box) {
|
701 |
$meta = get_post_meta($post->ID, self::prefix.'taxonomies', true);
|
702 |
$current = $meta != '' ? $meta : array();
|
738 |
|
739 |
}
|
740 |
|
741 |
+
/**
|
742 |
+
*
|
743 |
+
* Post Type content
|
744 |
+
*
|
745 |
+
* @param object $post
|
746 |
+
* @param array $box
|
747 |
+
*/
|
748 |
public function meta_box_post_type($post, $box) {
|
749 |
$meta = get_post_meta($post->ID, self::prefix.'post_types', true);
|
750 |
$current = $meta != '' ? $meta : array();
|
789 |
|
790 |
}
|
791 |
|
792 |
+
/**
|
793 |
+
*
|
794 |
+
* Various content
|
795 |
+
*
|
796 |
+
* @param object $post
|
797 |
+
* @param array $box
|
798 |
+
*/
|
799 |
public function meta_box_checkboxes($post, $box) {
|
800 |
$field = $box['args'];
|
801 |
$meta = get_post_meta($post->ID, self::prefix.$field, true);
|
825 |
*
|
826 |
* Create form field for metadata
|
827 |
*
|
828 |
+
* @global object $post
|
829 |
+
* @param array $setting
|
830 |
*/
|
831 |
private function _form_field($setting) {
|
832 |
global $post;
|
860 |
*
|
861 |
* Save meta values for post
|
862 |
*
|
863 |
+
* @global type $wpdb
|
864 |
+
* @param int $post_id
|
865 |
+
* @return type
|
866 |
*/
|
867 |
public function save_post($post_id) {
|
868 |
+
global $wpdb;
|
869 |
|
870 |
// Save button pressed
|
871 |
if(!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
893 |
// Update metadata
|
894 |
foreach ($this->metadata as $field) {
|
895 |
$old = get_post_meta($post_id, self::prefix.$field['id'], true);
|
896 |
+
$new = isset($_POST[$field['id']]) ? $_POST[$field['id']] : '';
|
897 |
|
898 |
+
if ($new != '' && $new != $old) {
|
899 |
+
update_post_meta($post_id, self::prefix.$field['id'], $new);
|
900 |
+
|
901 |
} elseif ($new == '' && $old != '') {
|
902 |
delete_post_meta($post_id, self::prefix.$field['id'], $old);
|
903 |
}
|
904 |
+
}
|
905 |
}
|
906 |
|
907 |
/**
|
917 |
*
|
918 |
* Load scripts and styles for administration
|
919 |
*
|
920 |
+
* @global string $pagenow
|
921 |
*/
|
922 |
public function load_admin_scripts() {
|
923 |
global $pagenow;
|
924 |
if($pagenow != 'edit.php') {
|
925 |
+
//wp_enqueue_script('jquery-ui-tabs');
|
926 |
wp_enqueue_script('cas_admin_script');
|
927 |
}
|
928 |
wp_enqueue_style('cas_admin_style');
|
935 |
*/
|
936 |
public function prepare_admin_scripts_styles() {
|
937 |
wp_register_script('cas_admin_script', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/js/cas_admin.js', array('jquery'), '0.1');
|
938 |
+
wp_register_style('cas_admin_style', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/css/style.css', false, '0.1');
|
939 |
}
|
940 |
|
941 |
/**
|
947 |
|
948 |
require_once('walker.php');
|
949 |
require_once('update_db.php');
|
950 |
+
require_once('modules/abstract.php');
|
951 |
|
952 |
}
|
953 |
+
|
954 |
+
/**
|
955 |
+
*
|
956 |
+
* Forge content module
|
957 |
+
*
|
958 |
+
* @param type $module
|
959 |
+
* @return object
|
960 |
+
*/
|
961 |
+
private function _forge_module($module) {
|
962 |
+
if (include_once('modules/'.$module .'.php')) {
|
963 |
+
$class = 'CASModule_'.$module;
|
964 |
+
return new $class;
|
965 |
+
}
|
966 |
+
return false;
|
967 |
+
}
|
968 |
+
|
969 |
/**
|
970 |
*
|
971 |
* Flush rewrite rules on plugin activation
|
991 |
global $ca_sidebars;
|
992 |
$ca_sidebars = new ContentAwareSidebars();
|
993 |
|
994 |
+
/**
|
995 |
+
*
|
996 |
+
* Template function
|
997 |
+
*
|
998 |
+
* @global ContentAwareSidebars $ca_sidebars
|
999 |
+
* @global array $_wp_sidebars_widgets
|
1000 |
+
* @param array|string $args
|
1001 |
+
* @return type
|
1002 |
+
*/
|
1003 |
function display_ca_sidebar($args = array()) {
|
1004 |
global $ca_sidebars, $_wp_sidebars_widgets;
|
1005 |
|
1036 |
|
1037 |
// Merge if more than one. First one is host.
|
1038 |
if($i > 0) {
|
1039 |
+
if(get_post_meta($post->ID, ContentAwareSidebars::prefix.'merge-pos', true))
|
1040 |
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$host],$_wp_sidebars_widgets[$id]);
|
1041 |
else
|
1042 |
$_wp_sidebars_widgets[$host] = array_merge($_wp_sidebars_widgets[$id],$_wp_sidebars_widgets[$host]);
|
css/style.css
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.icon32-posts-sidebar {
|
2 |
+
background:transparent url('../img/icon-32.png') no-repeat !important;
|
3 |
+
}
|
4 |
+
/*#preview-action {
|
5 |
+
display:none !important;
|
6 |
+
}*/
|
icon-16.png → img/icon-16.png
RENAMED
File without changes
|
icon-32.png → img/icon-32.png
RENAMED
File without changes
|
index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php
|
js/cas_admin.js
CHANGED
@@ -10,6 +10,8 @@ jQuery(document).ready(function($) {
|
|
10 |
|
11 |
handleSidebarHandle();
|
12 |
|
|
|
|
|
13 |
/**
|
14 |
*
|
15 |
* Handle "Show with All" checkbox
|
10 |
|
11 |
handleSidebarHandle();
|
12 |
|
13 |
+
//$( "#cas_tabs" ).tabs();
|
14 |
+
|
15 |
/**
|
16 |
*
|
17 |
* Handle "Show with All" checkbox
|
lang/content-aware-sidebars-da_DK.mo
CHANGED
Binary file
|
lang/content-aware-sidebars-da_DK.po
CHANGED
@@ -4,240 +4,252 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Content Aware Sidebars 0.8.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date: 2012-
|
|
|
|
|
|
|
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: 2012-04-23 22:25+0100\n"
|
12 |
-
"Last-Translator: Joachim Jensen <jv@intox.dk>\n"
|
13 |
-
"Language-Team: Intox Studio <jv@intox.dk>\n"
|
14 |
"X-Poedit-Language: Danish\n"
|
15 |
"X-Poedit-Country: DENMARK\n"
|
16 |
|
17 |
-
#: content-aware-sidebars.php:
|
18 |
-
|
19 |
-
msgstr "Indholdstyper"
|
20 |
-
|
21 |
-
#: content-aware-sidebars.php:111
|
22 |
-
msgid "Taxonomies"
|
23 |
-
msgstr "Taksonomier"
|
24 |
-
|
25 |
-
#: content-aware-sidebars.php:119
|
26 |
-
msgid "Authors"
|
27 |
-
msgstr "Forfattere"
|
28 |
-
|
29 |
-
#: content-aware-sidebars.php:127
|
30 |
-
msgid "Page Templates"
|
31 |
-
msgstr "Skabeloner"
|
32 |
-
|
33 |
-
#: content-aware-sidebars.php:135
|
34 |
-
msgid "Static Pages"
|
35 |
-
msgstr "Statiske sider"
|
36 |
-
|
37 |
-
#: content-aware-sidebars.php:141
|
38 |
-
msgid "Front Page"
|
39 |
-
msgstr "Forside"
|
40 |
-
|
41 |
-
#: content-aware-sidebars.php:142
|
42 |
-
msgid "Search Results"
|
43 |
-
msgstr "Søgeresultater"
|
44 |
-
|
45 |
-
#: content-aware-sidebars.php:143
|
46 |
-
msgid "404 Page"
|
47 |
-
msgstr "404-side"
|
48 |
-
|
49 |
-
#: content-aware-sidebars.php:147
|
50 |
-
#: content-aware-sidebars.php:312
|
51 |
msgid "Exposure"
|
52 |
msgstr "Eksponering"
|
53 |
|
54 |
-
#: content-aware-sidebars.php:
|
55 |
msgid "Singular"
|
56 |
msgstr "Singulær"
|
57 |
|
58 |
-
#: content-aware-sidebars.php:
|
59 |
msgid "Singular & Archive"
|
60 |
msgstr "Singulær og arkiv"
|
61 |
|
62 |
-
#: content-aware-sidebars.php:
|
63 |
msgid "Archive"
|
64 |
msgstr "Arkiv"
|
65 |
|
66 |
-
#: content-aware-sidebars.php:
|
67 |
-
#: content-aware-sidebars.php:
|
68 |
msgctxt "option"
|
69 |
msgid "Handle"
|
70 |
msgstr "Håndtering"
|
71 |
|
72 |
-
#: content-aware-sidebars.php:
|
73 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
74 |
msgstr "Erstat værts-sidebar, flet med den eller tilføj denne sidebar manuelt."
|
75 |
|
76 |
-
#: content-aware-sidebars.php:
|
77 |
msgid "Replace"
|
78 |
msgstr "Erstat"
|
79 |
|
80 |
-
#: content-aware-sidebars.php:
|
81 |
msgid "Merge"
|
82 |
msgstr "Flet"
|
83 |
|
84 |
-
#: content-aware-sidebars.php:
|
85 |
msgid "Manual"
|
86 |
msgstr "Manuel"
|
87 |
|
88 |
-
#: content-aware-sidebars.php:
|
89 |
msgid "Host Sidebar"
|
90 |
msgstr "Værts-sidebar"
|
91 |
|
92 |
-
#: content-aware-sidebars.php:
|
93 |
-
#: content-aware-sidebars.php:
|
94 |
msgid "Merge position"
|
95 |
msgstr "Fletteposition"
|
96 |
|
97 |
-
#: content-aware-sidebars.php:
|
98 |
msgid "Place sidebar on top or bottom of host when merging."
|
99 |
msgstr "Flet ind fra oven eller bunden."
|
100 |
|
101 |
-
#: content-aware-sidebars.php:
|
102 |
msgid "Top"
|
103 |
msgstr "Top"
|
104 |
|
105 |
-
#: content-aware-sidebars.php:
|
106 |
msgid "Bottom"
|
107 |
msgstr "Bund"
|
108 |
|
109 |
-
#: content-aware-sidebars.php:
|
110 |
msgid "Sidebars"
|
111 |
msgstr "Sidebars"
|
112 |
|
113 |
-
#: content-aware-sidebars.php:
|
114 |
msgid "Sidebar"
|
115 |
msgstr "Sidebar"
|
116 |
|
117 |
-
#: content-aware-sidebars.php:
|
118 |
msgctxt "sidebar"
|
119 |
msgid "Add New"
|
120 |
msgstr "Tilføj ny"
|
121 |
|
122 |
-
#: content-aware-sidebars.php:
|
123 |
msgid "Add New Sidebar"
|
124 |
msgstr "Tilføj ny sidebar"
|
125 |
|
126 |
-
#: content-aware-sidebars.php:
|
127 |
msgid "Edit Sidebar"
|
128 |
msgstr "Rediger sidebar"
|
129 |
|
130 |
-
#: content-aware-sidebars.php:
|
131 |
msgid "New Sidebar"
|
132 |
msgstr "Ny sidebar"
|
133 |
|
134 |
-
#: content-aware-sidebars.php:
|
135 |
msgid "All Sidebars"
|
136 |
msgstr "Alle sidebars"
|
137 |
|
138 |
-
#: content-aware-sidebars.php:
|
139 |
msgid "View Sidebar"
|
140 |
msgstr "Vis sidebar"
|
141 |
|
142 |
-
#: content-aware-sidebars.php:
|
143 |
msgid "Search Sidebars"
|
144 |
msgstr "Søg sidebars"
|
145 |
|
146 |
-
#: content-aware-sidebars.php:
|
147 |
msgid "No sidebars found"
|
148 |
msgstr "Ingen sidebars fundet"
|
149 |
|
150 |
-
#: content-aware-sidebars.php:
|
151 |
msgid "No sidebars found in Trash"
|
152 |
msgstr "Ingen sidebars fundet i papirkurven"
|
153 |
|
154 |
-
#: content-aware-sidebars.php:
|
155 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
156 |
msgstr "Sidebar opdateret. <a href=\"%s\">Håndter widgets</a>"
|
157 |
|
158 |
-
#: content-aware-sidebars.php:
|
159 |
msgid "Sidebar updated."
|
160 |
msgstr "Sidebar opdateret."
|
161 |
|
162 |
-
#: content-aware-sidebars.php:
|
163 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
164 |
msgstr "Sidebar udgivet. <a href=\"%s\">Håndter widgets</a>"
|
165 |
|
166 |
-
#: content-aware-sidebars.php:
|
167 |
msgid "Sidebar saved."
|
168 |
msgstr "Sidebar gemt."
|
169 |
|
170 |
-
#: content-aware-sidebars.php:
|
171 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
172 |
msgstr "Sidebar indsendt. <a href=\"%s\">Håndter widgets</a>"
|
173 |
|
174 |
-
#: content-aware-sidebars.php:
|
175 |
msgid "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage widgets</a>"
|
176 |
msgstr "Sidebar planlagt til: <strong>%1$s</strong>. <a href=\"%2$s\">Håndter widgets</a>"
|
177 |
|
178 |
#. translators: Publish box date format, see http:php.net/date
|
179 |
-
#: content-aware-sidebars.php:
|
180 |
msgid "M j, Y @ G:i"
|
181 |
msgstr "j. M, Y @ G:i"
|
182 |
|
183 |
-
#: content-aware-sidebars.php:
|
184 |
-
msgid "Sidebar draft updated.
|
185 |
-
msgstr "Sidebar-
|
186 |
|
187 |
-
#: content-aware-sidebars.php:
|
188 |
msgid "Manage Widgets"
|
189 |
msgstr "Håndter widgets"
|
190 |
|
191 |
-
#: content-aware-sidebars.php:
|
192 |
msgid "Words from the author"
|
193 |
msgstr "Et par ord fra forfatteren"
|
194 |
|
195 |
-
#: content-aware-sidebars.php:
|
196 |
msgid "Options"
|
197 |
msgstr "Indstillinger"
|
198 |
|
199 |
-
#: content-aware-sidebars.php:
|
200 |
msgid "If you love this plugin, please consider donating."
|
201 |
msgstr "Venligst overvej at donere, hvis du elsker dette plugin."
|
202 |
|
203 |
-
#: content-aware-sidebars.php:
|
204 |
msgid "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
205 |
msgstr "Glem ikke at <a class=\"button\" href=\"%1$s\" target=\"_blank\">vurdere</a> og <a class=\"button\" href=\"%2$s\" target=\"_blank\">dele</a> det!"
|
206 |
|
207 |
-
#: content-aware-sidebars.php:
|
208 |
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
209 |
msgstr "Jeg bruger Content Aware Sidebars til %23WordPress! :)"
|
210 |
|
211 |
-
#: content-aware-sidebars.php:
|
212 |
-
#: content-aware-sidebars.php:
|
213 |
msgid "No items."
|
214 |
msgstr "Ingen elementer."
|
215 |
|
216 |
-
#: content-aware-sidebars.php:
|
217 |
msgid "Most Used"
|
218 |
msgstr "Mest brugte"
|
219 |
|
220 |
-
#: content-aware-sidebars.php:
|
221 |
-
#: content-aware-sidebars.php:
|
222 |
-
#: content-aware-sidebars.php:
|
223 |
msgid "View All"
|
224 |
msgstr "Vis alle"
|
225 |
|
226 |
-
#: content-aware-sidebars.php:
|
227 |
msgid "Show with %s"
|
228 |
msgstr "Vis ved %s"
|
229 |
|
230 |
-
#: content-aware-sidebars.php:
|
|
|
231 |
msgid "Show with All %s"
|
232 |
msgstr "Vis ved alle %s"
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
#. Plugin Name of the plugin/theme
|
235 |
msgid "Content Aware Sidebars"
|
236 |
msgstr "Content Aware Sidebars"
|
237 |
|
238 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.
|
239 |
#. Plugin URI of the plugin/theme
|
240 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.
|
241 |
#. Author URI of the plugin/theme
|
242 |
msgid "http://www.intox.dk/"
|
243 |
msgstr "http://www.intox.dk/"
|
@@ -250,3 +262,5 @@ msgstr "Administrer og vis sidebars i henhold til det indhold, der vises."
|
|
250 |
msgid "Joachim Jensen"
|
251 |
msgstr "Joachim Jensen"
|
252 |
|
|
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Content Aware Sidebars 0.8.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2012-05-30 22:56:32+00:00\n"
|
8 |
+
"PO-Revision-Date: 2012-05-31 00:59+0100\n"
|
9 |
+
"Last-Translator: Joachim Jensen <jv@intox.dk>\n"
|
10 |
+
"Language-Team: Intox Studio <jv@intox.dk>\n"
|
11 |
"MIME-Version: 1.0\n"
|
12 |
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
14 |
"X-Poedit-Language: Danish\n"
|
15 |
"X-Poedit-Country: DENMARK\n"
|
16 |
|
17 |
+
#: content-aware-sidebars.php:151
|
18 |
+
#: content-aware-sidebars.php:329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Exposure"
|
20 |
msgstr "Eksponering"
|
21 |
|
22 |
+
#: content-aware-sidebars.php:157
|
23 |
msgid "Singular"
|
24 |
msgstr "Singulær"
|
25 |
|
26 |
+
#: content-aware-sidebars.php:158
|
27 |
msgid "Singular & Archive"
|
28 |
msgstr "Singulær og arkiv"
|
29 |
|
30 |
+
#: content-aware-sidebars.php:159
|
31 |
msgid "Archive"
|
32 |
msgstr "Arkiv"
|
33 |
|
34 |
+
#: content-aware-sidebars.php:163
|
35 |
+
#: content-aware-sidebars.php:330
|
36 |
msgctxt "option"
|
37 |
msgid "Handle"
|
38 |
msgstr "Håndtering"
|
39 |
|
40 |
+
#: content-aware-sidebars.php:165
|
41 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
42 |
msgstr "Erstat værts-sidebar, flet med den eller tilføj denne sidebar manuelt."
|
43 |
|
44 |
+
#: content-aware-sidebars.php:169
|
45 |
msgid "Replace"
|
46 |
msgstr "Erstat"
|
47 |
|
48 |
+
#: content-aware-sidebars.php:170
|
49 |
msgid "Merge"
|
50 |
msgstr "Flet"
|
51 |
|
52 |
+
#: content-aware-sidebars.php:171
|
53 |
msgid "Manual"
|
54 |
msgstr "Manuel"
|
55 |
|
56 |
+
#: content-aware-sidebars.php:175
|
57 |
msgid "Host Sidebar"
|
58 |
msgstr "Værts-sidebar"
|
59 |
|
60 |
+
#: content-aware-sidebars.php:183
|
61 |
+
#: content-aware-sidebars.php:331
|
62 |
msgid "Merge position"
|
63 |
msgstr "Fletteposition"
|
64 |
|
65 |
+
#: content-aware-sidebars.php:185
|
66 |
msgid "Place sidebar on top or bottom of host when merging."
|
67 |
msgstr "Flet ind fra oven eller bunden."
|
68 |
|
69 |
+
#: content-aware-sidebars.php:189
|
70 |
msgid "Top"
|
71 |
msgstr "Top"
|
72 |
|
73 |
+
#: content-aware-sidebars.php:190
|
74 |
msgid "Bottom"
|
75 |
msgstr "Bund"
|
76 |
|
77 |
+
#: content-aware-sidebars.php:223
|
78 |
msgid "Sidebars"
|
79 |
msgstr "Sidebars"
|
80 |
|
81 |
+
#: content-aware-sidebars.php:224
|
82 |
msgid "Sidebar"
|
83 |
msgstr "Sidebar"
|
84 |
|
85 |
+
#: content-aware-sidebars.php:225
|
86 |
msgctxt "sidebar"
|
87 |
msgid "Add New"
|
88 |
msgstr "Tilføj ny"
|
89 |
|
90 |
+
#: content-aware-sidebars.php:226
|
91 |
msgid "Add New Sidebar"
|
92 |
msgstr "Tilføj ny sidebar"
|
93 |
|
94 |
+
#: content-aware-sidebars.php:227
|
95 |
msgid "Edit Sidebar"
|
96 |
msgstr "Rediger sidebar"
|
97 |
|
98 |
+
#: content-aware-sidebars.php:228
|
99 |
msgid "New Sidebar"
|
100 |
msgstr "Ny sidebar"
|
101 |
|
102 |
+
#: content-aware-sidebars.php:229
|
103 |
msgid "All Sidebars"
|
104 |
msgstr "Alle sidebars"
|
105 |
|
106 |
+
#: content-aware-sidebars.php:230
|
107 |
msgid "View Sidebar"
|
108 |
msgstr "Vis sidebar"
|
109 |
|
110 |
+
#: content-aware-sidebars.php:231
|
111 |
msgid "Search Sidebars"
|
112 |
msgstr "Søg sidebars"
|
113 |
|
114 |
+
#: content-aware-sidebars.php:232
|
115 |
msgid "No sidebars found"
|
116 |
msgstr "Ingen sidebars fundet"
|
117 |
|
118 |
+
#: content-aware-sidebars.php:233
|
119 |
msgid "No sidebars found in Trash"
|
120 |
msgstr "Ingen sidebars fundet i papirkurven"
|
121 |
|
122 |
+
#: content-aware-sidebars.php:254
|
123 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
124 |
msgstr "Sidebar opdateret. <a href=\"%s\">Håndter widgets</a>"
|
125 |
|
126 |
+
#: content-aware-sidebars.php:257
|
127 |
msgid "Sidebar updated."
|
128 |
msgstr "Sidebar opdateret."
|
129 |
|
130 |
+
#: content-aware-sidebars.php:259
|
131 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
132 |
msgstr "Sidebar udgivet. <a href=\"%s\">Håndter widgets</a>"
|
133 |
|
134 |
+
#: content-aware-sidebars.php:260
|
135 |
msgid "Sidebar saved."
|
136 |
msgstr "Sidebar gemt."
|
137 |
|
138 |
+
#: content-aware-sidebars.php:261
|
139 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
140 |
msgstr "Sidebar indsendt. <a href=\"%s\">Håndter widgets</a>"
|
141 |
|
142 |
+
#: content-aware-sidebars.php:262
|
143 |
msgid "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage widgets</a>"
|
144 |
msgstr "Sidebar planlagt til: <strong>%1$s</strong>. <a href=\"%2$s\">Håndter widgets</a>"
|
145 |
|
146 |
#. translators: Publish box date format, see http:php.net/date
|
147 |
+
#: content-aware-sidebars.php:264
|
148 |
msgid "M j, Y @ G:i"
|
149 |
msgstr "j. M, Y @ G:i"
|
150 |
|
151 |
+
#: content-aware-sidebars.php:265
|
152 |
+
msgid "Sidebar draft updated."
|
153 |
+
msgstr "Sidebar-kladde opdateret."
|
154 |
|
155 |
+
#: content-aware-sidebars.php:444
|
156 |
msgid "Manage Widgets"
|
157 |
msgstr "Håndter widgets"
|
158 |
|
159 |
+
#: content-aware-sidebars.php:572
|
160 |
msgid "Words from the author"
|
161 |
msgstr "Et par ord fra forfatteren"
|
162 |
|
163 |
+
#: content-aware-sidebars.php:585
|
164 |
msgid "Options"
|
165 |
msgstr "Indstillinger"
|
166 |
|
167 |
+
#: content-aware-sidebars.php:679
|
168 |
msgid "If you love this plugin, please consider donating."
|
169 |
msgstr "Venligst overvej at donere, hvis du elsker dette plugin."
|
170 |
|
171 |
+
#: content-aware-sidebars.php:681
|
172 |
msgid "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
173 |
msgstr "Glem ikke at <a class=\"button\" href=\"%1$s\" target=\"_blank\">vurdere</a> og <a class=\"button\" href=\"%2$s\" target=\"_blank\">dele</a> det!"
|
174 |
|
175 |
+
#: content-aware-sidebars.php:683
|
176 |
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
177 |
msgstr "Jeg bruger Content Aware Sidebars til %23WordPress! :)"
|
178 |
|
179 |
+
#: content-aware-sidebars.php:698
|
180 |
+
#: content-aware-sidebars.php:750
|
181 |
msgid "No items."
|
182 |
msgstr "Ingen elementer."
|
183 |
|
184 |
+
#: content-aware-sidebars.php:704
|
185 |
msgid "Most Used"
|
186 |
msgstr "Mest brugte"
|
187 |
|
188 |
+
#: content-aware-sidebars.php:705
|
189 |
+
#: content-aware-sidebars.php:756
|
190 |
+
#: content-aware-sidebars.php:781
|
191 |
msgid "View All"
|
192 |
msgstr "Vis alle"
|
193 |
|
194 |
+
#: content-aware-sidebars.php:725
|
195 |
msgid "Show with %s"
|
196 |
msgstr "Vis ved %s"
|
197 |
|
198 |
+
#: content-aware-sidebars.php:769
|
199 |
+
#: content-aware-sidebars.php:794
|
200 |
msgid "Show with All %s"
|
201 |
msgstr "Vis ved alle %s"
|
202 |
|
203 |
+
#: modules/author.php:28
|
204 |
+
#: modules/author.php:42
|
205 |
+
msgid "Authors"
|
206 |
+
msgstr "Forfattere"
|
207 |
+
|
208 |
+
#: modules/page_template.php:17
|
209 |
+
#: modules/page_template.php:30
|
210 |
+
msgid "Page Templates"
|
211 |
+
msgstr "Skabeloner"
|
212 |
+
|
213 |
+
#: modules/post_type.php:30
|
214 |
+
msgid "Post Types"
|
215 |
+
msgstr "Indholdstyper"
|
216 |
+
|
217 |
+
#: modules/qtranslate.php:27
|
218 |
+
#: modules/qtranslate.php:39
|
219 |
+
#: modules/transposh.php:27
|
220 |
+
#: modules/transposh.php:39
|
221 |
+
#: modules/wpml.php:26
|
222 |
+
#: modules/wpml.php:38
|
223 |
+
msgid "Languages"
|
224 |
+
msgstr "Sprog"
|
225 |
+
|
226 |
+
#: modules/static.php:15
|
227 |
+
msgid "Static Pages"
|
228 |
+
msgstr "Statiske sider"
|
229 |
+
|
230 |
+
#: modules/static.php:21
|
231 |
+
msgid "Front Page"
|
232 |
+
msgstr "Forside"
|
233 |
+
|
234 |
+
#: modules/static.php:22
|
235 |
+
msgid "Search Results"
|
236 |
+
msgstr "Søgeresultater"
|
237 |
+
|
238 |
+
#: modules/static.php:23
|
239 |
+
msgid "404 Page"
|
240 |
+
msgstr "404-side"
|
241 |
+
|
242 |
+
#: modules/taxonomy.php:32
|
243 |
+
msgid "Taxonomies"
|
244 |
+
msgstr "Taksonomier"
|
245 |
+
|
246 |
#. Plugin Name of the plugin/theme
|
247 |
msgid "Content Aware Sidebars"
|
248 |
msgstr "Content Aware Sidebars"
|
249 |
|
250 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.3) #-#-#-#-#
|
251 |
#. Plugin URI of the plugin/theme
|
252 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.3) #-#-#-#-#
|
253 |
#. Author URI of the plugin/theme
|
254 |
msgid "http://www.intox.dk/"
|
255 |
msgstr "http://www.intox.dk/"
|
262 |
msgid "Joachim Jensen"
|
263 |
msgstr "Joachim Jensen"
|
264 |
|
265 |
+
#~ msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
|
266 |
+
#~ msgstr "Sidebar-udkast opdateret. <a href=\"%s\">Håndter widgets</a>"
|
lang/content-aware-sidebars-it_IT.mo
CHANGED
Binary file
|
lang/content-aware-sidebars-it_IT.po
CHANGED
@@ -4,240 +4,253 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Content Aware Sidebars 0.8.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date: 2012-
|
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: 2012-
|
12 |
-
"Last-Translator:
|
13 |
"Language-Team: MyWeb2 <info@myweb2.it>\n"
|
14 |
"X-Poedit-Language: Italian\n"
|
15 |
"X-Poedit-Country: ITALY\n"
|
|
|
16 |
|
17 |
-
#: content-aware-sidebars.php:
|
18 |
-
|
19 |
-
msgstr "Tipi di messaggi"
|
20 |
-
|
21 |
-
#: content-aware-sidebars.php:111
|
22 |
-
msgid "Taxonomies"
|
23 |
-
msgstr "Tassonomie"
|
24 |
-
|
25 |
-
#: content-aware-sidebars.php:119
|
26 |
-
msgid "Authors"
|
27 |
-
msgstr "Autori"
|
28 |
-
|
29 |
-
#: content-aware-sidebars.php:127
|
30 |
-
msgid "Page Templates"
|
31 |
-
msgstr "Template Pagine"
|
32 |
-
|
33 |
-
#: content-aware-sidebars.php:135
|
34 |
-
msgid "Static Pages"
|
35 |
-
msgstr "Pagine Statiche"
|
36 |
-
|
37 |
-
#: content-aware-sidebars.php:141
|
38 |
-
msgid "Front Page"
|
39 |
-
msgstr "Pagina Principale"
|
40 |
-
|
41 |
-
#: content-aware-sidebars.php:142
|
42 |
-
msgid "Search Results"
|
43 |
-
msgstr "Risultati di Ricerca"
|
44 |
-
|
45 |
-
#: content-aware-sidebars.php:143
|
46 |
-
msgid "404 Page"
|
47 |
-
msgstr "Pagina 404"
|
48 |
-
|
49 |
-
#: content-aware-sidebars.php:147
|
50 |
-
#: content-aware-sidebars.php:312
|
51 |
msgid "Exposure"
|
52 |
msgstr "Tipologia"
|
53 |
|
54 |
-
#: content-aware-sidebars.php:
|
55 |
msgid "Singular"
|
56 |
msgstr "Singola"
|
57 |
|
58 |
-
#: content-aware-sidebars.php:
|
59 |
msgid "Singular & Archive"
|
60 |
-
msgstr "Singola e
|
61 |
|
62 |
-
#: content-aware-sidebars.php:
|
63 |
msgid "Archive"
|
64 |
msgstr "Archivio"
|
65 |
|
66 |
-
#: content-aware-sidebars.php:
|
67 |
-
#: content-aware-sidebars.php:
|
68 |
msgctxt "option"
|
69 |
msgid "Handle"
|
70 |
-
msgstr "Comportamento
|
71 |
|
72 |
-
#: content-aware-sidebars.php:
|
73 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
74 |
msgstr "Sostituisce host sidebar, si fonde con essa o aggiunge la sidebar manualmente."
|
75 |
|
76 |
-
#: content-aware-sidebars.php:
|
77 |
msgid "Replace"
|
78 |
-
msgstr "
|
79 |
|
80 |
-
#: content-aware-sidebars.php:
|
81 |
msgid "Merge"
|
82 |
-
msgstr "
|
83 |
|
84 |
-
#: content-aware-sidebars.php:
|
85 |
msgid "Manual"
|
86 |
msgstr "Manuale"
|
87 |
|
88 |
-
#: content-aware-sidebars.php:
|
89 |
msgid "Host Sidebar"
|
90 |
msgstr "Sidebar Host"
|
91 |
|
92 |
-
#: content-aware-sidebars.php:
|
93 |
-
#: content-aware-sidebars.php:
|
94 |
msgid "Merge position"
|
95 |
-
msgstr "
|
96 |
|
97 |
-
#: content-aware-sidebars.php:
|
98 |
msgid "Place sidebar on top or bottom of host when merging."
|
99 |
msgstr "Posizione sidebar in alto o in basso dell'host durante la fusione."
|
100 |
|
101 |
-
#: content-aware-sidebars.php:
|
102 |
msgid "Top"
|
103 |
msgstr "Alto"
|
104 |
|
105 |
-
#: content-aware-sidebars.php:
|
106 |
msgid "Bottom"
|
107 |
msgstr "Basso"
|
108 |
|
109 |
-
#: content-aware-sidebars.php:
|
110 |
msgid "Sidebars"
|
111 |
msgstr "Sidebars"
|
112 |
|
113 |
-
#: content-aware-sidebars.php:
|
114 |
msgid "Sidebar"
|
115 |
msgstr "Sidebar"
|
116 |
|
117 |
-
#: content-aware-sidebars.php:
|
118 |
msgctxt "sidebar"
|
119 |
msgid "Add New"
|
120 |
msgstr "Aggiungi"
|
121 |
|
122 |
-
#: content-aware-sidebars.php:
|
123 |
msgid "Add New Sidebar"
|
124 |
msgstr "Aggiungi Nuova Sidebar"
|
125 |
|
126 |
-
#: content-aware-sidebars.php:
|
127 |
msgid "Edit Sidebar"
|
128 |
msgstr "Modifica Sidebar"
|
129 |
|
130 |
-
#: content-aware-sidebars.php:
|
131 |
msgid "New Sidebar"
|
132 |
msgstr "Nuova Sidebar"
|
133 |
|
134 |
-
#: content-aware-sidebars.php:
|
135 |
msgid "All Sidebars"
|
136 |
msgstr "Tutte le Sidebars"
|
137 |
|
138 |
-
#: content-aware-sidebars.php:
|
139 |
msgid "View Sidebar"
|
140 |
msgstr "Vedi Sidebar"
|
141 |
|
142 |
-
#: content-aware-sidebars.php:
|
143 |
msgid "Search Sidebars"
|
144 |
msgstr "Cerca Sidebars"
|
145 |
|
146 |
-
#: content-aware-sidebars.php:
|
147 |
msgid "No sidebars found"
|
148 |
-
msgstr "Nessuna
|
149 |
|
150 |
-
#: content-aware-sidebars.php:
|
151 |
msgid "No sidebars found in Trash"
|
152 |
msgstr "nessuna sidebar cancellata"
|
153 |
|
154 |
-
#: content-aware-sidebars.php:
|
155 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
156 |
msgstr "Sidebar aggiornata. <a href=\"%s\">Gestione widgets</a>"
|
157 |
|
158 |
-
#: content-aware-sidebars.php:
|
159 |
msgid "Sidebar updated."
|
160 |
msgstr "Sidebar aggiornata."
|
161 |
|
162 |
-
#: content-aware-sidebars.php:
|
163 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
164 |
msgstr "Sidebar publicata. <a href=\"%s\">Gestione widgets</a>"
|
165 |
|
166 |
-
#: content-aware-sidebars.php:
|
167 |
msgid "Sidebar saved."
|
168 |
msgstr "Sidebar salvata."
|
169 |
|
170 |
-
#: content-aware-sidebars.php:
|
171 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
172 |
msgstr "Sidebar inviata. <a href=\"%s\">Gestione widgets</a>"
|
173 |
|
174 |
-
#: content-aware-sidebars.php:
|
175 |
msgid "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage widgets</a>"
|
176 |
msgstr "Sidebar posticipata per: <strong>%1$s</strong>. <a href=\"%2$s\">Gestione widgets</a>"
|
177 |
|
178 |
#. translators: Publish box date format, see http:php.net/date
|
179 |
-
#: content-aware-sidebars.php:
|
180 |
msgid "M j, Y @ G:i"
|
181 |
msgstr "M j, Y @ G:i"
|
182 |
|
183 |
-
#: content-aware-sidebars.php:
|
184 |
-
msgid "Sidebar draft updated.
|
185 |
-
msgstr "Bozza sidebar aggiornata.
|
186 |
|
187 |
-
#: content-aware-sidebars.php:
|
188 |
msgid "Manage Widgets"
|
189 |
msgstr "Gestione Widgets"
|
190 |
|
191 |
-
#: content-aware-sidebars.php:
|
192 |
msgid "Words from the author"
|
193 |
msgstr "Parole dell'autore"
|
194 |
|
195 |
-
#: content-aware-sidebars.php:
|
196 |
msgid "Options"
|
197 |
msgstr "Opzioni"
|
198 |
|
199 |
-
#: content-aware-sidebars.php:
|
200 |
msgid "If you love this plugin, please consider donating."
|
201 |
-
msgstr "Se ti
|
202 |
|
203 |
-
#: content-aware-sidebars.php:
|
204 |
msgid "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
205 |
msgstr "Ricorda di <a class=\"button\" href=\"%1$s\" target=\"_blank\">valutarlo</a> e <a class=\"button\" href=\"%2$s\" target=\"_blank\">condiverlo</a>!"
|
206 |
|
207 |
-
#: content-aware-sidebars.php:
|
208 |
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
209 |
msgstr "Verifica Content Aware Sidebars per %23WordPress! :)"
|
210 |
|
211 |
-
#: content-aware-sidebars.php:
|
212 |
-
#: content-aware-sidebars.php:
|
213 |
msgid "No items."
|
214 |
msgstr "Nessun oggetto."
|
215 |
|
216 |
-
#: content-aware-sidebars.php:
|
217 |
msgid "Most Used"
|
218 |
msgstr "Più usati"
|
219 |
|
220 |
-
#: content-aware-sidebars.php:
|
221 |
-
#: content-aware-sidebars.php:
|
222 |
-
#: content-aware-sidebars.php:
|
223 |
msgid "View All"
|
224 |
msgstr "Vedi tutti"
|
225 |
|
226 |
-
#: content-aware-sidebars.php:
|
227 |
msgid "Show with %s"
|
228 |
msgstr "Mostra %s"
|
229 |
|
230 |
-
#: content-aware-sidebars.php:
|
|
|
231 |
msgid "Show with All %s"
|
232 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
#. Plugin Name of the plugin/theme
|
235 |
msgid "Content Aware Sidebars"
|
236 |
msgstr "Content Aware Sidebars"
|
237 |
|
238 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.
|
239 |
#. Plugin URI of the plugin/theme
|
240 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.
|
241 |
#. Author URI of the plugin/theme
|
242 |
msgid "http://www.intox.dk/"
|
243 |
msgstr "http://www.intox.dk/"
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Content Aware Sidebars 0.8.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2012-05-30 22:56:32+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: 2012-05-31 13:35+0100\n"
|
12 |
+
"Last-Translator: Luciano Del Fico <info@myweb2.it>\n"
|
13 |
"Language-Team: MyWeb2 <info@myweb2.it>\n"
|
14 |
"X-Poedit-Language: Italian\n"
|
15 |
"X-Poedit-Country: ITALY\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
|
18 |
+
#: content-aware-sidebars.php:151
|
19 |
+
#: content-aware-sidebars.php:329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
msgid "Exposure"
|
21 |
msgstr "Tipologia"
|
22 |
|
23 |
+
#: content-aware-sidebars.php:157
|
24 |
msgid "Singular"
|
25 |
msgstr "Singola"
|
26 |
|
27 |
+
#: content-aware-sidebars.php:158
|
28 |
msgid "Singular & Archive"
|
29 |
+
msgstr "Singola e archivio"
|
30 |
|
31 |
+
#: content-aware-sidebars.php:159
|
32 |
msgid "Archive"
|
33 |
msgstr "Archivio"
|
34 |
|
35 |
+
#: content-aware-sidebars.php:163
|
36 |
+
#: content-aware-sidebars.php:330
|
37 |
msgctxt "option"
|
38 |
msgid "Handle"
|
39 |
+
msgstr "Comportamento"
|
40 |
|
41 |
+
#: content-aware-sidebars.php:165
|
42 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
43 |
msgstr "Sostituisce host sidebar, si fonde con essa o aggiunge la sidebar manualmente."
|
44 |
|
45 |
+
#: content-aware-sidebars.php:169
|
46 |
msgid "Replace"
|
47 |
+
msgstr "Sostituzione"
|
48 |
|
49 |
+
#: content-aware-sidebars.php:170
|
50 |
msgid "Merge"
|
51 |
+
msgstr "Unione"
|
52 |
|
53 |
+
#: content-aware-sidebars.php:171
|
54 |
msgid "Manual"
|
55 |
msgstr "Manuale"
|
56 |
|
57 |
+
#: content-aware-sidebars.php:175
|
58 |
msgid "Host Sidebar"
|
59 |
msgstr "Sidebar Host"
|
60 |
|
61 |
+
#: content-aware-sidebars.php:183
|
62 |
+
#: content-aware-sidebars.php:331
|
63 |
msgid "Merge position"
|
64 |
+
msgstr "Posizione"
|
65 |
|
66 |
+
#: content-aware-sidebars.php:185
|
67 |
msgid "Place sidebar on top or bottom of host when merging."
|
68 |
msgstr "Posizione sidebar in alto o in basso dell'host durante la fusione."
|
69 |
|
70 |
+
#: content-aware-sidebars.php:189
|
71 |
msgid "Top"
|
72 |
msgstr "Alto"
|
73 |
|
74 |
+
#: content-aware-sidebars.php:190
|
75 |
msgid "Bottom"
|
76 |
msgstr "Basso"
|
77 |
|
78 |
+
#: content-aware-sidebars.php:223
|
79 |
msgid "Sidebars"
|
80 |
msgstr "Sidebars"
|
81 |
|
82 |
+
#: content-aware-sidebars.php:224
|
83 |
msgid "Sidebar"
|
84 |
msgstr "Sidebar"
|
85 |
|
86 |
+
#: content-aware-sidebars.php:225
|
87 |
msgctxt "sidebar"
|
88 |
msgid "Add New"
|
89 |
msgstr "Aggiungi"
|
90 |
|
91 |
+
#: content-aware-sidebars.php:226
|
92 |
msgid "Add New Sidebar"
|
93 |
msgstr "Aggiungi Nuova Sidebar"
|
94 |
|
95 |
+
#: content-aware-sidebars.php:227
|
96 |
msgid "Edit Sidebar"
|
97 |
msgstr "Modifica Sidebar"
|
98 |
|
99 |
+
#: content-aware-sidebars.php:228
|
100 |
msgid "New Sidebar"
|
101 |
msgstr "Nuova Sidebar"
|
102 |
|
103 |
+
#: content-aware-sidebars.php:229
|
104 |
msgid "All Sidebars"
|
105 |
msgstr "Tutte le Sidebars"
|
106 |
|
107 |
+
#: content-aware-sidebars.php:230
|
108 |
msgid "View Sidebar"
|
109 |
msgstr "Vedi Sidebar"
|
110 |
|
111 |
+
#: content-aware-sidebars.php:231
|
112 |
msgid "Search Sidebars"
|
113 |
msgstr "Cerca Sidebars"
|
114 |
|
115 |
+
#: content-aware-sidebars.php:232
|
116 |
msgid "No sidebars found"
|
117 |
+
msgstr "Nessuna sidebar trovata"
|
118 |
|
119 |
+
#: content-aware-sidebars.php:233
|
120 |
msgid "No sidebars found in Trash"
|
121 |
msgstr "nessuna sidebar cancellata"
|
122 |
|
123 |
+
#: content-aware-sidebars.php:254
|
124 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
125 |
msgstr "Sidebar aggiornata. <a href=\"%s\">Gestione widgets</a>"
|
126 |
|
127 |
+
#: content-aware-sidebars.php:257
|
128 |
msgid "Sidebar updated."
|
129 |
msgstr "Sidebar aggiornata."
|
130 |
|
131 |
+
#: content-aware-sidebars.php:259
|
132 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
133 |
msgstr "Sidebar publicata. <a href=\"%s\">Gestione widgets</a>"
|
134 |
|
135 |
+
#: content-aware-sidebars.php:260
|
136 |
msgid "Sidebar saved."
|
137 |
msgstr "Sidebar salvata."
|
138 |
|
139 |
+
#: content-aware-sidebars.php:261
|
140 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
141 |
msgstr "Sidebar inviata. <a href=\"%s\">Gestione widgets</a>"
|
142 |
|
143 |
+
#: content-aware-sidebars.php:262
|
144 |
msgid "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage widgets</a>"
|
145 |
msgstr "Sidebar posticipata per: <strong>%1$s</strong>. <a href=\"%2$s\">Gestione widgets</a>"
|
146 |
|
147 |
#. translators: Publish box date format, see http:php.net/date
|
148 |
+
#: content-aware-sidebars.php:264
|
149 |
msgid "M j, Y @ G:i"
|
150 |
msgstr "M j, Y @ G:i"
|
151 |
|
152 |
+
#: content-aware-sidebars.php:265
|
153 |
+
msgid "Sidebar draft updated."
|
154 |
+
msgstr "Bozza sidebar aggiornata. "
|
155 |
|
156 |
+
#: content-aware-sidebars.php:444
|
157 |
msgid "Manage Widgets"
|
158 |
msgstr "Gestione Widgets"
|
159 |
|
160 |
+
#: content-aware-sidebars.php:572
|
161 |
msgid "Words from the author"
|
162 |
msgstr "Parole dell'autore"
|
163 |
|
164 |
+
#: content-aware-sidebars.php:585
|
165 |
msgid "Options"
|
166 |
msgstr "Opzioni"
|
167 |
|
168 |
+
#: content-aware-sidebars.php:679
|
169 |
msgid "If you love this plugin, please consider donating."
|
170 |
+
msgstr "Se ti piace questo plugin, considera l'eventualità fare una donazione."
|
171 |
|
172 |
+
#: content-aware-sidebars.php:681
|
173 |
msgid "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
174 |
msgstr "Ricorda di <a class=\"button\" href=\"%1$s\" target=\"_blank\">valutarlo</a> e <a class=\"button\" href=\"%2$s\" target=\"_blank\">condiverlo</a>!"
|
175 |
|
176 |
+
#: content-aware-sidebars.php:683
|
177 |
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
178 |
msgstr "Verifica Content Aware Sidebars per %23WordPress! :)"
|
179 |
|
180 |
+
#: content-aware-sidebars.php:698
|
181 |
+
#: content-aware-sidebars.php:750
|
182 |
msgid "No items."
|
183 |
msgstr "Nessun oggetto."
|
184 |
|
185 |
+
#: content-aware-sidebars.php:704
|
186 |
msgid "Most Used"
|
187 |
msgstr "Più usati"
|
188 |
|
189 |
+
#: content-aware-sidebars.php:705
|
190 |
+
#: content-aware-sidebars.php:756
|
191 |
+
#: content-aware-sidebars.php:781
|
192 |
msgid "View All"
|
193 |
msgstr "Vedi tutti"
|
194 |
|
195 |
+
#: content-aware-sidebars.php:725
|
196 |
msgid "Show with %s"
|
197 |
msgstr "Mostra %s"
|
198 |
|
199 |
+
#: content-aware-sidebars.php:769
|
200 |
+
#: content-aware-sidebars.php:794
|
201 |
msgid "Show with All %s"
|
202 |
+
msgstr "Seleziona tutto: %s"
|
203 |
+
|
204 |
+
#: modules/author.php:28
|
205 |
+
#: modules/author.php:42
|
206 |
+
msgid "Authors"
|
207 |
+
msgstr "Autori"
|
208 |
+
|
209 |
+
#: modules/page_template.php:17
|
210 |
+
#: modules/page_template.php:30
|
211 |
+
msgid "Page Templates"
|
212 |
+
msgstr "Template Pagine"
|
213 |
+
|
214 |
+
#: modules/post_type.php:30
|
215 |
+
msgid "Post Types"
|
216 |
+
msgstr "Tipi di messaggi"
|
217 |
+
|
218 |
+
#: modules/qtranslate.php:27
|
219 |
+
#: modules/qtranslate.php:39
|
220 |
+
#: modules/transposh.php:27
|
221 |
+
#: modules/transposh.php:39
|
222 |
+
#: modules/wpml.php:26
|
223 |
+
#: modules/wpml.php:38
|
224 |
+
msgid "Languages"
|
225 |
+
msgstr "Lingue"
|
226 |
+
|
227 |
+
#: modules/static.php:15
|
228 |
+
msgid "Static Pages"
|
229 |
+
msgstr "Pagine statiche"
|
230 |
+
|
231 |
+
#: modules/static.php:21
|
232 |
+
msgid "Front Page"
|
233 |
+
msgstr "Pagina principale"
|
234 |
+
|
235 |
+
#: modules/static.php:22
|
236 |
+
msgid "Search Results"
|
237 |
+
msgstr "Risultati di ricerca"
|
238 |
+
|
239 |
+
#: modules/static.php:23
|
240 |
+
msgid "404 Page"
|
241 |
+
msgstr "Pagina 404"
|
242 |
+
|
243 |
+
#: modules/taxonomy.php:32
|
244 |
+
msgid "Taxonomies"
|
245 |
+
msgstr "Tassonomie"
|
246 |
|
247 |
#. Plugin Name of the plugin/theme
|
248 |
msgid "Content Aware Sidebars"
|
249 |
msgstr "Content Aware Sidebars"
|
250 |
|
251 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.3) #-#-#-#-#
|
252 |
#. Plugin URI of the plugin/theme
|
253 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.3) #-#-#-#-#
|
254 |
#. Author URI of the plugin/theme
|
255 |
msgid "http://www.intox.dk/"
|
256 |
msgstr "http://www.intox.dk/"
|
lang/content-aware-sidebars-lt_LT.mo
ADDED
Binary file
|
lang/content-aware-sidebars-lt_LT.po
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 0.8.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2012-03-09 13:35:16+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: 2012-05-01 19:05+0200\n"
|
12 |
+
"Last-Translator: \n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Poedit-Language: Lithuanian\n"
|
15 |
+
"X-Poedit-Country: Lithuania\n"
|
16 |
+
|
17 |
+
#: content-aware-sidebars.php:103
|
18 |
+
msgid "Post Types"
|
19 |
+
msgstr "Įrašų tipai"
|
20 |
+
|
21 |
+
#: content-aware-sidebars.php:111
|
22 |
+
msgid "Taxonomies"
|
23 |
+
msgstr "Taksonomijos"
|
24 |
+
|
25 |
+
#: content-aware-sidebars.php:119
|
26 |
+
msgid "Authors"
|
27 |
+
msgstr "Autoriai"
|
28 |
+
|
29 |
+
#: content-aware-sidebars.php:127
|
30 |
+
msgid "Page Templates"
|
31 |
+
msgstr "Puslapio Šablonai"
|
32 |
+
|
33 |
+
#: content-aware-sidebars.php:135
|
34 |
+
msgid "Static Pages"
|
35 |
+
msgstr "Statiniai Puslapiai"
|
36 |
+
|
37 |
+
#: content-aware-sidebars.php:141
|
38 |
+
msgid "Front Page"
|
39 |
+
msgstr "Namų Puslapis"
|
40 |
+
|
41 |
+
#: content-aware-sidebars.php:142
|
42 |
+
msgid "Search Results"
|
43 |
+
msgstr "Paieškos Rezultatai"
|
44 |
+
|
45 |
+
#: content-aware-sidebars.php:143
|
46 |
+
msgid "404 Page"
|
47 |
+
msgstr "404 Puslapis"
|
48 |
+
|
49 |
+
#: content-aware-sidebars.php:147
|
50 |
+
#: content-aware-sidebars.php:312
|
51 |
+
msgid "Exposure"
|
52 |
+
msgstr "Išlaikymas"
|
53 |
+
|
54 |
+
#: content-aware-sidebars.php:153
|
55 |
+
msgid "Singular"
|
56 |
+
msgstr "Vienaskaitinis"
|
57 |
+
|
58 |
+
#: content-aware-sidebars.php:154
|
59 |
+
msgid "Singular & Archive"
|
60 |
+
msgstr "Išlaikymas ir Archyvavimas"
|
61 |
+
|
62 |
+
#: content-aware-sidebars.php:155
|
63 |
+
msgid "Archive"
|
64 |
+
msgstr "Archyvas"
|
65 |
+
|
66 |
+
#: content-aware-sidebars.php:159
|
67 |
+
#: content-aware-sidebars.php:313
|
68 |
+
msgctxt "option"
|
69 |
+
msgid "Handle"
|
70 |
+
msgstr "Tvarkyti"
|
71 |
+
|
72 |
+
#: content-aware-sidebars.php:161
|
73 |
+
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
74 |
+
msgstr "Pakeisti serverio šoninę juostą , sulieti ją su tuo arba pridėti šoninę juostą rankiniu būdu"
|
75 |
+
|
76 |
+
#: content-aware-sidebars.php:165
|
77 |
+
msgid "Replace"
|
78 |
+
msgstr "Pakeisti"
|
79 |
+
|
80 |
+
#: content-aware-sidebars.php:166
|
81 |
+
msgid "Merge"
|
82 |
+
msgstr "Sulieti"
|
83 |
+
|
84 |
+
#: content-aware-sidebars.php:167
|
85 |
+
msgid "Manual"
|
86 |
+
msgstr "Rankiniu būdu"
|
87 |
+
|
88 |
+
#: content-aware-sidebars.php:171
|
89 |
+
msgid "Host Sidebar"
|
90 |
+
msgstr "Serverio šoninė juosta"
|
91 |
+
|
92 |
+
#: content-aware-sidebars.php:179
|
93 |
+
#: content-aware-sidebars.php:314
|
94 |
+
msgid "Merge position"
|
95 |
+
msgstr "Suliejimo pozicija"
|
96 |
+
|
97 |
+
#: content-aware-sidebars.php:181
|
98 |
+
msgid "Place sidebar on top or bottom of host when merging."
|
99 |
+
msgstr "Suliejimo metu patalpinti šoninę juostą serverio viršuje arba apačioje"
|
100 |
+
|
101 |
+
#: content-aware-sidebars.php:185
|
102 |
+
msgid "Top"
|
103 |
+
msgstr "Viršus"
|
104 |
+
|
105 |
+
#: content-aware-sidebars.php:186
|
106 |
+
msgid "Bottom"
|
107 |
+
msgstr "Apačia"
|
108 |
+
|
109 |
+
#: content-aware-sidebars.php:216
|
110 |
+
msgid "Sidebars"
|
111 |
+
msgstr "Šoninės juostos"
|
112 |
+
|
113 |
+
#: content-aware-sidebars.php:217
|
114 |
+
msgid "Sidebar"
|
115 |
+
msgstr "Šoninė juosta"
|
116 |
+
|
117 |
+
#: content-aware-sidebars.php:218
|
118 |
+
msgctxt "sidebar"
|
119 |
+
msgid "Add New"
|
120 |
+
msgstr "Pridėti Naują"
|
121 |
+
|
122 |
+
#: content-aware-sidebars.php:219
|
123 |
+
msgid "Add New Sidebar"
|
124 |
+
msgstr "Pridėti Naują Šoninė juostą"
|
125 |
+
|
126 |
+
#: content-aware-sidebars.php:220
|
127 |
+
msgid "Edit Sidebar"
|
128 |
+
msgstr "Redaguoti Šoninė juostą"
|
129 |
+
|
130 |
+
#: content-aware-sidebars.php:221
|
131 |
+
msgid "New Sidebar"
|
132 |
+
msgstr "Nauja Šoninė juosta"
|
133 |
+
|
134 |
+
#: content-aware-sidebars.php:222
|
135 |
+
msgid "All Sidebars"
|
136 |
+
msgstr "Visos Šoninės juostos"
|
137 |
+
|
138 |
+
#: content-aware-sidebars.php:223
|
139 |
+
msgid "View Sidebar"
|
140 |
+
msgstr "Peržiūrėti Šoninę juostą"
|
141 |
+
|
142 |
+
#: content-aware-sidebars.php:224
|
143 |
+
msgid "Search Sidebars"
|
144 |
+
msgstr "Ieškoti Šoninių juostų"
|
145 |
+
|
146 |
+
#: content-aware-sidebars.php:225
|
147 |
+
msgid "No sidebars found"
|
148 |
+
msgstr "Jokių šoninių juostų nerasta"
|
149 |
+
|
150 |
+
#: content-aware-sidebars.php:226
|
151 |
+
msgid "No sidebars found in Trash"
|
152 |
+
msgstr "Šiukšlėse nerasta jokių šoninių juostų"
|
153 |
+
|
154 |
+
#: content-aware-sidebars.php:247
|
155 |
+
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
156 |
+
msgstr "Šoninė juosta atnaujinta. <a href=\"%s\">Valdyti tvarkiklius</a>"
|
157 |
+
|
158 |
+
#: content-aware-sidebars.php:250
|
159 |
+
msgid "Sidebar updated."
|
160 |
+
msgstr "Šoninė juosta atnaujinta."
|
161 |
+
|
162 |
+
#: content-aware-sidebars.php:252
|
163 |
+
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
164 |
+
msgstr "Šoninė juosta paskelbta. <a href=\"%s\">Valdyti tvarkiklius</a>"
|
165 |
+
|
166 |
+
#: content-aware-sidebars.php:253
|
167 |
+
msgid "Sidebar saved."
|
168 |
+
msgstr "Šoninė juosta įrašyta."
|
169 |
+
|
170 |
+
#: content-aware-sidebars.php:254
|
171 |
+
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
172 |
+
msgstr "Šoninė juosta pateikta <a href=\"%s\">Valdyti tvarkiklius</a>"
|
173 |
+
|
174 |
+
#: content-aware-sidebars.php:255
|
175 |
+
msgid "Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage widgets</a>"
|
176 |
+
msgstr "Šoninė juosta suplanuota: <strong>%1$s</strong>. <a href=\"%2$s\">Valdyti tvarkiklius</a>"
|
177 |
+
|
178 |
+
#. translators: Publish box date format, see http:php.net/date
|
179 |
+
#: content-aware-sidebars.php:257
|
180 |
+
msgid "M j, Y @ G:i"
|
181 |
+
msgstr "M j, Y @ G:i"
|
182 |
+
|
183 |
+
#: content-aware-sidebars.php:258
|
184 |
+
msgid "Sidebar draft updated. <a href=\"%s\">Manage widgets</a>"
|
185 |
+
msgstr "Šoninės juostas juodraštis atnaujintas. <a href=\"%s\">Valdyti tvarkiklius</a>"
|
186 |
+
|
187 |
+
#: content-aware-sidebars.php:421
|
188 |
+
msgid "Manage Widgets"
|
189 |
+
msgstr "Valdyti Tvarkiklius"
|
190 |
+
|
191 |
+
#: content-aware-sidebars.php:656
|
192 |
+
msgid "Words from the author"
|
193 |
+
msgstr "Autoriaus žodžiai"
|
194 |
+
|
195 |
+
#: content-aware-sidebars.php:704
|
196 |
+
msgid "Options"
|
197 |
+
msgstr "Parinktys"
|
198 |
+
|
199 |
+
#: content-aware-sidebars.php:781
|
200 |
+
msgid "If you love this plugin, please consider donating."
|
201 |
+
msgstr "Jeigu Jums patinka šis papildinys, prašome apsvarstyti paaukojimo galimybę."
|
202 |
+
|
203 |
+
#: content-aware-sidebars.php:783
|
204 |
+
msgid "Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and <a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
205 |
+
msgstr "Neužmirškite <a class=\"button\" href=\"%1$s\" target=\"_blank\">įvertinti</a> ir <a class=\"button\" href=\"%2$s\" target=\"_blank\">pasidalinti</a> papildiniu!"
|
206 |
+
|
207 |
+
#: content-aware-sidebars.php:785
|
208 |
+
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
209 |
+
msgstr "Peržvelkite Content Aware Sidebars %23WordPress sistemai!"
|
210 |
+
|
211 |
+
#: content-aware-sidebars.php:800
|
212 |
+
#: content-aware-sidebars.php:852
|
213 |
+
msgid "No items."
|
214 |
+
msgstr "Jokių elementų."
|
215 |
+
|
216 |
+
#: content-aware-sidebars.php:806
|
217 |
+
msgid "Most Used"
|
218 |
+
msgstr "Dažniausiai Naudoti"
|
219 |
+
|
220 |
+
#: content-aware-sidebars.php:807
|
221 |
+
#: content-aware-sidebars.php:858
|
222 |
+
#: content-aware-sidebars.php:883
|
223 |
+
msgid "View All"
|
224 |
+
msgstr "Peržiūrėti Viską"
|
225 |
+
|
226 |
+
#: content-aware-sidebars.php:827
|
227 |
+
msgid "Show with %s"
|
228 |
+
msgstr "Rodyti per %s"
|
229 |
+
|
230 |
+
#: content-aware-sidebars.php:871
|
231 |
+
msgid "Show with All %s"
|
232 |
+
msgstr "Rodyti per visus %s"
|
233 |
+
|
234 |
+
#. Plugin Name of the plugin/theme
|
235 |
+
msgid "Content Aware Sidebars"
|
236 |
+
msgstr "Content Aware Sidebars"
|
237 |
+
|
238 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.2) #-#-#-#-#
|
239 |
+
#. Plugin URI of the plugin/theme
|
240 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.2) #-#-#-#-#
|
241 |
+
#. Author URI of the plugin/theme
|
242 |
+
msgid "http://www.intox.dk/"
|
243 |
+
msgstr "http://www.intox.dk/"
|
244 |
+
|
245 |
+
#. Description of the plugin/theme
|
246 |
+
msgid "Manage and show sidebars according to the content being viewed."
|
247 |
+
msgstr "Valdyti ir rodyti šonines juostas pagal tai, koks turinys šiuo metu yra peržiūrimas."
|
248 |
+
|
249 |
+
#. Author of the plugin/theme
|
250 |
+
msgid "Joachim Jensen"
|
251 |
+
msgstr "Joachim Jensen"
|
252 |
+
|
lang/content-aware-sidebars.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Content Aware Sidebars 0.8.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
-
"POT-Creation-Date: 2012-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,229 +12,235 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: content-aware-sidebars.php:
|
16 |
-
msgid "Post Types"
|
17 |
-
msgstr ""
|
18 |
-
|
19 |
-
#: content-aware-sidebars.php:111
|
20 |
-
msgid "Taxonomies"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: content-aware-sidebars.php:119
|
24 |
-
msgid "Authors"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: content-aware-sidebars.php:127
|
28 |
-
msgid "Page Templates"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: content-aware-sidebars.php:135
|
32 |
-
msgid "Static Pages"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
#: content-aware-sidebars.php:141
|
36 |
-
msgid "Front Page"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: content-aware-sidebars.php:142
|
40 |
-
msgid "Search Results"
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: content-aware-sidebars.php:143
|
44 |
-
msgid "404 Page"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: content-aware-sidebars.php:147 content-aware-sidebars.php:312
|
48 |
msgid "Exposure"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: content-aware-sidebars.php:
|
52 |
msgid "Singular"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: content-aware-sidebars.php:
|
56 |
msgid "Singular & Archive"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: content-aware-sidebars.php:
|
60 |
msgid "Archive"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: content-aware-sidebars.php:
|
64 |
msgctxt "option"
|
65 |
msgid "Handle"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: content-aware-sidebars.php:
|
69 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: content-aware-sidebars.php:
|
73 |
msgid "Replace"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: content-aware-sidebars.php:
|
77 |
msgid "Merge"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: content-aware-sidebars.php:
|
81 |
msgid "Manual"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: content-aware-sidebars.php:
|
85 |
msgid "Host Sidebar"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: content-aware-sidebars.php:
|
89 |
msgid "Merge position"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: content-aware-sidebars.php:
|
93 |
msgid "Place sidebar on top or bottom of host when merging."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: content-aware-sidebars.php:
|
97 |
msgid "Top"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: content-aware-sidebars.php:
|
101 |
msgid "Bottom"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: content-aware-sidebars.php:
|
105 |
msgid "Sidebars"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: content-aware-sidebars.php:
|
109 |
msgid "Sidebar"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: content-aware-sidebars.php:
|
113 |
msgctxt "sidebar"
|
114 |
msgid "Add New"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: content-aware-sidebars.php:
|
118 |
msgid "Add New Sidebar"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: content-aware-sidebars.php:
|
122 |
msgid "Edit Sidebar"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: content-aware-sidebars.php:
|
126 |
msgid "New Sidebar"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: content-aware-sidebars.php:
|
130 |
msgid "All Sidebars"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: content-aware-sidebars.php:
|
134 |
msgid "View Sidebar"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: content-aware-sidebars.php:
|
138 |
msgid "Search Sidebars"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: content-aware-sidebars.php:
|
142 |
msgid "No sidebars found"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: content-aware-sidebars.php:
|
146 |
msgid "No sidebars found in Trash"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: content-aware-sidebars.php:
|
150 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: content-aware-sidebars.php:
|
154 |
msgid "Sidebar updated."
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: content-aware-sidebars.php:
|
158 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: content-aware-sidebars.php:
|
162 |
msgid "Sidebar saved."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: content-aware-sidebars.php:
|
166 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: content-aware-sidebars.php:
|
170 |
msgid ""
|
171 |
"Sidebar scheduled for: <strong>%1$s</strong>. <a href=\"%2$s\">Manage "
|
172 |
"widgets</a>"
|
173 |
msgstr ""
|
174 |
|
175 |
#. translators: Publish box date format, see http:php.net/date
|
176 |
-
#: content-aware-sidebars.php:
|
177 |
msgid "M j, Y @ G:i"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: content-aware-sidebars.php:
|
181 |
-
msgid "Sidebar draft updated.
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: content-aware-sidebars.php:
|
185 |
msgid "Manage Widgets"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: content-aware-sidebars.php:
|
189 |
msgid "Words from the author"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: content-aware-sidebars.php:
|
193 |
msgid "Options"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: content-aware-sidebars.php:
|
197 |
msgid "If you love this plugin, please consider donating."
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: content-aware-sidebars.php:
|
201 |
msgid ""
|
202 |
"Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and "
|
203 |
"<a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: content-aware-sidebars.php:
|
207 |
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: content-aware-sidebars.php:
|
211 |
msgid "No items."
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: content-aware-sidebars.php:
|
215 |
msgid "Most Used"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: content-aware-sidebars.php:
|
219 |
-
#: content-aware-sidebars.php:
|
220 |
msgid "View All"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: content-aware-sidebars.php:
|
224 |
msgid "Show with %s"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: content-aware-sidebars.php:
|
228 |
msgid "Show with All %s"
|
229 |
msgstr ""
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
#. Plugin Name of the plugin/theme
|
232 |
msgid "Content Aware Sidebars"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.
|
236 |
#. Plugin URI of the plugin/theme
|
237 |
-
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.
|
238 |
#. Author URI of the plugin/theme
|
239 |
msgid "http://www.intox.dk/"
|
240 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Content Aware Sidebars package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Content Aware Sidebars 0.8.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/content-aware-sidebars\n"
|
7 |
+
"POT-Creation-Date: 2012-05-30 22:56:32+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: content-aware-sidebars.php:151 content-aware-sidebars.php:329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
msgid "Exposure"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: content-aware-sidebars.php:157
|
20 |
msgid "Singular"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: content-aware-sidebars.php:158
|
24 |
msgid "Singular & Archive"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: content-aware-sidebars.php:159
|
28 |
msgid "Archive"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: content-aware-sidebars.php:163 content-aware-sidebars.php:330
|
32 |
msgctxt "option"
|
33 |
msgid "Handle"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: content-aware-sidebars.php:165
|
37 |
msgid "Replace host sidebar, merge with it or add sidebar manually."
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: content-aware-sidebars.php:169
|
41 |
msgid "Replace"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: content-aware-sidebars.php:170
|
45 |
msgid "Merge"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: content-aware-sidebars.php:171
|
49 |
msgid "Manual"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: content-aware-sidebars.php:175
|
53 |
msgid "Host Sidebar"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: content-aware-sidebars.php:183 content-aware-sidebars.php:331
|
57 |
msgid "Merge position"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: content-aware-sidebars.php:185
|
61 |
msgid "Place sidebar on top or bottom of host when merging."
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: content-aware-sidebars.php:189
|
65 |
msgid "Top"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: content-aware-sidebars.php:190
|
69 |
msgid "Bottom"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: content-aware-sidebars.php:223
|
73 |
msgid "Sidebars"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: content-aware-sidebars.php:224
|
77 |
msgid "Sidebar"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: content-aware-sidebars.php:225
|
81 |
msgctxt "sidebar"
|
82 |
msgid "Add New"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: content-aware-sidebars.php:226
|
86 |
msgid "Add New Sidebar"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: content-aware-sidebars.php:227
|
90 |
msgid "Edit Sidebar"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: content-aware-sidebars.php:228
|
94 |
msgid "New Sidebar"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: content-aware-sidebars.php:229
|
98 |
msgid "All Sidebars"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: content-aware-sidebars.php:230
|
102 |
msgid "View Sidebar"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: content-aware-sidebars.php:231
|
106 |
msgid "Search Sidebars"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: content-aware-sidebars.php:232
|
110 |
msgid "No sidebars found"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: content-aware-sidebars.php:233
|
114 |
msgid "No sidebars found in Trash"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: content-aware-sidebars.php:254
|
118 |
msgid "Sidebar updated. <a href=\"%s\">Manage widgets</a>"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: content-aware-sidebars.php:257
|
122 |
msgid "Sidebar updated."
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: content-aware-sidebars.php:259
|
126 |
msgid "Sidebar published. <a href=\"%s\">Manage widgets</a>"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: content-aware-sidebars.php:260
|
130 |
msgid "Sidebar saved."
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: content-aware-sidebars.php:261
|
134 |
msgid "Sidebar submitted. <a href=\"%s\">Manage widgets</a>"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: content-aware-sidebars.php:262
|
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:264
|
145 |
msgid "M j, Y @ G:i"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: content-aware-sidebars.php:265
|
149 |
+
msgid "Sidebar draft updated."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: content-aware-sidebars.php:444
|
153 |
msgid "Manage Widgets"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: content-aware-sidebars.php:572
|
157 |
msgid "Words from the author"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: content-aware-sidebars.php:585
|
161 |
msgid "Options"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: content-aware-sidebars.php:679
|
165 |
msgid "If you love this plugin, please consider donating."
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: content-aware-sidebars.php:681
|
169 |
msgid ""
|
170 |
"Remember to <a class=\"button\" href=\"%1$s\" target=\"_blank\">rate</a> and "
|
171 |
"<a class=\"button\" href=\"%2$s\" target=\"_blank\">share</a> it too!"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: content-aware-sidebars.php:683
|
175 |
msgid "Check out Content Aware Sidebars for %23WordPress! :)"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: content-aware-sidebars.php:698 content-aware-sidebars.php:750
|
179 |
msgid "No items."
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: content-aware-sidebars.php:704
|
183 |
msgid "Most Used"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: content-aware-sidebars.php:705 content-aware-sidebars.php:756
|
187 |
+
#: content-aware-sidebars.php:781
|
188 |
msgid "View All"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: content-aware-sidebars.php:725
|
192 |
msgid "Show with %s"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: content-aware-sidebars.php:769 content-aware-sidebars.php:794
|
196 |
msgid "Show with All %s"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: modules/author.php:28 modules/author.php:42
|
200 |
+
msgid "Authors"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: modules/page_template.php:17 modules/page_template.php:30
|
204 |
+
msgid "Page Templates"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: modules/post_type.php:30
|
208 |
+
msgid "Post Types"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: modules/qtranslate.php:27 modules/qtranslate.php:39
|
212 |
+
#: modules/transposh.php:27 modules/transposh.php:39 modules/wpml.php:26
|
213 |
+
#: modules/wpml.php:38
|
214 |
+
msgid "Languages"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: modules/static.php:15
|
218 |
+
msgid "Static Pages"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: modules/static.php:21
|
222 |
+
msgid "Front Page"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: modules/static.php:22
|
226 |
+
msgid "Search Results"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: modules/static.php:23
|
230 |
+
msgid "404 Page"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: modules/taxonomy.php:32
|
234 |
+
msgid "Taxonomies"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
#. Plugin Name of the plugin/theme
|
238 |
msgid "Content Aware Sidebars"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.3) #-#-#-#-#
|
242 |
#. Plugin URI of the plugin/theme
|
243 |
+
#. #-#-#-#-# plugin.pot (Content Aware Sidebars 0.8.3) #-#-#-#-#
|
244 |
#. Author URI of the plugin/theme
|
245 |
msgid "http://www.intox.dk/"
|
246 |
msgstr ""
|
modules/abstract.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* All modules should extend this one.
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
abstract class CASModule {
|
12 |
+
|
13 |
+
protected $id;
|
14 |
+
|
15 |
+
/**
|
16 |
+
*
|
17 |
+
* Constructor
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
if(!isset($this->id))
|
22 |
+
$this->id = substr(get_class($this),strpos(get_class($this),'_')+1);
|
23 |
+
|
24 |
+
add_filter('cas_metadata', array(&$this,'metadata'));
|
25 |
+
add_action('cas_admin_gui', array(&$this,'admin_gui'));
|
26 |
+
add_action('cas_sidebar_db', array(&$this,'init_content'));
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
public function get_id() {
|
31 |
+
return $this->id;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
*
|
36 |
+
* Add hooks to plugin
|
37 |
+
*
|
38 |
+
*/
|
39 |
+
public function init_content() {
|
40 |
+
|
41 |
+
if($this->is_content()) {
|
42 |
+
add_filter('cas_sidebar_db_join', array(&$this,'db_join'),10,2);
|
43 |
+
add_filter('cas_sidebar_db_where', array(&$this,'db_where'));
|
44 |
+
add_filter('cas_sidebar_db_where2', array(&$this,'db_where2'));
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
public function db_join($join, $prefix) {
|
49 |
+
global $wpdb;
|
50 |
+
$join[$this->id] = "LEFT JOIN $wpdb->postmeta {$this->id} ON {$this->id}.post_id = posts.ID AND {$this->id}.meta_key = '".$prefix.$this->id."' ";
|
51 |
+
return $join;
|
52 |
+
}
|
53 |
+
|
54 |
+
public function exclude_sidebar($continue, $post, $prefix) {
|
55 |
+
if(!$continue) {
|
56 |
+
//print_r($this->id."<br />");
|
57 |
+
if (get_post_meta($post->ID, $prefix.$this->id, true) != '') {
|
58 |
+
//print_r($this->id." has<br />");
|
59 |
+
$continue = true;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
return $continue;
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
public function db_where2($where) {
|
67 |
+
$where[$this->id] = "{$this->id}.meta_value IS NOT NULL";
|
68 |
+
return $where;
|
69 |
+
}
|
70 |
+
|
71 |
+
abstract public function admin_gui($class);
|
72 |
+
abstract public function metadata($metadata);
|
73 |
+
abstract public function is_content();
|
74 |
+
abstract public function db_where($where);
|
75 |
+
|
76 |
+
}
|
modules/author.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Author Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) post type written by any or specific author
|
12 |
+
* b) any or specific author archive
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
class CASModule_author extends CASModule {
|
16 |
+
|
17 |
+
protected $id = 'authors';
|
18 |
+
|
19 |
+
public function metadata($metadata) {
|
20 |
+
global $wpdb;
|
21 |
+
|
22 |
+
$author_list = array();
|
23 |
+
foreach($wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID ASC") as $user) {
|
24 |
+
$author_list[$user->ID] = $user->display_name;
|
25 |
+
}
|
26 |
+
|
27 |
+
$metadata[$this->id] = array(
|
28 |
+
'name' => __('Authors', 'content-aware-sidebars'),
|
29 |
+
'id' => $this->id,
|
30 |
+
'desc' => '',
|
31 |
+
'val' => array(),
|
32 |
+
'type' => 'checkbox',
|
33 |
+
'list' => $author_list
|
34 |
+
);
|
35 |
+
return $metadata;
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
public function admin_gui($class) {
|
40 |
+
add_meta_box(
|
41 |
+
'ca-sidebar-authors',
|
42 |
+
__('Authors', 'content-aware-sidebars'),
|
43 |
+
array(&$class,'meta_box_checkboxes'),
|
44 |
+
'sidebar',
|
45 |
+
'side',
|
46 |
+
'default',
|
47 |
+
$this->id
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
public function is_content() {
|
52 |
+
return (is_singular() && !is_front_page()) || is_author();
|
53 |
+
}
|
54 |
+
|
55 |
+
public function db_where($where) {
|
56 |
+
global $post;
|
57 |
+
$author = (string)(is_singular() ? $post->post_author : get_query_var('author'));
|
58 |
+
$where[$this->id] = "(authors.meta_value IS NULL OR (authors.meta_value LIKE '%authors%' OR authors.meta_value LIKE '%".serialize($author)."%'))";
|
59 |
+
return $where;
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
modules/bbpress.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* bbPress Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) any or specific bbpress user profile
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class CASModule_bbpress extends CASModule {
|
15 |
+
|
16 |
+
protected $id = 'authors';
|
17 |
+
|
18 |
+
public function metadata($metadata) {
|
19 |
+
return $metadata;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function admin_gui($class) {
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
public function is_content() {
|
27 |
+
return bbp_is_single_user();
|
28 |
+
}
|
29 |
+
|
30 |
+
public function db_where($where) {
|
31 |
+
$where[$this->id] = "(authors.meta_value LIKE '%authors%' OR authors.meta_value LIKE '%".serialize((string)bbp_get_displayed_user_id())."%')";
|
32 |
+
return $where;
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
modules/page_template.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Page Template Module
|
9 |
+
*
|
10 |
+
* Detects if current content has:
|
11 |
+
* a) any or specific page template
|
12 |
+
*
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
class CASModule_page_template extends CASModule {
|
16 |
+
|
17 |
+
protected $id = 'page_templates';
|
18 |
+
|
19 |
+
public function metadata($metadata) {
|
20 |
+
$metadata['page_templates'] = array(
|
21 |
+
'name' => __('Page Templates', 'content-aware-sidebars'),
|
22 |
+
'id' => 'page_templates',
|
23 |
+
'desc' => '',
|
24 |
+
'val' => array(),
|
25 |
+
'type' => 'checkbox',
|
26 |
+
'list' => array_flip(get_page_templates())
|
27 |
+
);
|
28 |
+
return $metadata;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function admin_gui($class) {
|
32 |
+
add_meta_box(
|
33 |
+
'ca-sidebar-page_templates',
|
34 |
+
__('Page Templates', 'content-aware-sidebars'),
|
35 |
+
array(&$class,'meta_box_checkboxes'),
|
36 |
+
'sidebar',
|
37 |
+
'side',
|
38 |
+
'default',
|
39 |
+
'page_templates'
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
public function is_content() {
|
44 |
+
if(is_singular() && !('page' == get_option( 'show_on_front') && get_option('page_on_front') == get_the_ID())) {
|
45 |
+
$template = get_post_meta(get_the_ID(),'_wp_page_template',true);
|
46 |
+
if($template && $template != 'default') {
|
47 |
+
return true;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
public function db_where($where) {
|
54 |
+
$template = get_post_meta(get_the_ID(),'_wp_page_template',true);
|
55 |
+
$where[$this->id] = "(page_templates.meta_value IS NULL OR (page_templates.meta_value LIKE '%page_templates%' OR page_templates.meta_value LIKE '%".$template."%'))";
|
56 |
+
return $where;
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
modules/post_type.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Post Type Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) specific post type or specific post
|
12 |
+
* b) specific post type archive or home
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
class CASModule_post_type extends CASModule {
|
16 |
+
|
17 |
+
protected $id = 'post_types';
|
18 |
+
private $post_types;
|
19 |
+
private $post_type_objects;
|
20 |
+
|
21 |
+
public function metadata($metadata) {
|
22 |
+
|
23 |
+
// List public post types
|
24 |
+
foreach(get_post_types(array('public'=>true),'objects') as $post_type) {
|
25 |
+
$this->post_types[$post_type->name] = $post_type->label;
|
26 |
+
$this->post_type_objects[$post_type->name] = $post_type;
|
27 |
+
}
|
28 |
+
|
29 |
+
$metadata['post_types'] = array(
|
30 |
+
'name' => __('Post Types', 'content-aware-sidebars'),
|
31 |
+
'id' => 'post_types',
|
32 |
+
'desc' => '',
|
33 |
+
'val' => array(),
|
34 |
+
'type' => 'checkbox',
|
35 |
+
'list' => $this->post_types
|
36 |
+
);
|
37 |
+
return $metadata;
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
public function admin_gui($class) {
|
42 |
+
foreach($this->post_type_objects as $post_type) {
|
43 |
+
add_meta_box(
|
44 |
+
'ca-sidebar-post-type-'.$post_type->name,
|
45 |
+
$post_type->label,
|
46 |
+
array(&$class,'meta_box_post_type'),
|
47 |
+
'sidebar',
|
48 |
+
'normal',
|
49 |
+
'high',
|
50 |
+
$post_type
|
51 |
+
);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
public function is_content() {
|
56 |
+
return ((is_singular() || is_home()) && !is_front_page()) || is_post_type_archive();
|
57 |
+
}
|
58 |
+
|
59 |
+
public function db_where($where) {
|
60 |
+
if(is_singular()) {
|
61 |
+
$where[$this->id] = "(post_types.meta_value IS NULL OR (post_types.meta_value LIKE '%".serialize(get_post_type())."%' OR post_types.meta_value LIKE '%".serialize((string)get_the_ID())."%'))";
|
62 |
+
return $where;
|
63 |
+
}
|
64 |
+
global $post_type;
|
65 |
+
|
66 |
+
// Home has post as default post type
|
67 |
+
if(!$post_type) $post_type = 'post';
|
68 |
+
$where[$this->id] = "(post_types.meta_value IS NULL OR post_types.meta_value LIKE '%".serialize($post_type)."%')";
|
69 |
+
return $where;
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
modules/qtranslate.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* bbPress Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) any or specific bbpress user profile
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class CASModule_qtranslate extends CASModule {
|
15 |
+
|
16 |
+
protected $id = 'language';
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
parent::__construct();
|
20 |
+
|
21 |
+
add_filter('manage_edit-sidebar_columns', array(&$this,'admin_column_headers'));
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
public function metadata($metadata) {
|
26 |
+
global $q_config;
|
27 |
+
$langs = array();
|
28 |
+
|
29 |
+
foreach(get_option('qtranslate_enabled_languages') as $lng) {
|
30 |
+
$langs[$lng] = $q_config['language_name'][$lng];
|
31 |
+
}
|
32 |
+
|
33 |
+
$metadata[$this->id] = array(
|
34 |
+
'name' => __('Languages', 'content-aware-sidebars'),
|
35 |
+
'id' => 'language',
|
36 |
+
'val' => array(),
|
37 |
+
'type' => 'checkbox',
|
38 |
+
'list' => $langs
|
39 |
+
);
|
40 |
+
return $metadata;
|
41 |
+
}
|
42 |
+
|
43 |
+
public function admin_gui($class) {
|
44 |
+
add_meta_box(
|
45 |
+
'ca-sidebar-qtranslate',
|
46 |
+
__('Languages', 'content-aware-sidebars'),
|
47 |
+
array(&$class,'meta_box_checkboxes'),
|
48 |
+
'sidebar',
|
49 |
+
'side',
|
50 |
+
'default',
|
51 |
+
$this->id
|
52 |
+
);
|
53 |
+
}
|
54 |
+
|
55 |
+
public function is_content() {
|
56 |
+
return true;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function db_where($where) {
|
60 |
+
$where[$this->id] = "(language.meta_value IS NULL OR (language.meta_value LIKE '%language%' OR language.meta_value LIKE '%".serialize(qtrans_getLanguage())."%'))";
|
61 |
+
return $where;
|
62 |
+
}
|
63 |
+
|
64 |
+
public function admin_column_headers($columns) {
|
65 |
+
unset($columns['language']);
|
66 |
+
return $columns;
|
67 |
+
}
|
68 |
+
|
69 |
+
}
|
modules/static.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Static Pages Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) front page
|
12 |
+
* b) search results
|
13 |
+
* c) 404 page
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
class CASModule_static extends CASModule {
|
17 |
+
|
18 |
+
public function metadata($metadata) {
|
19 |
+
$metadata[$this->id] = array(
|
20 |
+
'name' => __('Static Pages', 'content-aware-sidebars'),
|
21 |
+
'id' => $this->id,
|
22 |
+
'desc' => '',
|
23 |
+
'val' => array(),
|
24 |
+
'type' => 'checkbox',
|
25 |
+
'list' => array(
|
26 |
+
'front-page' => __('Front Page', 'content-aware-sidebars'),
|
27 |
+
'search' => __('Search Results', 'content-aware-sidebars'),
|
28 |
+
'404' => __('404 Page', 'content-aware-sidebars')
|
29 |
+
)
|
30 |
+
);
|
31 |
+
return $metadata;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function admin_gui($class) {
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
public function is_content() {
|
39 |
+
return is_front_page() || is_search() || is_404();
|
40 |
+
}
|
41 |
+
|
42 |
+
public function db_where($where) {
|
43 |
+
if(is_front_page()) {
|
44 |
+
$val = 'front-page';
|
45 |
+
} else if(is_search()) {
|
46 |
+
$val = 'search';
|
47 |
+
} else {
|
48 |
+
$val = '404';
|
49 |
+
}
|
50 |
+
$where[$this->id] = "(static.meta_value IS NULL OR static.meta_value LIKE '%".$val."%')";
|
51 |
+
return $where;
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
modules/taxonomy.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Taxonomy Module
|
9 |
+
*
|
10 |
+
* Detects if current content has/is:
|
11 |
+
* a) any term of specific taxonomy or specific term
|
12 |
+
* b) taxonomy archive or specific term archive
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
class CASModule_taxonomy extends CASModule {
|
16 |
+
|
17 |
+
protected $id = 'taxonomies';
|
18 |
+
private $taxonomies;
|
19 |
+
private $taxonomy_objects;
|
20 |
+
private $post_taxonomies;
|
21 |
+
private $post_terms;
|
22 |
+
|
23 |
+
public function metadata($metadata) {
|
24 |
+
|
25 |
+
// List public taxonomies
|
26 |
+
foreach(get_taxonomies(array('public'=>true),'objects') as $tax) {
|
27 |
+
$this->taxonomies[$tax->name] = $tax->label;
|
28 |
+
$this->taxonomy_objects[$tax->name] = $tax;
|
29 |
+
}
|
30 |
+
|
31 |
+
$metadata[$this->id] = array(
|
32 |
+
'name' => __('Taxonomies', 'content-aware-sidebars'),
|
33 |
+
'id' => $this->id,
|
34 |
+
'desc' => '',
|
35 |
+
'val' => array(),
|
36 |
+
'type' => 'checkbox',
|
37 |
+
'list' => $this->taxonomies
|
38 |
+
);
|
39 |
+
return $metadata;
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
public function admin_gui($class) {
|
44 |
+
foreach($this->taxonomy_objects as $tax) {
|
45 |
+
add_meta_box(
|
46 |
+
'ca-sidebar-tax-'.$tax->name,
|
47 |
+
$tax->label,
|
48 |
+
array(&$class,'meta_box_taxonomy'),
|
49 |
+
'sidebar',
|
50 |
+
'side',
|
51 |
+
'default',
|
52 |
+
$tax
|
53 |
+
);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
public function is_content() {
|
58 |
+
if(is_singular()) {
|
59 |
+
// Check if content has any taxonomies supported
|
60 |
+
$this->post_taxonomies = get_object_taxonomies(get_post_type());
|
61 |
+
if($this->post_taxonomies) {
|
62 |
+
$this->post_terms = wp_get_object_terms(get_the_ID(),$this->post_taxonomies);
|
63 |
+
// Check if content has any actual taxonomy terms
|
64 |
+
if($this->post_terms) {
|
65 |
+
return true;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
} else if(is_tax() || is_category() || is_tag()) {
|
69 |
+
return true;
|
70 |
+
}
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function db_join($join, $prefix) {
|
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 = '".$prefix."taxonomies'";
|
81 |
+
|
82 |
+
$join[$this->id] = $joins;
|
83 |
+
|
84 |
+
return $join;
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
public function db_where($where) {
|
89 |
+
|
90 |
+
if(is_singular()) {
|
91 |
+
$terms = array();
|
92 |
+
$taxonomies = array();
|
93 |
+
|
94 |
+
//Grab posts terms and make where rules for taxonomies.
|
95 |
+
$tax_where[] = "taxonomies.meta_value IS NULL";
|
96 |
+
foreach($this->post_terms as $term) {
|
97 |
+
$terms[] = $term->slug;
|
98 |
+
if(!isset($taxonomies[$term->taxonomy])) {
|
99 |
+
$tax_where[] = "taxonomies.meta_value LIKE '%".$taxonomies[$term->taxonomy] = $term->taxonomy."%'";
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
$where[$this->id] = "(terms.slug IS NULL OR terms.slug IN('".implode("','",$terms)."')) AND (".implode(' OR ',$tax_where).")";
|
104 |
+
return $where;
|
105 |
+
}
|
106 |
+
$term = get_queried_object();
|
107 |
+
|
108 |
+
$where[$this->id] = "(terms.slug = '$term->slug' OR taxonomies.meta_value LIKE '%".serialize($term->taxonomy)."%')";
|
109 |
+
return $where;
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
public function db_where2($where) {
|
114 |
+
$where[$this->id] = "terms.slug IS NOT NULL OR taxonomies.meta_value IS NOT NULL";
|
115 |
+
return $where;
|
116 |
+
}
|
117 |
+
}
|
modules/transposh.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Transposh Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) in specific language
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class CASModule_transposh extends CASModule {
|
15 |
+
|
16 |
+
protected $id = 'language';
|
17 |
+
|
18 |
+
public function metadata($metadata) {
|
19 |
+
global $my_transposh_plugin;
|
20 |
+
$langs = array();
|
21 |
+
|
22 |
+
foreach(explode(',',$my_transposh_plugin->options->get_viewable_langs()) as $lng) {
|
23 |
+
$langs[$lng] = transposh_consts::get_language_orig_name($lng);
|
24 |
+
}
|
25 |
+
|
26 |
+
$metadata['language'] = array(
|
27 |
+
'name' => __('Languages', 'content-aware-sidebars'),
|
28 |
+
'id' => 'language',
|
29 |
+
'val' => array(),
|
30 |
+
'type' => 'checkbox',
|
31 |
+
'list' => $langs
|
32 |
+
);
|
33 |
+
return $metadata;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function admin_gui($class) {
|
37 |
+
add_meta_box(
|
38 |
+
'ca-sidebar-transposh',
|
39 |
+
__('Languages', 'content-aware-sidebars'),
|
40 |
+
array(&$class,'meta_box_checkboxes'),
|
41 |
+
'sidebar',
|
42 |
+
'side',
|
43 |
+
'default',
|
44 |
+
'language'
|
45 |
+
);
|
46 |
+
}
|
47 |
+
|
48 |
+
public function is_content() {
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function db_where($where) {
|
53 |
+
global $my_transposh_plugin;
|
54 |
+
$where[$this->id] = "(language.meta_value IS NULL OR (language.meta_value LIKE '%language%' OR language.meta_value LIKE '%".serialize($my_transposh_plugin->tgl)."%'))";
|
55 |
+
return $where;
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
modules/wpml.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* WPML Module
|
9 |
+
*
|
10 |
+
* Detects if current content is:
|
11 |
+
* a) in specific language
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class CASModule_wpml extends CASModule {
|
15 |
+
|
16 |
+
protected $id = 'language';
|
17 |
+
|
18 |
+
public function metadata($metadata) {
|
19 |
+
$langs = array();
|
20 |
+
|
21 |
+
foreach(icl_get_languages('skip_missing=N') as $lng) {
|
22 |
+
$langs[$lng['language_code']] = $lng['native_name'];
|
23 |
+
}
|
24 |
+
|
25 |
+
$metadata['language'] = array(
|
26 |
+
'name' => __('Languages', 'content-aware-sidebars'),
|
27 |
+
'id' => 'language',
|
28 |
+
'val' => array(),
|
29 |
+
'type' => 'checkbox',
|
30 |
+
'list' => $langs
|
31 |
+
);
|
32 |
+
return $metadata;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function admin_gui($class) {
|
36 |
+
add_meta_box(
|
37 |
+
'ca-sidebar-wpml',
|
38 |
+
__('Languages', 'content-aware-sidebars'),
|
39 |
+
array(&$class,'meta_box_checkboxes'),
|
40 |
+
'sidebar',
|
41 |
+
'side',
|
42 |
+
'default',
|
43 |
+
'language'
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
public function is_content() {
|
48 |
+
return true;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function db_where($where) {
|
52 |
+
$where[$this->id] = "(language.meta_value IS NULL OR (language.meta_value LIKE '%language%' OR language.meta_value LIKE '%".serialize(ICL_LANGUAGE_CODE)."%'))";
|
53 |
+
return $where;
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
readme.txt
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: intoxstudio
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KPZHE6A72LEN4&lc=US&item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
-
Tags: sidebar, widget, content aware,
|
5 |
Requires at least: 3.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 0
|
|
|
8 |
|
9 |
Manage and show sidebars according to the content being viewed.
|
10 |
|
@@ -15,24 +16,38 @@ No extra database tables or table columns will be added.
|
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
-
* Show sidebars with:
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
* Singulars
|
23 |
-
*
|
24 |
-
*
|
25 |
-
*
|
26 |
-
*
|
27 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
* Create complex content with nested sidebars
|
29 |
* Private sidebars only for members
|
30 |
* Schedule sidebars for later publishing
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
= Translations =
|
33 |
|
34 |
* Danish (da_DK): [Joachim Jensen](http://www.intox.dk/)
|
35 |
* Italian (it_IT): [Luciano Del Fico](http://www.myweb2.it/)
|
|
|
36 |
|
37 |
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.
|
38 |
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/).
|
@@ -76,6 +91,18 @@ The function accepts URL-style strings as parameters too, like the standard Word
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
= 0.8.3 =
|
80 |
|
81 |
* Added: Danish and Italian translation
|
1 |
=== Plugin Name ===
|
2 |
Contributors: intoxstudio
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KPZHE6A72LEN4&lc=US&item_name=WordPress%20Plugin%3a%20Content%20Aware%20Sidebars¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
+
Tags: sidebar, widget, content aware, seo, dynamic, flexible, modular
|
5 |
Requires at least: 3.1
|
6 |
+
Tested up to: 3.4
|
7 |
+
Stable tag: 1.0
|
8 |
+
License: GPL2
|
9 |
|
10 |
Manage and show sidebars according to the content being viewed.
|
11 |
|
16 |
|
17 |
= Features =
|
18 |
|
19 |
+
* Show sidebars with all or specific:
|
20 |
+
* Singulars - e.g. some posts or pages
|
21 |
+
* (Custom) Post Types
|
22 |
+
* Singulars with given (custom) taxonomies or taxonomy terms
|
23 |
+
* Singulars by a given author
|
24 |
+
* Page Templates
|
25 |
+
* Post Type Archives
|
26 |
+
* Author Archives
|
27 |
+
* (Custom) Taxonomy Archives or Taxonomy Term Archives
|
28 |
+
* Search results
|
29 |
+
* 404 Page
|
30 |
+
* Front Page
|
31 |
+
* bbPress User Profiles
|
32 |
+
* Languages (qTranslate, Transposh, WPML)
|
33 |
+
* **Any combination of the above**
|
34 |
+
* Merge new sidebars with others, replace others or simply add them to your theme manually with a template tag
|
35 |
* Create complex content with nested sidebars
|
36 |
* Private sidebars only for members
|
37 |
* Schedule sidebars for later publishing
|
38 |
|
39 |
+
= Builtin Plugin Support =
|
40 |
+
|
41 |
+
* bbPress (v2.0.2+)
|
42 |
+
* qTranslate (v2.5.29+)
|
43 |
+
* Transposh Translation Filter (v0.8.2+)
|
44 |
+
* WPML Multilingual Blog/CMS (v2.4.3+)
|
45 |
+
|
46 |
= Translations =
|
47 |
|
48 |
* Danish (da_DK): [Joachim Jensen](http://www.intox.dk/)
|
49 |
* Italian (it_IT): [Luciano Del Fico](http://www.myweb2.it/)
|
50 |
+
* Lithuanian (lt_LT): [Vincent G](http://host1free.com/)
|
51 |
|
52 |
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.
|
53 |
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/).
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 1.0 =
|
95 |
+
|
96 |
+
* Added: plugin rewritten to flexible modular system
|
97 |
+
* Added: builtin support for bbpress, qtranslate, transposh, wpml
|
98 |
+
* Added: lithuanian translation
|
99 |
+
* Fixed: all present rules now dependent of each other
|
100 |
+
* Fixed: sidebar update messages
|
101 |
+
* Fixed: specific hooks now not sitewide
|
102 |
+
* Fixed: better use of meta cache
|
103 |
+
* Fixed: dir structure
|
104 |
+
* Fixed: unexpected output notice on plugin activation
|
105 |
+
|
106 |
= 0.8.3 =
|
107 |
|
108 |
* Added: Danish and Italian translation
|
style.css
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
.icon32-posts-sidebar {
|
2 |
-
background:transparent url('icon-32.png') no-repeat !important;
|
3 |
-
}
|
4 |
-
/*#preview-action {
|
5 |
-
display:none !important;
|
6 |
-
}*/
|
|
|
|
|
|
|
|
|
|
|
|
uninstall.php
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if(!defined('WP_UNINSTALL_PLUGIN')) {
|
3 |
exit();
|
4 |
}
|
@@ -16,4 +20,3 @@ foreach($posts as $post) {
|
|
16 |
wp_delete_post($post->ID, true);
|
17 |
}
|
18 |
|
19 |
-
?>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
if(!defined('WP_UNINSTALL_PLUGIN')) {
|
7 |
exit();
|
8 |
}
|
20 |
wp_delete_post($post->ID, true);
|
21 |
}
|
22 |
|
|
update_db.php
CHANGED
@@ -1,7 +1,17 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function cas_run_db_update($current_version) {
|
4 |
-
|
5 |
if(current_user_can('update_plugins')) {
|
6 |
|
7 |
// Get current plugin db version
|
@@ -52,6 +62,8 @@ function cas_run_db_update($current_version) {
|
|
52 |
* Version 0 -> 0.8
|
53 |
* Introduces database version management, adds preficed keys to metadata
|
54 |
*
|
|
|
|
|
55 |
*/
|
56 |
function cas_update_to_08($return) {
|
57 |
global $wpdb;
|
@@ -94,5 +106,3 @@ function cas_update_to_08($return) {
|
|
94 |
$return = true;
|
95 |
|
96 |
}
|
97 |
-
|
98 |
-
?>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
*/
|
5 |
|
6 |
+
/**
|
7 |
+
*
|
8 |
+
* Run updates
|
9 |
+
*
|
10 |
+
* @param type $current_version
|
11 |
+
* @return boolean
|
12 |
+
*/
|
13 |
function cas_run_db_update($current_version) {
|
14 |
+
|
15 |
if(current_user_can('update_plugins')) {
|
16 |
|
17 |
// Get current plugin db version
|
62 |
* Version 0 -> 0.8
|
63 |
* Introduces database version management, adds preficed keys to metadata
|
64 |
*
|
65 |
+
* @global type $wpdb
|
66 |
+
* @param type $return
|
67 |
*/
|
68 |
function cas_update_to_08($return) {
|
69 |
global $wpdb;
|
106 |
$return = true;
|
107 |
|
108 |
}
|
|
|
|
walker.php
CHANGED
@@ -10,6 +10,10 @@
|
|
10 |
*/
|
11 |
class CAS_Walker_Checklist extends Walker {
|
12 |
|
|
|
|
|
|
|
|
|
13 |
function __construct($tree_type, $db_fields) {
|
14 |
|
15 |
$this->tree_type = $tree_type;
|
@@ -17,16 +21,33 @@ class CAS_Walker_Checklist extends Walker {
|
|
17 |
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
public function start_lvl(&$output, $depth, $args) {
|
21 |
$indent = str_repeat("\t", $depth);
|
22 |
$output .= "$indent<ul class='children'>\n";
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
public function end_lvl(&$output, $depth, $args) {
|
26 |
$indent = str_repeat("\t", $depth);
|
27 |
$output .= "$indent</ul>\n";
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
public function start_el(&$output, $term, $depth, $args) {
|
31 |
extract($args);
|
32 |
|
@@ -56,6 +77,12 @@ class CAS_Walker_Checklist extends Walker {
|
|
56 |
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
public function end_el(&$output, $term, $depth, $args) {
|
60 |
$output .= "</li>\n";
|
61 |
}
|
@@ -66,6 +93,8 @@ class CAS_Walker_Checklist extends Walker {
|
|
66 |
*
|
67 |
* Show terms checklist
|
68 |
*
|
|
|
|
|
69 |
*/
|
70 |
function cas_terms_checklist($post_id = 0, $args = array()) {
|
71 |
$defaults = array(
|
@@ -121,6 +150,12 @@ function cas_terms_checklist($post_id = 0, $args = array()) {
|
|
121 |
*
|
122 |
* Show checklist for popular terms
|
123 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
*/
|
125 |
function cas_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
|
126 |
global $post_ID;
|
@@ -158,6 +193,8 @@ function cas_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ec
|
|
158 |
*
|
159 |
* Show posts checklist
|
160 |
*
|
|
|
|
|
161 |
*/
|
162 |
function cas_posts_checklist($post_id = 0, $args = array()) {
|
163 |
$defaults = array(
|
@@ -207,5 +244,3 @@ function cas_posts_checklist($post_id = 0, $args = array()) {
|
|
207 |
// Then the rest of them
|
208 |
echo call_user_func_array(array(&$walker, 'walk'), array($posts, 0, $args));
|
209 |
}
|
210 |
-
|
211 |
-
?>
|
10 |
*/
|
11 |
class CAS_Walker_Checklist extends Walker {
|
12 |
|
13 |
+
/**
|
14 |
+
* @param type $tree_type
|
15 |
+
* @param type $db_fields
|
16 |
+
*/
|
17 |
function __construct($tree_type, $db_fields) {
|
18 |
|
19 |
$this->tree_type = $tree_type;
|
21 |
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* @param type $output
|
26 |
+
* @param type $depth
|
27 |
+
* @param type $args
|
28 |
+
*/
|
29 |
public function start_lvl(&$output, $depth, $args) {
|
30 |
$indent = str_repeat("\t", $depth);
|
31 |
$output .= "$indent<ul class='children'>\n";
|
32 |
}
|
33 |
|
34 |
+
/**
|
35 |
+
* @param type $output
|
36 |
+
* @param type $depth
|
37 |
+
* @param type $args
|
38 |
+
*/
|
39 |
public function end_lvl(&$output, $depth, $args) {
|
40 |
$indent = str_repeat("\t", $depth);
|
41 |
$output .= "$indent</ul>\n";
|
42 |
}
|
43 |
|
44 |
+
/**
|
45 |
+
* @param type $output
|
46 |
+
* @param type $term
|
47 |
+
* @param type $depth
|
48 |
+
* @param type $args
|
49 |
+
* @return type
|
50 |
+
*/
|
51 |
public function start_el(&$output, $term, $depth, $args) {
|
52 |
extract($args);
|
53 |
|
77 |
|
78 |
}
|
79 |
|
80 |
+
/**
|
81 |
+
* @param string $output
|
82 |
+
* @param type $term
|
83 |
+
* @param type $depth
|
84 |
+
* @param type $args
|
85 |
+
*/
|
86 |
public function end_el(&$output, $term, $depth, $args) {
|
87 |
$output .= "</li>\n";
|
88 |
}
|
93 |
*
|
94 |
* Show terms checklist
|
95 |
*
|
96 |
+
* @param type $post_id
|
97 |
+
* @param type $args
|
98 |
*/
|
99 |
function cas_terms_checklist($post_id = 0, $args = array()) {
|
100 |
$defaults = array(
|
150 |
*
|
151 |
* Show checklist for popular terms
|
152 |
*
|
153 |
+
* @global type $post_ID
|
154 |
+
* @param type $taxonomy
|
155 |
+
* @param type $default
|
156 |
+
* @param type $number
|
157 |
+
* @param type $echo
|
158 |
+
* @return type
|
159 |
*/
|
160 |
function cas_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
|
161 |
global $post_ID;
|
193 |
*
|
194 |
* Show posts checklist
|
195 |
*
|
196 |
+
* @param type $post_id
|
197 |
+
* @param type $args
|
198 |
*/
|
199 |
function cas_posts_checklist($post_id = 0, $args = array()) {
|
200 |
$defaults = array(
|
244 |
// Then the rest of them
|
245 |
echo call_user_func_array(array(&$walker, 'walk'), array($posts, 0, $args));
|
246 |
}
|
|
|
|