ھي پلگ ان WordPress جي جديد 3 وڏين رليزز سان آزمايو نه ويو آھي. اهو ٿي سگهي ٿو وڌيڪ برقرار يا سپورٽ نه ٿي سگهي ۽ ٿي سگهي ٿو مطابقت جا مسئلا جڏهن ورڈپریس جي وڌيڪ تازي ورزن سان استعمال ڪيو وڃي.

Zip Attachments

وضاحت

Simple and lightweight plugin to add a “Download” button to your posts, pages or custom post types.

This button will create a zip file of the post attachments on the fly and download it.

The output is very basic, no images, no fonts, no CSS. Just a simple button element.

Features

  • No output by default (check the Installation tab).
  • Easy to customizable with CSS.
  • Shortcode available.
  • Download counter stored per post.
  • You chose the output text so no translation needed.
  • Works with posts, pages and custom post types.

Known issues

  • If a download is cancelled, the file will not be deleted from the /wp-content/uploads folder.

Patches are welcome!

Requests

Feel free to post a request but let’s keep it simple and light.

Ping me / Blame me

Are you using the plugin? Do you like it? Do you hate it? Let me know!

تصوير

  • Using the Twenty Fourteen Theme.
  • Using the Twenty Thirteen Theme.
  • Using the Twenty Twelve Theme.

انسٽاليشن

First of all activate the Plugin, then you have three choices:

Functions.php

You can show the button after all your content (posts, pages, custom post types) by pasting this snippet at the end of your functions.php file of your theme:

function za_button_print($content)
{
    return $content.za_show_button('Download');
}
add_filter('the_content', 'za_button_print');

Single.php (or similar)

Alternatively you can print the button only in certain parts of your theme. Paste the following snippet wherever you want them to show.

Be aware, it should be within the Loop.

<?=function_exists('za_show_button') ? za_show_button("Download") : ''?>

Shortcode

Finally you can use the shortcode inside your post content like so:

[za_show_download_button text="Download the file"]

As you can see you can use your own text, the default value is “Download Attachments”.

Download Counter

Each method has a download counter, you need to add additional parameters:

A)

function za_button_print($content)
{
    return $content.za_show_button('Download', 'true', '(% times)');
}
add_filter('the_content', 'za_button_print');

B)

<?=function_exists('za_show_button') ? za_show_button("Download", "true", "(% times)") : ''?>

C)

[za_show_download_button text="Download the file" counter="true" counter_format="(% times)"]

NOTE: the default counter format is (%), where % is actual number. The plugin will automatically replace this character with the download count.

FAQ

I activated the plugin and I don’t see the button

You must specify where do you want to show the button your theme or post, check out the Installation instructions.

Can I customize the colors?

Absolutely. Use your theme CSS file to customize the appearnce of the button. The button comes with two CSS classes:

.za_download_button
.za_download_button_loading

جائزا

28 جُون 2024
The plugin does a good job. But is it still compatible with the newest Wordpress versions?
19 آگسٽ 2020
Все сказала в заголовке, ЖУТКО неудобно так как надо прикреплять файлы и нельзя их разграничить. Но в целом! Это то что нужно! Спасибо!
2 مَي 2018
To the point – does one thing well and simple. Currently using with WP 4.9.5 – no problem.
جمع: سڀ 9 تبصرا پڙهو

تعاون ڪندڙ & ڊولپرز

“Zip Attachments” اوپن سورس سافٽ ويئر آهي. ھيٺين ماڻھن ھن پلگ ان ۾ حصو ورتو آھي.

تعاون ڪندڙ

ترجمو ڪريو “Zip Attachments” توهان جي ٻولي ۾.

ڊولپمينٽ ۾ دلچسپي؟

ڪوڊ براؤز ڪريو، چيڪ ڪريو SVN مخزن، يا رڪنيت حاصل ڪريو ڊولپمينٽ لاگ پاران RSS.

لاگ تبدیل ڪريو

1.6

  • Fix undefined notice. Nothing should break due this change.

1.5.1

  • ATTENTION the plugin might not work! I’ve tried to fix a vulnerability. Now the temporal zip files are generated in the /wp-content/uploads folder of the plugin. Hopefully there’s not permission issues, since the directory should be writtable. If you encounter any problem, post in the forum: https://wordpress.org/support/plugin/zip-attachments

1.4

  • Code improvement to match WordPress best practices.

1.3

  • Add a download counter.

1.2

  • Fixed undefined variable for the plugin’s path.

1.1

  • Sanatize the filename to avoid errors with some titles.

1.0

  • Initial release, you’ll love it.