media_send_to_editor

media_send_to_editor

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('media_send_to_editor') is found 2 times:

  • /wp-admin/includes/ajax-actions.php line 3366
    		}
    	}
    
    	/** This filter is documented in wp-admin/includes/media.php */
    	$html = apply_filters( 'media_send_to_editor', $html, $id, $attachment );
    
    	wp_send_json_success( $html );
    }
    
    /**
     * Handles sending a link to the editor via AJAX.
    
  • /wp-admin/includes/media.php line 858
    		 * @param string $html       HTML markup for a media item sent to the editor.
    		 * @param int    $send_id    The first key from the $_POST['send'] data.
    		 * @param array  $attachment Array of attachment metadata.
    		 */
    		$html = apply_filters( 'media_send_to_editor', $html, $send_id, $attachment );
    
    		return media_send_to_editor( $html );
    	}
    
    	return $errors;
    }
    

See this hook used in plugins: