Plugin Directory

Changeset 3426055


Ignore:
Timestamp:
12/23/2025 09:57:42 AM (3 months ago)
Author:
codeandcore
Message:

Critical update

Location:
slug-search-and-admin-columns
Files:
25 added
2 edited

Legend:

Unmodified
Added
Removed
  • slug-search-and-admin-columns/trunk/readme.txt

    r3425226 r3426055  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 1.0.0
     8Stable tag: 1.0.1
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    166166== Changelog ==
    167167
    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 =
    169174* **Initial Release**
    170175* Slug search functionality with exact and partial match modes
     
    181186== Upgrade Notice ==
    182187
     188= 1.0.1 =
     189Critical update: Fixes fatal error on activation and potential conflicts with other plugins. Upgrade immediately.
     190
    183191= 1.0.0 =
    184192Initial 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  
    33 * Plugin Name: Slug Search and Admin Columns
    44 * Description: Adds slug search and ID/slug columns to WP admin. Settings included.
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Author: Code and Core
    77 * Author URI: https://codeandcore.com
     
    4949
    5050    // 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
    5154    wp_enqueue_style(
    5255        'ssac-admin-css',
    5356        plugins_url('admin/css/admin.css', __FILE__),
    5457        [],
    55         filemtime(plugin_dir_path(__FILE__) . 'admin/css/admin.css')
     58        $css_ver
    5659    );
    5760
    5861    // 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
    5965    wp_enqueue_script(
    6066        'ssac-admin-js',
    6167        plugins_url('admin/js/admin.js', __FILE__),
    6268        ['jquery'],
    63         filemtime(plugin_dir_path(__FILE__) . 'admin/js/admin.js'),
     69        $js_ver,
    6470        true
    6571    );
     
    142148
    143149    // Send tracking event
    144     code_core_send_tracking('Optin Yes', ['source' => $context]);
     150    ssac_code_core_send_tracking('Optin Yes', ['source' => $context]);
    145151}
    146152
     
    237243
    238244        // Store plugin version
    239         $info = code_core_get_plugin_info();
     245        $info = ssac_code_core_get_plugin_info();
    240246        if (!empty($info['Version'])) {
    241247            update_option('code_core_plugin_version', $info['Version']);
     
    243249
    244250        // Send tracking event
    245         code_core_send_tracking('Optin Yes');
     251        ssac_code_core_send_tracking('Optin Yes');
    246252
    247253    } elseif ($tracking_action === 'deny') {
     
    271277{
    272278    // Store plugin version
    273     $info = code_core_get_plugin_info();
     279    $info = ssac_code_core_get_plugin_info();
    274280    if (!empty($info['Version'])) {
    275281        update_option('code_core_plugin_version', $info['Version']);
     
    277283
    278284    // Send activation tracking event
    279     code_core_send_tracking('Activation');
     285    ssac_code_core_send_tracking('Activation');
    280286}
    281287register_activation_hook(__FILE__, 'ssac_plugin_activation');
     
    294300{
    295301    // Send deactivation tracking event
    296     code_core_send_tracking('Deactivation');
     302    ssac_code_core_send_tracking('Deactivation');
    297303}
    298304register_deactivation_hook(__FILE__, 'ssac_plugin_deactivation');
     
    308314 * @return void
    309315 */
    310 function code_core_uninstall_handler()
     316function ssac_code_core_uninstall_handler()
    311317{
    312318    // Send uninstall tracking event
    313     code_core_send_tracking('Uninstall');
     319    ssac_code_core_send_tracking('Uninstall');
    314320
    315321    // Clean up options
     
    317323    delete_option('code_core_plugin_version');
    318324}
    319 register_uninstall_hook(__FILE__, 'code_core_uninstall_handler');
     325register_uninstall_hook(__FILE__, 'ssac_code_core_uninstall_handler');
    320326
    321327
     
    331337 * @return void
    332338 */
    333 function code_core_track_plugin_update($upgrader, $options)
     339function ssac_code_core_track_plugin_update($upgrader, $options)
    334340{
    335341    // Check if this is a plugin update
     
    355361
    356362    // Get version information
    357     $info = code_core_get_plugin_info();
     363    $info = ssac_code_core_get_plugin_info();
    358364    $new_version = isset($info['Version']) ? $info['Version'] : '';
    359365    $old_version = get_option('code_core_plugin_version', 'unknown');
    360366
    361367    // Send update tracking event
    362     code_core_send_tracking(
     368    ssac_code_core_send_tracking(
    363369        'plugin_update',
    364370        [
     
    373379    }
    374380}
    375 add_action('upgrader_process_complete', 'code_core_track_plugin_update', 10, 2);
     381add_action('upgrader_process_complete', 'ssac_code_core_track_plugin_update', 10, 2);
    376382
    377383
     
    385391 * @return array Plugin data array
    386392 */
    387 function code_core_get_plugin_info()
     393function ssac_code_core_get_plugin_info()
    388394{
    389395    static $info = null;
     
    417423 * @return array Complete payload array
    418424 */
    419 function code_core_build_payload($event, $extra = [])
    420 {
    421     $info = code_core_get_plugin_info();
     425function ssac_code_core_build_payload($event, $extra = [])
     426{
     427    $info = ssac_code_core_get_plugin_info();
    422428
    423429    // Build base payload with site information
     
    452458 * @return string Base64 encoded encrypted data
    453459 */
    454 function code_and_core_encrypt_payload($data, $secret_key)
    455 {
     460function 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
    456467    // Generate random initialization vector
    457468    $iv = openssl_random_pseudo_bytes(16);
     
    482493 * @return void
    483494 */
    484 function code_core_send_tracking($event, $extra = [])
     495function ssac_code_core_send_tracking($event, $extra = [])
    485496{
    486497    // Only send if user has opted in
     
    490501
    491502    // Build payload
    492     $payload = code_core_build_payload($event, $extra);
     503    $payload = ssac_code_core_build_payload($event, $extra);
    493504    $secret_key = '8jF29fLkmsP0V9as0DLkso2P9lKs29FjsP4k2F0lskM2k';
    494505
    495506    // 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
    497513    $signature = hash_hmac('sha256', $encrypted, $secret_key);
    498514
Note: See TracChangeset for help on using the changeset viewer.