Plugin Directory

Changeset 3420466


Ignore:
Timestamp:
12/15/2025 07:26:52 PM (3 months ago)
Author:
logtivity
Message:

fixes log action texts

Location:
logtivity
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • logtivity/tags/3.3.6/Core/Errors/Logtivity_Error_Log.php

    r3369912 r3420466  
    197197                return false;
    198198            }
    199         }
    200 
    201         return true;
     199
     200            return true;
     201        }
     202
     203        // Exceptions are not rate limited
     204        return false;
    202205    }
    203206
  • logtivity/tags/3.3.6/Core/Services/Logtivity_Check_For_Disabled_Individual_Logs.php

    r3369912 r3420466  
    3232    public function __construct()
    3333    {
    34         add_action('wp_logtivity_instance', [$this, 'handle'], 10, 2);
     34        add_action('wp_logtivity_instance', [$this, 'handle'], 10, 1);
    3535    }
    3636
  • logtivity/tags/3.3.6/Core/Services/Logtivity_Logger.php

    r3382713 r3420466  
    121121    public function setAction(string $action): self
    122122    {
    123         $this->action = $action;
     123        $this->action = ucfirst(str_replace(['-', '_'], ' ', strtolower(trim($action))));
    124124
    125125        return $this;
  • logtivity/tags/3.3.6/Core/Services/Logtivity_Rest_Endpoints.php

    r3369912 r3420466  
    5555                        $response[$lastCheckinOption]        = $response[$lastCheckinOption]['date'] ?? null;
    5656                        $response['logtivity_checkin_delay'] = $options->checkinDelay;
     57                        $response['version']                 = $this->getLogtivityVersion();
    5758
    5859                        return $response;
     
    8182                $keys = explode(' ', $authHeader);
    8283                if (count($keys) == 2 && $keys[0] == 'Bearer') {
    83 
    8484                    $payload = $this->parseToken($keys[1], $apikey);
    8585
     
    149149        return false;
    150150    }
     151
     152    /**
     153     * @return string
     154     */
     155    protected function getLogtivityVersion(): string
     156    {
     157        $path = WP_PLUGIN_DIR . '/logtivity/logtivity.php';
     158        if (is_file($path)) {
     159            $pluginData = get_plugin_data($path);
     160            $version    = $pluginData['Version'] ?? 'Unknown';
     161        }
     162
     163        return $version ?? 'Logtivity not available';
     164    }
    151165}
  • logtivity/tags/3.3.6/logtivity.php

    r3402686 r3420466  
    66 * Description:       Record activity logs and errors logs across all your WordPress sites.
    77 * Author:            Logtivity
    8  * Version:           3.3.5
     8 * Version:           3.3.6
    99 * Text Domain:       logtivity
    1010 * Requires at least: 4.7
     
    4545     * @var string
    4646     */
    47     protected string $version = '3.3.5';
     47    protected string $version = '3.3.6';
    4848
    4949    /**
  • logtivity/tags/3.3.6/readme.txt

    r3402686 r3420466  
    55Requires at least: 6.6
    66Tested up to: 6.8
    7 Stable tag: 3.3.5
     7Stable tag: 3.3.6
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    262262
    263263== Changelog ==
     264
     265= 3.3.6 =
     266  * Include plugin version number in api responses
     267  * Stricter consistency with action texts
     268  * Fix: Exceptions were never being logged
    264269
    265270= 3.3.5 25 Nov 2025 =
  • logtivity/trunk/Core/Errors/Logtivity_Error_Log.php

    r3369912 r3420466  
    197197                return false;
    198198            }
    199         }
    200 
    201         return true;
     199
     200            return true;
     201        }
     202
     203        // Exceptions are not rate limited
     204        return false;
    202205    }
    203206
  • logtivity/trunk/Core/Services/Logtivity_Check_For_Disabled_Individual_Logs.php

    r3369912 r3420466  
    3232    public function __construct()
    3333    {
    34         add_action('wp_logtivity_instance', [$this, 'handle'], 10, 2);
     34        add_action('wp_logtivity_instance', [$this, 'handle'], 10, 1);
    3535    }
    3636
  • logtivity/trunk/Core/Services/Logtivity_Logger.php

    r3382713 r3420466  
    121121    public function setAction(string $action): self
    122122    {
    123         $this->action = $action;
     123        $this->action = ucfirst(str_replace(['-', '_'], ' ', strtolower(trim($action))));
    124124
    125125        return $this;
  • logtivity/trunk/Core/Services/Logtivity_Rest_Endpoints.php

    r3369912 r3420466  
    5555                        $response[$lastCheckinOption]        = $response[$lastCheckinOption]['date'] ?? null;
    5656                        $response['logtivity_checkin_delay'] = $options->checkinDelay;
     57                        $response['version']                 = $this->getLogtivityVersion();
    5758
    5859                        return $response;
     
    8182                $keys = explode(' ', $authHeader);
    8283                if (count($keys) == 2 && $keys[0] == 'Bearer') {
    83 
    8484                    $payload = $this->parseToken($keys[1], $apikey);
    8585
     
    149149        return false;
    150150    }
     151
     152    /**
     153     * @return string
     154     */
     155    protected function getLogtivityVersion(): string
     156    {
     157        $path = WP_PLUGIN_DIR . '/logtivity/logtivity.php';
     158        if (is_file($path)) {
     159            $pluginData = get_plugin_data($path);
     160            $version    = $pluginData['Version'] ?? 'Unknown';
     161        }
     162
     163        return $version ?? 'Logtivity not available';
     164    }
    151165}
  • logtivity/trunk/logtivity.php

    r3402686 r3420466  
    66 * Description:       Record activity logs and errors logs across all your WordPress sites.
    77 * Author:            Logtivity
    8  * Version:           3.3.5
     8 * Version:           3.3.6
    99 * Text Domain:       logtivity
    1010 * Requires at least: 4.7
     
    4545     * @var string
    4646     */
    47     protected string $version = '3.3.5';
     47    protected string $version = '3.3.6';
    4848
    4949    /**
  • logtivity/trunk/readme.txt

    r3402686 r3420466  
    55Requires at least: 6.6
    66Tested up to: 6.8
    7 Stable tag: 3.3.5
     7Stable tag: 3.3.6
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    262262
    263263== Changelog ==
     264
     265= 3.3.6 =
     266  * Include plugin version number in api responses
     267  * Stricter consistency with action texts
     268  * Fix: Exceptions were never being logged
    264269
    265270= 3.3.5 25 Nov 2025 =
Note: See TracChangeset for help on using the changeset viewer.