Git Product home page Git Product logo

download-attachments's Introduction

Download Attachments

Download Attachments is a new approach to managing downloads in WordPress. It allows you to easily add and display download links in any post or page.

Description

Download Attachments is a new approach to managing downloads in WordPress. Instead of bloated interface it enables simple, drag & drop and AJAX driven metabox where you can insert and manage your Media Library files and automatically or manually display them after, before or inside posts content.

For more information, check out plugin page at dFactory site.

Features include:

  • Automatic or manual download links display
  • Select post types where Download Attachments should be used
  • Select list or table display style
  • Downloads count
  • Advanced attachments sorting
  • Drag & drop files ordering
  • Based on Media Library attachments
  • Easy customisation of Frontend & Backend display
  • Pretty URLs for download links
  • Custom download slug
  • Custom permission for metabox display
  • Option to exclude selected attachments from display
  • Option to select from all Media Library files or only those attached to a post
  • 2 shortcodes
  • 5 functions and multiple filter hooks for developers
  • Option to use attachment caption and/or description for download links description
  • Compatible with WPML & Polylang
  • .pot file for translations included

Translations:

  • Danish - by Martin Schulze
  • Dutch - by Sebas Blom
  • French - by Jean-Philippe Gurecki
  • German - by Sascha Brendel
  • Greek - by vas gargan
  • Hungarian - by Meszaros Tamas
  • Italian - by Enzo Costantini
  • Polish - by Bartosz Arendt
  • Russian - by Semion Zuev
  • Spanish - by Cristian Sierra

Get involved

Feel free to contribute to the source code on the dFactory GitHub Repository.

Installation

  1. Install Download Attachments either via the WordPress.org plugin directory, or by uploading the files to your server
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to the Download Attachments settings under News menu and set your desired options.

Changelog

1.2.14

  • Fix: TinyMCE editor broken on post types
  • Fix: Attachments not displayed outside of the loop

1.2.5

  • New: Italian translation, thanks to Enzo Costantini

1.2.4

  • New: da_get_download_attachment() function, to get complete single attachment data

1.2.3

  • Tweak: Option to pass post_id parameter to [download-attachments] shortcode

1.2.2

  • New: Hungarian translation, thanks to Meszaros Tamas
  • Tweak: Uploaded files are now attached to a post

1.2.1

  • New: French translation, thanks to Jean-Philippe Gurecki
  • Fix: Attachment title display html fix
  • Fix: Undefined notice index in admin and frontend

1.2.0

  • New: Select list or table display style
  • New: Option to display attached file index

1.1.2

  • New: Option to donate this plugin :)

1.1.1

1.1.0

1.0.10

  • Fix: Important attachments query optimization and general plugin performance, especially on sites with large number of attachments

1.0.9

  • Tweak: Removed shop_order from default post types support
  • Tweak: Confirmed WordPress 3.9 compatibility

1.0.8

  • New: Dutch translation, thanks to Sebas Blom
  • Tweak: Changed default attachment editing option to modal

1.0.7

  • Tweak: UI improvements for WordPress 3.8

1.0.6

  • New: Spanish translation, thanks to Cristian Sierra

1.0.5

  • New: Danish translation, thanks to Martin Schulze

1.0.4

  • New: Russian translation, thanks to Semion Zuev
  • Tweak: Greek translation updated

1.0.3

  • Fix: Include & exclude attributes not working for download-attachments shortcode

1.0.2

  • New: Greek translation, thanks to vas gargan
  • Fix: Attachments box cutsom title not working
  • Tweak: Added file type classes for attachments list

1.0.0

Initial release

download-attachments's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

download-attachments's Issues

Attachments disappears

I’m experiencing random attachment disappears form the backend and frontend. Using the WP quick edit the problem is triggered. So I think there is a bug to be fixed.

WPML compatibility

Using the version currently on Github, with WordPress 4.8.1 and WPML 3.7.1, the files list is blank (see attached screenshot) and attachments are not saved.

download-attachments-wpml

Please note that WPML is a commercial plugin, but they offer free licenses to plugin developers to ensure maximum compatibility.
See https://wpml.org/purchase/theme-and-plugin-developers/

Title / filename not displayed

With the version currently on Github, on WordPress 4.8.1 the titles / file names are not displayed on the list. See attached screenshot.
download-attachments-bug-

Download fails if pretty urls are enabled on Wordpress >6.1

Since Wordpress 6.1 - if pretty urls are enabled, and the download type is 'force', then the download fails at line 761 of functions.php.

Instead of forcing the download, the browser shows:

This site can’t be reached
The webpage at xxx might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE

Something appears to be conflicting with the fopen statement when pretty urls are enabled, even though $filepath and $filename appear to be correct. I've not been able to determine what is causing this, but it's consistent and repeatable. Forum posts here show similar reports: https://wordpress.org/support/topic/error-do-not-download-the-files-in-wordpress-6-1/

Code fails at this point:

if ( $filepath = fopen( $filepath, 'rb' ) ) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.