/** * Returns the singleton instance * * @return \WP_User_Frontend */ function wpuf() { return WP_User_Frontend::init(); }
{ $access_level = wpuf_get_option('admin_access', 'wpuf_general', 'read'); return current_user_can($access_level); } /** * Load the translation file for current language. * * @since version 0.7 * @author Tareq Hasan */ function load_textdomain() { load_plugin_textdomain('wpuf', false, dirname(plugin_basename(__FILE__)) . '/languages/'); } /** * The main logging function * * @uses error_log * @param string $type type of the error. e.g: debug, error, info * @param string $msg */ public static function log($type = '', $msg = '') { if (WP_DEBUG == true) { $msg = sprintf("[%s][%s] %s\n", date('d.m.Y h:i:s'), $type, $msg); error_log($msg, 3, dirname(__FILE__) . '/log.txt'); } } } WP_User_Frontend::init();