💦 FULL SET: Changeset/ - Full Gallery 2025

Changeset 808664


Ignore:
Timestamp:
11/22/2013 07:02:54 AM (12 years ago)
Author:
mitchoyoshitaka
Message:

upgrade for wordpress 3.7; tag 0.5

Location:
plugin-beta-tester
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • plugin-beta-tester/tags/0.5/plugin-beta-tester.php

    r629151 r808664  
    33Plugin Name: Plugin Beta Tester
    44Description: Lets you easily beta test plugins by notifying you of beta versions. Also lets you upgrade to beta versions from within WordPress.
    5 Version: 0.4
     5Version: 0.5
    66Author: mitcho (Michael Yoshitaka Erlewine)
    77Author URI: http://mitcho.com/
     
    99*/
    1010
    11 define('PLUGIN_BETA_TESTER_VERSION','0.4');
     11define('PLUGIN_BETA_TESTER_VERSION','0.5');
    1212if ( !defined('PLUGIN_BETA_TESTER_EXPIRATION') )
    1313    define('PLUGIN_BETA_TESTER_EXPIRATION', 60 * 60 * 24);
     
    3333    // This is how we hijack the upgrade info from wordpress.org
    3434    function http_filter($response,$r,$url) {
    35         if ($url !== 'http://api.wordpress.org/plugins/update-check/1.0/')
     35        if ( $url == 'http://api.wordpress.org/plugins/update-check/1.0/' ) {   
     36            $wpapi_response = unserialize($response['body']);
     37            $response['body'] = serialize($this->upgradable( $wpapi_response ));
    3638            return $response;
    37    
    38         $wpapi_response = unserialize($response['body']);
    39         $response['body'] = serialize($this->upgradable( $wpapi_response ));
     39        }
     40
     41        // For WordPress 3.7 and later:
     42        // http://make.wordpress.org/core/2013/10/25/json-encoding-ssl-api-wordpress-3-7/
     43        if ( $url == 'https://api.wordpress.org/plugins/update-check/1.1/' ) {
     44            $wpapi_response = json_decode( $response['body'] );
     45            $override = (object) $this->upgradable( $wpapi_response->plugins );
     46            $wpapi_response->plugins = $override;
     47            $response['body'] = json_encode($wpapi_response);
     48            return $response;
     49        }
     50       
    4051        return $response;
    4152    }
  • plugin-beta-tester/tags/0.5/readme.txt

    r629151 r808664  
    33Donate link: http://tinyurl.com/donatetomitcho
    44Contributors: mitchoyoshitaka
    5 Tested up to: 3.5
     5Tested up to: 3.8
    66Requires at least: 3.0
    7 Stable Tag: 0.4
     7Stable Tag: 0.5
    88
    99== Description ==
     
    1313
    1414== Changelog ==
     15
     16= 0.5 =
     17* Updated for WordPress 3.7, which [changed the way plugin update checks happen](http://make.wordpress.org/core/2013/10/25/json-encoding-ssl-api-wordpress-3-7/).
    1518
    1619= 0.4 =
  • plugin-beta-tester/trunk/plugin-beta-tester.php

    r629151 r808664  
    33Plugin Name: Plugin Beta Tester
    44Description: Lets you easily beta test plugins by notifying you of beta versions. Also lets you upgrade to beta versions from within WordPress.
    5 Version: 0.4
     5Version: 0.5
    66Author: mitcho (Michael Yoshitaka Erlewine)
    77Author URI: http://mitcho.com/
     
    99*/
    1010
    11 define('PLUGIN_BETA_TESTER_VERSION','0.4');
     11define('PLUGIN_BETA_TESTER_VERSION','0.5');
    1212if ( !defined('PLUGIN_BETA_TESTER_EXPIRATION') )
    1313    define('PLUGIN_BETA_TESTER_EXPIRATION', 60 * 60 * 24);