/**
  * TODO Document!
  */
 function pagelines_theme_update_nag()
 {
     $pagelines_update = $this->pagelines_theme_update_check();
     if (!is_super_admin() || !$pagelines_update || !current_user_can('edit_themes')) {
         return false;
     }
     if ($this->email == '' || $this->key == '' || $pagelines_update['package'] == 'bad') {
         //	add_filter('pagelines_admin_notifications', array(&$this,'bad_creds') );
     }
     echo '<div class="updated">';
     printf('<p>%s v%s is available.', $this->theme, esc_html($pagelines_update['new_version']));
     printf(' %s', $pagelines_update['package'] != 'bad' ? sprintf('You should <a href="%s">update now</a>.', admin_url('update-core.php')) : sprintf('<a href="%s">Click here</a> to setup your PageLines account.', PLAdminPaths::editor_account()));
     echo $pagelines_update['extra'] ? sprintf('<br />%s', $pagelines_update['extra']) : '';
     echo '</div></p>';
 }
 /**
  * Save our credentials
  *
  */
 function update_lpinfo()
 {
     if (defined('PL_GLOBAL_USER') && defined('PL_GLOBAL_PASS') && !pagelines_check_credentials()) {
         set_pagelines_credentials(PL_GLOBAL_USER, PL_GLOBAL_PASS);
         PagelinesExtensions::flush_caches();
         return;
     }
     if (isset($_POST['form_submitted']) && $_POST['form_submitted'] === 'plinfo') {
         if (isset($_POST['creds_reset'])) {
             update_option('pagelines_extend_creds', array('user' => '', 'pass' => ''));
         } else {
             set_pagelines_credentials($_POST['lp_username'], $_POST['lp_password']);
         }
         PagelinesExtensions::flush_caches();
         wp_redirect(PLAdminPaths::account('&plinfo=true'));
         exit;
     }
 }