Changeset 9096 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php
- Timestamp:
- 08/08/2019 10:04:27 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php
r9089 r9096 14 14 */ 15 15 class Author_Card { 16 17 /** 18 * List of known problematic IPs 19 * 20 * @var array 21 */ 22 public static $iffy_ips = [ 23 '2.240.', 24 '2.241.', 25 '5.102.170.', 26 '5.102.171.', 27 '38.78.', 28 '47.15.', 29 '49.50.124.', 30 '65.33.104.38', 31 '71.41.77.202', 32 '76.73.108.', 33 '80.131.192.168', 34 '87.188.', 35 '91.228.', 36 '91.238.', 37 '94.103.41.', 38 '109.123.', 39 '110.55.1.251', 40 '110.55.4.248', 41 '116.193.162.', 42 '119.235.251.', 43 '159.253.145.183', 44 '173.171.9.190', 45 '173.234.140.18', 46 '188.116.36.', 47 '217.87.', 48 ]; 49 16 50 /** 17 51 * Displays information about the author of the current plugin. … … 251 285 */ 252 286 protected static function link_ip( $ip ) { 253 return sprintf( 254 '<a href="%1$s">%2$s</a>', 287 288 $ip_data = array( 289 'name' => $ip, 290 'tooltip' => '', 291 'iffy' => false, 292 ); 293 294 foreach ( self::$iffy_ips as $check_ip ) { 295 if ( false !== strpos( $ip, $check_ip ) ) { 296 $ip_data['name'] .= '*'; 297 $ip_data['tooltip'] = 'This IP may be problematic and has been used for abuse before.'; 298 $ip_data['iffy'] = true; 299 } 300 } 301 302 $output_ip = sprintf( 303 '<a href="%1$s" title="%2$s">%3$s</a>', 255 304 esc_url( add_query_arg( array( 256 305 'post_type' => 'plugin', 257 306 's' => $ip, 258 307 ), admin_url( 'edit.php' ) ) ), 259 $ip 308 $ip_data['tooltip'], 309 $ip_data['name'] 260 310 ); 311 312 return $output_ip; 261 313 } 262 314
Note: See TracChangeset
for help on using the changeset viewer.