. */ defined( 'ABSPATH' ) or exit; class FacetWP { private static $instance; function __construct() { // php check if ( version_compare( phpversion(), '7.0', '<' ) ) { add_action( 'admin_notices', array( $this, 'upgrade_notice' ) ); return; } // setup variables define( 'FACETWP_VERSION', '4.1.5' ); define( 'FACETWP_DIR', dirname( __FILE__ ) ); define( 'FACETWP_URL', plugins_url( '', __FILE__ ) ); define( 'FACETWP_BASENAME', plugin_basename( __FILE__ ) ); // get the gears turning include( FACETWP_DIR . '/includes/class-init.php' ); } /** * Singleton */ public static function instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self; } return self::$instance; } /** * Require PHP 7.0+ */ function upgrade_notice() { $message = __( 'FacetWP requires PHP %s or above. Please contact your host and request a PHP upgrade.', 'fwp' ); echo '

' . sprintf( $message, '7.0' ) . '

'; } } function FWP() { return FacetWP::instance(); } FWP();