CVS リポジトリの参照
Diff of /pukiwiki/pukiwiki/plugin/color.inc.php
Parent Directory
| Revision Log
| Revision Graph
| Patch
6 |
// |
// |
7 |
// Text color plugin |
// Text color plugin |
8 |
|
|
9 |
|
// Allow CSS instead of font tag (XHTML 1.0 Transitional only) |
10 |
define('PLUGIN_COLOR_ALLOW_CSS', TRUE); // TRUE, FALSE |
define('PLUGIN_COLOR_ALLOW_CSS', TRUE); // TRUE, FALSE |
11 |
|
|
12 |
// ---- |
// ---- |
34 |
return '&color():Invalid color: ' . htmlspecialchars($col) . ';'; |
return '&color():Invalid color: ' . htmlspecialchars($col) . ';'; |
35 |
} |
} |
36 |
|
|
37 |
if ($html_transitional === TRUE && PLUGIN_COLOR_ALLOW_CSS === TRUE) { |
if (PLUGIN_COLOR_ALLOW_CSS === TRUE && $html_transitional === FALSE) { |
38 |
if ($bgcolor != '') $bgcolor = ';background-color:' . $bgcolor; |
if ($bgcolor != '') $bgcolor = ';background-color:' . $bgcolor; |
39 |
return '<span style="color:' . $color . $bgcolor . '">' . $text . '</span>'; |
return '<span style="color:' . $color . $bgcolor . '">' . $text . '</span>'; |
40 |
} else { |
} else { |
41 |
// Using <font> tag with: |
// NOTE: <font> tag become invalid from XHTML 1.1 |
|
// NG: XHTML 1.1 |
|
|
// OK: XHTML 1.0 Transitional |
|
42 |
if ($bgcolor != '') return '&color(): bgcolor (with CSS) not allowd;'; |
if ($bgcolor != '') return '&color(): bgcolor (with CSS) not allowd;'; |
43 |
return '<font color="' . $color . '">' . $text . '</font>'; |
return '<font color="' . $color . '">' . $text . '</font>'; |
44 |
} |
} |
|
Legend:
Removed from v.1.12 |
|
changed lines |
|
Added in v.1.14 |
|
|
|