You should never ever modify WordPress Core files. WordPress has an Plugin API (http://codex.wordpress.org/Plugin_API) that allows you to modify WordPress to your liking without changing Core code.
In your case, the solution is to check the contents of the custom meta box fields before they are saved via the save_post action.
If the content is not valid, you can display a message on the post screen using the admin_notices action.
Related Posts:
- How to make a image-size selected by default in Media upload – WP v3.5
- Apply class to every paragraph that holds image?
- Remove “Insert from URL” link in Media upload – WP 3.5
- static variable loop not working in WordPress
- How to change the wp-login.php page title?
- adding a filter to a shortcode?
- Hide custom image sizes from media library
- Set media upload attachment link to none and hide it in WP v3.5
- How to set custom cookies before output
- Permanently remove first image from posts
- Change the footer text on the login page
- How can I hook into and edit the text of a wp_nav_menu tag?
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- add_filter to post-gallery and remove all ‘s?
- Rename image uploads with width in filename
- How to make an meta_query optional?
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Check if page parent has certain template
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Change comments form title on a page by page basis
- Filter the blog title displayed in the header
- Display only text to WordPress loop without loosing the text formatting
- Remove class that has been added by parent theme
- How do I edit the php/html for a particular post?
- append PHP function to the_content
- “Maximum function nesting level of ‘100’ reached” after adding a new filter
- How do I know what variables are passed in a filter/action and what their meaning is?
- Find variables available at a given hook
- wp_get_attachment_url filter won’t accept two arguments
- body_class filter – Is there a better way to write this code?
- Why do filters/actions require an argument count?
- How to add Shortcode (font awesome) in widget title?
- Filter link to existing content suggestion
- Getting my head round WordPress filter
- How To Change The Html of Products filtration sidebar in Woocommerce?
- Woocommerce filter cart and category specific quantity [closed]
- How to set a custom path, for ajax image upload folder in admin?
- Filter get_the_title to remove certain characters?
- Wrap First Character after in a tag
- Get posts with at least one category in common with current post?
- WooCommerce: Add Payment Gateway Field to Webhooks [closed]
- How to use return in my custom function instead of echo
- When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?
- How can i style “echo apply_filters”
- Adding body class to html tag that already has language attrubutes?
- Custom Bulk Actions handler not firing
- How to generate customized filtered output for the gallery
- dynamically change content of div with php
- Add class to all meta boxes for a custom post type
- Add a leading zero to pagination
- How to remove title tag with this filter
- str_replace not preserving whitespace
- How to apply filter
- Custom theme: adding unwanted tags in the content
- Apply filters when loading post via ajax
- Add custom filter to register data in array
- Get terms of the posts with one query
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- Select All not working in a WordPress search filter
- Custom field in title
- WordPress – show all posts + ones with specific tag
- Search box background on a different page template
- dynamically filter by category via sub-menu
- Display a list of users with avatar filterable with alphabets
- WXR XML import is stripping php tags that I need to keep
- How to add custom checkout field in user details mail template
- Keeping the previous get value and add another value when submitted
- AJAX: WordPress filters inside $html do not work as intended
- Why not showing all post by default in my jquery filter
- For each loop will not append to the_content hook
- Assign new post author IF another user in custom field on post transition
- Blog Posts not sorted and pagination not adjusted after filtering some category
- Modify meta data before saving to database
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- How to change wp-admin and wp-login urls
- How to add different menu items on different menus?
- How to pass value to add_filter wpcf7_form_tag from another function?
- Custom Filtering date with newsletter
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?
- How rename wp-content and wp-admin folders correctly
- Unable to logout correctly after wp-login file was modified
- how to append ACF field data using one of the following filter/ hooks
- Changing upload directory temporarily
- Add an attribute on WP images attachment link
- Show post in elementor based on views and specific category with query id feature in elementor
- Display featured posts first, then display all others within a specific category in WordPress
- Edit password change email text or disable it
- Adding Author Filter to CPTs
- How can I display formatted content using the_content filter?
- Using send_password_email filter after wp_update_user
- Is there a way to get a path to the theme directory without the server name?
- Prevent publishing of uncategorized posts
- WordPress query_posts with multiple tax_query
- Ajax Filters with Multiple tax_query args
- How do I ensure that the URL parameters are updated correctly when multiple filters are applied
- Filtered queries not responeding to page path