Skip to content

Instantly share code, notes, and snippets.

@manhleo93
Created July 21, 2017 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manhleo93/603ad2f1d6206482378b7c9fc0e27103 to your computer and use it in GitHub Desktop.
Save manhleo93/603ad2f1d6206482378b7c9fc0e27103 to your computer and use it in GitHub Desktop.
// show notice if license is invalid
if ( ! $this->license_is_valid() ) {
if ( $this->get_license_key() == '' ) {
$message = __( '<b>Warning!</b> You didn\'t set your %s license key yet, which means you\'re missing out on updates and support! <a href="%s">Enter your license key</a> or <a href="%s" target="_blank">get a license here</a>.' );
} else {
$message = __( '<b>Warning!</b> Your %s license is inactive which means you\'re missing out on updates and support! <a href="%s">Activate your license</a> or <a href="%s" target="_blank">get a license here</a>.' );
}
?>
<div class="notice notice-error yoast-notice-error">
<p><?php printf( __( $message, $this->product->get_text_domain() ), $this->product->get_item_name(), $this->product->get_license_page_url(), $this->product->get_tracking_url( 'activate-license-notice' ) ); ?></p>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment