Giter VIP home page Giter VIP logo

menus-endpoints's People

Contributors

danielbachhuber avatar joehoyle avatar kadamwhite avatar kwight avatar natewr avatar spacedmonkey avatar timothybjacobs avatar westonruter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

menus-endpoints's Issues

Widgets Schemas

Categories

  • title - string - ''
  • count - boolean - 0
  • hierarchical - boolean - 0
  • dropdown - boolean - 0

Archives

  • title - string - ''
  • count - boolean - 0
  • dropdown - boolean - 0

Meta

  • title - string - ''

Pages

  • title - string - ''
  • sortby - string - 'post_title'
  • exclude - string (comma-separated IDs)

Custom Menu

  • title - string - (default: no property)
  • nav_menu - integer - (default: no property)

Calendar

  • title - string - ''

Search

  • title - string - ''

Text

  • title - string - ''
  • text - string - ''
  • filter - boolean - 0

Tag Cloud

  • title - string - ''
  • taxonomy - string - 'post_tag'

Recent Comments

  • title - string - ''
  • number - integer - 5

RSS

  • title - string - ''
  • url - string - ''
  • link - string - ''
  • items - integer - 10
  • error - string 'WP HTTP Error: A valid URL was not provided.'
  • show_summary - boolean - 0
  • show_author - boolean - 0
  • show_date - boolean - 0

Recent Posts

  • title - string - ''
  • number - integer - 5
  • show_date - boolean - 0

PHP notice when accessing the menu-items endpoint

Howdy,

Accessing wp/v2/menu-items/ results in:

<b>Notice</b>:  Undefined index: type in <b>/var/www/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php</b> on line <b>255</b><br />

The result is correct, but this notice invalidates the response of course.

how call to api rest from same domain ?

hi team !

i have my worpdress in a subfolder : mydomain.com/cms

i create another folder /test-api and inside i create a file: index.php

content of this file index.php :

<?php
$json = "http://mydomain/cms/wp-json/wp/v2/users";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec($ch);
curl_close($ch);
if (!$contents) {
    $error = error_get_last();
    echo $error['message'];
}
else
    $data = json_decode($contents, true);

var_dump("result : ",$data);
?>

when in the browser i try to access to : http://mydomain/test-api/index.php
the result is NULL...

but if i try to get this same file /test-api/index.php from another domain, this work !

but not in the same domain . . .

please help me !

Additional Ergonomic Issues

What does it look like when a menu is reordered? It seems like this would require HTTP requests to each menu item to complete. We don't have a batch controller at the moment, but even if we did, we'd still have the overhead of dispatching internal requests for each menu item.

I think menu settings could cleanly be implemented into the menu controller.

Locations could as well, perhaps with the different locations defined by the Schema.

The URL structure is a bit confusing as well. /wp/v2/menus/{menu_id}/items/{item_id} would be more intuitive. Can a menu item belong to more than one menu? Can you have orphaned menu items? The current URL setup and linking somewhat implies that you can.

Change menu_order

Hello
,
I am trying to change the value of the "menu_order" field but when saving the order goes to 1.
route: /wp/v2/menu-items/
params: ['menu_order' =>XX]

Thanks

Collection params

  • Pagination. Does pagination make sense here? Especially with no upper-limit? I think I'd always want to be able to fetch all menu items for a menu.
  • before/after. Querying by publish date doesn't seem to make sense here.
  • menus/menus_exclude. These being arrays seems to imply that a menu item can belong to multiple menus.

Requiring authentication

The project description says you need to be authenticated to use these endpoints. Certainly some of the menus data is meant to be public though (eg it’s on the front end of websites). What sensitive data is stored in the menus and can we make some of the menus data public?

Add an endpoint for menu location

Add a menu locations endpoint to list which list of register menu locations.

With will have get all registered area. This api will not be able to create / edit / delete menu locations

Proposal: split repo into Menus & Widgets components

On August 6 I intend to rename this repository to wp-api/menus-endpoints and create a new repositoriy from the same HEAD called wp-api/widgets-endpoints.

I then intend to remove all widget-related code & documentation from the menus endpoints plugin, and vice-versa

This will entail closing some open PRs of @BE-Webdesign's, as we'd be re-purposing this repository to focus on @spacedmonkey's recent work to solidify the menus endpoints for use in Gutenberg. As those PRs are all somewhat outdated I don't foresee this being an issue, but we can re-open them on the new repository or add an issue back-linking to the closed PRs.

#33 will be invalidated, but we're waiting on feedback on the intend of that change so closing it pending provisionally moving it to the new repository should be similarly feasible.

Please comment below if you have an argument against this proposal; silence or positively-connoted emoji reactions will be interpreted as support :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.