How to modify the link of images uploaded with "insert photo" button

This topic contains 2 reply and 2 voices, and was last updated by ggsalas 10 years ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
March 22, 2014 at 1:15 am 17061
ggsalas Hi, I would like to set the link of the "insert photo" button, to image page, not the file url. For example, this link: http://redminka.com/jornadas-de-construccion-natural-y-permacultura-mendoza-marzo-y-abril-2014/1901282_579182612176953_444260262_n/ instead of: http://redminka.com/wp-content/uploads/2014/03/1901282_579182612176953_444260262_n.png In the screenshot are only 2 options: http://s1.postimg.org/3rnexghrz/Settings_redminka_Word_Press_2014_03_21_16_08.png Best regards
March 22, 2014 at 8:08 pm 17084
Tareq Hasan Tareq Hasan

You’ve to edit the /class/upload.php in order to do that.

March 26, 2014 at 1:32 am 17313
ggsalas ggsalas

Hi @Tareq,

I have modified the line 45 of the file /class/upload.php

from thhis:$response['html'] = wp_get_attachment_link( $attach['attach_id'], $image_size );

to this: $response['html'] = wp_get_attachment_link( $attach['attach_id'], $image_size, true );

And all is OK 😀

I think that would be good have an option for that in a future relase, for example: In “General Options” have one more item in the select:
1. Image only
2. Image with link
3. Image with attachment link.

Thanks for your help, ans I hope you consider good this improve.

Best regards

Viewing 2 Posts - 1 through 2 (of 2 total)