Plugin Directory

Changeset 730026


Ignore:
Timestamp:
06/22/2013 04:06:04 PM (13 years ago)
Author:
dphiffer
Message:

Tagged version 1.1.0

Location:
json-api
Files:
1 deleted
5 edited
36 copied

Legend:

Unmodified
Added
Removed
  • json-api/tags/1.1.0/json-api.php

    r729608 r730026  
    44Plugin URI: http://wordpress.org/plugins/json-api/
    55Description: A RESTful API for WordPress
    6 Version: 1.0.9
     6Version: 1.1.0
    77Author: Dan Phiffer
    88Author URI: http://phiffer.org/
  • json-api/tags/1.1.0/readme.txt

    r729608 r730026  
    44Tags: json, api, ajax, cms, admin, integration, moma
    55Requires at least: 2.8
    6 Tested up to: 3.5.1
    7 Stable tag: 1.0.9
     6Tested up to: 3.5.2
     7Stable tag: 1.1.0
    88
    99A RESTful API for WordPress
     
    690690* Setting `redirect_[status]` allows you to control the resulting browser redirection depending on the `status` value.
    691691* Setting `dev` to a non-empty value adds whitespace for readability and responds with `text/plain`
    692 * Setting `json_encode_options` will let you specify an integer bitmask to modify the behavior of [PHP's `json_encode`](http://php.net/manual/en/function.json-encode.php)
     692* Setting `json_encode_options` will let you specify an integer bitmask to modify the behavior of [PHP's `json_encode`](http://php.net/manual/en/function.json-encode.php) (Note: this option is only recognized in PHP version 5.3+)
    693693* Setting `json_unescaped_unicode` will replace unicode-escaped characters with their unescaped equivalents (e.g., `\u00e1` becomes á)
    694694* Omitting all of the above arguments will result in a standard JSON response.
     
    10351035== Changelog ==
    10361036
     1037= 1.1.0 (2013-06-22): =
     1038* Bugfix for `json_encode` compatibility with PHP < 5.3
     1039* Bugfix for `get_author_index` warnings in WordPress > 3.5
     1040
    10371041= 1.0.9 (2013-06-21): =
    10381042* Added `update_post` and `delete_post` methods to Post controller
     
    11591163== Upgrade Notice ==
    11601164
     1165= 1.1.0 =
     1166Minor bugfixes
     1167
    11611168= 1.0.9 =
    11621169Update/delete post methods and some other bugfixes and improvements
  • json-api/tags/1.1.0/singletons/introspector.php

    r729608 r730026  
    172172  public function get_authors() {
    173173    global $wpdb;
    174     $author_ids = $wpdb->get_col($wpdb->prepare("
     174    $author_ids = $wpdb->get_col("
    175175      SELECT u.ID, m.meta_value AS last_name
    176176      FROM $wpdb->users AS u,
     
    179179        AND m.meta_key = 'last_name'
    180180      ORDER BY last_name
    181     "));
     181    ");
    182182    $all_authors = array_map(array(&$this, 'get_author_by_id'), $author_ids);
    183183    $active_authors = array_filter($all_authors, array(&$this, 'is_active_author'));
  • json-api/tags/1.1.0/singletons/response.php

    r729608 r730026  
    3434    if (function_exists('json_encode')) {
    3535      // Use the built-in json_encode function if it's available
    36       $json_encode_options = 0;
    37       if ($json_api->query->json_encode_options) {
    38         $json_encode_options = $json_api->query->json_encode_options;
    39       }
    40       $json = json_encode($data, $json_encode_options);
     36      if (version_compare(PHP_VERSION, '5.3') < 0) {
     37        $json = json_encode($data);
     38      } else {
     39        $json_encode_options = 0;
     40        if ($json_api->query->json_encode_options) {
     41          $json_encode_options = $json_api->query->json_encode_options;
     42        }
     43        $json = json_encode($data, $json_encode_options);
     44      }
    4145    } else {
    4246      // Use PEAR's Services_JSON encoder otherwise
     
    4953    }
    5054   
     55    // Thanks to Stack Overflow user Gumbo stackoverflow.com/questions/2934563
    5156    if ($json_api->query->json_unescaped_unicode) {
    5257      $callback = array($this, 'replace_unicode_escape_sequence');
  • json-api/tags/1.1.0/tests/core.info-01.phpt

    r725741 r730026  
    1111
    1212echo "Response status: $response->status\n";
    13 echo "Version: $response->json_api_version\n";
    1413echo "Controllers:\n";
    1514var_dump($response->controllers);
     
    1817--EXPECT--
    1918Response status: ok
    20 Version: 1.0.8
    2119Controllers:
    2220array(4) {
  • json-api/trunk/json-api.php

    r729608 r730026  
    44Plugin URI: http://wordpress.org/plugins/json-api/
    55Description: A RESTful API for WordPress
    6 Version: 1.0.9
     6Version: 1.1.0
    77Author: Dan Phiffer
    88Author URI: http://phiffer.org/
  • json-api/trunk/readme.txt

    r729608 r730026  
    44Tags: json, api, ajax, cms, admin, integration, moma
    55Requires at least: 2.8
    6 Tested up to: 3.5.1
    7 Stable tag: 1.0.9
     6Tested up to: 3.5.2
     7Stable tag: 1.1.0
    88
    99A RESTful API for WordPress
     
    690690* Setting `redirect_[status]` allows you to control the resulting browser redirection depending on the `status` value.
    691691* Setting `dev` to a non-empty value adds whitespace for readability and responds with `text/plain`
    692 * Setting `json_encode_options` will let you specify an integer bitmask to modify the behavior of [PHP's `json_encode`](http://php.net/manual/en/function.json-encode.php)
     692* Setting `json_encode_options` will let you specify an integer bitmask to modify the behavior of [PHP's `json_encode`](http://php.net/manual/en/function.json-encode.php) (Note: this option is only recognized in PHP version 5.3+)
    693693* Setting `json_unescaped_unicode` will replace unicode-escaped characters with their unescaped equivalents (e.g., `\u00e1` becomes á)
    694694* Omitting all of the above arguments will result in a standard JSON response.
     
    10351035== Changelog ==
    10361036
     1037= 1.1.0 (2013-06-22): =
     1038* Bugfix for `json_encode` compatibility with PHP < 5.3
     1039* Bugfix for `get_author_index` warnings in WordPress > 3.5
     1040
    10371041= 1.0.9 (2013-06-21): =
    10381042* Added `update_post` and `delete_post` methods to Post controller
     
    11591163== Upgrade Notice ==
    11601164
     1165= 1.1.0 =
     1166Minor bugfixes
     1167
    11611168= 1.0.9 =
    11621169Update/delete post methods and some other bugfixes and improvements
  • json-api/trunk/singletons/introspector.php

    r729608 r730026  
    172172  public function get_authors() {
    173173    global $wpdb;
    174     $author_ids = $wpdb->get_col($wpdb->prepare("
     174    $author_ids = $wpdb->get_col("
    175175      SELECT u.ID, m.meta_value AS last_name
    176176      FROM $wpdb->users AS u,
     
    179179        AND m.meta_key = 'last_name'
    180180      ORDER BY last_name
    181     "));
     181    ");
    182182    $all_authors = array_map(array(&$this, 'get_author_by_id'), $author_ids);
    183183    $active_authors = array_filter($all_authors, array(&$this, 'is_active_author'));
  • json-api/trunk/singletons/response.php

    r729608 r730026  
    3434    if (function_exists('json_encode')) {
    3535      // Use the built-in json_encode function if it's available
    36       $json_encode_options = 0;
    37       if ($json_api->query->json_encode_options) {
    38         $json_encode_options = $json_api->query->json_encode_options;
    39       }
    40       $json = json_encode($data, $json_encode_options);
     36      if (version_compare(PHP_VERSION, '5.3') < 0) {
     37        $json = json_encode($data);
     38      } else {
     39        $json_encode_options = 0;
     40        if ($json_api->query->json_encode_options) {
     41          $json_encode_options = $json_api->query->json_encode_options;
     42        }
     43        $json = json_encode($data, $json_encode_options);
     44      }
    4145    } else {
    4246      // Use PEAR's Services_JSON encoder otherwise
     
    4953    }
    5054   
     55    // Thanks to Stack Overflow user Gumbo stackoverflow.com/questions/2934563
    5156    if ($json_api->query->json_unescaped_unicode) {
    5257      $callback = array($this, 'replace_unicode_escape_sequence');
  • json-api/trunk/tests/core.info-01.phpt

    r725741 r730026  
    1111
    1212echo "Response status: $response->status\n";
    13 echo "Version: $response->json_api_version\n";
    1413echo "Controllers:\n";
    1514var_dump($response->controllers);
     
    1817--EXPECT--
    1918Response status: ok
    20 Version: 1.0.8
    2119Controllers:
    2220array(4) {
Note: See TracChangeset for help on using the changeset viewer.