Plugin Directory

Changeset 1181173


Ignore:
Timestamp:
06/15/2015 03:15:17 PM (11 years ago)
Author:
guavaworks
Message:

v2 upgrade

Location:
angularjs-for-wp/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • angularjs-for-wp/trunk/plugin.php

    r1149615 r1181173  
    44 * Plugin URI: http://www.roysivan.com/angularjs-for-wordpress
    55 * Description: This plugin will allow you to easily load WordPress content client-side using AngularJS. JSON REST API required.
    6  * Version: 1.2.2
     6 * Version: 2.0.0
    77 * Author: Roy Sivan
    88 * Author URI: http://www.roysivan.com
     
    1414require_once('includes/shortcodes.php');
    1515
    16 define('WordPressAngularJS', '1.2.2');
     16define('WordPressAngularJS', '1.2');
    1717
    1818class WordPressAngularJS {
     
    6666            array(
    6767                'site' => get_bloginfo('wpurl'),
    68                 'base' => json_url(),
     68                'base' => get_bloginfo( 'wpurl') . '/' . rest_get_url_prefix() . '/wp/v2',
    6969                'nonce' => wp_create_nonce( 'wp_json' ),
    7070                'template_directory' => $template_directory
     
    8181
    8282/** 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     }
     83function 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    }
    8791}
    8892
     
    9195}
    9296
    93 add_action('admin_init', 'angular_wpapi_check');
     97add_action( 'admin_init', 'wpsd_check_dependencies', 99 );
    9498
    9599new WordPressAngularJS();
  • angularjs-for-wp/trunk/readme.txt

    r1149639 r1181173  
    44Tags: angularjs, angular js, angular, javascript, client side, single page application, mvc, client side framework
    55Requires at least: 3.9
    6 Tested up to: 4.2.1
    7 Stable tag: 1.2.2
     6Tested up to: 4.2.2
     7Stable tag: 2.0.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7373= 1.2.2 =
    7474* Adding in HTML Janitor - [fixing issue](https://github.com/royboy789/angularjs-for-wordpress/issues/6)
     75 
     76= 2.0.0 =
     77* Now works with JSON REST API v2 beta
Note: See TracChangeset for help on using the changeset viewer.