Plugin Directory

Changeset 2468341


Ignore:
Timestamp:
02/03/2021 09:55:31 PM (5 years ago)
Author:
csorbamedia
Message:

Tested up to 5.6.1, small fix for WPForms

Location:
protect-wp-files/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protect-wp-files/trunk/includes/pwpf-hooks.php

    r2454153 r2468341  
    553553
    554554    // This will handle the download action
    555     public function PWPF_handle_private_download(){
    556 
    557         $file   =    get_query_var('pwpf_file');
     555    public function PWPF_handle_private_download($query = ''){
     556
     557        $file = '';
     558        if($query){
     559            $vars = $query->query_vars;
     560            if(array_key_exists('pwpf_file', $vars)){
     561                $file = $query->query_vars['pwpf_file'];
     562            }
     563        }
    558564
    559565        if(is_user_logged_in() && !empty($file)){
     
    845851     * This will handle the thumbnails
    846852     */
    847     public function PWPF_handle_private_thumb(){
    848 
    849         global $pagenow;
    850         $thumbnail   =    get_query_var('pwpf_thumb');
     853    public function PWPF_handle_private_thumb($query = ''){
     854
     855        $thumbnail = '';
     856        if($query){
     857            $vars = $query->query_vars;
     858            if(array_key_exists('pwpf_thumb', $vars)){
     859                $thumbnail = $query->query_vars['pwpf_thumb'];
     860            }
     861        }
    851862
    852863        if(current_user_can( 'upload_files' ) && is_user_logged_in() && !empty($thumbnail)){
  • protect-wp-files/trunk/pwpf.php

    r2454153 r2468341  
    99 *
    1010 * @link              mauwen.com
    11  * @since             1.2.2.4
     11 * @since             1.2.2.5
    1212 * @package           Protect WordPress Uploads
    1313 *
     
    1616 * Plugin URI:        mauwen.com
    1717 * Description:       This plugin makes it possible to upload and protect WordPress uploads and keep them safe for non-registered users.
    18  * Version:           1.2.2.4
     18 * Version:           1.2.2.5
    1919 * Author:            Stephan Csorba
    2020 * Author URI:        https://www.linkedin.com/in/skcsorba/
  • protect-wp-files/trunk/readme.txt

    r2454153 r2468341  
    11=== Protect WordPress Uploads ===
    2 Contributors: csorbamedia
     2Contributors: csorbamedia, mauwen
    33Tags: secure downloads, protection, uploads, uploads folder
    44Requires at least: 4.8
    5 Tested up to: 5.6
     5Tested up to: 5.6.1
    66Requires PHP: 5.6
    77License: GPLv3
     
    103103== Changelog ==
    104104
     105= 1.2.2.5 =
     106- Tested with WP 5.6.1
     107- Small fix, issue with WP Forms.
     108
    105109= 1.2.2.4 =
    106110- Added documentation link.
Note: See TracChangeset for help on using the changeset viewer.