Last active
August 29, 2015 14:05
-
-
Save SeanChDavis/068c9deee5223f46981f to your computer and use it in GitHub Desktop.
EDD Software Licensing Admin Notice Based on License State/Existence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * If the license is not entered or is not valid, show notice. For use with EDD Software Licensing | |
| * | |
| * CHANGE sample_ TO YOUR FUNCTION PREFIX | |
| * | |
| * https://easydigitaldownloads.com/extensions/software-licensing/?ref=184 | |
| */ | |
| function sample_admin_notice() { | |
| $license_key = trim( get_option( 'sample_license_key' ) ); | |
| $status = get_option( 'sample_license_status' ); | |
| if ( false == $license_key || 'valid' != $status ) { ?> | |
| <div class="update-nag"> | |
| <p>This should be a good start.</p> | |
| </div> | |
| <?php | |
| } | |
| } | |
| add_action( 'admin_notices', 'sample_admin_notice' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment