PluginProbe
FeedWordPress / 2011.0211.2
FeedWordPress v2011.0211.2
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
← All changes | feedwordpresshtml.class.php +10 -11 trunk2011.0211.2 View file →
@@ -1,7 +1,7 @@
1 -<?php
1 +<?php
2 2 class FeedWordPressHTML {
3 - static function attributeRegex ($tag, $attr) {
3 + function attributeRegex ($tag, $attr) {
4 4 return ":(
5 5 (<($tag)\s+[^>]*)
6 6 ($attr)=
7 7 )
@@ -15,11 +15,11 @@
15 15 )
16 16 :ix";
17 17 } /* function FeedWordPressHTML::attributeRegex () */
18 18
19 - static function attributeMatch ($matches) {
19 + function attributeMatch ($matches) {
20 20 for ($i = 0; $i <= 12; $i++) :
21 - if ( !isset($matches[$i])) :
21 + if (!isset($matches[$i])) :
22 22 $matches[$i] = '';
23 23 endif;
24 24 endfor;
25 25
@@ -37,9 +37,9 @@
37 37 "after_attribute" => $suffix,
38 38 );
39 39 } /* function FeedWordPressHTML::attributeMatch () */
40 40
41 - static function tagWithAttributeRegex ($tag, $attr, $value, $closing = true) {
41 + function tagWithAttributeRegex ($tag, $attr, $value) {
42 42 return ":(
43 43 (<($tag)\s+[^>]*)
44 44 ($attr)=
45 45 )
@@ -49,18 +49,17 @@
49 49 \\6([^>]*>)
50 50 |
51 51 \s*((?!/>)($value))
52 52 ([^>]*>)
53 - )".($closing ? "
53 + )
54 54 (((?!</($tag)>).)*)
55 55 (</($tag)>)
56 - " : "")."
57 56 :ix";
58 57 } /* FeedWordPressHTML::tagWithAttributeRegex () */
59 58
60 - static function tagWithAttributeMatch ($matches, $closing = true) {
59 + function tagWithAttributeMatch ($matches) {
61 60 for ($i = 0; $i <= 21; $i++) :
62 - if ( !isset($matches[$i])) :
61 + if (!isset($matches[$i])) :
63 62 $matches[$i] = '';
64 63 endif;
65 64 endfor;
66 65
@@ -77,10 +76,10 @@
77 76 "suffix" => $matches[6].$suffix,
78 77 "before_attribute" => $matches[2],
79 78 "after_attribute" => $suffix,
80 79 "open_tag" => $matches[1].$matches[6].$value.$matches[6].$suffix,
81 - "content" => ($closing ? $matches[17] : NULL),
82 - "close_tag" => ($closing ? $matches[20] : NULL),
80 + "content" => $matches[17],
81 + "close_tag" => $matches[20],
83 82 );
84 83
85 84 } /* FeedWordPressHTML::tagWithAttributeMatch () */
86 85 } /* class FeedWordPressHTML */