From 068a229e30e07a54bdc1537b57fee9ab0b9cfdc5 Mon Sep 17 00:00:00 2001 From: Russell Fair Date: Wed, 1 Mar 2017 23:48:26 +0000 Subject: [PATCH] add version check for WordPress version less than 4.7.0 --- functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.php b/functions.php index 0fabad5..87ac658 100644 --- a/functions.php +++ b/functions.php @@ -24,6 +24,13 @@ if (version_compare('5.6.4', phpversion(), '>=')) { $sage_error(__('You must be using PHP 5.6.4 or greater.', 'sage'), __('Invalid PHP version', 'sage')); } +/** + * Ensure compatible version of WordPress is used + */ +if (version_compare('4.7.0', get_bloginfo('version'), '>=')) { + $sage_error(__('You must be using WordPress 4.7.0 or greater.', 'sage'), __('Invalid WordPress version', 'sage')); +} + /** * Ensure dependencies are loaded */