settings = $settings; $pattern = stripslashes($settings->get_option('url_pattern')); $this->url_pattern = empty($pattern) ? '.*' : $pattern; } /* * Checks if a URL is annotable. * * url - a URL string; defaults to current url (optional). * * returns whether or not the annotator should be injected in this url. * */ function url_is_annotatable($url=null) { $url or $url = OkfnUtils::current_url(); $match= preg_match("/" . $this->url_pattern . "/", $url); return $match; } } ?>