WordPress Mango Plugin


The WordPress Mango Plugin is an companion plugin to Mango. It adds multiple REST endpoints which are thus not available in the current WP REST V2 specification.

Authentication

Currently the WordPress Mango Plugin does not supports and authentication or authorization.

Error States

The common HTTP Response Status Codes are used.

Locations

Exposes the available nav menu locations.

A single object containing all the available nav locations of the enabled WordPress theme.

REQUEST

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "top": 2
}


                      
                        
                      
Nav menu

Exposes the information about nav menus.

A single object containing all the information about a nav menu.

REQUEST

Parameters
id int 1

Id of the nav menu to get.

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "term_id": 2,
    "name": "Test",
    "slug": "test",
    "term_group": 0,
    "term_taxonomy_id": 2,
    "taxonomy": "nav_menu",
    "description": "",
    "parent": 0,
    "count": 1,
    "filter": "raw"
}


                      
                        
                      
Nav items

Exposes the associated nav items of a nav menu.

An array containing all the associated nav items of a nav menu.

REQUEST

Parameters
id int 1

Id of the nav menu to get.

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "ID": 4,
        "post_author": "1",
        "post_date": "2018-01-02 14:23:10",
        "post_date_gmt": "2018-01-02 13:23:10",
        "post_content": " ",
        "post_title": "",
        "post_excerpt": "",
        "post_status": "publish",
        "comment_status": "closed",
        "ping_status": "closed",
        "post_password": "",
        "post_name": "4",
        "to_ping": "",
        "pinged": "",
        "post_modified": "2018-01-02 14:23:57",
        "post_modified_gmt": "2018-01-02 13:23:57",
        "post_content_filtered": "",
        "post_parent": 0,
        "guid": "http://localhost:8080/?p=4",
        "menu_order": 1,
        "post_type": "nav_menu_item",
        "post_mime_type": "",
        "comment_count": "0",
        "filter": "raw",
        "db_id": 4,
        "menu_item_parent": "0",
        "object_id": "1",
        "object": "post",
        "type": "post_type",
        "type_label": "Beitrag",
        "url": "http://localhost:8080/2018/01/02/hallo-welt/",
        "title": "Hallo Welt!",
        "target": "",
        "attr_title": "",
        "description": "",
        "classes": [
            ""
        ],
        "xfn": ""
    }
]