Plugin Directory

Changeset 2054976


Ignore:
Timestamp:
03/22/2019 02:49:22 AM (7 years ago)
Author:
warriorrocker
Message:

Update menus api endpoint and interfaces.

Location:
xo-for-angular/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • xo-for-angular/trunk/Includes/Api/Abstract/Objects/Menu.class.php

    r2044909 r2054976  
    99{
    1010    /**
    11      * Additional css classes that may be used in the front-end.
     11     * ID of the menu item mapped from ID.
     12     *
     13     * @since 1.0.8
     14     *
     15     * @var int
     16     */
     17    public $id;
     18
     19    /**
     20     * ID of the menu item's parent mapped from menu_item_parent.
     21     *
     22     * @since 1.0.8
     23     *
     24     * @var int
     25     */
     26    public $parent;
     27
     28    /**
     29     * Type of the object of the linked menu item mapped from type.
     30     *
     31     * @since 1.0.8
     32     *
     33     * @var string
     34     */
     35    public $type;
     36
     37    /**
     38     * Link text of the menu item mapped from title.
     39     *
     40     * @since 1.0.8
     41     *
     42     * @var string
     43     */
     44    public $title;
     45
     46    /**
     47     * Order of the menu item mapped from menu_order.
     48     *
     49     * @since 1.0.8
     50     *
     51     * @var string
     52     */
     53    public $order;
     54
     55    /**
     56     * Date of the menu item mapped from post_date.
     57     *
     58     * @since 1.0.8
     59     *
     60     * @var string
     61     */
     62    public $date;
     63
     64    /**
     65     * Modified date of the menu item mapped from post_modified.
     66     *
     67     * @since 1.0.8
     68     *
     69     * @var string
     70     */
     71    public $modified;
     72
     73    /**
     74     * URL of the menu item or relative URL if using target="_blank" mapped from url.
     75     *
     76     * @since 1.0.8
     77     *
     78     * @var string
     79     */
     80    public $url;
     81
     82    /**
     83     * Type of linked menu item object mapped from object.
     84     *
     85     * @since 1.0.8
     86     *
     87     * @var string
     88     */
     89    public $object;
     90
     91    /**
     92     * ID of the linked menu item object mapped from object_id.
     93     *
     94     * @since 1.0.8
     95     *
     96     * @var string
     97     */
     98    public $objectId;
     99
     100    /**
     101     * Additional CSS classes that may be used in the front-end.
    12102     *
    13103     * @since 1.0.0
     
    18108
    19109    /**
    20      * Target for the anchor link.
     110     * Target for the anchor link applied to the menu item.
    21111     *
    22112     * @since 1.0.1
     
    42132        // Map base menu object properties
    43133        $this->title = $menu->title;
     134        $this->type = $menu->type;
     135        $this->parent = intval($menu->menu_item_parent);
     136        $this->object = $menu->object;
     137        $this->objectId = intval($menu->object_id);
    44138        $this->classes = $menu->classes;
    45         $this->parent = $menu->menu_item_parent;
    46139        $this->target = $menu->target;
    47140
  • xo-for-angular/trunk/Includes/Api/Abstract/Objects/Post.class.php

    r2042983 r2054976  
    147147    function __construct(WP_Post $post, $terms = false, $meta = false, $fields = false, $breadcrumbs = false) {
    148148        // Map base post object properties
    149         $this->id = $post->ID;
    150         $this->parent = $post->post_parent;
     149        $this->id = intval($post->ID);
     150        $this->parent = intval($post->post_parent);
    151151        $this->type = $post->post_type;
    152152        $this->slug = $post->post_name;
  • xo-for-angular/trunk/Includes/Api/Controllers/MenusController.class.php

    r2042983 r2054976  
    99{
    1010    /**
    11      * Get a navigation menu by location name
     11     * Get a navigation menu by location name.
    1212     *
    1313     * @since 1.0.0
  • xo-for-angular/trunk/README.md

    r2042983 r2054976  
    55Xo provides a foundation for both Angular and WordPress developers to use what they know best.
    66
    7 1) Use WordPress to manage content for pages and posts and let Xo generate your routes dynamically.
    8 2) Use the Xo API to get pages, posts, menus, options, and more in your Angular app.
    9 3) Run locally using ng serve for rapid development of new features and updates.
    10 4) Deploy for production using ng build and then distribute your theme with or without the source code.
     71. Use WordPress to manage content for pages and posts and let Xo generate your routes dynamically.
     82. Use the Xo API to get pages, posts, menus, options, and more in your Angular app.
     93. Run locally using ng serve for rapid development of new features and updates.
     104. Deploy for production using ng build and then distribute your theme with or without the source code.
    1111
    12 Getting started with Xo is easy, find the quick start guides at: https://angularxo.io/guides
     12Getting started with Xo is easy, begin with the [Getting Started](https://angularxo.io/guides) guides.
    1313
    14 Xo also provides an extensive customization API provided here: https://angularxo.io/api
     14Xo also provides an extensive customization [API](https://angularxo.io/api).
     15
     16## Getting Started
     17Getting started takes just a few minutes!
     18
     191. Add the [Xo for Angular](https://wordpress.org/plugins/xo-for-angular/) plugin to WordPress.
     202. Add the [angular-xo](https://www.npmjs.com/package/angular-xo) module to your Angular app.
     213. Read the guides for [WordPress](https://angularxo.io/guides/wordpress), [Angular](https://angularxo.io/guides/angular), and [Templates](https://angularxo.io/guides/templates).
     22
     23## Installation
     24The easiest method is directly through WordPress by searching "Xo for Angular" on the Add New plugins screen. Alternatively the latest stable release is also available for download from the [WordPress Plugins](https://wordpress.org/plugins/xo-for-angular/) repository.
     25
     26Alternatively to use the latest development version simply clone this repository into a folder named "xo-for-angular" within your "wp-content/plugins" directory.
     27
     28Run this from the plugins folder.
     29```
     30$ git clone https://github.com/WarriorRocker/angular-xo-core.git xo-for-angular
     31```
    1532
    1633## Resources
    17 The main documentation site, https://angularxo.io is written to take full advantage of the features available within Xo. The full source code is available at: https://github.com/WarriorRocker/angular-xo-material
     34The main [angularxo.io](https://angularxo.io) documentation site theme, [Angular Xo Material](https://github.com/WarriorRocker/angular-xo-material) has been provided as a complete example or base to integrating Xo with your Angular theme.
  • xo-for-angular/trunk/xo-angular.php

    r2054167 r2054976  
    44Plugin URI: https://angularxo.io
    55Description: Angular theme development in WordPress with templates and a powerful API.
    6 Version: 1.0.7
     6Version: 1.0.8
    77Author: Travis Brown
    88Author URI: http://www.xodustech.com
Note: See TracChangeset for help on using the changeset viewer.