Plugin Directory

Changeset 832241


Ignore:
Timestamp:
01/03/2014 01:27:40 PM (12 years ago)
Author:
zemanta
Message:

1.2.3 release - unused code removal, default image size change

Location:
zemanta
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • zemanta/tags/1.2.3/readme.txt

    r699660 r832241  
    33Tags: related posts, posts, thumbnails, images, post, seo, related content, widget, plugin, popular posts, similar posts, related, nrelate, outbrain
    44Requires at least: 2.8
    5 Tested up to: 3.5
    6 Stable Tag: 1.2.2
     5Tested up to: 3.8
     6Stable Tag: 1.2.3
    77
    88This plugin finds related posts and related images while you write your post. Pick related posts manually!
     
    8080== Changelog ==
    8181
     82= 1.2.3 =
     83* Code clean-up, remove unused functions
     84* Changed default image size from 300 to 350 pixels (resolutions are increasing)
     85* Tested with 3.8
     86
    8287= 1.2.2 =
    8388* Dropped custom path support for uploader
  • zemanta/tags/1.2.3/zemanta.php

    r650146 r832241  
    77Plugin URI: http://wordpress.org/extend/plugins/zemanta/
    88Description: Contextual suggestions of related posts, images and tags that makes your blogging fun and efficient.
    9 Version: 1.2.2
     9Version: 1.2.3
    1010Author: Zemanta Ltd.
    1111Author URI: http://www.zemanta.com/
     
    3939class Zemanta {
    4040
    41     var $version = '1.2.2';
     41    var $version = '1.2.3';
    4242    var $api_url = 'http://api.zemanta.com/services/rest/0.0/';
    4343    var $api_key = '';
     
    7878    public function init()
    7979    {
    80         add_action('wp_ajax_zemanta', array($this, 'proxy'));
    8180        add_action('wp_ajax_zemanta_set_featured_image', array($this, 'ajax_zemanta_set_featured_image'));
    8281        add_action('edit_form_advanced', array($this, 'assets'), 1);
     
    381380        $this->render('options', array(
    382381            'api_key' => $this->api_key,
    383             //'api_test' => $this->api_test(),
    384382            'is_pro' => $this->is_pro()
    385383            ));
     
    627625    }
    628626
    629     /**
    630     * api_test
    631     *
    632     * Test the API
    633     */
    634     public function api_test()
    635     {
    636         $response = $this->api(array(
    637             'method' => 'zemanta.suggest'
    638             ,'text'=> ''
    639             ));
    640 
    641         if (is_wp_error($response)) {
    642             return __('API ERROR', 'zemanta');
    643         } else {
    644             $matches = $this->match('/<status>(.+?)<\/status>/', $response['body']);
    645            
    646             return !$matches ? __('Invalid Response', 'zemanta') . ': "' . @htmlspecialchars($response) . '"' : $matches[1];
    647         }
    648     }
    649 
    650     /**
    651     * proxy
    652     *
    653     * Work as a proxy for the embedded Zemanta widget
    654     */
    655     public function proxy()
    656     {
    657         if (!isset($_POST['api_key']))
    658         {
    659             header($_SERVER['SERVER_PROTOCOL'] . ' 500');
    660             header('Content-Type: text/plain');
    661 
    662             die('No API Key.');
    663         }
    664 
    665         $arguments = $_POST;
    666 
    667         $base = dirname(__FILE__);
    668 
    669         if (file_exists($base . '/SECRET.php'))
    670         {
    671             require_once($base . '/SECRET.php');
    672 
    673             if (defined('ZEMANTA_SECRET'))
    674             {
    675                 $arguments['signature'] = ZEMANTA_SECRET . join('', $arguments);
    676             }
    677         }
    678 
    679         $arguments['format'] = 'json';
    680 
    681         if (isset($arguments['text']) && $arguments['method'] == 'zemanta.suggest')
    682         {
    683             $arguments['text'] = apply_filters('zemanta_proxy_text_filter', $arguments['text']);
    684         }
    685 
    686         $response = $this->api($arguments);
    687 
    688         if ($response['response']['code'] != 200)
    689         {
    690             header($_SERVER['SERVER_PROTOCOL'] . ' 500');
    691             header('Content-Type: text/plain');
    692 
    693             die($response['response']['message']);
    694         }
    695         else
    696         {
    697             header('Content-Type: text/plain');
    698 
    699             echo $response['body'];
    700         }
    701 
    702         die('');
    703     }
    704627   
    705628    /**
  • zemanta/trunk/readme.txt

    r699660 r832241  
    33Tags: related posts, posts, thumbnails, images, post, seo, related content, widget, plugin, popular posts, similar posts, related, nrelate, outbrain
    44Requires at least: 2.8
    5 Tested up to: 3.5
    6 Stable Tag: 1.2.2
     5Tested up to: 3.8
     6Stable Tag: 1.2.3
    77
    88This plugin finds related posts and related images while you write your post. Pick related posts manually!
     
    8080== Changelog ==
    8181
     82= 1.2.3 =
     83* Code clean-up, remove unused functions
     84* Changed default image size from 300 to 350 pixels (resolutions are increasing)
     85* Tested with 3.8
     86
    8287= 1.2.2 =
    8388* Dropped custom path support for uploader
  • zemanta/trunk/zemanta.php

    r650146 r832241  
    77Plugin URI: http://wordpress.org/extend/plugins/zemanta/
    88Description: Contextual suggestions of related posts, images and tags that makes your blogging fun and efficient.
    9 Version: 1.2.2
     9Version: 1.2.3
    1010Author: Zemanta Ltd.
    1111Author URI: http://www.zemanta.com/
     
    3939class Zemanta {
    4040
    41     var $version = '1.2.2';
     41    var $version = '1.2.3';
    4242    var $api_url = 'http://api.zemanta.com/services/rest/0.0/';
    4343    var $api_key = '';
     
    7878    public function init()
    7979    {
    80         add_action('wp_ajax_zemanta', array($this, 'proxy'));
    8180        add_action('wp_ajax_zemanta_set_featured_image', array($this, 'ajax_zemanta_set_featured_image'));
    8281        add_action('edit_form_advanced', array($this, 'assets'), 1);
     
    381380        $this->render('options', array(
    382381            'api_key' => $this->api_key,
    383             //'api_test' => $this->api_test(),
    384382            'is_pro' => $this->is_pro()
    385383            ));
     
    627625    }
    628626
    629     /**
    630     * api_test
    631     *
    632     * Test the API
    633     */
    634     public function api_test()
    635     {
    636         $response = $this->api(array(
    637             'method' => 'zemanta.suggest'
    638             ,'text'=> ''
    639             ));
    640 
    641         if (is_wp_error($response)) {
    642             return __('API ERROR', 'zemanta');
    643         } else {
    644             $matches = $this->match('/<status>(.+?)<\/status>/', $response['body']);
    645            
    646             return !$matches ? __('Invalid Response', 'zemanta') . ': "' . @htmlspecialchars($response) . '"' : $matches[1];
    647         }
    648     }
    649 
    650     /**
    651     * proxy
    652     *
    653     * Work as a proxy for the embedded Zemanta widget
    654     */
    655     public function proxy()
    656     {
    657         if (!isset($_POST['api_key']))
    658         {
    659             header($_SERVER['SERVER_PROTOCOL'] . ' 500');
    660             header('Content-Type: text/plain');
    661 
    662             die('No API Key.');
    663         }
    664 
    665         $arguments = $_POST;
    666 
    667         $base = dirname(__FILE__);
    668 
    669         if (file_exists($base . '/SECRET.php'))
    670         {
    671             require_once($base . '/SECRET.php');
    672 
    673             if (defined('ZEMANTA_SECRET'))
    674             {
    675                 $arguments['signature'] = ZEMANTA_SECRET . join('', $arguments);
    676             }
    677         }
    678 
    679         $arguments['format'] = 'json';
    680 
    681         if (isset($arguments['text']) && $arguments['method'] == 'zemanta.suggest')
    682         {
    683             $arguments['text'] = apply_filters('zemanta_proxy_text_filter', $arguments['text']);
    684         }
    685 
    686         $response = $this->api($arguments);
    687 
    688         if ($response['response']['code'] != 200)
    689         {
    690             header($_SERVER['SERVER_PROTOCOL'] . ' 500');
    691             header('Content-Type: text/plain');
    692 
    693             die($response['response']['message']);
    694         }
    695         else
    696         {
    697             header('Content-Type: text/plain');
    698 
    699             echo $response['body'];
    700         }
    701 
    702         die('');
    703     }
    704627   
    705628    /**
Note: See TracChangeset for help on using the changeset viewer.