Plugin Directory

Changeset 1524519


Ignore:
Timestamp:
10/29/2016 04:23:38 PM (9 years ago)
Author:
chen420
Message:

tagging version 0.2.6

Location:
tinywebdb-api
Files:
3 edited
7 copied

Legend:

Unmodified
Added
Removed
  • tinywebdb-api/tags/0.2.6/readme.txt

    r1523540 r1524519  
    77Requires at least: 4.0
    88Tested up to: 4.6.1
    9 Stable tag: 0.2.5
     9Stable tag: 0.2.6
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • tinywebdb-api/tags/0.2.6/tinywebdb-api.php

    r1523540 r1524519  
    99Author: Hong Chen
    1010Author URI: http://edu2web.com/tinywebdb-api/
    11 Version: 0.2.5
     11Version: 0.2.6
    1212*/
    1313
    1414
    1515define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php");
    16 define("TINYWEBDB_VER", "0.2.5");
     16define("TINYWEBDB_VER", "0.2.6");
    1717
    1818//***** Hooks *****
  • tinywebdb-api/tags/0.2.6/tinywebdb.php

    r1523540 r1524519  
    117117      // this action enable from v 0.1.x
    118118      // JSON_API , Post Parameters : tag
    119       $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName);
    120       $tagValue = get_post($postid);
    121       if (is_null($tagValue)) $tagValue = $bedtag;  //reports a get_post failure
    122       // $tagName = wp_tinywebdb_api_get_tagName($postid);
    123       return $tagValue;
     119
     120      if (empty($tagName)) {
     121        $tagtype = get_option("wp_tinywebdb_api_tag_type");
     122        if ($tagtype=='') {
     123            $tagtype = 'id';
     124        }
     125
     126        $posts = get_posts('numberposts=10');
     127        foreach ($posts as $post) {
     128            if ($tagtype == 'id') {
     129            $tagnames[] = $post->ID;
     130            } else {
     131            $tagnames[] = $post->post_name;
     132            }
     133        }
     134        return $tagnames;
     135      } else {
     136        $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName);
     137        $tagValue = get_post($postid);
     138        if (is_null($tagValue)) $tagValue = $bedtag;    //reports a get_post failure
     139        // $tagName = wp_tinywebdb_api_get_tagName($postid);
     140        return $tagValue;
     141      }
    124142    }
    125143 
  • tinywebdb-api/trunk/readme.txt

    r1523540 r1524519  
    77Requires at least: 4.0
    88Tested up to: 4.6.1
    9 Stable tag: 0.2.5
     9Stable tag: 0.2.6
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • tinywebdb-api/trunk/tinywebdb-api.php

    r1523540 r1524519  
    99Author: Hong Chen
    1010Author URI: http://edu2web.com/tinywebdb-api/
    11 Version: 0.2.5
     11Version: 0.2.6
    1212*/
    1313
    1414
    1515define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php");
    16 define("TINYWEBDB_VER", "0.2.5");
     16define("TINYWEBDB_VER", "0.2.6");
    1717
    1818//***** Hooks *****
  • tinywebdb-api/trunk/tinywebdb.php

    r1523540 r1524519  
    117117      // this action enable from v 0.1.x
    118118      // JSON_API , Post Parameters : tag
    119       $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName);
    120       $tagValue = get_post($postid);
    121       if (is_null($tagValue)) $tagValue = $bedtag;  //reports a get_post failure
    122       // $tagName = wp_tinywebdb_api_get_tagName($postid);
    123       return $tagValue;
     119
     120      if (empty($tagName)) {
     121        $tagtype = get_option("wp_tinywebdb_api_tag_type");
     122        if ($tagtype=='') {
     123            $tagtype = 'id';
     124        }
     125
     126        $posts = get_posts('numberposts=10');
     127        foreach ($posts as $post) {
     128            if ($tagtype == 'id') {
     129            $tagnames[] = $post->ID;
     130            } else {
     131            $tagnames[] = $post->post_name;
     132            }
     133        }
     134        return $tagnames;
     135      } else {
     136        $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName);
     137        $tagValue = get_post($postid);
     138        if (is_null($tagValue)) $tagValue = $bedtag;    //reports a get_post failure
     139        // $tagName = wp_tinywebdb_api_get_tagName($postid);
     140        return $tagValue;
     141      }
    124142    }
    125143 
Note: See TracChangeset for help on using the changeset viewer.