HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/td-composer/mobile/includes/shortcodes/td_misc_shortcodes.php
<?php

// button
function td_button( $atts, $content = null ) {

	extract(
        shortcode_atts(
			array(
				'label' => '', /* text button */
				'color' => '', /* button color */
				'size' => '', /* empty for default size or */
				'type' => '', /* empty for default type or */
				'target' => '', /* empty for _self or */
				'link' => '' /* empty for # or */
			),
			$atts
		)
	);

	// target
	if ( $target != '' ) {
		$target = 'target="' . esc_attr($target) . '" ';
	} else {
		$target = '';
	}

	// link
	if ( $link != '' ) {
		$link = 'href="' . esc_url($link) . '" ';
	} else {
		$link = 'href="#"';
	}

	// parse the label
	if ( !empty($content) ) {
		$label = $content;
	}

	return '<a class="td-buttons"' . $link . $target . '>' . $label . '</a>';
}

add_shortcode('button', 'td_button');