Wordpress - WordPress mysqli and PDO
An update for Wordpress 3.9+ - with PHP 5.5 deprecating the mysql_*
functions Wordpress has begun using the mysqli
if it is available on the server. Your future plugins and code should take this into consideration and stop using mysql_*
. Right now, in 3.9, wordpress checks for the availability of mysqli
and uses it if available. If not it uses mysql_*
but that check will be removed at the earliest possible convenience. Down the road it seems they will be using PDO
but that is a larger project.
Here is an FAQ and announcement on it:
http://make.wordpress.org/core/2014/04/07/mysql-in-wordpress-3-9/
WordPress uses mysql_*
functions.
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/wp-db.php
It has used those ever since I can remember, which probably answers your last question. It is what I would consider legacy code. I suspect it will be updated sometime soon (those functions were only deprecated as of PHP 5.5, I believe). I don't know which route development will go.
Link to a ticket in Trac, courtesy of Wyck (from a comment below):
http://core.trac.wordpress.org/ticket/21663