From: Anthony Talarico Date: Fri, 30 Nov 2018 16:27:17 +0000 (-0500) Subject: fixing filter sanitize int to string for the category slug X-Git-Tag: v1.6.2^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=42fb57b614ef6703d077b7878f9c7e5b41c09e6c;p=WP-Plugins%2Fglm-blocks.git fixing filter sanitize int to string for the category slug --- diff --git a/glm-blocks.php b/glm-blocks.php index 1625e65..7ae7557 100644 --- a/glm-blocks.php +++ b/glm-blocks.php @@ -99,13 +99,13 @@ if (!function_exists('fetch_blocks_by_slug')) { } } function action_item_blocks( $atts ){ - + $out = ''; extract(shortcode_atts( array('category' => '-1'), $atts, 'glm-blocks') ); if(function_exists('fetch_blocks_by_slug')): - $category = filter_var($atts['category'], FILTER_VALIDATE_INT); + $category = filter_var($atts['category'], FILTER_SANITIZE_STRING); fetch_blocks_by_slug($category); $blocks = fetch_blocks_by_slug($category); $out .= '
';