WordPress.org

Ready to get started?Download WordPress

Forums

Download Monitor
Bug concerning shortcode option "digforcats" (dlm v3. (1 post)

  1. der-burger
    Member
    Posted 1 year ago #

    Hi,

    thanks for the amazing plugin. I encountered a bug using the shortcode option "digforcats" like this:

    [downloads query="category=1&digforcats=false"]

    My category "1" has child categories, and they are shown although I used digforcats=false.

    The problem is in the function get_downloads() in shortcodes.php at line 266. The input gets parsed by wp_parse_args, after which $r['digforcats'] is a string. This string is used later (line 322/327) as condition for an if-statement, and evaluates always to true. My fix (line 288) works like this:

    // handle boolean value 'digforcats'
    $r['digforcats'] = strtolower($r['digforcats']) == "false" ? false : true;

    Greets, Markus

    http://wordpress.org/extend/plugins/download-monitor/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic