Try this:
<div class="my-metabox">
<!-- This is your metabox HTML -->
<-- Add this button somewhere: -->
<button id="my-submit" class="button button-primary button-large">Submit</button>
</div>
Add this JavaScript snippet however you want only to this screen (either by checking the post type and enqueue this in the admin footer or output it directly along with your metabox HTML):
<script type="text/javascript">
jQuery(function($) {
// You can substitute this with a CSS rule somewhere:
// <style type="text/css"> #submitdiv { display: none } </style>
// if you wish to avoid the hiding 'flicker'
$('#submitdiv').hide();
$('#my-submit').on('click', function(ev) {
ev.preventDefault();
$('#publish').trigger('click');
});
});
</script>
Related Posts:
- How to add a custom CSS class to core blocks in Gutenberg editor?
- Filter translations (gettext strings) on specific admin pages
- How to add icons to post listing (edit.php) in admin
- Adding a class to the body_class function
- How can I send data to admin-ajax via JS Fetch?
- How to limit the pages displayed for choosing parent page on page attribute’s menu?
- Add classname to the_category() function?
- Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies
- Filtering admin entries for custom post type
- how to change appearence of the content of default post list columns?
- How to remove google font in WordPress for only single page?
- Where is this inline CSS code [closed]
- How to center oEmbedded content
- Remove CSS & JS files from WordPress Main Page For Increase Pagespeed?
- Add new post with predefined / preset date
- Make the Status, Visibility, or Date fields opened by default in the Publish box
- Header image automatically changes depending on season
- Adding a Clone link to product attributes – post_row_actions() filter, or how to override a Class question
- Filtering the post list in the admin area
- Filter for when the post is updated
- Help with filter for wp_notify_moderator()
- Change login CSS
- Admin: how to make a custom list filter button send GET queryvars
- Echo string in admin panel footer beside version no
- an action hook when a post reaches a certain number of views
- Add an attribute to the root from functions.php with add_filter
- How to filter page title for certain page?
- Having issue with dynamic data within restrict_manage_posts function
- meta box loop problem with a search filter
- Filter on the day of the week from timestamp
- Admin view: filter posts by whether they have specific taxonomy attached
- Get content of publish box
- How to filter posts in admin by before date or by post status ‘future’?
- Adding to an array & passing it through do_action/apply_filters
- Admin filter/error if post title is too long
- Remove “minor-publishing” div from Publish admin metabox
- Remove pipe in views admin page filter
- This code works, but breaks the media uploader. How do I integrate it in a way that won’t?
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Disable emojicons introduced with WP 4.2
- How to remove a filter that is an anonymous object?
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- What are the standard admin CSS id/class tags?
- WordPress hooks/filters insert before content or after title
- How to add defer=”defer” tag in plugin javascripts?
- add_action(), add_filter() before or after function
- apply_filters(‘the_content’, $content) vs do_shortcode($content)
- How do filters and hooks really work in PHP
- Trouble understanding apply_filters()
- What is the very earliest action hook you can call?
- How would one modify the filtering Gutenberg applies to pasted content?
- How can I modify the WordPress default widget output?
- Disable dragging of meta boxes?
- Add custom options to the wplink dialog
- Remove classes from body_class
- what is __return_false in filters
- Explanation for apply_filters function and its variables
- Gutenberg: Is there a way to know if current block is inside InnerBlocks?
- How to reorder billing fields in WooCommerce Checkout template? [closed]
- Insert HTML just after tag
- the_content and is_main_query
- Filter by custom field in custom post type on admin page
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- How to show page content in feed?
- wp_headers vs send_headers. When to use each?
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- Disable SSL / HTTPS for wordpress
- Filter any HTTP request URI?
- How to Pass External Variables to Filters/Actions
- How to filter users on admin users page by custom meta field?
- How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button
- Filter by one custom field, order by another?
- Setting admin edit panels & metaboxes positions and visibility for ALL users and admins
- Not able to change wp_title using add_filter
- Update post counts (published, draft, unattached) in admin interface
- How to appending to the_content using add_filter with custom post type?
- Query WP REST API v2 by multiple meta keys
- No filter of code on switch from html to visual editor, how?
- Sanitize and data validation with apply_filters() function
- How to modify posts_where filter only for the search query
- How to hook a filter to catch get_post_meta when alternate a custom field output?
- WordPress admin stylesheet
- How to get shortcode’s input values inside a filter?
- Removing Image and Caption Dimension Attributes
- This CSS Stuffing Works, But Is This A Good Practice?
- How to wrap oEmbed-embedded video in DIV tags inside the_content?
- How to bulk delete all users with no posts?
- How many filter/action hooks are healthy?
- WordPress 3.9 – Trouble Editing TinyMCE 4.0
- Changing JPEG compression depending on image size
- How to add filter with 2 args?
- Why is javascript allowed in my post content?
- How to use update_{$meta_type}_metadata filter to modify meta value
- How to wrap an element around an iframe or embed in content automatically?
- Filter specific shortcode output?
- WordPress Internal @ Mentions
- How to add headers to outgoing email?
- Earliest hook to reliably get $post/$posts
- Insert new element to array with add_filter
- LESS CSS enqueue_style with add_filter to change rel attribute