I consider this question to be borderline unanswerable. It really depends on context.
In your example $post is whatever that global has been set to. That is pretty general, pretty obvious, and not really saying much but without knowing the context in which this code executes it is hard to give a better answer.
That variable is set for each post in the Loop by setup_postdata or the_post and it is set on some back-end pages in similar ways, based ultimately in $_GET or $_POST data whether that $_GET or $_POST data contains a post ID or components of a query.
Many of the hooks and filters that you use are passed that value so it is not always necessary to grab the global directly.
Related Posts:
- Remove Custom Taxonomy Metabox from Custom Post Type Screen
- How do I set the default admin sort order for a custom post type to a custom column?
- Can you make a custom metabox field be required to save a new post?
- Action hook on Edit custom post type?
- Display content from custom meta boxes in revisions
- Changing the priority of a custom taxonomy’s metabox
- manage posts custom column is not populating data from meta boxes
- How to get custom metabox image field?
- Detect meta value changes when post is updated (post_updated)
- Custom field being erased after autosave
- How to select one major category (or custom taxonomy) for a custom post type?
- How can i add a metabox to pull list of custom posts (any two) on edit or add post screen?
- How to add a select menu to this metabox code?
- Cleanest way to code “Custom Write Panels/Meta Boxes”?
- Custom post type’s slug gets wrong when adding a custom meta box
- Metabox saving values
- Having trouble with custom post type / meta box
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- How to add meta boxes(repeater fields) from WordPress back end?
- Displaying Meta Box Image
- Change Post Title Edit Box
- Multiple information using custom post type
- How to keep a check box in custom meta box for custom post type checked by default for add new post?
- Show metabox in custom-post-template depending on taxonomy term?
- How to add a “custom” date field to a custom post type?
- Meta Box Only in CPT Edit Page, Not in Add New
- get_post_meta is returning image id
- Why do I lose the content of meta boxes when I leave the page?
- WordPress nl2br is not converting newline to html line break when saving metabox value
- Create custom PAGE with register_post_type
- Populate Custom Fields in a Custom Post Type?
- Duplicate Custom Header Functionality into the post edit screen
- Send email button in custom post type backend
- Custom meta box data array: foreach not working correctly?
- What’s the difference between same wp functions get_posts(); functions in different form?
- how to check if custom post type column already exists?
- How to check if user meta field is empty in conditional else statement
- Custom Post Type with Templates using Meta Boxes?
- Post Quote with image on header for news site
- How to Create an Image Upload Box for Custom Posts?
- How to store multiple values in 1 meta_key with radio input?
- Extending AZIndex plugin to use custom post types and custom taxonomies
- A better way to add a meta box to custom post types
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Create Connection Between two post types
- Disable closing on metaboxes
- Order a custom post type admin screen by a second custom post type title
- Create a Dropdown from Custom Post Type
- meta box on custom post type
- Listing custom terms in custom post meta
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Moving meta boxes in admin
- Can I restrict category availability?
- Custom columns doesn’t appear in custom post type
- Displaying a div from an assigned meta_value when on a page
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- populate array with posts
- Retrieving meta-box from a custom-post-type
- Create a custom post type for a photo post
- How to insert data into meta box from another plugin?
- Getting post attchment URL to populate a CPT Admin Page Column
- Display metaboxes if checkbox ir marked
- Create a select metabox that the user can pupolate?
- Display custom meta on page that has been check in custom post type
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Saving metabox keys and storing values as array
- How to sum values from all custom posts metabox
- Custom sortable column with WPAlchemy
- Sortable column with custom data by date
- Publish box in CPT remove ‘edit’ link
- Saving a Custom Post Type with a Meta Box results in a “Updating Failed” error
- Adding accordion-section to custom post type edit screen
- I’m having trouble with Related Product “tax_query” ‘terms’ value
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- wp_editor in custom post type is not saving formatted text like bold, italic etc
- Add other all taxonomies as meta boxes to custom post type
- Metaboxes in Loop
- How save custom meta type posts multicheck grouped by taxonomy (with CMB2) [closed]
- Custom meta box data not saving
- Collect custom post in a calendar
- Meta Box not being added in plugin
- Unable to get the values for metaboxes for custom post type
- Custom meta-box for all custom post types
- Howto: use existing post_meta as options for a different metabox (checkboxes or list)
- Meta-Box to add multiple items one at a time and on publish save all
- WPAlchemy Metabox rewriting slug
- Displaying wp post categories into my custom metabox
- Filter CPT based on meta box value using Flexible Posts widget?
- Add Metabox to all custom post types
- Loading one meta box only on post-new.php with a forward link
- Textarea type on one field custom add_meta_box?
- Extending a CPT by Created by another plugin
- Creating entries with image attachements within posts and managing them in a list
- Adding a custom “Add Custom Field” button to Custom Meta boxes
- add a “list” into add meta box : problem
- Show search for data extracted from metabox
- Issues on saving data from CPT select metabox
- Remove custom meta boxes from custom post type
- My custom meta box with textarea field not saved