wp-api / menus-endpoints Goto Github PK
View Code? Open in Web Editor NEWFeature plugin for Menu Endpoints
Feature plugin for Menu Endpoints
What permissions should the navigation endpoints have?
Categories
Archives
Meta
Pages
Custom Menu
Calendar
Search
Text
Tag Cloud
Recent Comments
RSS
Recent Posts
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.
Allow users to assign a menu term to a menu location.
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 !
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.
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
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 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
Create issue here for reference.
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 :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.