'Insert into Post' button filter

  1. mslocum


    Five places media.php creates a button called 'Insert into Post'. This is often times inaccurate and confusing. The media manger iframe can be used in many places other that posts. It can be used on custom types as well as widget settings and plugin settings.

    A plugin should have the ability to change the text of the button using a filter.

    Posted: 6 years ago #
  2. Maor Chasen

    Totally agree on this one. Also there should be support for CPTs.

    Posted: 5 years ago #
  3. webaware


    Agree, it would be good to filter this button label. I currently do this with a gettext filter, but it's not the ideal way.

    add_filter('gettext', array($this, 'filterGettextMediaPopup'));
    * replace "Insert into Post" label on media popup submit button
    * @param string $text
    * @return string
    public function filterGettextMediaPopup($text) {
        if ($text == 'Insert into Post' && self::isOurMediaUpload()) {
            $text = 'Select';
        return $text;
    * check to see if this is our media upload form
    * @return bool
    protected static function isOurMediaUpload() {
        $wpwines = isset($_GET['wpwines']) ? (string) $_GET['wpwines'] : '';
        return ($wpwines == 'product' || $wpwines == 'award');
    Posted: 5 years ago #
  4. I agree on this one as well, it is very confusing. Media manger should not be used in posts.

    Posted: 5 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    3 Votes
  • Status

    This idea has been implemented