Ejemplo n.º 1
0
<?php

/**
 * View licenses page for AnsPress
 */
$fields = ap_product_license_fields();
$licenses = get_option('anspress_license');
?>

<div class="wrap">
    <h2>
		<?php 
_e('Licenses', 'anspress-question-answer');
?>
    </h2>
	<p class="lead"><?php 
_e('License keys for AnsPress products, i.e. extensions and themes.', 'anspress-question-answer');
?>
</p>

	<?php 
if (!empty($fields)) {
    ?>
        <form method="post" action="<?php 
    echo admin_url('admin-post.php');
    ?>
">
            <table class="form-table">
                <tbody>
					<?php 
    foreach ($fields as $slug => $prod) {
Ejemplo n.º 2
0
 /**
  * Initiate product updater.
  */
 public function ap_plugin_updater()
 {
     $fields = ap_product_license_fields();
     $licenses = get_option('anspress_license', array());
     if (!empty($fields)) {
         foreach ($fields as $slug => $prod) {
             if (isset($licenses[$slug]) && !empty($licenses[$slug]['key'])) {
                 new EDD_SL_Plugin_Updater('https://anspress.io', __FILE__, array('version' => $prod['version'], 'license' => $licenses[$slug]['key'], 'item_name' => $prod['name'], 'author' => $prod['author']));
             }
         }
     }
 }