[Plugin: WordPress Download Monitor] Bug concerning shortcode option "digforcats" (dlm v3.
-
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
- The topic ‘[Plugin: WordPress Download Monitor] Bug concerning shortcode option "digforcats" (dlm v3.’ is closed to new replies.