PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 3.15.0
GiveWP – Donation Plugin and Fundraising Platform v3.15.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
← All changes | src/MultiFormGoals/MultiFormGoal/Shortcode.php +13 -1 2.30.03.15.0 View file →
@@ -25,12 +25,16 @@
25 25
26 26 /**
27 27 * Returns Shortcode markup
28 28 *
29 + * @since 3.7.0 Sanitize attributes
30 + * @since 3.0.3 Use static function on array_map callback to pass the id as reference for _give_redirect_form_id to prevent warnings on PHP 8.0.1 or plus
29 31 * @since 2.9.0
30 32 **/
31 33 public function renderCallback($attributes)
32 34 {
35 + $attributes = give_clean($attributes);
36 +
33 37 $attributes = $this->parseAttributes(
34 38 [
35 39 'ids' => [],
36 40 'tags' => [],
@@ -45,11 +49,19 @@
45 49 ],
46 50 $attributes,
47 51 'give_multi_form_goal'
48 52 );
53 +
49 54 $multiFormGoal = new MultiFormGoal(
50 55 [
51 - 'ids' => $attributes['ids'],
56 + 'ids' => array_map(
57 + static function ($id) {
58 + _give_redirect_form_id($id);
59 +
60 + return $id;
61 + },
62 + $attributes['ids']
63 + ),
52 64 'tags' => $attributes['tags'],
53 65 'categories' => $attributes['categories'],
54 66 'goal' => $attributes['goal'],
55 67 'enddate' => $attributes['enddate'],