1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-10-31 21:33:00 +00:00

Add is_interwiki_link method

This commit is contained in:
Starbeamrainbowlabs 2019-01-05 13:04:52 +00:00
parent 1d14fdc85d
commit 08ff3772b3
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -89,4 +89,14 @@ function interwiki_get_pagename_url($interwiki_pagename) {
); );
} }
/**
* Returns whether a given pagename is an interwiki link or not.
* Note that this doesn't guarantee that it's a _valid_ interwiki link - only that it looks like one :P
* @param string $pagename The page name to check.
* @return boolean Whether the given page name is an interwiki link or not.
*/
function is_interwiki_link($pagename) {
return strpos($pagename, ":") !== false;
}
?> ?>