footer
2 years ago
sui-accordion.php
10 months ago
sui-box-header.php
3 years ago
sui-button.php
4 years ago
sui-checkbox.php
3 years ago
sui-footer.php
3 years ago
sui-header.php
4 years ago
sui-icon.php
5 years ago
sui-notice.php
3 years ago
sui-row.php
3 years ago
sui-select.php
3 years ago
sui-settings-row.php
5 months ago
sui-tabs.php
3 years ago
sui-tutorials.php
4 years ago
sui-button.php
35 lines
| 1 | <?php |
| 2 | /** |
| 3 | * SUI Button. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.3.0 |
| 7 | */ |
| 8 | |
| 9 | $class = empty( $class ) ? '' : $class; |
| 10 | $class .= ' sui-button'; |
| 11 | $class .= ! empty( $color ) ? ' sui-button-' . $color : ''; |
| 12 | $class .= ! empty( $outlined ) ? ' sui-button-ghost' : ''; |
| 13 | |
| 14 | if ( 'link' === $type ) : |
| 15 | ?> |
| 16 | <a |
| 17 | class="<?php echo esc_attr( $class ); ?>" |
| 18 | <?php echo empty( $id ) ? '' : 'id="' . esc_attr( $id ) . '"'; ?> |
| 19 | > |
| 20 | <?php echo esc_html( $label ); ?> |
| 21 | </a> |
| 22 | |
| 23 | <?php elseif ( 'button' === $type ) : ?> |
| 24 | <button |
| 25 | class="<?php echo esc_attr( $class ); ?>" |
| 26 | <?php echo empty( $id ) ? '' : 'id="' . esc_attr( $id ) . '"'; ?> |
| 27 | > |
| 28 | <span class="sui-loading-text"> |
| 29 | <?php echo esc_html( $label ); ?> |
| 30 | </span> |
| 31 | <span class="sui-icon-loader sui-loading" aria-hidden="true"></span> |
| 32 | </button> |
| 33 | <?php |
| 34 | endif; |
| 35 |