diff --git a/credit-tracker-shortcodes.php b/credit-tracker-shortcodes.php index e09d919..96fb377 100644 --- a/credit-tracker-shortcodes.php +++ b/credit-tracker-shortcodes.php @@ -26,6 +26,8 @@ function credit_tracker_table_shortcode($atts) if (is_numeric($size)) { $size = array($size, $size); + } else if (stripos($size, 'x') !== false) { + $size = explode('x', $size); } $request = array( diff --git a/credit-tracker.php b/credit-tracker.php index 162de88..cd4e290 100755 --- a/credit-tracker.php +++ b/credit-tracker.php @@ -12,7 +12,7 @@ * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Requires at least: 3.5.1 - * Tested up to: 3.8.1 + * Tested up to: 3.8.3 * * @package Credit_Tracker * @author Labs64 diff --git a/options.php b/options.php index cf5cdf8..075b8a6 100644 --- a/options.php +++ b/options.php @@ -11,7 +11,7 @@ define('CT_OPTIONS', 'CT_OPTIONS'); -define('API_KEY', 'bd58df75-36be-44e2-811b-063fd3957182'); +define('API_KEY', '31c7bc4e-90ff-44fb-9f07-b88eb06ed9dc'); if (is_admin()) { @@ -254,8 +254,8 @@ function print_reference_section() default behavior, if no ID is specified, is to display all images containing author info.

  size (optional) - specify the image size to use for the thumbnail - display. Valid values include "thumbnail", "medium", "large", "full". The default value is - "thumbnail".

+ display. Valid values include "thumbnail", "medium", "large", "full" or numeric values (e.g. "50" or "100x50"). + The default value is "thumbnail".

  style (optional) - specify the table CSS style. Valid values include "default", "mercury", "mars". The default value is "default".

diff --git a/php/netlicensing/netlicensing.php b/php/netlicensing/netlicensing.php index d78418e..112f2f7 100755 --- a/php/netlicensing/netlicensing.php +++ b/php/netlicensing/netlicensing.php @@ -13,18 +13,15 @@ class NetLicensing private $curl = null; - public $apiKey; - /** * Initializes a NetLicensing object **/ function __construct($apiKey) { - $this->apiKey = $apiKey; - $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'NetLicensing/PHP ' . PHP_VERSION . ' (http://netlicensing.labs64.com)'; $this->curl = new Curl(); + $this->curl->headers['Authorization'] = 'Basic ' . base64_encode("apiKey:" . $apiKey); $this->curl->headers['Accept'] = 'application/json'; $this->curl->user_agent = $user_agent; } @@ -45,9 +42,6 @@ function validate($productNumber, $licenseeNumber, $licenseeName = '') $licenseeName = $licenseeNumber; } $url = self::NLIC_BASE_URL . '/licensee/' . $licenseeNumber . '/validate?productNumber=' . $productNumber . '&name=' . $licenseeName; - if (!empty($this->apiKey)) { - $url .= '&apiKey=' . $this->apiKey; - } $response = $this->curl->get($url, $vars = array()); diff --git a/readme.txt b/readme.txt index 36e9b89..baa40a5 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: labs64 Tags: credit, attribution, legal, copyright, owner, author, media library, media, image, photo, license, royalty-free, RF, Creative Commons, stock, attachment, fotolia, bildnachweis, impressum, imprint, microdata, NetLicensing Requires at least: 3.5.1 -Tested up to: 3.8.1 +Tested up to: 3.8.3 Stable tag: 0.9.12 License: GPL-2.0+ License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -131,7 +131,8 @@ Yes you can! Join in on our [GitHub repository](https://github.com/Labs64/credit == Changelog == = 0.9.12 = -* ... +* Add custom sizes at the credit table +* Adapt NetLicensing authentication using apiKey = 0.9.11 = * German translation by Michail Preissnerov