I solved this by reading from the DOM. Not the prettiest way but it does what I needed.
const CustomUpdateComponent = {...};
document.addEventListener('DOMContentLoaded', () => {
// replace update button with our own
const publishingActionButton = document.querySelector( '#publishing-action' );
if (publishingActionButton) {
const postId = document.querySelector( '#post_ID' ).value;
render( <CustomUpdateComponent post={postId} ... />, publishingActionButton );
}
});
Related Posts:
- How do I access the body of a WP API request in a custom route?
- wp rest api v2 return json_no_route
- WP-REST API not returning all its endpoints, 404 on documented endpoints
- WP REST API V2 – Modifying responses
- OAuth signature does not match
- How to upload image to wordpress from external page
- WP API to fetch all records for /posts, /media, /categories
- WP Rest API get page from path
- backbone fetch() not working
- WP-API user email change confirmation
- No featured media in API request
- Syntax for REST API to have bold formatted and multiple lines in product description [closed]
- WP Rest get all by post within that category, by category name not by cat ID
- Add Data to Response of WP-JSON Root
- OAuth1 empty “authentication” in /wp-json
- WP – API – OAuth 1.0a Server, How to implement with AngularJS?
- Are there events pub/sub for external application to subscribe to file/pdf uploads by wordpress admin
- WP API and Proxy
- Get single item from cURL plugin API call inside bash [closed]
- why woocommerce api only do not upload images from local computer? [closed]
- ng-repeat is not returning a list of posts
- What request is WordPress sending on theme update?
- Is WP API going to be around in the long term?
- How to Create a Post from localfiles?
- Get a complete list of all categories using node-wpapi
- upload image to wp-api
- WP-API call function
- wordpress api make 2 custom post type with single request
- Update Custom Post Type Metadata Wp Rest API
- WP-API Content showing null
- How to retreive/set wordpress page html?
- Query WP REST API v2 by multiple meta keys
- Uploading media with the REST API
- Are there server performance benefits to fetching only specific fields when querying the REST API?
- WordPress Rest API
- Retrieving pages with multiple tags using REST API
- Insert variations via woocommerce api [closed]
- Fetching private posts or custom post types via WP-API with basic authentication
- Custom endpoint and X-WP-TotalPages (headers)
- WP Rest API v2 filter and display latest post with specific tag
- WordPress Rest API: How do we validate with our custom API key?
- How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?
- Can I list all installed plugins/versions and wp version from API
- How do I retrieve a list of popular plugins using the WordPress.org Plugin API?
- How to filter or search the posts using postmeta tables custom meta fields with wordpress REST API
- Hiding API routes list
- Get more than 10 posts in a specific category with the wordpress api
- WP REST API – Retrieve content from page
- Updata Metadata WP Rest API
- Keep getting 401 error from WordPress on AWS Lightsail
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- node-wpapi: how to handle authentication?
- Backbone.js and WP API
- React post to WordPress custom post type
- Post body not working with wp_remote_post()
- Hook before posting via JSON REST API
- Display post title from WordPress excluding a string via API
- WP_REMOTE_POST Requests are being blocked by API provider [closed]
- Cache WP remote_get HTTP Response using Transients
- I am getting error message on accessing menu-endpoint
- Update Line Item Meta Data – WooCommerce API
- Use the backbone.js client to save custom post type meta
- Get non-rendered content from WP-API
- No ‘Access-Control-Allow-Origin’ when call rest API
- Adding custom end points, No error line
- Using WP-API and SSE not authenticating user ID
- Custom Post Type not showing in Rest API on Multisite
- WP-API select custom taxonomy when creating a post
- Authenticating a user with the WP-API V2 in Postman
- Faceted search with WP-API data
- WordPress API for custom post types returns rest_no_route
- WP REST API – get custom taxonomies based on terms & filter
- Getting featured image with PHP and not javascript from wordpress api _embed [closed]
- How can I spin up a new website for a registered user automatically?
- Creating a WordPress Post via REST API – HTML or Markdown?
- Custom REST endpoint not working to retrieve single posts (“rest_no_route”)
- Why is wp api returning old acf values?
- Best way to retrieve data in custom api extended from wp-api
- WP-API: get posts in multiple categories
- WP-API Custom Post Type json_no_route
- Cannot use WordPress Application Passwords: “code”: “rest_no_route” “status”:404 for /wp-json/wp/v2/users/me/application-passwords
- wp-api Backbone JS Client fetch options
- is_user_logged_in not working from WP-API (wp-json)
- wp_update_user very slow
- Escape commas in REST API
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- How to use following API with WordPress?
- Help to create the best plugin settings!
- How to use the WordPress API to get links and scripts in and
- Woocommerce REST API not considering discounts and coupons
- Extending the API I created to return category names
- How to properly set a value to meta fields of a custom post type in WP-API/node-wpapi REST API?
- WordPress Customazation API section in section
- Best Way to detect unique posts in wp rest api
- Combining results from WP-API using AngularJS
- return content section as json in wp rest api v1
- WP-API : post_meta not updated… but have another entry
- External api call using wordpress
- Woocommerce API for calling products by Category ID
- wordpress rest api authentication failed