The get_edit_post_link
filter lets you modify that value. This is applied any time get_edit_post_link
function is called, which admin uses, as well as themes on the front end.
function wpd_edit_post_link_filter( $link, $post_ID, $context ){
if( 'room' == get_post_type( $post_ID ) ){
$link = $link . '&fubar=baz';
}
return $link;
}
add_filter( 'get_edit_post_link', 'wpd_edit_post_link_filter', 10, 3 );
You can use the $post_ID
to fetch info about that particular post, and get_current_screen
might be helpful to decide when to apply the filter.
Related Posts:
- How can I put a custom meta box above the editor but below the title section on the edit post page?
- Add custom fields within meta box class “on the fly”
- Disable the visibility options in WP
- How to replace default icon on “Add Media” button?
- Why could I not change the icon of the default Add media button that I added into the toolbar of TinyMCE?
- can’t see all pages in dashboard (can only see 3) /wp-admin/edit.php > 500 error
- WordPress Post Editor Toolbar Missing
- How to add “Check all” to Edit post page in WP?
- How do I disable wpautop for a specific block?
- Is it possible to “comment out” text in a post?
- Make substitute in all WordPress posts
- editor-style.css Functionality
- Show box only on edit post
- Adding a tooltip above Categories postbox in Post Editor
- YouTube Video autoplay
- How can I define a max width for content in post editor based on a page template?
- wp_update_post() blank screen
- Post editor loads empty
- Word count not accurate – potential bug
- Prepare content from a different CMS/WYSIWYG to the WordPress editor
- Admin sidebar overlapping on editor when saving draft
- How can I remove the editor from the ‘main posts page’?
- Theme post editor does not have Visual & Html tabs and all buttons?
- Confirmation message when submitting post for review
- < ! - - more - - > tag not working
- How can I (for the long term) style the classic editor’s TEXTAREA?
- Empty paragraphs around figure and figcaption tags when using markdown
- How can I implement a simple post editor?
- How to retain last modification date on draft edit
- Remove inline linking tool
- Syntax highlighting for post/page editor [closed]
- Post/Page Publish/Update button not clickable once I make an edit
- Add comments from the admin panel?
- How to enable the tag in WordPress posts and pages
- wp_editor on front end – JavaScripts not included
- How to show an error message after publishing a post?
- No Edit / Delete Links for Custom Post Type?
- Add search to list of categories in post editor
- Restrict acceess of a page in backend
- Automatically set page order on create page
- Why is the new Gutenberg editor so narrow, and how to make it wider?
- What is the action or filter for changing permalink in Edit Post/Page?
- Adding a Nav menu to post admin
- TinyMCE Autoresize
- onClick inside post_content does not appear in post tinymce editor
- How to after saving or publishing a post redirect back to the original page
- How to wrap the content of the main tinyMCE editor with extra tags
- Create and edit posts from front end
- Using WPAlchemy metabox values in another metabox
- Hide content editor for posts after approriate date
- How to add multiple checkbox elements to media attachments?
- WordPress hook that gets featured image from direct URL?
- Disable “preview changes” button
- Limiting allowed html elements/strip harmful scripts from editor
- Are there individual memory allocations for different user roles in WordPress?
- Prevent stripping MathML tags on post save
- Set default post author to none on new post
- Is there a way to enable bulk edit and quick edit on custom post types?
- Add the description field on the attached media
- Media added with shortcodes not “linked” with post
- Edit page blank, control buttons missing
- Embedded tweets get wrapped in tags and fail to load
- edit.php alter links
- Editing does not change post_name
- Clicking Add New button for custom taxonomy only moves element
- Remove Permalink From Admin Edit Post
- How to disable Edit Post and Allow only Custom Field?
- Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
- How to create “custom page types” with different custom fields in them?
- Dynamically set taxonomy term and show admin notice on post save
- Feauterd image meta box not showing up
- How do I increase the upload size only when editing special pages?
- How do you render posts from outside wordpress?
- Add data to post edit page, when post is published
- How to make shortcode which returns HTML?
- What is the action or filter for adding information under the Permalink in Edit Post/Page?
- Updating post content and custom fields in edit post screen
- Adding a ‘style=’ bit to image_send_to_editor output
- remove specificly the last tag in all posts
- Need help creating a page that has editable fields
- How to add text before post_excerpt in Gutenberg
- How to Batch Convert Gutenberg post to Classic post?
- How can I add a stylesheet to the Classic Editor page?
- Select another post in a post meta like a parent page is selected while editing a page
- After updating the custom post type, metafields disappear from the post.php edit menu, how do I fix it?
- Hide Some Categories in Post Editor
- If I disable screen options, does WP still try to update post meta?
- Block editor: content resets to the previous state in “Edit as HTML” by clicking somewhere outside of the editing window
- Images are not shown in the post editor
- How to hide the Text Color icon from Visual Editor of WordPress Post Editor from Users other than Admins?
- Conditions for admin get_current_screen action parent_file edit.php?post_type=page
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- Modify loop to include all post statuses not just ‘published’
- Edit is changing my custom’s post type parent id
- Can’t create posts with WP DB Abstraction Plugin
- In the Edit Post page how do I modify with jQuery the status select list?
- When I click edit on a post, all the content disappear. Does anyone know how to fix this?
- Create another TAG widget for posts
- dynamically get post attachment while editing
- Bullet points not showing in wordpress