Add WordPress code to check user status

Add WordPress-specific code to check whether user is admin and to run the SQL query against the CiviCRM tables.