wp = '3.3.1'; $a->php = '5.2'; $a->mysql = '5.1'; $a->exit_msg_wp = 'The plugin Acme Plugin requires WordPress ' . $a->wp . ' or newer. Please update WordPress or delete the plugin.'; $a->check_wp(); $a->check_php(); $a->check_mysql(); /* * Creating an object with the minimum versions * Create an instance of WP_Environment_Check * Performs all tests at once */ $v = new stdClass(); $v->wp = '3.3.1'; $v->php = '5.2'; $v->mysql = '5.0'; $a = new WP_Environment_Check(); $a->run_all_tests( $v ); /* * Setup an array with the minimum versions * Performs all test by creating an instance of WP_Environment_Check */ $v = array( 'wp' => '3.0', 'php' => '5.2', 'MySQL' => '5.1' ); $a = new WP_Environment_Check( $v ); /* * Store testresult in an object. Disable dying if tests failed */ $a = new WP_Environment_Check(); $a->set_die_on_fail( FALSE ); $a->wp = '3.3.1'; $a->php = '5.2'; $a->mysql = '7.0'; $r = new stdClass(); $r->wp = $a->check_wp(); $r->php = $a->check_php(); $r->mysql = $a->check_mysql(); // fail on MYSQL -> 'mysql' => false var_dump( $r );