Changeset 541230
- Timestamp:
- 05/08/2012 08:55:13 AM (14 years ago)
- Location:
- qtranslate-slug-with-widget
- Files:
-
- 5 added
- 3 edited
-
tags/0.6 (added)
-
tags/0.6/CHANGELOG (added)
-
tags/0.6/COPYING (added)
-
tags/0.6/qtranslate-slug-with-widget.php (added)
-
tags/0.6/readme.txt (added)
-
trunk/CHANGELOG (modified) (1 diff)
-
trunk/qtranslate-slug-with-widget.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
qtranslate-slug-with-widget/trunk/CHANGELOG
r346654 r541230 1 1 qTranslate slug with widget 2 3 = 0.6 (2012.05.08) = 4 * Bugfix in saving category fields (line 849) 5 * Slug translation improved by codetavern & ilpiac 6 7 = 0.5 (2011.09.17) = 8 * Category slug translation implemented by Matteo Plebani: matteo@comunicrea.com 9 * Un-tested attempt to support custom post types (including WP E-commerce products) 10 * Un-tested attempt to remove translated slugs when a post is deleted 2 11 3 12 = 0.4 (2011.02.17) = -
qtranslate-slug-with-widget/trunk/qtranslate-slug-with-widget.php
r439452 r541230 4 4 Plugin URI: http://www.3dolab.net/261/qtranslateslug-plugin-widget 5 5 Plugin Description: Allows to define a slug for each language. Widget for language selection 6 Version: 0. 57 Author: 3DOlab 6 Version: 0.6 7 Author: 3DOlab, teonsight 8 8 Author URI: http://www.3dolab.net 9 9 … … 111 111 112 112 if (isset($q['name'])) { 113 $type = QTS_POST; 114 $slug = $q['name']; 115 $param = 'p'; 116 $get_link = 'get_permalink'; 117 unset($new_q['name']); 113 $id = qTranslateSlug_get_page_by_path($q['name'], $lang); 114 if ($id) { 115 unset($new_q['name']); 116 $q = $new_q; 117 $q['page_id'] = $id; 118 $get_link = 'get_page_link'; 119 } else { 120 $type = QTS_POST; 121 $slug = $q['name']; 122 $param = 'p'; 123 $get_link = 'get_permalink'; 124 unset($new_q['name']); 125 } 118 126 } else if (isset($q['pagename'])) { 119 127 //$type = QTS_PAGE; … … 139 147 $get_link = 'get_tag_link'; 140 148 unset($new_q['tag']); 141 } 149 }else{ 150 $path = trim(preg_replace('/\?(.*)/', '', $_SERVER['REQUEST_URI']), '/'); 151 $id = qTranslateSlug_get_page_by_path($path, $lang); 152 if ($id) { 153 if (isset ($q['attachment'])) { 154 unset($q['attachment']); 155 unset($new_q['attachment']); 156 } 157 $q = $new_q; 158 $q['page_id'] = $id; 159 $get_link = 'get_page_link'; 160 } 161 } 142 162 143 163 if (isset($type)){ … … 336 356 add_filter('category_link', 'qTranslateSlug_category_link', 0, 2); 337 357 add_filter('tag_link', 'qTranslateSlug_tag_link'); 358 add_filter('term_link', 'qTranslateSlug_category_link', 0, 2); 338 359 //add_filter('the_permalink', 'qTranslateSlug_convertURL', 0, 4); 339 360 … … 347 368 remove_filter('category_link', 'qtrans_convertURL'); 348 369 remove_filter('tag_link', 'qtrans_convertURL'); 370 remove_filter('term_link', 'qtrans_convertURL'); 349 371 //remove_filter('the_permalink', 'qtrans_convertURL'); 350 372 } … … 847 869 } 848 870 849 function save_qTranslateSlug_category_fi leds( $term_id ) {871 function save_qTranslateSlug_category_fields( $term_id ) { 850 872 global $wpdb, $q_config; 851 873 -
qtranslate-slug-with-widget/trunk/readme.txt
r441989 r541230 1 1 === qTranslate slug with widget === 2 Contributors: 3dolab 2 Contributors: 3dolab, teonsight 3 3 Homepage: http://www.3dolab.net/en/qtranslateslug-plugin-widget 4 4 Tags: qtranslate, translation, slug, sidebar, widget, link, permalink 5 5 Requires at least: 2.8 6 6 Tested up to: 3.2.1 7 Stable tag: 0. 57 Stable tag: 0.6 8 8 9 9 Multiple language slugs for qTranslate, now equipped with its own widget for language selection. … … 20 20 http://www.3dolab.net/en/qtranslateslug-plugin-widget 21 21 22 = What's new? version 0.5 (2011.09.17) = 23 * Category slug translation implemented by Matteo Plebani: matteo@comunicrea.com 24 * Un-tested attempt to support custom post types (including WP E-commerce products) 25 * Un-tested attempt to remove translated slugs when a post is deleted 22 = What's new? version 0.6 (2012.05.08) = 23 * Bugfix in saving category fields (line 849) 24 * Slug translation improved by codetavern & ilpiac 26 25 27 26 See the CHANGELOG for more information … … 42 41 ... 43 42 44 the function qTranslateSlug_generateLanguageSelectCode() could be manually inserted wherever into the template, to use it without widget 43 the function qTranslateSlug_generateLanguageSelectCode() could be manually inserted wherever into the template, to use it without widgets 45 44 46 45 47 46 == CHANGELOG == 47 48 = 0.6 (2012.05.08) = 49 * Bugfix in saving category fields (line 849) 50 * Slug translation improved by codetavern & ilpiac 48 51 49 52 = 0.5 (2011.09.17) =
Note: See TracChangeset
for help on using the changeset viewer.