Changeset 1524519
- Timestamp:
- 10/29/2016 04:23:38 PM (9 years ago)
- Location:
- tinywebdb-api
- Files:
-
- 3 edited
- 7 copied
-
tags/0.2.6 (copied) (copied from tinywebdb-api/trunk)
-
tags/0.2.6/LICENSE (copied) (copied from tinywebdb-api/trunk/LICENSE)
-
tags/0.2.6/master (copied) (copied from tinywebdb-api/trunk/master)
-
tags/0.2.6/menus.php (copied) (copied from tinywebdb-api/trunk/menus.php)
-
tags/0.2.6/readme.txt (copied) (copied from tinywebdb-api/trunk/readme.txt) (1 diff)
-
tags/0.2.6/tinywebdb-api.php (copied) (copied from tinywebdb-api/trunk/tinywebdb-api.php) (1 diff)
-
tags/0.2.6/tinywebdb.php (copied) (copied from tinywebdb-api/trunk/tinywebdb.php) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/tinywebdb-api.php (modified) (1 diff)
-
trunk/tinywebdb.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tinywebdb-api/tags/0.2.6/readme.txt
r1523540 r1524519 7 7 Requires at least: 4.0 8 8 Tested up to: 4.6.1 9 Stable tag: 0.2. 59 Stable tag: 0.2.6 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
tinywebdb-api/tags/0.2.6/tinywebdb-api.php
r1523540 r1524519 9 9 Author: Hong Chen 10 10 Author URI: http://edu2web.com/tinywebdb-api/ 11 Version: 0.2. 511 Version: 0.2.6 12 12 */ 13 13 14 14 15 15 define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php"); 16 define("TINYWEBDB_VER", "0.2. 5");16 define("TINYWEBDB_VER", "0.2.6"); 17 17 18 18 //***** Hooks ***** -
tinywebdb-api/tags/0.2.6/tinywebdb.php
r1523540 r1524519 117 117 // this action enable from v 0.1.x 118 118 // 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 } 124 142 } 125 143 -
tinywebdb-api/trunk/readme.txt
r1523540 r1524519 7 7 Requires at least: 4.0 8 8 Tested up to: 4.6.1 9 Stable tag: 0.2. 59 Stable tag: 0.2.6 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
tinywebdb-api/trunk/tinywebdb-api.php
r1523540 r1524519 9 9 Author: Hong Chen 10 10 Author URI: http://edu2web.com/tinywebdb-api/ 11 Version: 0.2. 511 Version: 0.2.6 12 12 */ 13 13 14 14 15 15 define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php"); 16 define("TINYWEBDB_VER", "0.2. 5");16 define("TINYWEBDB_VER", "0.2.6"); 17 17 18 18 //***** Hooks ***** -
tinywebdb-api/trunk/tinywebdb.php
r1523540 r1524519 117 117 // this action enable from v 0.1.x 118 118 // 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 } 124 142 } 125 143
Note: See TracChangeset
for help on using the changeset viewer.