mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Add is_interwiki_link method
This commit is contained in:
parent
1d14fdc85d
commit
08ff3772b3
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue