Linux 软件免费装

WP-Content Listener

开发者 webheadllc
更新时间 2018年8月26日 05:31
捐献地址: 去捐款
PHP版本: 3.9.0 及以上
WordPress版本: 4.9.8
版权: GPLv2 or later
版权网址: 版权信息

标签

pdf private analytics track access protect hide doc downloads wp-content

下载

0.1 0.2 0.3 0.4

详情介绍:

NOTE: The .htaccess file needs to be writable in the wp-content sub-directories. This is meant to be a simple plugin that lets you: CAUTION: This plugin may cause your website to load slower if you have pages that include a lot of protected images. Each image that is loaded needs to load WordPress files and check if a user is logged in, if the directory is protected, and run other custom code you may have. Usage To protect file downloads select the folders you want to protect in the WP-Content Listener's settings and check the protect checkbox. To track file downloads you'll need a Google Analytics Universal account. On WP-Content Listener's settings page, select the folders you want to track, click the option to track, and enter your Google Analtyics Universal ID. You can view visits and other stats on the Google Analytics website under Behavior -> Events. The Event will be in the "Files" Category and "Download" action. To run custom code when a file is accessed or downloaded select the folders you want to run the custom code in the settings. Then write your code and hook into the 'wpcl_before_file_download' action. If you need to protect your files with specific access rules (more than just if the user is logged in or not), hook into the 'wpcl_access_filter' filter. This plugin did at one time work on IIS, but I cannot offer any support if anything does not currently work. Try at your own risk. For servers that don't use .htaccess to redirect, you'll basically need to redirect anything going to your protected directory to go to /wpcl-listen-slug/?f=$1 where $1 is the path to the file after relative to your protected directory.

屏幕截图:

  • WP-Content-Listener Settings

更新日志:

0.4 Added filter to change the directory in which this plugin monitors. 0.3 Updated to be compatible with PHP 7. 0.2 Fix for IIS web.config - changed to redirect file url instead of rewrite.\ Added description on where tracking ends up in Google Analytics. 0.1 Initial release.