Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2868
Prose.php
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:15 PM
2014-11-21 21:15:53 (UTC+0)
Size
697 B
Referenced Files
None
Subscribers
None
Prose.php
View Options
<?php
$wgExtensionFunctions
[]
=
"wfProseExtension"
;
function
wfProseExtension
()
{
$GLOBALS
[
'wgParser'
]->
setHook
(
"prose"
,
"ProseExtension"
);
}
function
ProseExtension
(
$text
,
$params
=
array
(),
$parser
=
null
)
{
global
$wgVersion
;
$parsed
=
$parser
->
parse
(
$text
,
$parser
->
mTitle
,
$parser
->
mOptions
);
if
(
version_compare
(
$wgVersion
,
"1.7alpha"
)
>=
0
)
{
$attribs
=
Sanitizer
::
validateTagAttributes
(
$params
,
'div'
);
}
else
{
$attribs
=
array
();
}
if
(
isset
(
$attribs
[
'class'
]))
{
$attribs
[
'class'
]
=
'prose '
.
$attribs
[
'class'
];
}
else
{
$attribs
[
'class'
]
=
'prose'
;
}
return
wfOpenElement
(
'div'
,
$attribs
)
.
"
\n
"
.
$parsed
->
getText
()
.
"
\n
</div>"
;
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2440
Default Alt Text
Prose.php (697 B)
Attached To
Mode
T8810: create <prose> tag
Attached
Detach File
Event Timeline
Log In to Comment