summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c0b122f)
The get_small_link_with_id() function behaves the same as
get_small_link() except that the returned <a> tag includes an ID
suitable for use with jQuery.
- function get_small_link() {
- /* Args are <alt text>, <format>, [<stuff> ...] */
+ function get_small_link_with_id() {
+ /* Args are <id>, <alt text>, <format>, [<stuff> ...] */
+ $id = array_shift($args);
+ if (isset($id)) $id = " id=\"$id\"";
$html = htmlspecialchars(array_shift($args));
$url = array_shift($args);
$html = htmlspecialchars(array_shift($args));
$url = array_shift($args);
- return vsprintf("<a class=\"small noprint\" href=\"$url\">$html</a>\n", $args);
+ return vsprintf("<a$id class=\"small noprint\" href=\"$url\">$html</a>\n", $args);
+ }
+
+ function get_small_link() {
+ /* Args are <alt text>, <format>, [<stuff> ...] */
+ $args = func_get_args();
+ array_unshift($args, null);
+ return call_user_func_array("get_small_link_with_id", $args);
}
function small_link() {
}
function small_link() {