| @@ -5,8 +5,10 @@ | ||
| 5 | 5 | * @package Timetics |
| 6 | 6 | */ |
| 7 | 7 | namespace Timetics\Core\DummyData\Provider; |
| 8 | 8 | |
| 9 | +defined( 'ABSPATH' ) || exit; | |
| 10 | + | |
| 9 | 11 | /** |
| 10 | 12 | * Internet Faker Class |
| 11 | 13 | */ |
| 12 | 14 | class Internet { |
| @@ -32,9 +34,9 @@ | ||
| 32 | 34 | public static function username() { |
| 33 | 35 | $strLength = strlen( self::$str ); |
| 34 | 36 | |
| 35 | 37 | // Generate a random start position within the valid range |
| 36 | - $start_pos = mt_rand( 0, max( 0, $strLength - 5 ) ); | |
| 38 | + $start_pos = wp_rand( 0, max( 0, $strLength - 5 ) ); | |
| 37 | 39 | |
| 38 | 40 | // Extract the random substring using substr() |
| 39 | 41 | $random_substring = substr( self::$str, $start_pos, 5 ); |
| 40 | 42 | |