Changeset 3348662
- Timestamp:
- 08/22/2025 12:59:31 PM (7 months ago)
- Location:
- ts-search-slug
- Files:
-
- 13 added
- 3 edited
-
tags/1.0.7 (added)
-
tags/1.0.7/css (added)
-
tags/1.0.7/css/backend.css (added)
-
tags/1.0.7/index.php (added)
-
tags/1.0.7/js (added)
-
tags/1.0.7/js/backend.js (added)
-
tags/1.0.7/languages (added)
-
tags/1.0.7/languages/ts-search-slug-de_DE.l10n.php (added)
-
tags/1.0.7/languages/ts-search-slug-de_DE.mo (added)
-
tags/1.0.7/languages/ts-search-slug-de_DE.po (added)
-
tags/1.0.7/license.txt (added)
-
tags/1.0.7/plugin.php (added)
-
tags/1.0.7/readme.txt (added)
-
trunk/js/backend.js (modified) (2 diffs)
-
trunk/plugin.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ts-search-slug/trunk/js/backend.js
r3341948 r3348662 3 3 // Daten, die gesendet werden sollen 4 4 var data = { 5 action: 'tsinf_get_state_list', // Der Action-Name, der in WordPress registriert wird6 security: TS_Search_Slug_JS_Obj.nonce, // Das Nonce-Feld für die Sicherheit5 action: 'tsinf_get_state_list', 6 security: TS_Search_Slug_JS_Obj.nonce, 7 7 }; 8 8 … … 35 35 36 36 }).fail(function(xhr, status, error) { 37 // Hier wird ein Fehler verarbeitet38 37 console.error('Fehler:', error); 39 38 }); -
ts-search-slug/trunk/plugin.php
r3342238 r3348662 7 7 Author: Tobias Spiess 8 8 Author URI: https://www.spiess-informatik.de 9 Version: 1.0. 69 Version: 1.0.7 10 10 Text-Domain: ts-search-slug 11 11 Domain Path: /languages … … 246 246 public static function append_admin_columns($columns) { 247 247 $columns['ts_search_slug_post_name'] = __('Postname/Slug', 'ts-search-slug'); 248 $columns['ts_search_slug_post_id'] = __('ID', 'ts-search-slug'); 248 249 $all_options = get_option('ts_search_slug_settings'); 250 if(is_array($all_options) && isset($all_options['post_types_id'])) { 251 $post_type_ids = $all_options['post_types_id']; 252 if(is_array($post_type_ids) && in_array(get_post_type(), $post_type_ids)) { 253 $columns['ts_search_slug_post_id'] = __('ID', 'ts-search-slug'); 254 } 255 } 249 256 250 257 return $columns; … … 278 285 public static function make_custom_columns_sortable($columns) { 279 286 $columns['ts_search_slug_post_name'] = 'post_name'; 280 $columns['ts_search_slug_post_id'] = 'ID'; 281 287 288 $all_options = get_option('ts_search_slug_settings'); 289 if(is_array($all_options) && isset($all_options['post_types_id'])) { 290 $post_type_ids = $all_options['post_types_id']; 291 if(is_array($post_type_ids) && in_array(get_post_type(), $post_type_ids)) { 292 $columns['ts_search_slug_post_id'] = 'ID'; 293 } 294 } 295 282 296 return $columns; 283 297 } … … 298 312 299 313 if(!is_string($post_type) || (is_string($post_type) && strlen($post_type) < 1)) { 300 $post_type = $wp_query->query['post_type'];314 $post_type = (isset($wp_query->query['post_type'])) ? $wp_query->query['post_type'] : ''; 301 315 } 302 316 … … 355 369 } 356 370 357 371 358 372 359 373 return $where; -
ts-search-slug/trunk/readme.txt
r3342246 r3348662 32 32 33 33 == Changelog == 34 ### 1.0.7 35 - Fix PHP Warning "Undefined Array Key post_type" 36 - Fix Bug "Post ID" settings do not hide ID Column 37 34 38 ### 1.0.6 35 39 - Clean up code
Note: See TracChangeset
for help on using the changeset viewer.