| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical. |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
if ( ! $show_button ) { |
| 8 |
return; |
| 9 |
} |
| 10 |
|
| 11 |
$show_button_icon = isset( $show_button_icon ) ? $show_button_icon : false; |
| 12 |
$button_icon_position = isset( $button_icon_position ) ? $button_icon_position : ''; |
| 13 |
?> |
| 14 |
|
| 15 |
<a class="docs-cat-link-btn betterdocs-category-link-btn" href="<?php echo esc_attr( esc_url( $permalink ) ); ?>"> |
| 16 |
<?php |
| 17 |
if ( $show_button_icon && ( $button_icon_position === 'before' || $button_icon_position === 'left' ) ) { |
| 18 |
betterdocs()->template_helper->icon( $button_icon, true ); |
| 19 |
} |
| 20 |
|
| 21 |
echo wp_kses_post( $button_text ); |
| 22 |
|
| 23 |
if ( $show_button_icon && ( $button_icon_position === 'after' || $button_icon_position === 'right' ) ) { |
| 24 |
betterdocs()->template_helper->icon( $button_icon, true ); |
| 25 |
} |
| 26 |
?> |
| 27 |
</a> |
| 28 |
|