You can use the the_editor_content
filter:
function wpa_editor_content( $content ) {
global $post;
return "this post's id is $post->ID " . $content;
}
add_filter( 'the_editor_content', 'wpa_editor_content' );
Related Posts:
- Get old values for post before saving new ones
- How can i do something after head like adding a hook for after head but before post
- How to retrieve the postID in a “image_send_to_editor” hook function?
- What is the filter or hook to add admin controls to posts on the front end?
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- Trying to alter the post_content through the_post
- Adding bootstrap classes to video shortcodes
- Modify posts listing at back end
- Hook for changing excerpt content when excerpt not set
- Is it possible to add a shortcode below post title?
- Restricting displayed posts to posts from only select authors
- How to get the postID inside ‘content_save_pre’? Other hook?
- Removing filter dropdown in posts table (in this case Yoast SEO)
- Execute function when post is published
- how to limit edit_form_after_title hook to page and post edit only?
- How does filter the_posts work?
- How to publish a post with empty title and empty content?
- How to add a “publish” link to the quick actions
- Action hook ‘wp’ firing twice… why?
- Why is wordpress removing some unicode characters (e.g. some emojis) when I save my post?
- Better post meta efficiency?
- Count singular post views automatically
- How to remove_filter that filters iframes in posts? [duplicate]
- How to change post status from publish to draft using hook in wordpress?
- Custom function for “Submit for Review” hook
- How to filter content post only on save
- If specific user role then sticky post
- Does an action fire when adding a tag via the “Tags” meta box?
- the_posts filter been called multiple time
- Filter Posts By Tag
- Custom excerpt length filter doesn’t work
- Are posts updated or built from revisions + autosaves?
- Only display posts after current date
- Amend wordpress password function
- Custom Post Templates
- How to generate numbers indistinguishable for the IDs of the posts
- How to filter posts that belong to a specific category only if that is the only category
- Action hook for new pending posts?
- Filter Custom Post Type by Category with Ajax
- Register post status, exclude from searches
- pre_get_posts query between 2 dates (date stored in custom post meta)
- how to remove dash (-) post status from post title on posts listing page wordpress
- Modify Image Source With The_Content Filter?
- How to modify post content?
- Which WordPress hook fires after post content loaded?
- Change post order random through out the entire WordPress
- How to hide html tags on revision comparison pages?
- Add filter by custom field to block of posts
- Default to ‘all’ view on the ‘edit-post’ screen for authors
- More then one menu items are assigned with “current-menu-item” class
- How to access $post from a callback function
- How to allow visitors to filter posts by multiple taxonomies
- Call Web Services on post first publish
- add to end of post in the loop with plugin
- What does WordPress do if I save a post without content/title? [duplicate]
- Is it possible to filter the main loop to exclude posts from a specific category?
- preg_replace not removed “class”
- why the same code got different results when using query_posts in functions.php and index.php
- Divs appearing everywhere in post content
- Prevent posts with certain post_meta to be edited
- How include css class based on post ( in loop ) slug?
- Restrict displaying posts to the poster itself (in Back-end)
- Exists filter or action that change Add New Post link?
- changing parent_id on post
- Trying to exclude custom posts based on date, while sorting by custom field
- can’t modify post title using the_posts filter
- Show only posts with titles/permalinks that do not contain certain words
- user_has_cap filter allows “edit_others_posts” but not is not allowing updating/publishing
- Using AJAX to filter posts without refreshing page
- Posting to WP via URL
- Filter posts by month (dropdown)
- Randomize post (and page) IDs on generation
- Hook when post is set from published to draft?
- Display/Filter post using if else statement
- Get Category in save_post Hook
- Count singular post views automatically
- Dropdown Select Post Filter
- Add view to admin menu to filter for specific criteria ( If post is child of specific Parent )
- show only one category and filter by tag
- Prevent WordPress from putting around specific element
- filter buddypress users posts by user ‘xprofile’ custom fields
- Override wp_link_pages pagebreak with filter
- How do I change the post title’s link on the posts page?
- Grab meta data before post is saved
- How to create frontend Post filter using meta query
- Printable Page with all Posts from Tag
- How to test if user is filtering post list in dashboard
- Hide Admin posts & pages in Dashboard
- Extracting a TLD from the content and assign to custom field
- Filter question list on substring of metavalue
- Get results from the main wp_query
- Keep post format class with isotope filter
- Hook only specific post type
- Custom filter on all post page (admin backend)
- How to use in_category?
- the_content() not displaying the full post
- save_post not working
- Add custom PHP (no-SQL) filter to WP_query
- Filters do not work when there are multiple (one works)
- Admin notice on wp_insert_post