public static function maybe_deploy()
 {
     global $gfpdfe_data;
     /*
      * Check if we have a 'direct' method, that the software isn't fully installed and we aren't trying to manually initialise
      */
     if ($gfpdfe_data->automated === true && $gfpdfe_data->is_initialised === false && !rgpost('upgrade') && get_option('gfpdfe_automated_install') != 'installing') {
         /*
          * Initialise all multisites if a super admin is logged in
          */
         if (is_multisite() && is_super_admin()) {
             $results = GFPDF_InstallUpdater::run_multisite_deployment(array('GFPDF_InstallUpdater', 'do_deploy'));
             if ($results === true) {
                 add_action($gfpdfe_data->notice_type, array('GFPDF_Notices', 'gf_pdf_network_deploy_success'));
             } elseif ($results === false) {
                 add_action($gfpdfe_data->notice_type, array('GFPDF_Notices', 'gf_pdf_auto_deploy_network_failure'));
             }
             return $results;
         } else {
             if (self::do_deploy()) {
                 /*
                  * Output successfull automated installation message
                  */
                 add_action($gfpdfe_data->notice_type, array('GFPDF_Notices', 'gf_pdf_auto_deploy_success'));
             }
         }
     }
 }
 private function deploy()
 {
     global $gfpdfe_data;
     /*
      * Initialise all multisites if a super admin is logged in and the software hasn't been installed before
      */
     if (is_multisite() && is_super_admin() && $gfpdfe_data->fresh_install === true) {
         $results = GFPDF_InstallUpdater::run_multisite_deployment(array('GFPDF_InstallUpdater', 'do_deploy'));
         if ($results === true) {
             add_action($gfpdfe_data->notice_type, array('GFPDF_Notices', 'gf_pdf_network_deploy_success'));
         } elseif ($results === false) {
             add_action($gfpdfe_data->notice_type, array('GFPDF_Notices', 'gf_pdf_auto_deploy_network_failure'));
         }
         return $results;
     } else {
         /*
          * Run the updater
          */
         $results = GFPDF_InstallUpdater::pdf_extended_activate();
         if ($results === 'false') {
             return $results;
         }
         add_action($gfpdfe_data->notice_type, array('GFPDF_Notices', 'gf_pdf_deploy_success'));
     }
 }