Shortcodes

$shortcodes = array(
	array(
		'tag'      => 'footprint',
		'callback' => array( $this, 'footprint_callback' ),
	),
);

parent::set_shortcodes( $shortcodes );
/**
 * Outputs the Carbon Footprint Badge
 *
 * @return string The constructed footprint string.
 */
public function footprint_callback(): string {
	$footprint = '<div id="wcb" class="carbonbadge"></div>';
	return $footprint;
}

First PublishedAugust 14, 2023
Last UpdatedAugust 14, 2023