Version Description
- New screenshots.
- Updated language file.
- Added support for both old and new Wordpress media uploader.
- Added new submenu (Categories Images) in Settings menu.
- Added new settings for excluding any taxonomies from the plugin.
- Added new placeholder image.
Thanks to Patrick http://www.patrickbos.nl and Hassan http://profiles.wordpress.org/hassanhamm/ for the new ideas.
Download this release
Release Info
Developer | elzahlan |
Plugin | Categories Images |
Version | 2.3 |
Comparing to | |
See all releases |
Version 2.3
- categories-images.php +291 -0
- images/placeholder.png +0 -0
- languages/zci-ar.mo +0 -0
- languages/zci-ar.po +56 -0
- languages/zci-zh_CN.mo +0 -0
- languages/zci-zh_CN.po +32 -0
- readme.txt +106 -0
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- screenshot-4.jpg +0 -0
- screenshot-5.jpg +0 -0
categories-images.php
ADDED
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Categories Images
|
4 |
+
Plugin URI: http://zahlan.net/blog/2012/06/categories-images/
|
5 |
+
Description: Categories Images Plugin allow you to add an image to category or any custom term.
|
6 |
+
Author: Muhammad Said El Zahlan
|
7 |
+
Version: 2.3
|
8 |
+
Author URI: http://zahlan.net/
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
if (!defined('Z_PLUGIN_URL'))
|
13 |
+
define('Z_PLUGIN_URL', untrailingslashit(plugins_url('', __FILE__)));
|
14 |
+
|
15 |
+
define('Z_IMAGE_PLACEHOLDER', Z_PLUGIN_URL."/images/placeholder.png");
|
16 |
+
|
17 |
+
// l10n
|
18 |
+
load_plugin_textdomain('zci', FALSE, 'categories-images/languages');
|
19 |
+
|
20 |
+
add_action('admin_init', 'z_init');
|
21 |
+
function z_init() {
|
22 |
+
$z_taxonomies = get_taxonomies();
|
23 |
+
if (is_array($z_taxonomies)) {
|
24 |
+
$zci_options = get_option('zci_options');
|
25 |
+
if (empty($zci_options['excluded_taxonomies']))
|
26 |
+
$zci_options['excluded_taxonomies'] = array();
|
27 |
+
|
28 |
+
foreach ($z_taxonomies as $z_taxonomy) {
|
29 |
+
if (in_array($z_taxonomy, $zci_options['excluded_taxonomies']))
|
30 |
+
continue;
|
31 |
+
add_action($z_taxonomy.'_add_form_fields', 'z_add_texonomy_field');
|
32 |
+
add_action($z_taxonomy.'_edit_form_fields', 'z_edit_texonomy_field');
|
33 |
+
add_filter( 'manage_edit-' . $z_taxonomy . '_columns', 'z_taxonomy_columns' );
|
34 |
+
add_filter( 'manage_' . $z_taxonomy . '_custom_column', 'z_taxonomy_column', 10, 3 );
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
function z_add_style() {
|
40 |
+
echo '<style type="text/css" media="screen">
|
41 |
+
th.column-thumb {width:60px;}
|
42 |
+
.form-field img.taxonomy-image {border:1px solid #eee;max-width:300px;max-height:300px;}
|
43 |
+
.inline-edit-row fieldset .thumb label span.title {width:48px;height:48px;border:1px solid #eee;display:inline-block;}
|
44 |
+
.column-thumb span {width:48px;height:48px;border:1px solid #eee;display:inline-block;}
|
45 |
+
.inline-edit-row fieldset .thumb img,.column-thumb img {width:48px;height:48px;}
|
46 |
+
</style>';
|
47 |
+
}
|
48 |
+
|
49 |
+
// add image field in add form
|
50 |
+
function z_add_texonomy_field() {
|
51 |
+
if (get_bloginfo('version') >= 3.5)
|
52 |
+
wp_enqueue_media();
|
53 |
+
else {
|
54 |
+
wp_enqueue_style('thickbox');
|
55 |
+
wp_enqueue_script('thickbox');
|
56 |
+
}
|
57 |
+
|
58 |
+
echo '<div class="form-field">
|
59 |
+
<label for="taxonomy_image">' . __('Image', 'zci') . '</label>
|
60 |
+
<input type="text" name="taxonomy_image" id="taxonomy_image" value="" />
|
61 |
+
<br/>
|
62 |
+
<button class="z_upload_image_button button">' . __('Upload/Add image', 'zci') . '</button>
|
63 |
+
</div>'.z_script();
|
64 |
+
}
|
65 |
+
|
66 |
+
// add image field in edit form
|
67 |
+
function z_edit_texonomy_field($taxonomy) {
|
68 |
+
if (get_bloginfo('version') >= 3.5)
|
69 |
+
wp_enqueue_media();
|
70 |
+
else {
|
71 |
+
wp_enqueue_style('thickbox');
|
72 |
+
wp_enqueue_script('thickbox');
|
73 |
+
}
|
74 |
+
|
75 |
+
if (z_taxonomy_image_url( $taxonomy->term_id, TRUE ) == Z_IMAGE_PLACEHOLDER)
|
76 |
+
$image_text = "";
|
77 |
+
else
|
78 |
+
$image_text = z_taxonomy_image_url( $taxonomy->term_id, TRUE );
|
79 |
+
echo '<tr class="form-field">
|
80 |
+
<th scope="row" valign="top"><label for="taxonomy_image">' . __('Image', 'zci') . '</label></th>
|
81 |
+
<td><img class="taxonomy-image" src="' . z_taxonomy_image_url( $taxonomy->term_id, TRUE ) . '"/><br/><input type="text" name="taxonomy_image" id="taxonomy_image" value="'.$image_text.'" /><br />
|
82 |
+
<button class="z_upload_image_button button">' . __('Upload/Add image', 'zci') . '</button>
|
83 |
+
<button class="z_remove_image_button button">' . __('Remove image', 'zci') . '</button>
|
84 |
+
</td>
|
85 |
+
</tr>'.z_script();
|
86 |
+
}
|
87 |
+
// upload using wordpress upload
|
88 |
+
function z_script() {
|
89 |
+
return '<script type="text/javascript">
|
90 |
+
jQuery(document).ready(function($) {
|
91 |
+
var wordpress_ver = "'.get_bloginfo("version").'", upload_button;
|
92 |
+
$(".z_upload_image_button").click(function() {
|
93 |
+
upload_button = $(this);
|
94 |
+
var frame;
|
95 |
+
if (wordpress_ver >= "3.5") {
|
96 |
+
event.preventDefault();
|
97 |
+
if (frame) {
|
98 |
+
frame.open();
|
99 |
+
return;
|
100 |
+
}
|
101 |
+
frame = wp.media();
|
102 |
+
frame.on( "select", function() {
|
103 |
+
// Grab the selected attachment.
|
104 |
+
var attachment = frame.state().get("selection").first();
|
105 |
+
frame.close();
|
106 |
+
if (upload_button.parent().prev().children().hasClass("tax_list")) {
|
107 |
+
upload_button.parent().prev().children().val(attachment.attributes.url);
|
108 |
+
upload_button.parent().prev().prev().children().attr("src", attachment.attributes.url);
|
109 |
+
}
|
110 |
+
else
|
111 |
+
$("#taxonomy_image").val(attachment.attributes.url);
|
112 |
+
});
|
113 |
+
frame.open();
|
114 |
+
}
|
115 |
+
else {
|
116 |
+
tb_show("", "media-upload.php?type=image&TB_iframe=true");
|
117 |
+
return false;
|
118 |
+
}
|
119 |
+
});
|
120 |
+
|
121 |
+
$(".z_remove_image_button").click(function() {
|
122 |
+
$("#taxonomy_image").val("");
|
123 |
+
$(this).parent().siblings(".title").children("img").attr("src","' . Z_IMAGE_PLACEHOLDER . '");
|
124 |
+
$(".inline-edit-col :input[name=\'taxonomy_image\']").val("");
|
125 |
+
return false;
|
126 |
+
});
|
127 |
+
|
128 |
+
if (wordpress_ver < "3.5") {
|
129 |
+
window.send_to_editor = function(html) {
|
130 |
+
imgurl = $("img",html).attr("src");
|
131 |
+
if (upload_button.parent().prev().children().hasClass("tax_list")) {
|
132 |
+
upload_button.parent().prev().children().val(imgurl);
|
133 |
+
upload_button.parent().prev().prev().children().attr("src", imgurl);
|
134 |
+
}
|
135 |
+
else
|
136 |
+
$("#taxonomy_image").val(imgurl);
|
137 |
+
tb_remove();
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
$(".editinline").live("click", function(){
|
142 |
+
var tax_id = $(this).parents("tr").attr("id").substr(4);
|
143 |
+
var thumb = $("#tag-"+tax_id+" .thumb img").attr("src");
|
144 |
+
if (thumb != "' . Z_IMAGE_PLACEHOLDER . '") {
|
145 |
+
$(".inline-edit-col :input[name=\'taxonomy_image\']").val(thumb);
|
146 |
+
} else {
|
147 |
+
$(".inline-edit-col :input[name=\'taxonomy_image\']").val("");
|
148 |
+
}
|
149 |
+
$(".inline-edit-col .title img").attr("src",thumb);
|
150 |
+
return false;
|
151 |
+
});
|
152 |
+
});
|
153 |
+
</script>';
|
154 |
+
}
|
155 |
+
|
156 |
+
// save our taxonomy image while edit or save term
|
157 |
+
add_action('edit_term','z_save_taxonomy_image');
|
158 |
+
add_action('create_term','z_save_taxonomy_image');
|
159 |
+
function z_save_taxonomy_image($term_id) {
|
160 |
+
if(isset($_POST['taxonomy_image']))
|
161 |
+
update_option('z_taxonomy_image'.$term_id, $_POST['taxonomy_image']);
|
162 |
+
}
|
163 |
+
|
164 |
+
// output taxonomy image url for the given term_id (NULL by default)
|
165 |
+
function z_taxonomy_image_url($term_id = NULL, $return_placeholder = FALSE) {
|
166 |
+
if (!$term_id) {
|
167 |
+
if (is_category())
|
168 |
+
$term_id = get_query_var('cat');
|
169 |
+
elseif (is_tax()) {
|
170 |
+
$current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
|
171 |
+
$term_id = $current_term->term_id;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
$taxonomy_image_url = get_option('z_taxonomy_image'.$term_id);
|
175 |
+
if ($return_placeholder)
|
176 |
+
return ($taxonomy_image_url != "") ? $taxonomy_image_url : Z_IMAGE_PLACEHOLDER;
|
177 |
+
else
|
178 |
+
return $taxonomy_image_url;
|
179 |
+
}
|
180 |
+
|
181 |
+
function z_quick_edit_custom_box($column_name, $screen, $name) {
|
182 |
+
if ($column_name == 'thumb')
|
183 |
+
echo '<fieldset>
|
184 |
+
<div class="thumb inline-edit-col">
|
185 |
+
<label>
|
186 |
+
<span class="title"><img src="" alt="Thumbnail"/></span>
|
187 |
+
<span class="input-text-wrap"><input type="text" name="taxonomy_image" value="" class="tax_list" /></span>
|
188 |
+
<span class="input-text-wrap">
|
189 |
+
<button class="z_upload_image_button button">' . __('Upload/Add image', 'zci') . '</button>
|
190 |
+
<button class="z_remove_image_button button">' . __('Remove image', 'zci') . '</button>
|
191 |
+
</span>
|
192 |
+
</label>
|
193 |
+
</div>
|
194 |
+
</fieldset>';
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Thumbnail column added to category admin.
|
199 |
+
*
|
200 |
+
* @access public
|
201 |
+
* @param mixed $columns
|
202 |
+
* @return void
|
203 |
+
*/
|
204 |
+
function z_taxonomy_columns( $columns ) {
|
205 |
+
$new_columns = array();
|
206 |
+
$new_columns['cb'] = $columns['cb'];
|
207 |
+
$new_columns['thumb'] = __('Image', 'zci');
|
208 |
+
|
209 |
+
unset( $columns['cb'] );
|
210 |
+
|
211 |
+
return array_merge( $new_columns, $columns );
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Thumbnail column value added to category admin.
|
216 |
+
*
|
217 |
+
* @access public
|
218 |
+
* @param mixed $columns
|
219 |
+
* @param mixed $column
|
220 |
+
* @param mixed $id
|
221 |
+
* @return void
|
222 |
+
*/
|
223 |
+
function z_taxonomy_column( $columns, $column, $id ) {
|
224 |
+
if ( $column == 'thumb' )
|
225 |
+
$columns = '<span><img src="' . z_taxonomy_image_url($id, TRUE) . '" alt="' . __('Thumbnail', 'zci') . '" class="wp-post-image" /></span>';
|
226 |
+
|
227 |
+
return $columns;
|
228 |
+
}
|
229 |
+
|
230 |
+
// change 'insert into post' to 'use this image'
|
231 |
+
function z_change_insert_button_text($safe_text, $text) {
|
232 |
+
return str_replace("Insert into Post", "Use this image", $text);
|
233 |
+
}
|
234 |
+
|
235 |
+
// style the image in category list
|
236 |
+
if ( strpos( $_SERVER['SCRIPT_NAME'], 'edit-tags.php' ) > 0 ) {
|
237 |
+
add_action( 'admin_head', 'z_add_style' );
|
238 |
+
add_action('quick_edit_custom_box', 'z_quick_edit_custom_box', 10, 3);
|
239 |
+
add_filter("attribute_escape", "z_change_insert_button_text", 10, 2);
|
240 |
+
}
|
241 |
+
|
242 |
+
// New menu submenu for plugin options in Settings menu
|
243 |
+
add_action('admin_menu', 'z_options_menu');
|
244 |
+
function z_options_menu() {
|
245 |
+
add_options_page(__('Categories Images settings', 'zci'), __('Categories Images', 'zci'), 'manage_options', 'zci-options', 'zci_options');
|
246 |
+
add_action('admin_init', 'z_register_settings');
|
247 |
+
}
|
248 |
+
|
249 |
+
// Register plugin settings
|
250 |
+
function z_register_settings() {
|
251 |
+
register_setting('zci_options', 'zci_options', 'z_options_validate');
|
252 |
+
add_settings_section('zci_settings', __('Categories Images settings', 'zci'), 'z_section_text', 'zci-options');
|
253 |
+
add_settings_field('z_excluded_taxonomies', __('Excluded Taxonomies', 'zci'), 'z_excluded_taxonomies', 'zci-options', 'zci_settings');
|
254 |
+
}
|
255 |
+
|
256 |
+
// Settings section description
|
257 |
+
function z_section_text() {
|
258 |
+
echo '<p>'.__('Please select the taxonomies you want to exclude it from Categories Images plugin', 'zci').'</p>';
|
259 |
+
}
|
260 |
+
|
261 |
+
// Excluded taxonomies checkboxs
|
262 |
+
function z_excluded_taxonomies() {
|
263 |
+
$options = get_option('zci_options');
|
264 |
+
$disabled_taxonomies = array('nav_menu', 'link_category', 'post_format');
|
265 |
+
foreach (get_taxonomies() as $tax) : if (in_array($tax, $disabled_taxonomies)) continue; ?>
|
266 |
+
<input type="checkbox" name="zci_options[excluded_taxonomies][<?php echo $tax ?>]" value="<?php echo $tax ?>" <?php checked(isset($options['excluded_taxonomies'][$tax])); ?> /> <?php echo $tax ;?><br />
|
267 |
+
<?php endforeach;
|
268 |
+
}
|
269 |
+
|
270 |
+
// Validating options
|
271 |
+
function z_options_validate($input) {
|
272 |
+
return $input;
|
273 |
+
}
|
274 |
+
|
275 |
+
// Plugin option page
|
276 |
+
function zci_options() {
|
277 |
+
if (!current_user_can('manage_options'))
|
278 |
+
wp_die(__( 'You do not have sufficient permissions to access this page.', 'zci'));
|
279 |
+
$options = get_option('zci_options');
|
280 |
+
?>
|
281 |
+
<div class="wrap">
|
282 |
+
<?php screen_icon(); ?>
|
283 |
+
<h2><?php _e('Categories Images', 'zci'); ?></h2>
|
284 |
+
<form method="post" action="options.php">
|
285 |
+
<?php settings_fields('zci_options'); ?>
|
286 |
+
<?php do_settings_sections('zci-options'); ?>
|
287 |
+
<?php submit_button(); ?>
|
288 |
+
</form>
|
289 |
+
</div>
|
290 |
+
<?php
|
291 |
+
}
|
images/placeholder.png
ADDED
Binary file
|
languages/zci-ar.mo
ADDED
Binary file
|
languages/zci-ar.po
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Categories Images\n"
|
4 |
+
"POT-Creation-Date: 2013-06-14 04:42+0200\n"
|
5 |
+
"PO-Revision-Date: 2013-06-14 04:45+0200\n"
|
6 |
+
"Last-Translator: Muhammad Zahlan <elzahlan@gmail.com>\n"
|
7 |
+
"Language-Team: Muhammad Zahlan <elzahlan@gmail.com>\n"
|
8 |
+
"Language: ar\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.5.5\n"
|
13 |
+
"X-Poedit-KeywordsList: _;__;_e\n"
|
14 |
+
"X-Poedit-Basepath: ../\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: categories-images.php:59 categories-images.php:80 categories-images.php:207
|
19 |
+
msgid "Image"
|
20 |
+
msgstr "صورة"
|
21 |
+
|
22 |
+
#: categories-images.php:62 categories-images.php:82 categories-images.php:189
|
23 |
+
msgid "Upload/Add image"
|
24 |
+
msgstr "رفع/اضافة صورة"
|
25 |
+
|
26 |
+
#: categories-images.php:83 categories-images.php:190
|
27 |
+
msgid "Remove image"
|
28 |
+
msgstr "حذف الصورة"
|
29 |
+
|
30 |
+
#: categories-images.php:225
|
31 |
+
msgid "Thumbnail"
|
32 |
+
msgstr "صورة مصغرة"
|
33 |
+
|
34 |
+
#: categories-images.php:245 categories-images.php:252
|
35 |
+
msgid "Categories Images settings"
|
36 |
+
msgstr "إعدادات صور التصنيفات"
|
37 |
+
|
38 |
+
#: categories-images.php:245 categories-images.php:283
|
39 |
+
msgid "Categories Images"
|
40 |
+
msgstr "صور التصنيفات"
|
41 |
+
|
42 |
+
#: categories-images.php:253
|
43 |
+
msgid "Excluded Taxonomies"
|
44 |
+
msgstr "التصنيفات المستبعدة"
|
45 |
+
|
46 |
+
#: categories-images.php:258
|
47 |
+
msgid ""
|
48 |
+
"Please select the taxonomies you want to exclude it from Categories Images "
|
49 |
+
"plugin"
|
50 |
+
msgstr ""
|
51 |
+
"من فضلك قم بإختيار نوع التصنيفات التي تريد استبعادها من الإضافة ( التصنيفات "
|
52 |
+
"التي لن يتم استخدام صور فيها )"
|
53 |
+
|
54 |
+
#: categories-images.php:278
|
55 |
+
msgid "You do not have sufficient permissions to access this page."
|
56 |
+
msgstr "لا توجد لديك صلاحيات كافية لعرض هذه الصفحة."
|
languages/zci-zh_CN.mo
ADDED
Binary file
|
languages/zci-zh_CN.po
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Categories Images\n"
|
4 |
+
"POT-Creation-Date: 2013-01-10 16:45+0800\n"
|
5 |
+
"PO-Revision-Date: 2013-01-10 16:45+0800\n"
|
6 |
+
"Last-Translator: Joe <tkjune@gmail.com>\n"
|
7 |
+
"Language-Team: Joe Tse <tkjune@gmail.com>\n"
|
8 |
+
"Language: zh_CN\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.5.4\n"
|
13 |
+
"X-Poedit-KeywordsList: _;__;_e\n"
|
14 |
+
"X-Poedit-Basepath: ../\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: categories-images.php:52 categories-images.php:68 categories-images.php:164
|
19 |
+
msgid "Image"
|
20 |
+
msgstr "图片"
|
21 |
+
|
22 |
+
#: categories-images.php:55 categories-images.php:70 categories-images.php:146
|
23 |
+
msgid "Upload/Add image"
|
24 |
+
msgstr "上传/添加图片"
|
25 |
+
|
26 |
+
#: categories-images.php:71 categories-images.php:147
|
27 |
+
msgid "Remove image"
|
28 |
+
msgstr "删除图片"
|
29 |
+
|
30 |
+
#: categories-images.php:182
|
31 |
+
msgid "Thumbnail"
|
32 |
+
msgstr "缩略图"
|
readme.txt
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Categories Images ===
|
2 |
+
Contributors: elzahlan
|
3 |
+
Tags: Category Image, Category Images, Categories Images, taxonomy image, taxonomy images, taxonomies images, category icon, categories icons, category logo, categories logos, admin, wp-admin, category image plugin, categories images plugin
|
4 |
+
Requires at least: 2.8
|
5 |
+
Tested up to: 3.5.1
|
6 |
+
Stable tag: 2.3
|
7 |
+
|
8 |
+
The Categories Images Plugin allow you to add image with category or taxonomy.
|
9 |
+
|
10 |
+
== Description ==
|
11 |
+
|
12 |
+
The Categories Images Plugin allow you to add image with category or taxonomy.
|
13 |
+
|
14 |
+
Use `<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>` to get the url and put it in any img tag in (category or taxonomy) template.
|
15 |
+
|
16 |
+
Also from settings menu you can exclude any taxonomies from the plugin to avoid conflicting with another plugins like WooCommerce!
|
17 |
+
|
18 |
+
= More documentation =
|
19 |
+
|
20 |
+
Go to [http://zahlan.net/blog/2012/06/categories-images/](http://zahlan.net/blog/2012/06/categories-images/)
|
21 |
+
|
22 |
+
== Installation ==
|
23 |
+
|
24 |
+
You can install Categories Images directly from the WordPress admin panel:
|
25 |
+
|
26 |
+
1. Visit the Plugins > Add New and search for 'Categories Images'.
|
27 |
+
2. Click to install.
|
28 |
+
3. Once installed, activate and it is functional.
|
29 |
+
|
30 |
+
OR
|
31 |
+
|
32 |
+
Manual Installation:
|
33 |
+
|
34 |
+
1. Download the plugin, then extract it.
|
35 |
+
2. Upload `categories-images` extracted folder to the `/wp-content/plugins/` directory
|
36 |
+
3. Activate the plugin through the 'Plugins' menu in WordPress
|
37 |
+
|
38 |
+
You're done! The Plugin ready to use, for more please check the plugin description.
|
39 |
+
|
40 |
+
= More documentation =
|
41 |
+
|
42 |
+
Go to [http://zahlan.net/blog/2012/06/categories-images/](http://zahlan.net/blog/2012/06/categories-images/)
|
43 |
+
|
44 |
+
== Frequently Asked Questions ==
|
45 |
+
|
46 |
+
Please check the documentation page:
|
47 |
+
[http://zahlan.net/blog/2012/06/categories-images/](http://zahlan.net/blog/2012/06/categories-images/)
|
48 |
+
|
49 |
+
== Screenshots ==
|
50 |
+
|
51 |
+
1. Image preview and new image field in add/edit category or taxonomy with upload button which allow you to select current or upload a new image.
|
52 |
+
2. New image field with (upload/remove) buttons to allow you to edit category or taxonomy image in quick edit.
|
53 |
+
3. When you click the upload button the wordpress upload box will popup, upload or select image then press use this image.
|
54 |
+
4. New submenu (Categories Images) in Settings menu.
|
55 |
+
5. Now you can exclude any taxonomy from the plugin and save changes.
|
56 |
+
|
57 |
+
== Changelog ==
|
58 |
+
|
59 |
+
= 2.3 =
|
60 |
+
* New screenshots.
|
61 |
+
* Updated language file.
|
62 |
+
* Added support for both old and new Wordpress media uploader.
|
63 |
+
* Added new submenu (Categories Images) in Settings menu.
|
64 |
+
* Added new settings for excluding any taxonomies from the plugin.
|
65 |
+
* Added new placeholder image.
|
66 |
+
|
67 |
+
Thanks to Patrick http://www.patrickbos.nl and Hassan http://profiles.wordpress.org/hassanhamm/ for the new ideas.
|
68 |
+
|
69 |
+
= 2.2.4 =
|
70 |
+
* java script bug fixed, reported about conflicting with WooCommerce plugin. Thanks to Marty McGee.
|
71 |
+
|
72 |
+
= 2.2.3 =
|
73 |
+
* bug fix in displaying category or taxonomy image at the frontend.
|
74 |
+
|
75 |
+
= 2.2.2 =
|
76 |
+
* bug fix in displaying placeholder image in wp-admin.
|
77 |
+
|
78 |
+
= 2.2.1 =
|
79 |
+
* edit z_taxonomy_image_url() to only return data in case the user inserted image for the selected category or taxonomy
|
80 |
+
|
81 |
+
= 2.2 =
|
82 |
+
* fix a bug, prevent a function from running execpt when editing a category or taxonomy to avoid affecting other wordpress edit pages in the wp-admin
|
83 |
+
|
84 |
+
= 2.1 =
|
85 |
+
* fix a bug in languages
|
86 |
+
* fix a bug in quick edit category or taxonomy
|
87 |
+
|
88 |
+
= 2.0 =
|
89 |
+
* New screenshots.
|
90 |
+
* Added l10n support.
|
91 |
+
* Added Arabic and Chinese languages.
|
92 |
+
* Added new button for upload or select an image using wordpress media uploader.
|
93 |
+
* Added default image placeholder.
|
94 |
+
* Added thumbnail in categories or taxonomies list.
|
95 |
+
* Added image thumbnail, image text box, upload button and remove button in quick edit.
|
96 |
+
|
97 |
+
Thank so much to Joe Tse http://tkjune.com :)
|
98 |
+
|
99 |
+
= 1.2 =
|
100 |
+
Adding some screenshots
|
101 |
+
|
102 |
+
= 1.1 =
|
103 |
+
Fix javascript bug with wordpress 3.4
|
104 |
+
|
105 |
+
= 1.0 =
|
106 |
+
The First Release
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
screenshot-3.jpg
ADDED
Binary file
|
screenshot-4.jpg
ADDED
Binary file
|
screenshot-5.jpg
ADDED
Binary file
|