Version Description
- Added Portuguese Translation (rough)
Download this release
Release Info
Developer | jchristopher |
Plugin | Attachments |
Version | 1.0.7.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.7.1
- attachments-pt_BR.mo +0 -0
- attachments-pt_BR.po +101 -0
- attachments.php +20 -8
- media.php +31 -26
- readme.txt +4 -1
attachments-pt_BR.mo
ADDED
Binary file
|
attachments-pt_BR.po
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Attachments\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-03-21 14:50-0500\n"
|
6 |
+
"PO-Revision-Date: 2010-03-21 14:53-0500\n"
|
7 |
+
"Last-Translator: Jonathan Christopher <jonathandchr@gmail.com>\n"
|
8 |
+
"Language-Team: Jonathan Christopher <jonathandchr@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: _e;__\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: Portuguese\n"
|
15 |
+
"X-Poedit-Country: BRAZIL\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: attachments.php:97
|
20 |
+
#, fuzzy
|
21 |
+
msgid "Users can only see their own attachments"
|
22 |
+
msgstr "Os usuários só poderão ver seus próprios anexos"
|
23 |
+
|
24 |
+
#: attachments.php:102
|
25 |
+
msgid "Save"
|
26 |
+
msgstr "Salvar"
|
27 |
+
|
28 |
+
#: attachments.php:137
|
29 |
+
#, fuzzy
|
30 |
+
msgid "Browse Existing"
|
31 |
+
msgstr "Browse Existente"
|
32 |
+
|
33 |
+
#: attachments.php:138
|
34 |
+
#: media.php:26
|
35 |
+
#, fuzzy
|
36 |
+
msgid "Add to Media Library"
|
37 |
+
msgstr "Adicionar à Biblioteca de Mídia"
|
38 |
+
|
39 |
+
#: attachments.php:160
|
40 |
+
msgid "Delete"
|
41 |
+
msgstr "Excluir"
|
42 |
+
|
43 |
+
#: attachments.php:164
|
44 |
+
msgid "Title"
|
45 |
+
msgstr "Título"
|
46 |
+
|
47 |
+
#: attachments.php:168
|
48 |
+
msgid "Caption"
|
49 |
+
msgstr "Legenda"
|
50 |
+
|
51 |
+
#: attachments.php:205
|
52 |
+
#: attachments.php:208
|
53 |
+
msgid "Attachments"
|
54 |
+
msgstr "Attachments"
|
55 |
+
|
56 |
+
#: media.php:26
|
57 |
+
#, fuzzy
|
58 |
+
msgid "Available attachments are listed from your"
|
59 |
+
msgstr "Acessórios disponíveis estão listados em sua"
|
60 |
+
|
61 |
+
#: media.php:26
|
62 |
+
#, fuzzy
|
63 |
+
msgid "Media Library"
|
64 |
+
msgstr "Biblioteca de Mídia"
|
65 |
+
|
66 |
+
#: media.php:26
|
67 |
+
#, fuzzy
|
68 |
+
msgid "If you need to upload a new attachment, please close this dialog and use the available"
|
69 |
+
msgstr "Se você precisar fazer upload de um novo anexo, por favor feche esta janela e usar o disponível"
|
70 |
+
|
71 |
+
#: media.php:26
|
72 |
+
msgid "button"
|
73 |
+
msgstr "botão"
|
74 |
+
|
75 |
+
#: media.php:27
|
76 |
+
#, fuzzy
|
77 |
+
msgid "Select/deselect an attachment by clicking its thumbnail. When you're done managing your attachments, click "
|
78 |
+
msgstr "Seleccionar / deseleccionar um anexo, clicando em sua miniatura. Quando você terminar de gerenciar seus anexos, clique em"
|
79 |
+
|
80 |
+
#: media.php:27
|
81 |
+
#: media.php:29
|
82 |
+
#: media.php:160
|
83 |
+
msgid "Apply"
|
84 |
+
msgstr "Aplicar"
|
85 |
+
|
86 |
+
#: media.php:39
|
87 |
+
msgid "Images"
|
88 |
+
msgstr "Imagens"
|
89 |
+
|
90 |
+
#: media.php:67
|
91 |
+
msgid "Videos"
|
92 |
+
msgstr "Vídeos"
|
93 |
+
|
94 |
+
#: media.php:99
|
95 |
+
msgid "Documents"
|
96 |
+
msgstr "Documentos"
|
97 |
+
|
98 |
+
#: media.php:131
|
99 |
+
msgid "Audio"
|
100 |
+
msgstr "Áudio"
|
101 |
+
|
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
|
7 |
Author: Jonathan Christopher
|
8 |
Author URI: http://mondaybynoon.com/
|
9 |
*/
|
@@ -94,12 +94,12 @@ function attachments_options()
|
|
94 |
<?php wp_nonce_field('update-options'); ?>
|
95 |
<div style="padding:20px 0 0 0; overflow:hidden; zoom:1;">
|
96 |
<input type="checkbox" name="attachments_limit_to_user" style="display:block; float:left; margin-top:2px;" value="true"<?php if (get_option('attachments_limit_to_user')=='true') : ?> checked="checked"<?php endif ?> />
|
97 |
-
<span style="display:block; float:left; padding:0 0 0 7px;"
|
98 |
</div>
|
99 |
<input type="hidden" name="action" value="update" />
|
100 |
<input type="hidden" name="page_options" value="attachments_limit_to_user" />
|
101 |
<p class="submit">
|
102 |
-
<input type="submit" class="button-primary" value="Save" />
|
103 |
</p>
|
104 |
</form>
|
105 |
</div>
|
@@ -134,8 +134,8 @@ function attachments_add()
|
|
134 |
<div id="attachments-inner">
|
135 |
|
136 |
<ul id="attachments-actions">
|
137 |
-
<li id="attachments-browse"><a href="<?php echo WP_PLUGIN_URL . '/attachments/media.php'; ?>?width=640&height=523" class="button thickbox button-highlighted browse-attachments"
|
138 |
-
<li id="attachments-add-new"><a href="media-upload.php?type=image&TB_iframe=true&width=640&height=523" class="button thickbox"
|
139 |
</ul>
|
140 |
|
141 |
<div id="attachments-list">
|
@@ -157,15 +157,15 @@ function attachments_add()
|
|
157 |
<span class="attachment-handle-icon"><img src="<?php echo WP_PLUGIN_URL; ?>/attachments/images/handle.gif" alt="Drag" /></span>
|
158 |
</a>
|
159 |
<span class="attachment-name"><?php echo $attachment['name']; ?></span>
|
160 |
-
<span class="attachment-delete"><a href="#"
|
161 |
</h2>
|
162 |
<div class="attachments-fields">
|
163 |
<div class="textfield" id="field_attachment_title_<?php echo $attachment_index ; ?>">
|
164 |
-
<label for="attachment_title_<?php echo $attachment_index; ?>"
|
165 |
<input type="text" id="attachment_title_<?php echo $attachment_index; ?>" name="attachment_title_<?php echo $attachment_index; ?>" value="<?php echo $attachment['title']; ?>" size="20" />
|
166 |
</div>
|
167 |
<div class="textfield" id="field_attachment_caption_<?php echo $attachment_index; ?>">
|
168 |
-
<label for="attachment_caption_<?php echo $attachment_index; ?>"
|
169 |
<input type="text" id="attachment_caption_<?php echo $attachment_index; ?>" name="attachment_caption_<?php echo $attachment_index; ?>" value="<?php echo $attachment['caption']; ?>" size="20" />
|
170 |
</div>
|
171 |
</div>
|
@@ -386,6 +386,18 @@ function attachments_init()
|
|
386 |
{
|
387 |
wp_enqueue_style('attachments', WP_PLUGIN_URL . '/attachments/css/attachments.css');
|
388 |
wp_enqueue_script('attachments', WP_PLUGIN_URL . '/attachments/js/attachments.js');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
|
390 |
attachments_meta_box();
|
391 |
}
|
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.1
|
7 |
Author: Jonathan Christopher
|
8 |
Author URI: http://mondaybynoon.com/
|
9 |
*/
|
94 |
<?php wp_nonce_field('update-options'); ?>
|
95 |
<div style="padding:20px 0 0 0; overflow:hidden; zoom:1;">
|
96 |
<input type="checkbox" name="attachments_limit_to_user" style="display:block; float:left; margin-top:2px;" value="true"<?php if (get_option('attachments_limit_to_user')=='true') : ?> checked="checked"<?php endif ?> />
|
97 |
+
<span style="display:block; float:left; padding:0 0 0 7px;"><?php _e("Users can only see their own attachments", "attachments");?></span>
|
98 |
</div>
|
99 |
<input type="hidden" name="action" value="update" />
|
100 |
<input type="hidden" name="page_options" value="attachments_limit_to_user" />
|
101 |
<p class="submit">
|
102 |
+
<input type="submit" class="button-primary" value="<?php _e("Save", "attachments");?>" />
|
103 |
</p>
|
104 |
</form>
|
105 |
</div>
|
134 |
<div id="attachments-inner">
|
135 |
|
136 |
<ul id="attachments-actions">
|
137 |
+
<li id="attachments-browse"><a href="<?php echo WP_PLUGIN_URL . '/attachments/media.php'; ?>?width=640&height=523" class="button thickbox button-highlighted browse-attachments"><?php _e("Browse Existing", "attachments")?></a></li>
|
138 |
+
<li id="attachments-add-new"><a href="media-upload.php?type=image&TB_iframe=true&width=640&height=523" class="button thickbox"><?php _e("Add to Media Library", "attachments")?></a></li>
|
139 |
</ul>
|
140 |
|
141 |
<div id="attachments-list">
|
157 |
<span class="attachment-handle-icon"><img src="<?php echo WP_PLUGIN_URL; ?>/attachments/images/handle.gif" alt="Drag" /></span>
|
158 |
</a>
|
159 |
<span class="attachment-name"><?php echo $attachment['name']; ?></span>
|
160 |
+
<span class="attachment-delete"><a href="#"><?php _e("Delete", "attachments")?></a></span>
|
161 |
</h2>
|
162 |
<div class="attachments-fields">
|
163 |
<div class="textfield" id="field_attachment_title_<?php echo $attachment_index ; ?>">
|
164 |
+
<label for="attachment_title_<?php echo $attachment_index; ?>"><?php _e("Title", "attachments")?></label>
|
165 |
<input type="text" id="attachment_title_<?php echo $attachment_index; ?>" name="attachment_title_<?php echo $attachment_index; ?>" value="<?php echo $attachment['title']; ?>" size="20" />
|
166 |
</div>
|
167 |
<div class="textfield" id="field_attachment_caption_<?php echo $attachment_index; ?>">
|
168 |
+
<label for="attachment_caption_<?php echo $attachment_index; ?>"><?php _e("Caption", "attachments")?></label>
|
169 |
<input type="text" id="attachment_caption_<?php echo $attachment_index; ?>" name="attachment_caption_<?php echo $attachment_index; ?>" value="<?php echo $attachment['caption']; ?>" size="20" />
|
170 |
</div>
|
171 |
</div>
|
386 |
{
|
387 |
wp_enqueue_style('attachments', WP_PLUGIN_URL . '/attachments/css/attachments.css');
|
388 |
wp_enqueue_script('attachments', WP_PLUGIN_URL . '/attachments/js/attachments.js');
|
389 |
+
|
390 |
+
if( function_exists( 'load_plugin_textdomain' ) )
|
391 |
+
{
|
392 |
+
if( !defined('WP_PLUGIN_DIR') )
|
393 |
+
{
|
394 |
+
load_plugin_textdomain( 'attachments', str_replace( ABSPATH, '', dirname( __FILE__ ) ) );
|
395 |
+
}
|
396 |
+
else
|
397 |
+
{
|
398 |
+
load_plugin_textdomain( 'attachments', false, dirname( plugin_basename( __FILE__ ) ) );
|
399 |
+
}
|
400 |
+
}
|
401 |
|
402 |
attachments_meta_box();
|
403 |
}
|
media.php
CHANGED
@@ -1,37 +1,42 @@
|
|
1 |
-
|
2 |
-
<p>Available attachments are listed from your <strong>Media Library</strong>. If you need to upload a new attachment, please close this dialog and use the available <strong>Add to Media Library</strong> button.</p>
|
3 |
-
<p>Select/deselect an attachment by clicking its thumbnail. When you're done managing your attachments, click <strong>Apply</strong></p>
|
4 |
|
5 |
-
|
|
|
6 |
|
7 |
-
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
require( dirname(__FILE__) . '/../../../wp-config.php' );
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
get_currentuserinfo();
|
18 |
|
19 |
-
|
20 |
-
{
|
21 |
-
$attachments_sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_author = " . $userdata->ID . " ORDER BY post_modified DESC";
|
22 |
-
}
|
23 |
-
else
|
24 |
-
{
|
25 |
-
$attachments_sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_modified DESC";
|
26 |
-
}
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
// ================
|
31 |
// = IMAGES FIRST =
|
32 |
// ================
|
33 |
echo '<div class="attachments-file-section attachments-images">';
|
34 |
-
echo '<h2>Images</h2>';
|
35 |
echo '<ul>';
|
36 |
foreach ($attachment_files as $post)
|
37 |
{
|
@@ -59,7 +64,7 @@
|
|
59 |
// = VIDEOS =
|
60 |
// ==========
|
61 |
echo '<div class="attachments-file-section attachments-alt attachments-videos">';
|
62 |
-
echo '<h2>Videos</h2>';
|
63 |
echo '<ul>';
|
64 |
foreach ($attachment_files as $post)
|
65 |
{
|
@@ -91,7 +96,7 @@
|
|
91 |
// = DOCUMENTS =
|
92 |
// =============
|
93 |
echo '<div class="attachments-file-section attachments-alt attachments-documents">';
|
94 |
-
echo '<h2>Documents</h2>';
|
95 |
echo '<ul>';
|
96 |
foreach ($attachment_files as $post)
|
97 |
{
|
@@ -123,7 +128,7 @@
|
|
123 |
// = AUDIO =
|
124 |
// =========
|
125 |
echo '<div class="attachments-file-section attachments-alt attachments-audio">';
|
126 |
-
echo '<h2>Audio</h2>';
|
127 |
echo '<ul>';
|
128 |
foreach ($attachment_files as $post)
|
129 |
{
|
@@ -152,6 +157,6 @@
|
|
152 |
|
153 |
</div>
|
154 |
|
155 |
-
<p class="attachments-actions"><a href="#" class="attachments-apply button button-highlighted"
|
156 |
|
157 |
</div>
|
1 |
+
<?php
|
|
|
|
|
2 |
|
3 |
+
error_reporting(0);
|
4 |
+
require( dirname(__FILE__) . '/../../../wp-config.php' );
|
5 |
|
6 |
+
global $wpdb;
|
7 |
+
global $userdata;
|
8 |
|
9 |
+
// set the user info in case we need to limit to the current author
|
10 |
+
get_currentuserinfo();
|
|
|
11 |
|
12 |
+
if( get_option('attachments_limit_to_user') == 'true' )
|
13 |
+
{
|
14 |
+
$attachments_sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_author = " . $userdata->ID . " ORDER BY post_modified DESC";
|
15 |
+
}
|
16 |
+
else
|
17 |
+
{
|
18 |
+
$attachments_sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_modified DESC";
|
19 |
+
}
|
20 |
|
21 |
+
$attachment_files = $wpdb->get_results( $attachments_sql );
|
|
|
22 |
|
23 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
<div id="attachments-file-list">
|
26 |
+
<p><?php _e("Available attachments are listed from your", "attachments"); ?> <strong><?php _e("Media Library", "attachments"); ?></strong>. <?php _e("If you need to upload a new attachment, please close this dialog and use the available", "attachments"); ?> <strong><?php _e("Add to Media Library", "attachments"); ?></strong> <?php _e("button", "attachments"); ?></p>
|
27 |
+
<p><?php _e("Select/deselect an attachment by clicking its thumbnail. When you're done managing your attachments, click ", "attachments")?><strong><?php _e("Apply", "attachments")?></strong></p>
|
28 |
+
|
29 |
+
<p class="attachments-actions"><a href="#" class="attachments-apply button button-highlighted"><?php _e("Apply", "attachments"); ?></a></p>
|
30 |
+
|
31 |
+
<div id="attachments-file-details">
|
32 |
+
|
33 |
+
<?php
|
34 |
|
35 |
// ================
|
36 |
// = IMAGES FIRST =
|
37 |
// ================
|
38 |
echo '<div class="attachments-file-section attachments-images">';
|
39 |
+
echo '<h2>' . __("Images", "attachments") . '</h2>';
|
40 |
echo '<ul>';
|
41 |
foreach ($attachment_files as $post)
|
42 |
{
|
64 |
// = VIDEOS =
|
65 |
// ==========
|
66 |
echo '<div class="attachments-file-section attachments-alt attachments-videos">';
|
67 |
+
echo '<h2>' . __("Videos", "attachments") . '</h2>';
|
68 |
echo '<ul>';
|
69 |
foreach ($attachment_files as $post)
|
70 |
{
|
96 |
// = DOCUMENTS =
|
97 |
// =============
|
98 |
echo '<div class="attachments-file-section attachments-alt attachments-documents">';
|
99 |
+
echo '<h2>' . __("Documents", "attachments") . '</h2>';
|
100 |
echo '<ul>';
|
101 |
foreach ($attachment_files as $post)
|
102 |
{
|
128 |
// = AUDIO =
|
129 |
// =========
|
130 |
echo '<div class="attachments-file-section attachments-alt attachments-audio">';
|
131 |
+
echo '<h2>' . __("Audio", "attachments") . '</h2>';
|
132 |
echo '<ul>';
|
133 |
foreach ($attachment_files as $post)
|
134 |
{
|
157 |
|
158 |
</div>
|
159 |
|
160 |
+
<p class="attachments-actions"><a href="#" class="attachments-apply button button-highlighted"><?php _e("Apply", "attachments"); ?></a></p>
|
161 |
|
162 |
</div>
|
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.2
|
7 |
-
Stable tag: 1.0.7
|
8 |
|
9 |
Attachments allows you to append any number of items from your WordPress Media Library to Posts and Pages
|
10 |
|
@@ -41,6 +41,9 @@ Attachments uses WordPress' built in Media library for uploads and storage.
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
44 |
= 1.0.7 =
|
45 |
* Numerous fixes to enhance data integrity
|
46 |
* Implemented a change to improve data portability
|
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.2
|
7 |
+
Stable tag: 1.0.7.1
|
8 |
|
9 |
Attachments allows you to append any number of items from your WordPress Media Library to Posts and Pages
|
10 |
|
41 |
|
42 |
== Changelog ==
|
43 |
|
44 |
+
= 1.0.7.1 =
|
45 |
+
* Added Portuguese Translation (rough)
|
46 |
+
|
47 |
= 1.0.7 =
|
48 |
* Numerous fixes to enhance data integrity
|
49 |
* Implemented a change to improve data portability
|