Current Path: > home > transcarter > public_html > wp-content > > plugins > leadin > > public > data
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.135 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
class-filters.php | File | 6821 bytes | July 17 2025 21:06:25. | |
class-portal-options.php | File | 7275 bytes | July 17 2025 21:06:25. | |
class-user-metadata.php | File | 2470 bytes | July 17 2025 21:06:25. | |
class-user.php | File | 1344 bytes | July 17 2025 21:06:25. |
<?php namespace Leadin\data; /** * Static function that wraps the WordPress current user functions. */ class User { /** * Return the first role of the current user. If unauthenticated, return 'visitor'. */ public static function get_role() { global $current_user; if ( is_user_logged_in() ) { $user_roles = $current_user->roles; $user_role = array_shift( $user_roles ); } else { $user_role = 'visitor'; } return $user_role; } /** * Return true if the current user has the `manage_options` capability. */ public static function is_admin() { return current_user_can( 'manage_options' ); } /** * Set metadata for current user * * @param String $key metadata key to store data in. * @param String $data metadata value to store. */ public static function set_metadata( $key, $data ) { update_user_meta( get_current_user_id(), $key, $data ); } /** * Fetch metadata stored for this user by key * * @param String $key metadata to retrieve by the key. */ public static function get_metadata( $key ) { return get_user_meta( get_current_user_id(), $key, true ); } /** * Delete metadata associated with this user * * @param String $key key to delete metadata for. */ public static function delete_metadata( $key ) { delete_user_meta( get_current_user_id(), $key ); } }
SILENT KILLER Tool