Changeset 223951
- Timestamp:
- 04/01/2010 09:58:09 AM (16 years ago)
- File:
-
- 1 edited
-
wp-headline/trunk/wp-headline.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-headline/trunk/wp-headline.php
r223938 r223951 33 33 function onTheContent($content='') 34 34 { 35 $content = preg_replace_callback('/\[h(?:\s*=\s*( ?P<h>[1-5])\s*)?\](?P<t>.*)\[\/h\]/imS', array($this, 'onH'), $content);36 $content = preg_replace_callback('/\[hl(?:\s*=\s*( ?P<h>[1-5])\s*)?\](?P<t>.*)\[\/hl\]/imS', array($this, 'onHL'), $content);35 $content = preg_replace_callback('/\[h(?:\s*=\s*([1-5])\s*)?\](.*)\[\/h\]/imS', array($this, 'onH'), $content); 36 $content = preg_replace_callback('/\[hl(?:\s*=\s*([1-5])\s*)?\](.*)\[\/hl\]/imS', array($this, 'onHL'), $content); 37 37 38 38 if( isset($this->_headlines[0]) ) … … 52 52 { 53 53 $h = 1; 54 if( !empty($in['h']) ) 55 $h = $in['h']; 56 57 $title = $in['t']; 54 if( isset($in[2]) ) 55 { 56 $h = $in[1]; 57 $title = $in[2]; 58 } 59 else 60 $title = $in[1]; 61 58 62 59 63 return '<h' . ($h+1) . '>' . $title . '</h' . ($h+1) . '>'; … … 63 67 { 64 68 $h = 1; 65 if( !empty($in['h']) ) 66 $h = $in['h']; 67 68 $title = $in['t']; 69 if( isset($in[2]) ) 70 { 71 $h = $in[1]; 72 $title = $in[2]; 73 } 74 else 75 $title = $in[1]; 69 76 70 77 $name = preg_replace('/\s+/mS', '_', $title);
Note: See TracChangeset
for help on using the changeset viewer.