PluginProbe
URL Params / 2.3
URL Params v2.3
trunk 1.6 1.7 1.8 2.0 2.1 2.2 2.3 2.4 2.5 2.5-review
← All changes | urlparams.php +6 -11 2.42.3 View file →
@@ -2,9 +2,9 @@
2 2 /*
3 3 Plugin Name: URL Params
4 4 Plugin URI: http://asandia.com/wordpress-plugins/urlparams/
5 5 Description: Short Code to grab any URL Parameter
6 -Version: 2.4
6 +Version: 2.3
7 7 Author: Jeremy B. Shapiro
8 8 Author URI: http://www.asandia.com/
9 9 */
10 10
@@ -9,9 +9,9 @@
9 9 */
10 10
11 11 /*
12 12 URL Params (Wordpress Plugin)
13 -Copyright (C) 2011-2023 Jeremy Shapiro
13 +Copyright (C) 2011-2022 Jeremy Shapiro
14 14
15 15 */
16 16
17 17 // error_reporting(E_ALL); // Helpful for checking for warnings that are TYPICALLY hidden but may be present on some installs
@@ -55,13 +55,10 @@
55 55 if(!$return) {
56 56 $return = $attributes['default'];
57 57 }
58 58
59 - if(($attr = $attributes['attr'])
60 - // Don't allow setting attributes for javascript events, i.e. onclick
61 - && !preg_match('/^on/', $attr)
62 - ) {
63 - $return = ' ' . $attr . '="' . $return . '" ';
59 + if($attributes['attr']) {
60 + $return = ' ' . $attributes['attr'] . '="' . $return . '" ';
64 61
65 62 if($attributes['htmltag']) {
66 63 $tagName = $attributes['htmltag'];
67 64
@@ -67,14 +64,12 @@
67 64
68 65 foreach(array_keys($defaults) as $key) {
69 66 unset($attributes[$key]);
70 67 }
68 +
71 69 $otherAttributes = "";
72 70 foreach($attributes as $key => $val) {
73 - // Don't allow setting attributes for javascript events, i.e. onclick
74 - if(!preg_match('/^on/', $key)) {
75 - $otherAttributes .= " $key=\"$val\"";
76 - }
71 + $otherAttributes .= " $key=\"$val\"";
77 72 }
78 73
79 74 $return = "<$tagName $otherAttributes $return".($content ? ">$content</$tagName>" : "/>");
80 75 }