PluginProbe ʕ •ᴥ•ʔ
Image Widget / 3.3.1
Image Widget v3.3.1
trunk 1.0 2.0 2.1 2.2 2.2.1 2.2.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.10 3.2.11 3.2.2 3.2.3 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1 4.1.1 4.1.2 4.2 4.2.1 4.2.2 4.3 4.3.1 4.4 4.4.1 4.4.11 4.4.12 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9
image-widget / views / widget.php
image-widget / views Last commit date
widget-admin.php 14 years ago widget.php 14 years ago
widget.php
49 lines
1 <?php
2 /**
3 * Widget template. This template can be overriden using the "sp_template_image-widget_widget.php" filter.
4 * See the readme.txt file for more info.
5 */
6
7 // Block direct requests
8 if ( !defined('ABSPATH') )
9 die('-1');
10
11 echo $before_widget;
12 if ( !empty( $title ) ) { echo $before_title . esc_attr($title) . $after_title; }
13 if ( !empty( $image ) ) {
14 if ( $link ) {
15 echo '<a class="'.$this->widget_options['classname'].'-image-link" href="'.esc_url($link).'" target="'.esc_attr($linktarget).'">';
16 }
17 if ( $imageurl ) {
18 echo '<img src="'.esc_url($imageurl).'" style="';
19 if ( !empty( $width ) && is_numeric( $width ) ) {
20 echo "max-width: {$width}px;";
21 }
22 if ( !empty( $height ) && is_numeric( $height ) ) {
23 echo "max-height: {$height}px;";
24 }
25 echo "\"";
26 if ( !empty( $align ) && $align != 'none' ) {
27 $align = esc_attr($align);
28 echo " class=\"align{$align}\"";
29 }
30 if ( !empty( $alt ) ) {
31 $alt = esc_attr($alt);
32 echo " alt=\"{$alt}\"";
33 } else {
34 $title = esc_attr($title);
35 echo " alt=\"{$title}\"";
36 }
37 echo " />";
38 }
39
40 if ( $link ) { echo '</a>'; }
41 }
42 if ( !empty( $description ) ) {
43 $text = apply_filters( 'widget_text', $description );
44 echo '<div class="'.$this->widget_options['classname'].'-description" >';
45 echo wpautop( $text );
46 echo "</div>";
47 }
48 echo $after_widget;
49 ?>