| 474 | | function a_button($label, $url, $classes = array(), $id = null, $name = null, $title = null) |
| 475 | | { |
| | 474 | /** |
| | 475 | * Conveniently outputs a button, supplying the a-btn class and also supplying the |
| | 476 | * "icon" span if 'icon' is in the $classes array. If a-link or a-arrow-btn is in the |
| | 477 | * classes array then a-btn is not supplied. |
| | 478 | * |
| | 479 | * You can now pass all of these arguments, plus the new target option, as a single |
| | 480 | * array parameter rather than passing a long list of parameters. None are mandatory. |
| | 481 | */ |
| | 482 | function a_button($label, $url = '#', $classes = array(), $id = null, $name = null, $title = null, $options = array()) |
| | 483 | { |
| | 484 | if (is_array($label)) |
| | 485 | { |
| | 486 | $options = $label; |
| | 487 | $label = a_get_option($options, 'label', null); |
| | 488 | $url = a_get_option($options, 'url', '#'); |
| | 489 | $classes = a_get_option($options, 'classes', array()); |
| | 490 | $id = a_get_option($options, 'id', null); |
| | 491 | $name = a_get_option($options, 'name', null); |
| | 492 | $title = a_get_option($options, 'title', null); |
| | 493 | $target = a_get_option($options, 'target', null); |
| | 494 | } |
| | 495 | else |
| | 496 | { |
| | 497 | $target = null; |
| | 498 | } |