diff --git a/modules/feature-interwiki-links.php b/modules/feature-interwiki-links.php index 93dad01..7469494 100644 --- a/modules/feature-interwiki-links.php +++ b/modules/feature-interwiki-links.php @@ -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; +} + ?>