add_filter("attribute_escape", "myfunction", 10, 2);
function myfunction($safe_text, $text) {
return str_replace("Insert into Post", "Use this image", $text);
}
Place in your theme functions file of in a plugin file.
The first usable filter that this button hits is on the function esc_attr()
. So what that code will do is find any instance of Insert into Post
that is run through esc_attr()
and replace it to Use this image
. This code might have undesired issues elsewhere though. Maybe there is a language file method someone might know of that might be a better solution than this.
TRY:
add_filter("attribute_escape", "myfunction", 10, 2);
function myfunction($safe_text, $text) {
return str_replace(__('Insert into Post'), __('Use this image'), $text);
}
Should account for translations.
Related Posts:
- ZIP up all images displayed in a [gallery] and offer as download link
- media_handle_upload for local files?
- How do I detach images from posts?
- Replacing all attachment links in post with media file link
- upload featured image from front end using wordpress add media button
- how to grab first link in post… and of course call it
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- Easy way to delete 70k posts and attached media?
- How can I create custom button in post.php
- Paginated Posts – Social Media Buttons Share First Page URL
- Too many connections to server
- Errors when uploading images in WP 3.5
- How can I get the media inside a post?
- wp-cli post create & media import issues
- It is possible to add extra button under the ‘publish’ button in the post of wordpress? and how?
- Removal of Media Gallery pictures
- How can you change all past posts’ images to link to none instead of the image file?
- Automatically attach image to post if they have the same title
- How to get the last selected media alignment setting?
- WordPress Automatic Filename Changer
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- Adding an Archive button to posts page for administrators
- Remove Featured Image & All Media Uploaded to the Post
- Display a mixed list of posts and media
- How to get all inline images in post content? [duplicate]
- Inserting Media to WordPress Posts
- Delete Post but retain image of post [WP REST API]
- Site/Post preview is not working on all social media
- unable to write to the database while uploading images
- Getting image data from phone camera (MediaDevices.getUserMedia) into user post
- Go back to the exact post page number
- Post images are not displayed in media library
- Connection dropped due to file size
- Customizing individual images on posts
- Embed button for post screen
- Disable Media uploader to users
- How to get only current images of a post
- How to associate media with a post?
- WordPress Media URLs?
- Use radio buttons & checkboxes for post categories
- Bulk Attach Or Insert Media To Post Without Opening Post Editor
- How to add audio media in a post?
- How would I attach media/images to a post based on a ID stored in a each post’s custom field
- wordpress radio button on single post page
- How can to use the players from the Media Widgets in the body of a post to play audio and video files
- Bug with post titles [closed]
- Broken images after importing posts and opening in Gutenberg
- Inserting Media on New Post But Hides Previous Uploads for Editor/Contributor
- What is the proper use of guid for images in wp_posts?
- Download button under all images WordPress
- Optimize blog that serves hundred of images and videos
- Images being uploaded via WP Media are not attached even they are used by some CPT posts
- When inserting media file in a post or page, show file name under the thumbnail
- Undefined array key “width” in wp-admin/includes/image.php error when publishing post or page
- Get WordPress post content by post id
- Get page ID of page that is set as the posts page
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- Stop WordPress Wrapping Images In A “P” Tag
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- GET the excerpt by ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to get ‘post_content’ without stripping tags?
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?
- How to end the excerpt with a sentence rather than a word?
- How do I check if I linked to a post before I delete it?
- How to change the case of all post titles to “Title Case”
- Appending content with broken in 4.4
- How to get posts published between a date and today?
- How to detect single.php (but not single-portfolio.php)?
- How to check if post meta key exists or not in wordpress database
- How to remove a column from the Posts page
- removing inline styles from wp-caption div
- What is the use of to_ping and pinged column?
- How to use “Add link” pop up for a WordPress widget
- Remove Categories / Tags From Admin Menu
- How to retrieve text only from wp_content() not from wp_excerpt()?
- Stop WP from creating “Sample Page” and “Hello World!” post
- Where is the old post permalink slug stored?
- How to Create Editable Blocks of Text for the Homepage?
- Keyboard shortcut for updating a page or post?
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Apply the_title() filter in post & page title, but not in menu title
- How to Change Order of Posts in Admin?
- is it possible to get next_post_link
- Get post content by ID