Plugin Directory

Changeset 3356722


Ignore:
Timestamp:
09/05/2025 01:01:38 PM (7 months ago)
Author:
MooveAgency
Message:

Version 4.2.0 released

Location:
user-activity-tracking-and-log
Files:
71 added
3 edited

Legend:

Unmodified
Added
Removed
  • user-activity-tracking-and-log/trunk/class-moove-activity-shortcodes.php

    r3025589 r3356722  
    7777    public function get_location_details( $ip = false ) {
    7878        $response = false;
     79
    7980        if ( $ip ) :
    8081            $transient_key = 'uat_locdata_' . md5( $ip );
     
    8283            if ( ! $details ) :
    8384                try {
    84                     $url_link = "http://www.geoplugin.net/xml.gp?ip={$ip}";
    85                     $response = simplexml_load_file( $url_link );
     85                    $response = wp_remote_get(
     86                        'https://ipapi.co/'.$ip.'/json',
     87                        array(
     88                            'timeout'     => 30,
     89                            'httpversion' => '1.1',
     90                        )
     91                    );
     92
     93                    try {
     94                    $data = json_decode( $response['body'], true );
     95                  } catch ( Exception $ex ) {
     96                    $data = null;
     97                  }
     98
     99                  $loc = maybe_unserialize( $data );
     100
    86101                    $details  = array();
    87                     if ( $response ) :
     102                    if ( $loc && is_array( $loc ) && isset( $loc['ip'] ) ) :
    88103                        $details = array(
    89                             'ip'     => isset( $response->geoplugin_request ) ? strval( $response->geoplugin_request ) : $ip,
    90                             'city'   => isset( $response->geoplugin_city ) ? strval( $response->geoplugin_city ) : '',
    91                             'region' => isset( $response->geoplugin_region ) ? strval( $response->geoplugin_region ) : ''
     104                            'ip'     => isset( $loc['ip'] ) ? strval( $loc['ip'] ) : $ip,
     105                            'city'   => isset( $loc['city'] ) ? strval( $loc['city'] ) : '',
     106                            'region' => isset( $loc['region'] ) ? strval( $loc['region'] ) : ''
    92107                        );
    93108                    endif;
    94109
    95110                    if ( $details && is_array( $details ) && ! empty( $details ) ) :
    96                         $details = wp_json_encode( $details );
    97                         set_transient( $transient_key, $details, 30 * DAY_IN_SECONDS );
     111                        $_details = wp_json_encode( $details );
     112                        set_transient( $transient_key, $_details, 30 * DAY_IN_SECONDS );
     113                        $details = json_decode( json_encode( $details ) );
    98114                    else :
    99115                        $details = false;
  • user-activity-tracking-and-log/trunk/moove-activity.php

    r3252242 r3356722  
    55 *  Plugin URI: http://www.mooveagency.com
    66 *  Description: This plugin gives you the ability to track user activity on your website.
    7  *  Version: 4.1.9
     7 *  Version: 4.2.0
    88 *  Author: Moove Agency
    99 *  Author URI: http://www.mooveagency.com
     
    1818}
    1919
    20 define( 'MOOVE_UAT_VERSION', '4.1.9' );
     20define( 'MOOVE_UAT_VERSION', '4.2.0' );
    2121
    2222if ( ! defined( 'MOOVE_SHOP_URL' ) ) :
  • user-activity-tracking-and-log/trunk/readme.txt

    r3275917 r3356722  
    22Contributors: MooveAgency
    33Donate link: https://www.mooveagency.com/wordpress-plugins/user-activity-tracking-and-log/
    4 Stable tag: 4.1.9
     4Stable tag: 4.2.0
    55Tags: time tracking, activity log, analytics, statistics, stats
    66Requires at least: 4.3
     
    144144
    145145== Changelog ==
     146= 4.2.0: 5 September 2025 =
     147* GeoIP tool replaced
     148
    146149= 4.1.9: 7 Mar 2025 =
    147150* Admin improvements
Note: See TracChangeset for help on using the changeset viewer.