I would suggest using post_submitbox_misc_actions action as shown in the below example to provide an option for Publish meta-box.
<?php
add_action( 'post_submitbox_misc_actions', 'my_post_submitbox_misc_actions' );
function my_post_submitbox_misc_actions(){
?>
<div class="misc-pub-section my-options">
<label for="my_custom_post_action">My Option</label><br />
<select id="my_custom_post_action" name="my_custom_post_action">
<option value="1">First Option goes here</option>
<option value="2">Second Option goes here</option>
</select>
</div>
<?php
}
?>
Once used for at-least one post( or a CPT), then those options should appear beside publish actions in all posts admin page.
Related Posts:
- Earliest hook to reliably get $post/$posts
- How to pass/get data to/from the WooCommerce data-product_variations object?
- What does (10, 2) mean when used with add_filter
- Clarification on filters and hooks
- Valid characters for actions, hooks and filters
- How to check if a hook is hooked or not?
- Passing Additional Parameters to add_filter Callable
- Modify WordPress Rest Api Request/Response
- How to add some custom HTML into wordpress admin bar?
- How to add icons to post listing (edit.php) in admin
- Custom theme hooks / filters – passing arguments
- How to hook wp_list_pages?
- How to make post and comment count unclickable with dashboard_glance_items hook
- How to use the_excerpt in a filter hook?
- Hook into admin post list page
- How can I hide all posts that don’t have a thumbnail?
- Change text of Description in Image Library
- Am I using the right hook for removing quicktags on the admin TinyMCE?
- About Hooks and Filters
- Should I use add_action(‘publish_post or add_filter(‘publish_post?
- Too many actions/filters!
- How to get list of all hooks of current theme / plugin?
- Which hook is fired when inserting media into a post
- Filtering admin entries for custom post type
- What hook/filter can I use to add/edit/show/hide the title under (on hover) links on the table view?
- Change WordPress RSS link with filter?
- Add a header before fields added with the attachment_fields_to_edit() filter
- Hide content editor for posts after approriate date
- Why my admin doesn’t work after adding rest_prepare_post filter?
- add_filter() function misunderstanding
- Same Conditionals Not Working on Two Different Hooks
- Filter or Hook to catch pre-rendering of post content
- Can the wp_filter object hold multiple values with the same key
- check to see if hook is available
- apply_filters/do_action tag characters limit
- Insert term when page is published – avoid duplicates after edits
- How to modify core when there is no hook?
- When does a function assigned to the content_filtered_edit_pre filter hook fire?
- Post Content, Special Characters and Filters
- Capture post content before page renders
- Remove_action does not work
- How to remove action with slashes and arrows?
- Better extend a class or use add filter/action hooks?
- Add content as soon starts
- Make an array filterable per hook
- Changing WordPress core without hacking core
- Adding a Clone link to product attributes – post_row_actions() filter, or how to override a Class question
- Comment search plugin
- Plugin options, presets and filters : can you help me improve my workflow?
- how to customize rss feed tags using hooks?
- What hooks to hook onto for automatic cache clearing
- Modify Redux Framework Options in Child Theme
- How to customize category_description()?
- How can I output all apply_filters and do_action?
- Set default value for “Additional CSS class(es)” for specific block types
- Disadvantage of using filters & hooks multiple times
- Admin post list – adding an option to the date filter dropdown
- Modify message displayed on post save
- How to add a filter to the get_body_class function?
- Pass debug_backtrace() in WordPress filter
- How to override include_once pointed file using add_filter?
- Remove actions/filters that are set with create_function()
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- comment_for() Custom fields not visible when user is logged in
- How to access page variable inside action hook
- Admin: how to make a custom list filter button send GET queryvars
- I need to hook and change language of facebook sdk
- Use has_filter on comment_post
- Renaming wordpress login and get new password button
- Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )
- Hook in a sidebar widget and add some markup
- BuddyPress – A hook available to hide custom born date on public profile view?
- ‘manage_users_custom_column’ is a filter, but ‘manage_posts_custom_column’ is an action. Why?
- Scanning for custom embed and prefetching
- The gettext hook doesnt work on text with links
- Remove and replace woocommerce add to cart button [closed]
- Hook to change the site URL
- Modify WordPress Page Title ()
- Add an attribute to the root from functions.php with add_filter
- Would like to use hook or filters to customize email templates
- Hook to add content after date in post?
- Is it possible to assign a css id to a row in plugins list table?
- Add Index to Item in WordPress Gallery
- Remove image of srcset
- Re-order search results with posts_orderby filter and post meta value
- wp_editor customization
- Converting restricted html in comments to bbcode
- Publish button inside custom field group
- How to filter posts in admin by before date or by post status ‘future’?
- How to add a class to Buddypress avatars in the Activity stream? [closed]
- WooCommerce comments_template Filter Not Firing
- NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code [closed]
- str_replace css meta tag?
- How do you disable the verification process of user email changes?
- Can you call a filter hook by “add_action”?
- Better way to change the default password reset url with the woocommerce one?
- How to elect position of new item output in a dropdown when using add_filter
- Replacing text using add_filter
- Change password reqts with NO plugin without breaking resetpass link?
- “Invalid parameter(s): attributes” issue in context of “blocks.registerBlockType” filter