Skip to content

Instantly share code, notes, and snippets.

@bwmarkle
Created January 2, 2019 14:43
Show Gist options
  • Save bwmarkle/adf029731c176e10f01627b73d43d736 to your computer and use it in GitHub Desktop.
Save bwmarkle/adf029731c176e10f01627b73d43d736 to your computer and use it in GitHub Desktop.
// Please see: https://github.com/BoldGrid/boldgrid-backup/issues/9
// Full path: boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php
public function is_setup( $try_cache = false ) {
// ## #############################
// STEP ONE: COMMENT OUT THIS LOGIC
// ## #############################
// If successfully logged in within last 24 hours, return true.
//if ( $try_cache && $this->settings->is_last_login_valid() ) {
// return true;
//}
$this->connect();
$this->log_in();
// ## #######################################
// STEP TWO: ECHO / LOG THAT YOU'VE LOGGED IN
// ## #######################################
error_log( 'logged in to ftp' );
$logged_in = $this->logged_in;
$this->disconnect();
return $logged_in;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment