run(); } return self::$init; } } $min_php = '5.6.0'; /** * Begins execution of the plugin * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * Also returns copy of the app object so 3rd party developers * can interact with the plugin's hooks contained within. **/ function Advance_Search_init() { return Advance_Search::init(); } /** * Show admin notice if php version is lower than required version. */ function upgrade_php_version() { $html = '
'; $html .= '

' . sprintf( __('Advanced Search plugin requires a minmum PHP Version of %s. You have to upgrade your php version to enjoy Advanced Search.', 'advance-search'), $min_php) . '

'; $html .= '
'; echo apply_filters('the_content',$html); } // Check the minimum required PHP version and run the plugin. if ( version_compare( PHP_VERSION, $min_php, '>=' ) ) { Advance_Search_init(); } else { add_action('admin_notices', 'upgrade_php_version'); }