开发者 | apos37 |
---|---|
更新时间 | 2025年6月3日 04:59 |
PHP版本: | 7.4 及以上 |
WordPress版本: | 6.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/eri-file-library
directory.Download counts are automatically recorded for each file. If you want to additionally track user interactions and dates, you will need to enable it. Navigate to Files > Settings, and select the "Enable User Tracking" option. Doing so will create a new table in your database where each download is logged. "Downloads" and "Report" pages will appear under Files in the admin menu where you can see your collected data.
Yes, there are plenty. The following hooks are available:
erifl_download_file_url
( String $url, Array $file, Integer $user_id, String $user_ip ) — Filter the URL for the file when a user is downloading it. $file contains the file data, $user_id is the ID of the user if they are logged in, and $user_ip is the IP address of the user if they are logged out.erifl_after_file_downloaded
( Array $file, String $url, Integer $user_id, String $user_ip ) — Action fired after a file has been downloaded. $file contains the file data, $url is the download URL, $user_id is the ID of the user, and $user_ip is the IP address of the user.erifl_user_meets_requirements
( Boolean $meets_requirements, Integer $file_id, Integer $user_id, Array $required_roles, String $required_meta_key ) — Filter whether the user meets the requirements for accessing the file. This filter allows modifying the result of the access check based on the user’s roles, meta key values, and any additional custom logic.erifl_classes
( Array $classes, Array $file, String $type ) — Filter the classes used in the file download link element. $file contains an array of file data, and $type specifies the type of link being displayed.erifl_download_icon
( String $default_icon, String $icon_type, Array $file, String $ext ) — Filter the icon used for file downloads. $icon_type specifies the icon type (e.g., 'logo-full', 'logo-file', 'uni', 'fa', 'cs'), $file contains the file data, and $ext is the file extension.erifl_downloaded_count_string
( String $downloaded_string, Integer $count, Array $file ) — Filter the string used to display the download count in the "post" type links. $count is the number of times the file was downloaded, and $file contains the file data.erifl_format_specific_prefixes
( Array $format_prefixes, Array $file, String $type ) — Filter the prefixes added to the displayed title of the link based on the file format. $file contains the file data, and $type specifies the link type (e.g., 'mp3', 'mp4').erifl_ip_lookup_path
( String $ip_address_link ) — Filter the link used for looking up a logged-out user's IP address on the Downloads page.erifl_where_used_post_types
( Array $post_types ) — Filter the post types used to look for where the shortcode is used. This feature is located at the bottom of the file edit screen.erifl_post_meta
( Array $meta ) — Filter the "post" display type meta html.We recommend using our website support forum as the primary method for requesting features and getting help. You can also reach out via our Discord support server or the WordPress.org support forum, but please note that WordPress.org doesn’t always notify us of new posts, so it’s not ideal for time-sensitive issues.