$ftp_conn = ftp_connect($host) or die("Could not connect to server");
$login = ftp_login ($ftp_conn, $user, $password);

I am pretty sure that ftp_connect isn’t recommended from a security point of view, and probably hasn’t been for a couple of hundred years.

Having said that, it turns out that when a third party says ‘to hell with the security concerns’, and only gives you access to FTP for an order process it’s pretty straight forward to connect with the PHP I’m putting together.


Welcome Prefix

function replace_prefix( $wp_admin_bar ) {
 $newtitle = str_replace( 'Hi,', 'Logged in as', $my_account->title );
 $wp_admin_bar->add_node( array(
 'id' => 'my-account',
 'title' => $newtitle,
 ) );
 add_filter( 'admin_bar_menu', 'replace_prefix',25 );

It’s the little things that make me happy. Like controlling the WordPress prefix to the username in the admin bar. Here from a simple “Hi” to a “Logged in as” notification.