File "Update_Available.php"
Full Path: /home/magiggjm/magistvandroids.com/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/uplink/src/Uplink/Messages/Update_Available.php
File size: 1.1 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/**
* @license GPL-2.0-or-later
*
* Modified using {@see https://github.com/BrianHenryIE/strauss}.
*/
namespace KadenceWP\KadenceBlocks\StellarWP\Uplink\Messages;
use KadenceWP\KadenceBlocks\StellarWP\ContainerContract\ContainerInterface;
use KadenceWP\KadenceBlocks\StellarWP\Uplink\Resources\Resource;
class Update_Available extends Message_Abstract {
/**
* Resource instance.
*
* @var Resource
*/
protected $resource;
/**
* Constructor.
*
* @since 1.0.0
*
* @param Resource $resource Resource instance.
* @param ContainerInterface|null $container Container instance.
*/
public function __construct( Resource $resource, $container = null ) {
parent::__construct( $container );
$this->resource = $resource;
}
/**
* @inheritDoc
*/
public function get(): string {
$link = sprintf( '<a href="%s">', $this->resource->get_home_url() ?: '' );
return sprintf(
esc_html__( 'There is an update for %s. You\'ll need to %scheck your license%s to have access to updates, downloads, and support.', '%TEXTDOMAIN%' ),
$this->resource->get_name(),
$link,
'</a>'
);
}
}