I have changed the download method to “Redirect to file”. The pdf-file opens in the same window. But i want it to open in a new window. I think i must update the function.php. But this option must be integrated in a new release.
Hi, I did a modification in functions.php file Find this line $html .= '<a href="' . ($options['pretty_urls'] === true ? home_url( '/' . $options['download_link'] . '/' . $attachment['attachment_id'] . '/' ) : plugins_url( 'download-attachments/includes/download.php?id=' . $attachment['attachment_id'] )) . '" class="attachment-link" title="' . $title . '">' . $title . '</a>'; and replace it with $html .= '<a target="blank" href="' . ($options['pretty_urls'] === true ? home_url( '/' . $options['download_link'] . '/' . $attachment['attachment_id'] . '/' ) : plugins_url( 'download-attachments/includes/download.php?id=' . $attachment['attachment_id'] )) . '" class="attachment-link" title="' . $title . '">' . $title . '</a>'; It worked for me.
$html .= '<a href="' . ($options['pretty_urls'] === true ? home_url( '/' . $options['download_link'] . '/' . $attachment['attachment_id'] . '/' ) : plugins_url( 'download-attachments/includes/download.php?id=' . $attachment['attachment_id'] )) . '" class="attachment-link" title="' . $title . '">' . $title . '</a>';
$html .= '<a target="blank" href="' . ($options['pretty_urls'] === true ? home_url( '/' . $options['download_link'] . '/' . $attachment['attachment_id'] . '/' ) : plugins_url( 'download-attachments/includes/download.php?id=' . $attachment['attachment_id'] )) . '" class="attachment-link" title="' . $title . '">' . $title . '</a>';
There’s a room for a plugin option here. We’ll think of it.
:)
Cześć Bartosz. Jaką zmianę trzeba wprowadzić, aby pliki załączników otwierały się w nowej karcie przeglądarki ? Posiadam najnowszą wersję wtyczki.
Pozdrawiam i z góry dziękuję za odpowiedź.