Changeset 1133643
- Timestamp:
- 04/13/2015 11:05:01 AM (11 years ago)
- Location:
- worona
- Files:
-
- 59 added
- 2 edited
-
tags/0.7.2 (added)
-
tags/0.7.2/admin (added)
-
tags/0.7.2/admin/worona_admin_page.php (added)
-
tags/0.7.2/assets (added)
-
tags/0.7.2/assets/css (added)
-
tags/0.7.2/assets/css/worona-plugin.css (added)
-
tags/0.7.2/assets/screenshot-1.png (added)
-
tags/0.7.2/assets/worona-logo.png (added)
-
tags/0.7.2/assets/worona20x20.png (added)
-
tags/0.7.2/assets/worona20x20.svg (added)
-
tags/0.7.2/json-rest-api (added)
-
tags/0.7.2/json-rest-api/.git (added)
-
tags/0.7.2/json-rest-api/.scrutinizer.yml (added)
-
tags/0.7.2/json-rest-api/.travis.yml (added)
-
tags/0.7.2/json-rest-api/CHANGELOG.md (added)
-
tags/0.7.2/json-rest-api/CONTRIBUTING.md (added)
-
tags/0.7.2/json-rest-api/README.md (added)
-
tags/0.7.2/json-rest-api/bin (added)
-
tags/0.7.2/json-rest-api/bin/install-wp-tests.sh (added)
-
tags/0.7.2/json-rest-api/docs (added)
-
tags/0.7.2/json-rest-api/docs/README.md (added)
-
tags/0.7.2/json-rest-api/docs/routes (added)
-
tags/0.7.2/json-rest-api/docs/routes/routes.md (added)
-
tags/0.7.2/json-rest-api/lib (added)
-
tags/0.7.2/json-rest-api/lib/class-jsonserializable.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-comments.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-customposttype.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-datetime.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-media.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-meta-posts.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-meta.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-pages.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-posts.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-response.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-responsehandler.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-responseinterface.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-server.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-taxonomies.php (added)
-
tags/0.7.2/json-rest-api/lib/class-wp-json-users.php (added)
-
tags/0.7.2/json-rest-api/lib/wp-json.php (added)
-
tags/0.7.2/json-rest-api/license.txt (added)
-
tags/0.7.2/json-rest-api/phpunit.xml.dist (added)
-
tags/0.7.2/json-rest-api/plugin.php (added)
-
tags/0.7.2/json-rest-api/tests (added)
-
tags/0.7.2/json-rest-api/tests/bootstrap.php (added)
-
tags/0.7.2/json-rest-api/tests/helper.php (added)
-
tags/0.7.2/json-rest-api/tests/taxonomies_caller.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-plugin.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-post-comments.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-post-revisions.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-posts-meta.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-posts.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-server.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-taxonomies.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-testcase.php (added)
-
tags/0.7.2/json-rest-api/tests/test-json-users.php (added)
-
tags/0.7.2/json-rest-api/wp-api.js (added)
-
tags/0.7.2/readme.txt (added)
-
tags/0.7.2/worona.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/worona.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
worona/trunk/readme.txt
r1132133 r1133643 5 5 Requires at least: 3.9 or higher 6 6 Tested up to: 4.0 7 Stable tag: 0.7. 17 Stable tag: 0.7.2 8 8 stable. 9 9 License: GPLv3 … … 86 86 == Changelog == 87 87 88 = 0.7.2 = 89 * Fix a problem of WP-API with old WP versions. 90 88 91 = 0.7.1 = 89 92 * Include WP-API inside the plugin so you don't have to install it -
worona/trunk/worona.php
r1132133 r1133643 4 4 Plugin URI: http://www.worona.org/ 5 5 Description: Turn your WordPress site into a native iOS, Android and Windows Phone App. 6 Version: 0.7. 16 Version: 0.7.2 7 7 Author: Benuit 8 8 Author URI: http://www.benuit.com/ … … 41 41 add_filter( 'json_prepare_post', array($this, 'add_worona_content_to_api'), 10, 3 ); 42 42 43 // if WP-API is not active, include it 44 if ( !in_array( 'json-rest-api/plugin.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 45 include_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'json-rest-api/plugin.php' ); 46 } else { 47 deactivate_plugins('json-rest-api/plugin.php'); 48 } 43 // 44 $this->include_wp_api(); 49 45 } 50 46 … … 145 141 return $_post; 146 142 } 143 144 /* 145 * include_wp_api 146 * 147 * This function is called during the __construct() and will do things such as: 148 * check if we can include the WP-API plugin and include it. 149 * 150 * @type method 151 * @date 13/04/15 152 * @since 0.7.2 153 * 154 * @param N/A 155 * @return N/A 156 */ 157 158 function include_wp_api() { 159 160 // check if current_action function exist, because it was introduced in WP 3.9 161 if (function_exists('current_action')) { 162 // if WP-API is not active, include it 163 if ( !in_array( 'json-rest-api/plugin.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 164 error_log("json-rest-api/plugin.php"); 165 include_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'json-rest-api/plugin.php' ); 166 } 167 } 168 } 169 147 170 } 148 171
Note: See TracChangeset
for help on using the changeset viewer.