Пример #1
0
 /**
  * Show a notice to users if they have pending updates but are not connected.
  */
 function notice_updates_needed()
 {
     global $notice_updates_needed;
     // action has already run.. no need for more than 1 notice.
     if (isset($notice_updates_needed)) {
         // return false;
     }
     $notice_updates_needed = true;
     $link = sprintf('<a href="%s">%s &rarr;</a>', PL_Platform()->oauth->connect_account_link(), __('Connect This Site', 'pl-platform'));
     $text = __('You appear to have one or more pending updates for PageLines products.', 'pl-platform');
     pl_create_notice(array('title' => __('Upgrade Needed', 'pl-platform'), 'msg' => $text, 'action' => $link, 'icon' => 'warning'));
 }
Пример #2
0
 function show_error_message()
 {
     $error_string = get_option('pl_oauth_error', false);
     if (!$error_string) {
         return false;
     }
     pl_create_notice(array('title' => __('Platform 5 Connection Issue', 'pl-platform'), 'msg' => $error_string, 'action' => false, 'icon' => 'warning'));
     if (false !== strpos($error_string, 'SSL') && !defined('OPENSSL_TLSEXT_SERVER_NAME')) {
         $text = __("The server you are hosted on uses a very old version of CURL and / or OpenSSL, the library used to connect to other servers.<br />Please see <a href='http://kb.yoast.com/article/263-update-errors-with-certificate-subject-name'>This link</a> for more information.<br />To connect to PageLines insecurly you can add this to wp-config.php, please only do this as a last resort.<br /><kbd>define( 'PL_SSL_NO_VERIFY', true );", 'pl-platform');
         pl_create_notice(array('title' => __('SSL Issues', 'pl-platform'), 'msg' => $text, 'action' => false, 'icon' => 'warning'));
     }
     update_option('pl_oauth_error', false);
 }
Пример #3
0
 /**
  * 
  * Notice shown on non PL Connect pages.
  */
 function notice_upgrade_site()
 {
     $dformat = PL_Platform()->oauth->get_domain_data_format();
     $action = '';
     $action .= '<a class="button button-secondary button-disabled">1. Connect Account <i class="pl-icon pl-icon-check"></i></a>';
     $action .= '<a class="button button-secondary button-disabled">2. Install Extensions <i class="pl-icon pl-icon-check"></i></a>';
     if (!PL_Platform()->oauth->can_register_site()) {
         $action .= sprintf('<a class="button button-primary" href="%s">3. Get Pro License <i class="pl-icon pl-icon-shopping-cart"></i></a>', PL()->urls->purchase);
         $action .= sprintf('<a class="button button-primary button-disabled">4. Activate Pro %s <i class="pl-icon pl-icon-bolt"></i></a>', $dformat);
     } else {
         $action .= '<a class="button button-primary button-disabled">3. Get Pro License <i class="pl-icon pl-icon-check"></i></a>';
         $action .= sprintf('<a class="button button-primary" href="%s">4. Activate Pro %s <i class="pl-icon pl-icon-bolt"></i></a>', $this->url('account'), $dformat);
     }
     // 'alink'   => PL()->urls->purchase,
     // 'atext'   => __( 'Activate', 'pagelines' ),
     pl_create_notice(array('title' => __('Get the most out of PageLines...', 'pl-platform'), 'msg' => __('You are all set up! To get monthly <strong>pro</strong> extensions, updates, options and support just Pro activate your site.', 'pl-platform'), 'action' => $action, 'id' => 'upgrade_pro', 'exp' => 3 * DAY_IN_SECONDS, 'icon' => 'plus'));
 }