Version Description
- Adding language support for Ukrainian. Thanks to Michael Yunat [http://getvoip.com].
- Adding new function z_taxonomy_image() to display category or taxonomy image directly with support for size, alt and other attributes, for and how to use it please check the documentations.
- Some code enhancements.
Download this release
Release Info
Developer | elzahlan |
Plugin | Categories Images |
Version | 2.5 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.5
- categories-images.php +42 -1
- languages/zci-uk_UA.mo +0 -0
- languages/zci-uk_UA.po +56 -0
- readme.txt +9 -4
categories-images.php
CHANGED
@@ -4,7 +4,7 @@
|
|
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.
|
8 |
* Author URI: http://zahlan.net/
|
9 |
*/
|
10 |
?>
|
@@ -84,6 +84,7 @@ function z_edit_texonomy_field($taxonomy) {
|
|
84 |
</td>
|
85 |
</tr>'.z_script();
|
86 |
}
|
|
|
87 |
// upload using wordpress upload
|
88 |
function z_script() {
|
89 |
return '<script type="text/javascript">
|
@@ -307,4 +308,44 @@ function zci_options() {
|
|
307 |
</form>
|
308 |
</div>
|
309 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
}
|
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.5
|
8 |
* Author URI: http://zahlan.net/
|
9 |
*/
|
10 |
?>
|
84 |
</td>
|
85 |
</tr>'.z_script();
|
86 |
}
|
87 |
+
|
88 |
// upload using wordpress upload
|
89 |
function z_script() {
|
90 |
return '<script type="text/javascript">
|
308 |
</form>
|
309 |
</div>
|
310 |
<?php
|
311 |
+
}
|
312 |
+
|
313 |
+
// get taxonomy image for the given term_id
|
314 |
+
function z_taxonomy_image($term_id = NULL, $size = 'full', $attr = NULL, $echo = TRUE) {
|
315 |
+
if (!$term_id) {
|
316 |
+
if (is_category())
|
317 |
+
$term_id = get_query_var('cat');
|
318 |
+
elseif (is_tax()) {
|
319 |
+
$current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
|
320 |
+
$term_id = $current_term->term_id;
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
$taxonomy_image_url = get_option('z_taxonomy_image'.$term_id);
|
325 |
+
if(!empty($taxonomy_image_url)) {
|
326 |
+
$attachment_id = z_get_attachment_id_by_url($taxonomy_image_url);
|
327 |
+
if(!empty($attachment_id))
|
328 |
+
$taxonomy_image = wp_get_attachment_image($attachment_id, $size, FALSE, $attr);
|
329 |
+
else {
|
330 |
+
$image_attr = '';
|
331 |
+
if(is_array($attr)) {
|
332 |
+
if(!empty($attr['class']))
|
333 |
+
$image_attr .= ' class="'.$attr['class'].'" ';
|
334 |
+
if(!empty($attr['alt']))
|
335 |
+
$image_attr .= ' alt="'.$attr['alt'].'" ';
|
336 |
+
if(!empty($attr['width']))
|
337 |
+
$image_attr .= ' width="'.$attr['width'].'" ';
|
338 |
+
if(!empty($attr['height']))
|
339 |
+
$image_attr .= ' height="'.$attr['height'].'" ';
|
340 |
+
if(!empty($attr['title']))
|
341 |
+
$image_attr .= ' title="'.$attr['title'].'" ';
|
342 |
+
}
|
343 |
+
$taxonomy_image = '<img src="'.$taxonomy_image_url.'" '.$image_attr.'/>';
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
if ($echo)
|
348 |
+
echo $taxonomy_image;
|
349 |
+
else
|
350 |
+
return $taxonomy_image;
|
351 |
}
|
languages/zci-uk_UA.mo
ADDED
Binary file
|
languages/zci-uk_UA.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: 2014-06-08 22:58+0200\n"
|
6 |
+
"Last-Translator: Michael Yunat <Michael.Yunat@gmail.com>\n"
|
7 |
+
"Language-Team: http://getvoip.com/\n"
|
8 |
+
"Language: uk\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.6.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 "Ви не маєте достатньо прав для доступу до цієї сторінки."
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Categories Images ===
|
2 |
Contributors: elzahlan
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G8LC4VSYKYSGA
|
4 |
-
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
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 3
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
The Categories Images Plugin allow you to add image with category or taxonomy.
|
10 |
|
@@ -12,7 +12,7 @@ The Categories Images Plugin allow you to add image with category or taxonomy.
|
|
12 |
|
13 |
The Categories Images Plugin allow you to add image with category or taxonomy.
|
14 |
|
15 |
-
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.
|
16 |
|
17 |
Also from settings menu you can exclude any taxonomies from the plugin to avoid conflicting with another plugins like WooCommerce!
|
18 |
|
@@ -57,6 +57,11 @@ Please check the documentation page:
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
|
|
|
|
|
|
|
|
|
|
60 |
= 2.4.2 =
|
61 |
* Update code to reduce db queries. Thanks to fburatti [http://profiles.wordpress.org/fburatti/].
|
62 |
|
1 |
=== Categories Images ===
|
2 |
Contributors: elzahlan
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G8LC4VSYKYSGA
|
4 |
+
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, category featured image, categories featured images, feature image for category
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 2.5
|
8 |
|
9 |
The Categories Images Plugin allow you to add image with category or taxonomy.
|
10 |
|
12 |
|
13 |
The Categories Images Plugin allow you to add image with category or taxonomy.
|
14 |
|
15 |
+
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 or simply use `<?php if (function_exists('z_taxonomy_image')) z_taxonomy_image(); ?>` in (category or taxonomy) template.
|
16 |
|
17 |
Also from settings menu you can exclude any taxonomies from the plugin to avoid conflicting with another plugins like WooCommerce!
|
18 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 2.5 =
|
61 |
+
* Adding language support for Ukrainian. Thanks to Michael Yunat [http://getvoip.com].
|
62 |
+
* Adding new function z_taxonomy_image() to display category or taxonomy image directly with support for size, alt and other attributes, for and how to use it please check the documentations.
|
63 |
+
* Some code enhancements.
|
64 |
+
|
65 |
= 2.4.2 =
|
66 |
* Update code to reduce db queries. Thanks to fburatti [http://profiles.wordpress.org/fburatti/].
|
67 |
|