Changeset 1181173 for angularjs-for-wp/trunk/plugin.php
- Timestamp:
- 06/15/2015 03:15:17 PM (11 years ago)
- File:
-
- 1 edited
-
angularjs-for-wp/trunk/plugin.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
angularjs-for-wp/trunk/plugin.php
r1149615 r1181173 4 4 * Plugin URI: http://www.roysivan.com/angularjs-for-wordpress 5 5 * Description: This plugin will allow you to easily load WordPress content client-side using AngularJS. JSON REST API required. 6 * Version: 1.2.26 * Version: 2.0.0 7 7 * Author: Roy Sivan 8 8 * Author URI: http://www.roysivan.com … … 14 14 require_once('includes/shortcodes.php'); 15 15 16 define('WordPressAngularJS', '1.2 .2');16 define('WordPressAngularJS', '1.2'); 17 17 18 18 class WordPressAngularJS { … … 66 66 array( 67 67 'site' => get_bloginfo('wpurl'), 68 'base' => json_url(),68 'base' => get_bloginfo( 'wpurl') . '/' . rest_get_url_prefix() . '/wp/v2', 69 69 'nonce' => wp_create_nonce( 'wp_json' ), 70 70 'template_directory' => $template_directory … … 81 81 82 82 /** JSON REST API CHECK **/ 83 function angular_wpapi_check(){ 84 if ( !is_plugin_active( 'json-rest-api/plugin.php' ) ) { 85 add_action( 'admin_notices', 'angular_wpapi_error' ); 86 } 83 function wpsd_check_dependencies() { 84 if ( ! defined( 'REST_API_VERSION' ) ) { 85 function wpsd_admin_notice() { 86 printf( '<div class="error"><p>%s</p></div>', __( 'Activate the WP REST API plugin. It 87 is required.' ) ); 88 } 89 add_action( 'admin_notices', 'angular_wpapi_error' ); 90 } 87 91 } 88 92 … … 91 95 } 92 96 93 add_action( 'admin_init', 'angular_wpapi_check');97 add_action( 'admin_init', 'wpsd_check_dependencies', 99 ); 94 98 95 99 new WordPressAngularJS();
Note: See TracChangeset
for help on using the changeset viewer.