get( 'tag_prefix' ); $instance = array(); if (!is_array( $keywords )) { $keywords = explode( ',', $keywords ); } foreach ($keywords as $keyword) { $keyword = trim( $keyword ); $regex = '#^' . $prefix . '#'; if (preg_match( $regex, $keyword )) { $instance[] = $keyword; } } } return $instance; } /** * Checks if a URL is an image * * @param string * @return URL */ function isImage( $url ) { $result = preg_match( '#(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$#', $url ); return $result; } /** * Checks if a URL is a Flash file * * @param string * @return URL */ function isFlash( $url ) { $result = preg_match( '#\.swf$#', $url ); return $result; } } ?>