Created
June 27, 2018 19:36
-
-
Save Shelob9/ad7db4f594d2c1b1d288c1ae67844654 to your computer and use it in GitHub Desktop.
This file contains 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 (!version_compare(PHP_VERSION, '5.6.0', '>=')) { | |
function slug_php_version_nag() | |
{ | |
?> | |
<div class="notice notice-error"> | |
<p> | |
<?php _e('Your version of PHP is incompatible with YOUR PLUGIN and can not be used.', 'caldera-forms'); ?> | |
<?php printf(' <a href="https://your-plugin.com/php?utm_source=wp-admin&utm_campaign=php_deprecated&utm_source=admin-nag" target="__blank">%s</a>', | |
esc_html__('Learn More', 'slug') | |
) ?></p> | |
</div> | |
<?php | |
} | |
add_action('admin_notices', 'slug_php_version_nag'); | |
} |
This file contains 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
=== Your plugin === | |
Contributors: Shelob9 | |
Tags: hi-oy | |
Requires at least: 4.7 | |
Tested up to: 4.9.7 | |
Stable tag: 1.7.2 | |
License: GPLv2 | |
Requires PHP: 5.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, Josh. I saw this gist embedded at https://torquemag.io/2018/08/how-to-drop-legacy-php-support-in-wordpress-plugins/
For those who copy/paste without reading first, please change that
License
to addor any later version
-- better yet,GPL version 3 or any later version