Version Description
- Fixed an issue with deleting Attachments
Download this release
Release Info
| Developer | jchristopher |
| Plugin | |
| Version | 1.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.1 to 1.0.2
- attachments.php +14 -12
- readme.txt +28 -27
attachments.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Attachments
|
| 4 |
Plugin URI: http://mondaybynoon.com/wordpress-attachments/
|
| 5 |
Description: Attachments gives the ability to append any number of Media Library items to Pages and Posts
|
| 6 |
-
Version: 1.0.
|
| 7 |
Author: Jonathan Christopher
|
| 8 |
Author URI: http://jchristopher.me
|
| 9 |
*/
|
|
@@ -186,17 +186,19 @@ function attachments_save($post_id)
|
|
| 186 |
$attachments_data = array();
|
| 187 |
for ($i=1; $i <= $total_attachments; $i++)
|
| 188 |
{
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
|
|
|
|
|
|
| 200 |
}
|
| 201 |
}
|
| 202 |
|
| 3 |
Plugin Name: Attachments
|
| 4 |
Plugin URI: http://mondaybynoon.com/wordpress-attachments/
|
| 5 |
Description: Attachments gives the ability to append any number of Media Library items to Pages and Posts
|
| 6 |
+
Version: 1.0.2
|
| 7 |
Author: Jonathan Christopher
|
| 8 |
Author URI: http://jchristopher.me
|
| 9 |
*/
|
| 186 |
$attachments_data = array();
|
| 187 |
for ($i=1; $i <= $total_attachments; $i++)
|
| 188 |
{
|
| 189 |
+
if( !empty($_POST['attachment_location_' . $i]) )
|
| 190 |
+
{
|
| 191 |
+
$attachment_details = array(
|
| 192 |
+
'title' => $_POST['attachment_title_' . $i],
|
| 193 |
+
'caption' => $_POST['attachment_caption_' . $i],
|
| 194 |
+
'name' => $_POST['attachment_name_' . $i],
|
| 195 |
+
'location' => $_POST['attachment_location_' . $i],
|
| 196 |
+
'mime' => $_POST['attachment_mime_' . $i],
|
| 197 |
+
'id' => $_POST['attachment_id_' . $i],
|
| 198 |
+
'order' => $_POST['attachment_order_' . $i]
|
| 199 |
+
);
|
| 200 |
+
array_push($attachments_data, $attachment_details);
|
| 201 |
+
}
|
| 202 |
}
|
| 203 |
}
|
| 204 |
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: http://mondaybynoon.com/donate/
|
|
| 4 |
Tags: post, page, posts, pages, images, PDF, doc, Word, image, jpg, jpeg, picture, pictures, photos, attachment
|
| 5 |
Requires at least: 2.8
|
| 6 |
Tested up to: 2.9
|
| 7 |
-
Stable tag: 1.0.
|
| 8 |
|
| 9 |
Attachments allows you to append any number of items from your WordPress Media Library to Posts and Pages
|
| 10 |
|
|
@@ -21,6 +21,32 @@ There is a **screencast available** on the [plugin home page](http://mondaybynoo
|
|
| 21 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
| 22 |
1. Update your templates where applicable (see **Usage**)
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
== Usage ==
|
| 25 |
|
| 26 |
After installing Attachments, you will need to update your template files in order to pull the data to the front end.
|
|
@@ -53,29 +79,4 @@ Here is a basic implementation:
|
|
| 53 |
}
|
| 54 |
echo '</ul>';
|
| 55 |
}
|
| 56 |
-
?>`
|
| 57 |
-
|
| 58 |
-
You can elaborate on this implementation in any way you see fit.
|
| 59 |
-
|
| 60 |
-
== Frequently Asked Questions ==
|
| 61 |
-
|
| 62 |
-
= Attachments are not showing up in my theme =
|
| 63 |
-
|
| 64 |
-
You will need to edit your theme files where applicable. Please reference the **Usage** instructions
|
| 65 |
-
|
| 66 |
-
= Where are uploads saved? =
|
| 67 |
-
|
| 68 |
-
Attachments uses WordPress' built in Media library for uploads and storage.
|
| 69 |
-
|
| 70 |
-
== Screencast ==
|
| 71 |
-
|
| 72 |
-
There is a **screencast available** on the [plugin home page](http://mondaybynoon.com/wordpress-attachments/)
|
| 73 |
-
|
| 74 |
-
== Changelog ==
|
| 75 |
-
|
| 76 |
-
= 1.0.1 =
|
| 77 |
-
* Fixed an error when adding only one attachment
|
| 78 |
-
* Added MIME type array value (`mime`) to available attachments
|
| 79 |
-
|
| 80 |
-
= 1.0 =
|
| 81 |
-
* First stable release
|
| 4 |
Tags: post, page, posts, pages, images, PDF, doc, Word, image, jpg, jpeg, picture, pictures, photos, attachment
|
| 5 |
Requires at least: 2.8
|
| 6 |
Tested up to: 2.9
|
| 7 |
+
Stable tag: 1.0.2
|
| 8 |
|
| 9 |
Attachments allows you to append any number of items from your WordPress Media Library to Posts and Pages
|
| 10 |
|
| 21 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
| 22 |
1. Update your templates where applicable (see **Usage**)
|
| 23 |
|
| 24 |
+
== Frequently Asked Questions ==
|
| 25 |
+
|
| 26 |
+
= Attachments are not showing up in my theme =
|
| 27 |
+
|
| 28 |
+
You will need to edit your theme files where applicable. Please reference the **Usage** instructions
|
| 29 |
+
|
| 30 |
+
= Where are uploads saved? =
|
| 31 |
+
|
| 32 |
+
Attachments uses WordPress' built in Media library for uploads and storage.
|
| 33 |
+
|
| 34 |
+
== Changelog ==
|
| 35 |
+
|
| 36 |
+
= 1.0.2 =
|
| 37 |
+
* Fixed an issue with deleting Attachments
|
| 38 |
+
|
| 39 |
+
= 1.0.1 =
|
| 40 |
+
* Fixed an error when adding only one attachment
|
| 41 |
+
* Added MIME type array value (`mime`) to available attachments
|
| 42 |
+
|
| 43 |
+
= 1.0 =
|
| 44 |
+
* First stable release
|
| 45 |
+
|
| 46 |
+
== Screencast ==
|
| 47 |
+
|
| 48 |
+
There is a **screencast available** on the [plugin home page](http://mondaybynoon.com/wordpress-attachments/)
|
| 49 |
+
|
| 50 |
== Usage ==
|
| 51 |
|
| 52 |
After installing Attachments, you will need to update your template files in order to pull the data to the front end.
|
| 79 |
}
|
| 80 |
echo '</ul>';
|
| 81 |
}
|
| 82 |
+
?>`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
