Changeset 3426055
- Timestamp:
- 12/23/2025 09:57:42 AM (3 months ago)
- Location:
- slug-search-and-admin-columns
- Files:
-
- 25 added
- 2 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/admin (added)
-
tags/1.0.1/admin/css (added)
-
tags/1.0.1/admin/css/admin.css (added)
-
tags/1.0.1/admin/css/index.php (added)
-
tags/1.0.1/admin/images (added)
-
tags/1.0.1/admin/images/speedy-go.gif (added)
-
tags/1.0.1/admin/images/wysiwyg-character-limit-for-acf.png (added)
-
tags/1.0.1/admin/index.php (added)
-
tags/1.0.1/admin/js (added)
-
tags/1.0.1/admin/js/admin.js (added)
-
tags/1.0.1/admin/js/index.php (added)
-
tags/1.0.1/admin/templates (added)
-
tags/1.0.1/admin/templates/index.php (added)
-
tags/1.0.1/admin/templates/settings-page.php (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/class-ssac-columns.php (added)
-
tags/1.0.1/includes/class-ssac-search.php (added)
-
tags/1.0.1/includes/class-ssac-settings.php (added)
-
tags/1.0.1/includes/helpers.php (added)
-
tags/1.0.1/includes/index.php (added)
-
tags/1.0.1/index.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/slug-search-and-admin-columns.php (added)
-
tags/1.0.1/uninstall.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/slug-search-and-admin-columns.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
slug-search-and-admin-columns/trunk/readme.txt
r3425226 r3426055 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 08 Stable tag: 1.0.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 166 166 == Changelog == 167 167 168 = 1.0.0 - 2025-12-03 = 168 = 1.0.1 - 2025-12-23 = 169 * Fix: Fatal error on activation due to missing OpenSSL extension check. 170 * Fix: Function name collision with other plugins from same author. 171 * Improvement: Added file existence check for admin assets. 172 173 = 1.0.0 - 2025-12-22 = 169 174 * **Initial Release** 170 175 * Slug search functionality with exact and partial match modes … … 181 186 == Upgrade Notice == 182 187 188 = 1.0.1 = 189 Critical update: Fixes fatal error on activation and potential conflicts with other plugins. Upgrade immediately. 190 183 191 = 1.0.0 = 184 192 Initial release of Slug Search and Admin Columns. Install to enhance your WordPress admin with powerful content management tools! -
slug-search-and-admin-columns/trunk/slug-search-and-admin-columns.php
r3425226 r3426055 3 3 * Plugin Name: Slug Search and Admin Columns 4 4 * Description: Adds slug search and ID/slug columns to WP admin. Settings included. 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Author: Code and Core 7 7 * Author URI: https://codeandcore.com … … 49 49 50 50 // Enqueue admin CSS with file modification time for cache busting 51 $css_path = plugin_dir_path(__FILE__) . 'admin/css/admin.css'; 52 $css_ver = file_exists($css_path) ? filemtime($css_path) : '1.0.0'; 53 51 54 wp_enqueue_style( 52 55 'ssac-admin-css', 53 56 plugins_url('admin/css/admin.css', __FILE__), 54 57 [], 55 filemtime(plugin_dir_path(__FILE__) . 'admin/css/admin.css')58 $css_ver 56 59 ); 57 60 58 61 // Enqueue admin JavaScript with jQuery dependency 62 $js_path = plugin_dir_path(__FILE__) . 'admin/js/admin.js'; 63 $js_ver = file_exists($js_path) ? filemtime($js_path) : '1.0.0'; 64 59 65 wp_enqueue_script( 60 66 'ssac-admin-js', 61 67 plugins_url('admin/js/admin.js', __FILE__), 62 68 ['jquery'], 63 filemtime(plugin_dir_path(__FILE__) . 'admin/js/admin.js'),69 $js_ver, 64 70 true 65 71 ); … … 142 148 143 149 // Send tracking event 144 code_core_send_tracking('Optin Yes', ['source' => $context]);150 ssac_code_core_send_tracking('Optin Yes', ['source' => $context]); 145 151 } 146 152 … … 237 243 238 244 // Store plugin version 239 $info = code_core_get_plugin_info();245 $info = ssac_code_core_get_plugin_info(); 240 246 if (!empty($info['Version'])) { 241 247 update_option('code_core_plugin_version', $info['Version']); … … 243 249 244 250 // Send tracking event 245 code_core_send_tracking('Optin Yes');251 ssac_code_core_send_tracking('Optin Yes'); 246 252 247 253 } elseif ($tracking_action === 'deny') { … … 271 277 { 272 278 // Store plugin version 273 $info = code_core_get_plugin_info();279 $info = ssac_code_core_get_plugin_info(); 274 280 if (!empty($info['Version'])) { 275 281 update_option('code_core_plugin_version', $info['Version']); … … 277 283 278 284 // Send activation tracking event 279 code_core_send_tracking('Activation');285 ssac_code_core_send_tracking('Activation'); 280 286 } 281 287 register_activation_hook(__FILE__, 'ssac_plugin_activation'); … … 294 300 { 295 301 // Send deactivation tracking event 296 code_core_send_tracking('Deactivation');302 ssac_code_core_send_tracking('Deactivation'); 297 303 } 298 304 register_deactivation_hook(__FILE__, 'ssac_plugin_deactivation'); … … 308 314 * @return void 309 315 */ 310 function code_core_uninstall_handler()316 function ssac_code_core_uninstall_handler() 311 317 { 312 318 // Send uninstall tracking event 313 code_core_send_tracking('Uninstall');319 ssac_code_core_send_tracking('Uninstall'); 314 320 315 321 // Clean up options … … 317 323 delete_option('code_core_plugin_version'); 318 324 } 319 register_uninstall_hook(__FILE__, ' code_core_uninstall_handler');325 register_uninstall_hook(__FILE__, 'ssac_code_core_uninstall_handler'); 320 326 321 327 … … 331 337 * @return void 332 338 */ 333 function code_core_track_plugin_update($upgrader, $options)339 function ssac_code_core_track_plugin_update($upgrader, $options) 334 340 { 335 341 // Check if this is a plugin update … … 355 361 356 362 // Get version information 357 $info = code_core_get_plugin_info();363 $info = ssac_code_core_get_plugin_info(); 358 364 $new_version = isset($info['Version']) ? $info['Version'] : ''; 359 365 $old_version = get_option('code_core_plugin_version', 'unknown'); 360 366 361 367 // Send update tracking event 362 code_core_send_tracking(368 ssac_code_core_send_tracking( 363 369 'plugin_update', 364 370 [ … … 373 379 } 374 380 } 375 add_action('upgrader_process_complete', ' code_core_track_plugin_update', 10, 2);381 add_action('upgrader_process_complete', 'ssac_code_core_track_plugin_update', 10, 2); 376 382 377 383 … … 385 391 * @return array Plugin data array 386 392 */ 387 function code_core_get_plugin_info()393 function ssac_code_core_get_plugin_info() 388 394 { 389 395 static $info = null; … … 417 423 * @return array Complete payload array 418 424 */ 419 function code_core_build_payload($event, $extra = [])420 { 421 $info = code_core_get_plugin_info();425 function ssac_code_core_build_payload($event, $extra = []) 426 { 427 $info = ssac_code_core_get_plugin_info(); 422 428 423 429 // Build base payload with site information … … 452 458 * @return string Base64 encoded encrypted data 453 459 */ 454 function code_and_core_encrypt_payload($data, $secret_key) 455 { 460 function ssac_code_and_core_encrypt_payload($data, $secret_key) 461 { 462 // Check for openssl support 463 if (!function_exists('openssl_encrypt') || !function_exists('openssl_random_pseudo_bytes')) { 464 return false; 465 } 466 456 467 // Generate random initialization vector 457 468 $iv = openssl_random_pseudo_bytes(16); … … 482 493 * @return void 483 494 */ 484 function code_core_send_tracking($event, $extra = [])495 function ssac_code_core_send_tracking($event, $extra = []) 485 496 { 486 497 // Only send if user has opted in … … 490 501 491 502 // Build payload 492 $payload = code_core_build_payload($event, $extra);503 $payload = ssac_code_core_build_payload($event, $extra); 493 504 $secret_key = '8jF29fLkmsP0V9as0DLkso2P9lKs29FjsP4k2F0lskM2k'; 494 505 495 506 // Encrypt payload and create signature 496 $encrypted = code_and_core_encrypt_payload($payload, $secret_key); 507 $encrypted = ssac_code_and_core_encrypt_payload($payload, $secret_key); 508 509 if ($encrypted === false) { 510 return; 511 } 512 497 513 $signature = hash_hmac('sha256', $encrypted, $secret_key); 498 514
Note: See TracChangeset
for help on using the changeset viewer.