Yes, the save action has a nonce already. But you don’t know it – so you cannot validate it. Besides that, you may want to fill a meta box from other places like a user profile or the dashboard, and then you need your own nonce anyway.
An example from my current work: There is a custom post type domicile
with a booking schedule meta box. My client is the agent or broker (English is not my native language …) for the domicile and fills the schedule from the editor for the CPT. But the owners of the domiciles can fill the schedule too – from their dashboard. I just load all booking schedules they are assigned to and they edit them without ever seeing the complete data of the domicile.
Without separate nonces this would be very awkward.
Related Posts:
- How to show a custom meta box on the “Quick Edit” screen?
- Reset positions of metaboxes in admin
- How to sanitize select box values in post meta?
- Strategy to get post meta for use outside the loop
- Theme elements not translating
- Set Expiration Date of a Post from the Frontend with wp_insert_post
- Why is save_post triggered even when I havent saved the post
- Appending a value to metabox before and after saving
- How do I obtain the post content via a custom meta box inside the editor?
- More than one meta field in a single meta box?
- wp_editor() usage in custom meta box
- Metadata Query when storing data as array possible?
- Custom metabox for custom page template
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- Wp Super Cache stops the update of a Post Meta
- Where WordPress Stores The Custom Fields Values
- Wpautop in wp_editor not working
- How to show specific post meta?
- Running a function on post update with new post meta
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Is it possible to set a variable for get_post_meta?
- Load different single.php templates according to post layout selection
- Output richtext metabox value
- Get attachment meta (I need attachment ID, unsure how to find it)
- Adjust query on single
- How can I sort my loop based on meta data, using a form?
- show_option_none not working in meta box
- Related Post Category Filter
- Find callback function of custom meta box
- Make a custom field in admin post.php read only
- Access meta box checked value in another file
- Create new sidebars trough admin post/page metabox
- Get all Custom Post Types
- Adding Metabox Value Using the content filter
- Support Multiple featured images
- Change default options on attachment page
- Add custom field to existing meta box?
- After a while attachment meta data is missing “sizes” data
- Why is my Toggle field not showing in Gutenberg?
- How do I access the current post object within a block theme template or pattern?
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- Get the blog page URL set in Options
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- Worthwhile to restrict direct access of theme files?
- How Do I Protect My Premium WordPress App Theme from Copying?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- How to add posts to custom menus?
- WordPress Theme Preview Image
- How To extend WP_Customize_Control
- What is the difference between front-page.php and home.php? [duplicate]
- How can I get page slug
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- When to use _e and __ for the translation?
- What is a Theme textdomain?
- How to add CSS class to custom logo?
- Passing error/warning messages from a meta box to “admin_notices”
- How to add custom css file in theme?
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- Display Search Result Count
- Add “upload media” button in meta box field
- wp_nav_menu(), how to change class?
- theme path in javascript file
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- Making update notification functionality for my themes
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- How do I remove a pre-existing customizer setting?
- Minimum Template Files for Theme Development
- What’s the difference between home.php and index.php?
- pass object/JSON to wp_localize_script
- get_template_part vs action hooks in themes
- Theme Activate Hook
- Solutions for generating dynamic javascript / CSS
- wp_redirect() – headers already sent
- Can I create my own “Recent Posts” widget or customize the existing one?
- Custom single template for a specific category
- how can I add an icon/image for a child theme?
- How can I add a URL field to the attachments window?
- The the_post_thumbnail without srcset?
- The proper way to include/require PHP files in WordPress
- Get the first image from post content (eg.: hotlinked images)
- after_setup_theme always runs
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Getting failure when using filemtime() with wp_enqueue_style
- Do I actually need to link my theme’s style.css in the theme files
- Why is wp_head() creating a top margin at the top of my theme header?
- How to store widget fields data as an array?
- How do I add version control to my workflow?
- Using classes instead of global functions in functions.php