Exemple #1
0
?>

<form method="post">
	<input type="hidden" value="<?php 
echo wp_create_nonce('headway-admin-nonce');
?>
" name="headway-admin-nonce" id="headway-admin-nonce" />

	<div class="big-tabs-container">
	
	
		<div class="big-tab" id="tab-general-content">
			
			<?php 
if (is_main_site()) {
    $license_validation_request = headway_validate_license_key();
    $license_validation = null;
    if ($error = headway_get('error', $license_validation_request)) {
        $license_validation = '<span class="red license-key-validation">' . $error . '</span>';
    } elseif ($success = headway_get('success', $license_validation_request)) {
        $license_validation = '<span class="green license-key-validation">' . $success . '</span>';
    }
    $form = array(array('id' => 'license-key', 'size' => 'large', 'value' => headway_get_license_key(), 'type' => 'text', 'masked' => true, 'label' => 'License Key', 'description' => 'Please enter your license key here.  This will be used to authenticate your site so you can take advantage of the automatic updates, Headway Extend, and more.<br /><br />You may find your license key in the <a href="http://headwaythemes.com/dashboard" target="_blank">Headway Members Dashboard</a>.', 'suffix' => $license_validation));
    HeadwayAdminInputs::generate($form, 'form-table license-key-input-table');
    echo '<h3 class="title title-hr">General</h3>';
} else {
    echo '<h3 class="title">General</h3>';
}
$form = array(array('id' => 'favicon', 'size' => 'large', 'type' => 'text', 'label' => 'Favicon URL', 'value' => HeadwayOption::get('favicon'), 'description' => 'A favicon is the little image that sits next to your address in the favorites menu and on tabs.  If you do not know how to save an image as an icon you can go to <a href="http://www.favicon.cc/" target="_blank">favicon.cc</a> and draw or import an image.'), array('id' => 'feed-url', 'size' => 'large', 'type' => 'text', 'label' => 'Feed URL', 'description' => 'If you use any service like <a href="http://feedburner.google.com/" target="_blank">FeedBurner</a>, type the feed URL here.', 'value' => HeadwayOption::get('feed-url')));
HeadwayAdminInputs::generate($form);
?>
Exemple #2
0
    public static function notice_no_license()
    {
        global $pagenow;
        if ($pagenow != 'update-core.php') {
            return;
        }
        if (!headway_get_license_key()) {
            echo '
				<div id="update-nag">
			       <p><strong>Important!</strong> In order to receive Headway updates you must enter your license key.  <a href="' . admin_url('admin.php?page=headway-options') . '">Enter License Key &raquo;</a></p>
			    </div>
			';
        } elseif ($license_validation_request = headway_validate_license_key()) {
            if ($error = headway_get('error', $license_validation_request)) {
                echo '
					<div id="update-nag">
				       <p><strong>Headway License Error:</strong> ' . $error . '  Please note, you must have a valid license key to receive Headway updates.  <a href="' . admin_url('admin.php?page=headway-options') . '">Update License Key &raquo;</a></p>
				    </div>
				';
            }
        }
    }