PluginProbe
Thumbnail Editor / 2.3.2
Thumbnail Editor v2.3.2
trunk 1.0.0 1.1.0 1.2.0 2.0.0 2.0.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4
thumbnail-editor / functions.php

functions.php in Thumbnail Editor 2.3.2, at functions.php

55 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if(!function_exists('get_thumb_image_src')){
4 function get_thumb_image_src($att_id = '', $type = ''){
5 if($att_id == '' or $type == '' )
6 return false;
7
8 $full_image = wp_get_attachment_image_src( $att_id, $type );
9 if(is_array($full_image)){
10 return $full_image[0];
11 } else {
12 return false;
13 }
14 }
15 }
16
17 if(!function_exists('get_thumb_image')){
18 function get_thumb_image($att_id = '', $type = ''){
19 if($att_id == '' or $type == '' )
20 return false;
21
22 $full_image = wp_get_attachment_image_src( $att_id, $type );
23 if(is_array($full_image)){
24 return '<img src="'.$full_image[0].'" alt="'.$type.'">';
25 } else {
26 return false;
27 }
28 }
29 }
30
31 if(!function_exists('get_thumb_image_sc')){
32 function get_thumb_image_sc( $atts ) {
33 $a = shortcode_atts( array(
34 'att_id' => '',
35 'type' => '',
36 ), $atts );
37 return get_thumb_image($a['att_id'], $a['type']);
38 }
39 }
40
41 if(!function_exists('get_thumb_image_src_sc')){
42 function get_thumb_image_src_sc( $atts ) {
43 $a = shortcode_atts( array(
44 'att_id' => '',
45 'type' => '',
46 ), $atts );
47 return get_thumb_image_src($a['att_id'], $a['type']);
48 }
49 }
50
51 if(!function_exists('thumb_editor_afo_text_domain')){
52 function thumb_editor_afo_text_domain(){
53 load_plugin_textdomain('thumbnail-editor', FALSE, basename( THE_PLUGIN_PATH ) .'/languages');
54 }
55 }