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

  1. der-burger
    Posted 3 years ago #


    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


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Download Monitor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic