Attachments - Version 1.0.9

Version Description

  • Support for Custom Post Types (found in Settings)
  • Revised Portuguese Translation by Miriam de Paula
Download this release

Release Info

Developer jchristopher
Plugin Icon wp plugin Attachments
Version 1.0.9
Comparing to
See all releases

Code changes from version 1.0.8 to 1.0.9

attachments-pt_BR.mo CHANGED
Binary file
attachments-pt_BR.po CHANGED
@@ -1,11 +1,11 @@
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 21:23+0100\n"
7
- "Last-Translator: \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"
@@ -16,8 +16,11 @@ msgstr ""
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
 
@@ -25,74 +28,83 @@ msgstr "Os usuários só poderão ver seus próprios anexos"
25
  msgid "Save"
26
  msgstr "Salvar"
27
 
28
- #: attachments.php:137
29
  msgid "Browse Existing"
30
  msgstr "Pesquisar os anexos existentes"
31
 
32
- #: attachments.php:138
33
- #: media.php:26
34
- #, fuzzy
35
  msgid "Add to Media Library"
36
  msgstr "Adicionar à Biblioteca de Mídia"
37
 
38
- #: attachments.php:160
39
  msgid "Delete"
40
  msgstr "Apagar"
41
 
42
- #: attachments.php:164
43
  msgid "Title"
44
  msgstr "Título"
45
 
46
- #: attachments.php:168
47
  msgid "Caption"
48
  msgstr "Legenda"
49
 
50
- #: attachments.php:205
51
- #: attachments.php:208
52
  msgid "Attachments"
53
  msgstr "Attachments"
54
 
55
- #: media.php:26
56
- msgid "Available attachments are listed from your"
57
- msgstr "Anexos disponíveis estão listados desde"
58
-
59
- #: media.php:26
60
- #, fuzzy
61
- msgid "Media Library"
62
- msgstr "Biblioteca de Mídia"
63
-
64
- #: media.php:26
65
- msgid "If you need to upload a new attachment, please close this dialog and use the available"
66
- msgstr "Se você precisar fazer upload de um novo anexo, por favor feche esta janela e use o disponível"
67
-
68
- #: media.php:26
69
- msgid "button"
70
- msgstr "botão"
71
 
72
- #: media.php:27
73
- #, fuzzy
74
- msgid "Select/deselect an attachment by clicking its thumbnail. When you're done managing your attachments, click "
75
- msgstr "Seleccionar / deseleccionar um anexo, clicando em sua miniatura. Quando você terminar de gerenciar seus anexos, clique em"
76
 
77
- #: media.php:27
78
- #: media.php:29
79
- #: media.php:160
80
  msgid "Apply"
81
  msgstr "Aplicar"
82
 
83
- #: media.php:39
84
  msgid "Images"
85
  msgstr "Imagens"
86
 
87
- #: media.php:67
88
  msgid "Videos"
89
  msgstr "Vídeos"
90
 
91
- #: media.php:99
92
  msgid "Documents"
93
  msgstr "Documentos"
94
 
95
- #: media.php:131
96
  msgid "Audio"
97
  msgstr "Áudio"
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Attachments pt_BR version\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-08-02 09:43-0300\n"
6
+ "PO-Revision-Date: 2010-08-02 09:43-0300\n"
7
+ "Last-Translator: Tecsite Estúdio Digital <tecsite@gmail.com>\n"
8
+ "Language-Team: Miriam de Paula (Tecsite Estúdio Digital) <tecsite@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: attachments.php:92
20
+ msgid "Attachments Options"
21
+ msgstr "Opções do Attachments"
22
+
23
  #: attachments.php:97
 
24
  msgid "Users can only see their own attachments"
25
  msgstr "Os usuários só poderão ver seus próprios anexos"
26
 
28
  msgid "Save"
29
  msgstr "Salvar"
30
 
31
+ #: attachments.php:139
32
  msgid "Browse Existing"
33
  msgstr "Pesquisar os anexos existentes"
34
 
35
+ #: attachments.php:144
 
 
36
  msgid "Add to Media Library"
37
  msgstr "Adicionar à Biblioteca de Mídia"
38
 
39
+ #: attachments.php:168
40
  msgid "Delete"
41
  msgstr "Apagar"
42
 
43
+ #: attachments.php:172
44
  msgid "Title"
45
  msgstr "Título"
46
 
47
+ #: attachments.php:176
48
  msgid "Caption"
49
  msgstr "Legenda"
50
 
51
+ #: attachments.php:213
52
+ #: attachments.php:216
53
  msgid "Attachments"
54
  msgstr "Attachments"
55
 
56
+ #: media.php:28
57
+ msgid "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."
58
+ msgstr "Os anexos disponíveis são listados em sua <strong>Biblioteca de Mídia</strong>. Se for necessário fazer upload de um novo anexo, por favor feche esta janela e use o botão <strong>Adicionar à Biblioteca de Mídia</strong>"
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
+ #: media.php:28
61
+ msgid "Select/deselect an attachment by clicking its thumbnail. When you're done managing your attachments, click <strong>Apply</strong>."
62
+ msgstr "Selecionar/ deselecionar um anexo, clicando em sua miniatura. Quando você terminar de gerenciar seus anexos, clique no botão <strong>Aplicar</strong>"
 
63
 
64
+ #: media.php:30
65
+ #: media.php:132
 
66
  msgid "Apply"
67
  msgstr "Aplicar"
68
 
69
+ #: media.php:38
70
  msgid "Images"
71
  msgstr "Imagens"
72
 
73
+ #: media.php:42
74
  msgid "Videos"
75
  msgstr "Vídeos"
76
 
77
+ #: media.php:46
78
  msgid "Documents"
79
  msgstr "Documentos"
80
 
81
+ #: media.php:50
82
  msgid "Audio"
83
  msgstr "Áudio"
84
 
85
+ #: media.php:86
86
+ #: media.php:92
87
+ msgid "Icon"
88
+ msgstr "Ícone"
89
+
90
+ #: media.php:87
91
+ #: media.php:93
92
+ msgid "File"
93
+ msgstr "Arquivo"
94
+
95
+ #~ msgid "Available attachments are listed from your"
96
+ #~ msgstr "Anexos disponíveis estão listados desde"
97
+
98
+ #, fuzzy
99
+ #~ msgid "Media Library"
100
+ #~ msgstr "Biblioteca de Mídia"
101
+
102
+ #~ msgid ""
103
+ #~ "If you need to upload a new attachment, please close this dialog and use "
104
+ #~ "the available"
105
+ #~ msgstr ""
106
+ #~ "Se você precisar fazer upload de um novo anexo, por favor feche esta "
107
+ #~ "janela e use o disponível"
108
+
109
+ #~ msgid "button"
110
+ #~ msgstr "botão"
attachments.options.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <div id="icon-options-general" class="icon32"><br /></div>
3
+ <h2>Attachments Options</h2>
4
+ <form action="options.php" method="post">
5
+ <?php wp_nonce_field('update-options'); ?>
6
+
7
+ <?php if( function_exists( 'get_post_types' ) ) : ?>
8
+ <h3><?php _e("Custom Post Type Settings", "attachments"); ?></h3>
9
+ <p><?php _e("Include Attachments in the following Custom Post Types:", "attachments"); ?></p>
10
+ <?php
11
+ $args = array(
12
+ 'public' => true,
13
+ '_builtin' => false
14
+ );
15
+ $output = 'objects';
16
+ $operator = 'and';
17
+ $post_types = get_post_types( $args, $output, $operator );
18
+ foreach($post_types as $post_type) : ?>
19
+
20
+ <div class="attachments_checkbox">
21
+ <input type="checkbox" name="attachments_cpt_<?php echo $post_type->name; ?>" id="attachments_cpt_<?php echo $post_type->name; ?>" value="true"<?php if (get_option('attachments_cpt_' . $post_type->name)=='true') : ?> checked="checked"<?php endif ?> />
22
+ <label for="attachments_cpt_<?php echo $post_type->name; ?>"><?php echo $post_type->labels->name; ?></label>
23
+ </div>
24
+
25
+ <?php endforeach ?>
26
+ <?php endif ?>
27
+
28
+ <h3><?php _e("Privacy Settings", "attachments"); ?></h3>
29
+ <div class="attachments_checkbox">
30
+ <input type="checkbox" name="attachments_limit_to_user" id="attachments_limit_to_user" value="true"<?php if (get_option('attachments_limit_to_user')=='true') : ?> checked="checked"<?php endif ?> />
31
+ <label for="attachments_limit_to_user"><?php _e("Users can only see their own attachments", "attachments");?></label>
32
+ </div>
33
+ <input type="hidden" name="action" value="update" />
34
+ <input type="hidden" name="page_options" value="attachments_limit_to_user,<?php if( !empty( $post_types ) ) : foreach( $post_types as $post_type ) : ?>attachments_cpt_<?php echo $post_type->name; ?>,<?php endforeach; endif; ?>" />
35
+ <p class="submit">
36
+ <input type="submit" class="button-primary" value="<?php _e("Save", "attachments");?>" />
37
+ </p>
38
+ </form>
39
+ </div>
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.8
7
  Author: Jonathan Christopher
8
  Author URI: http://mondaybynoon.com/
9
  */
@@ -86,24 +86,9 @@ function attachments_cmp($a, $b)
86
  * @author Jonathan Christopher
87
  */
88
  function attachments_options()
89
- { ?>
90
- <div class="wrap">
91
- <div id="icon-options-general" class="icon32"><br /></div>
92
- <h2>Attachments Options</h2>
93
- <form action="options.php" method="post">
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>
106
- <?php }
107
 
108
 
109
 
@@ -214,6 +199,22 @@ function attachments_meta_box()
214
 
215
  // for pages
216
  add_meta_box( 'attachments_list', __( 'Attachments', 'attachments_textdomain' ), 'attachments_add', 'page', 'normal' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
218
 
219
 
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.9
7
  Author: Jonathan Christopher
8
  Author URI: http://mondaybynoon.com/
9
  */
86
  * @author Jonathan Christopher
87
  */
88
  function attachments_options()
89
+ {
90
+ include 'attachments.options.php';
91
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
 
94
 
199
 
200
  // for pages
201
  add_meta_box( 'attachments_list', __( 'Attachments', 'attachments_textdomain' ), 'attachments_add', 'page', 'normal' );
202
+
203
+ // for custom post types
204
+ if( function_exists( 'get_post_types' ) )
205
+ {
206
+ $args = array(
207
+ 'public' => true,
208
+ '_builtin' => false
209
+ );
210
+ $output = 'objects';
211
+ $operator = 'and';
212
+ $post_types = get_post_types( $args, $output, $operator );
213
+ foreach($post_types as $post_type)
214
+ {
215
+ add_meta_box( 'attachments_list', __( 'Attachments', 'attachments_textdomain' ), 'attachments_add', $post_type->name, 'normal' );
216
+ }
217
+ }
218
  }
219
 
220
 
css/attachments.css CHANGED
@@ -7,9 +7,6 @@ ul#attachments-actions li { width:50%; float:left; }
7
  li#attachments-add-new { float:right; text-align:right; }
8
 
9
 
10
- /* ========================== */
11
- /* = SHADOWBOX FILE LISTING = */
12
- /* ========================== */
13
  #attachments-file-list { padding:0 10px 15px 10px; background:#fff; }
14
  .attachments-file-section { padding:0 0 20px 0; }
15
  p.attachments-actions { padding:10px 0; }
@@ -52,4 +49,12 @@ p.attachments-actions { padding:10px 0; }
52
 
53
  .attachments-fields .textfield { overflow:hidden; zoom:1; padding-bottom:10px; }
54
  .attachments-fields .textfield label { display:block; width:20%; float:left; padding-top:6px; }
55
- .attachments-fields .textfield input { display:block; width:75%; float:left; }
 
 
 
 
 
 
 
 
7
  li#attachments-add-new { float:right; text-align:right; }
8
 
9
 
 
 
 
10
  #attachments-file-list { padding:0 10px 15px 10px; background:#fff; }
11
  .attachments-file-section { padding:0 0 20px 0; }
12
  p.attachments-actions { padding:10px 0; }
49
 
50
  .attachments-fields .textfield { overflow:hidden; zoom:1; padding-bottom:10px; }
51
  .attachments-fields .textfield label { display:block; width:20%; float:left; padding-top:6px; }
52
+ .attachments-fields .textfield input { display:block; width:75%; float:left; }
53
+
54
+
55
+ /* =========== */
56
+ /* = OPTIONS = */
57
+ /* =========== */
58
+ .attachments_checkbox { overflow:hidden; zoom:1; padding:0 0 7px 0; }
59
+ .attachments_checkbox input { display:block; float:left; margin-top:2px; }
60
+ .attachments_checkbox label { display:block; float:left; padding:0 0 0 7px; }
media.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
 
3
  error_reporting(0);
 
4
  require( dirname(__FILE__) . '/../../../wp-config.php' );
5
 
6
  global $wpdb;
1
  <?php
2
 
3
  error_reporting(0);
4
+ require_once(dirname(__FILE__) . '/../../../wp-admin/admin.php');
5
  require( dirname(__FILE__) . '/../../../wp-config.php' );
6
 
7
  global $wpdb;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: jchristopher
3
  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: 3.0
7
- Stable tag: 1.0.8
8
 
9
  Attachments allows you to append any number of items from your WordPress Media Library to Posts and Pages
10
 
@@ -41,12 +41,16 @@ Attachments uses WordPress' built in Media library for uploads and storage.
41
 
42
  == Changelog ==
43
 
 
 
 
 
44
  = 1.0.8 =
45
  * Fixed possible bug with images not thumbnailing properly
46
  * Tabbed media browsing implemented
47
 
48
  = 1.0.7.2 =
49
- * Revised Portuguese Translation by [Nicolas Mollet](www.nicolasmollet.com)
50
  * Added French Translation
51
 
52
  = 1.0.7.1 =
3
  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: 3.0.1
7
+ Stable tag: 1.0.9
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.9 =
45
+ * Support for Custom Post Types (found in Settings)
46
+ * Revised Portuguese Translation by [Miriam de Paula](http://www.tecsite.com.br)
47
+
48
  = 1.0.8 =
49
  * Fixed possible bug with images not thumbnailing properly
50
  * Tabbed media browsing implemented
51
 
52
  = 1.0.7.2 =
53
+ * Revised Portuguese Translation by [Nicolas Mollet](http://www.nicolasmollet.com)
54
  * Added French Translation
55
 
56
  = 1.0.7.1 =