Exemplo n.º 1
0
 public static function init()
 {
     self::$license_key = trim(get_option(self::LICENSE_KEY_OPTION, ''));
     self::$uid = trim(get_option(self::LICENSE_UID_OPTION, 0));
     if (is_admin()) {
         // AJAX
         add_action('wp_ajax_si_get_license', array(__CLASS__, 'maybe_get_free_license'), 10, 0);
     }
     add_filter('si_get_purchase_link', array(__CLASS__, 'add_uid_to_url'));
     add_filter('si_get_sa_link', array(__CLASS__, 'add_uid_to_url'));
     // Messaging
     add_action('si_settings_page', array(__CLASS__, 'thank_for_registering'), 10, 0);
 }
				<div class="activate_message clearfix">
					<div class="activation_msg clearfix">
						 <h4><?php 
    self::_e('Get a free Sprout Apps license instantly...');
    ?>
</h4>
					</div>
					<div class="activation_inputs clearfix">
						<input type="text" name="<?php 
    echo SI_Free_License::LICENSE_KEY_OPTION;
    ?>
" id="<?php 
    echo SI_Free_License::LICENSE_KEY_OPTION;
    ?>
" value="<?php 
    echo SI_Free_License::license_key();
    ?>
" class="fat-input <?php 
    echo 'license_' . SI_Free_License::license_status();
    ?>
" size="40" class="text-input" placeholder="<?php 
    self::_e('Enter your email.');
    ?>
">
							<button id="free_license" class="button button-primary button-large"><?php 
    self::_e('Get License');
    ?>
</button>
						<div id="license_message" class="clearfix"></div>
					</div>