thebatclaudio / wp-rest-api-v2-menus

Adding menus endpoints on WP REST API v2
47 stars 22 forks source link

Fix possible name colision #39

Closed drosendo closed 3 years ago

drosendo commented 3 years ago

If for some reason there is a ACF field with name "title" it will overwrite the original page title. Grouping ACF values into is own object will be easier to find as well as prevent name collision.

thebatclaudio commented 3 years ago

Hi @drosendo, thank you for your pull request. I just released a new version (0.10) of the plugin on Wordpress Repository.

P.S If you tell me your Wordpress.org username I will add you to plugin's contributors in the next release!

drosendo commented 3 years ago

Hey,

It's the same user :)

Dont forget that the structure in the api is changed. The acf data gets stored in his own group.

           "acf": {
                "title": false,
                "sample1": false,
                "sample2": false,
            },