Changeset 1292022
- Timestamp:
- 11/22/2015 01:55:47 PM (10 years ago)
- Location:
- image-widget-deluxe/trunk
- Files:
-
- 6 edited
-
css/image-widget-backend.css (modified) (3 diffs)
-
image-widget-deluxe.php (modified) (9 diffs)
-
js/media.js (modified) (3 diffs)
-
languages/image-widget-da_DK.mo (modified) (previous)
-
languages/image-widget-da_DK.po (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-widget-deluxe/trunk/css/image-widget-backend.css
r1238824 r1292022 37 37 position: absolute; 38 38 top: 73px; 39 margin: 0; 40 line-height: 1; 39 41 right: 15px; 40 42 background: #ccc; … … 44 46 color: #000; 45 47 font-size: 24px; 48 -webkit-appearance: none; 49 -moz-appearance: none; 50 appearance: none; 46 51 } 47 52 … … 58 63 height: auto; 59 64 margin-top: 15px; 65 } 66 67 .customize-control-widget_form button.widget-image-select { 68 display: block !important; 60 69 } 61 70 -
image-widget-deluxe/trunk/image-widget-deluxe.php
r1290503 r1292022 81 81 * 82 82 */ 83 83 add_action( 'customize_controls_enqueue_scripts', 'rommeled_image_widget_scripts', 999 ); // Enqueue at the customizer. 84 84 function rommeled_image_widget_scripts(){ 85 85 … … 116 116 117 117 // Enqueue the JS and styles for the backend. 118 add_action( 'admin_enqueue_scripts', 'rommeled_image_widget_scripts', 99 ); 118 add_action( 'admin_enqueue_scripts', 'rommeled_image_widget_scripts', 99 ); // Enqueue at admin area. 119 119 } 120 120 … … 138 138 $text = ! empty( $instance['text'] ) ? $instance['text'] : ''; 139 139 $url = ! empty( $instance['url'] ) ? esc_attr($instance['url']) : ''; 140 $url_target = ! empty( $instance['url_target'] ) ? esc_attr($instance['url_target']) : ''; 140 141 $button = ! empty( $instance['button'] ) ? esc_attr($instance['button']) : ''; 141 142 $size = ! empty( $instance['size'] ) ? esc_attr($instance['size']) : ''; … … 153 154 } 154 155 156 // Url Target. 157 if ( ! empty($url_target) ) { 158 $attr_target = 'target="' . $url_target .'" '; 159 } else { 160 $attr_target = ''; 161 } 162 155 163 // Get the title. 156 164 if ( ! empty( $title ) ) { … … 180 188 // Begin the link. 181 189 if ( ! empty( $url ) ) { 182 echo '<a href="' . $url . '">';190 echo '<a ' . $attr_target . ' href="' . $url . '">'; 183 191 } 184 192 … … 213 221 if ( $field == $widget_id . '-button' && ! empty( $url ) && ! empty( $button ) || $field === 'no-sort' && ! empty( $url ) && ! empty( $button ) ) : 214 222 215 $link = "window.location.href='" . $url . "'"; 223 if ( empty($url_target) ) { 224 $link = "window.location.href='" . $url . "'"; 225 } else { 226 $link = "window.location.href='" . $url . "','_blank'"; 227 } 216 228 217 229 echo '<p class="rommeled_widget_image-field rommeled_widget_image-button"><button class="button btn" onclick="' . $link . '">' . $button . '</button></p>'; … … 239 251 $text = ! empty( $instance['text'] ) ? $instance['text'] : ''; 240 252 $url = ! empty( $instance['url'] ) ? esc_attr($instance['url']) : ''; 253 $url_target = ! empty( $instance['url_target'] ) ? esc_attr($instance['url_target']) : ''; 241 254 $button = ! empty( $instance['button'] ) ? esc_attr($instance['button']) : ''; 242 255 $size = ! empty( $instance['size'] ) ? esc_attr($instance['size']) : ''; … … 333 346 <div class="non-sortable" <?php echo $imageoptions; ?>> 334 347 <h4><?php _e('Widget Options', 'image-widget' ); ?></h4> 348 349 <label for="<?php echo $this->get_field_id( 'url_target' ); ?>"><?php _e( 'Link target', 'image-widget' ); ?>: 350 <select class='widefat' id="<?php echo $this->get_field_id( 'url_target' ); ?>" name="<?php echo $this->get_field_name( 'url_target' ); ?>"> 351 352 <?php 353 354 $targets = array( 355 '' => esc_html__( 'Same window', 'image-widget' ), 356 '_blank' => esc_html__( 'New window', 'image-widget' ), 357 ); 358 359 foreach ( $targets as $target => $target_type ) : ?> 360 361 <option value="<?php echo $target; ?>" <?php selected( $target, $url_target, true ); ?>><?php echo $target_type; ?></option> 362 363 <?php endforeach; ?> 364 365 </select> 366 <small><?php _e( 'Select a style for the image', 'image-widget' ); ?>.</small> 367 </label> 335 368 336 369 <label for="<?php echo $this->get_field_id( 'style' ); ?>"><?php _e( 'Image style', 'image-widget' ); ?>: … … 394 427 $instance['button'] = ( ! empty( $new_instance['button'] ) ) ? strip_tags( $new_instance['button'] ) : ''; 395 428 $instance['url'] = ( ! empty( $new_instance['url'] ) ) ? strip_tags( $new_instance['url'] ) : ''; 429 $instance['url_target'] = ( ! empty( $new_instance['url_target'] ) ) ? strip_tags( $new_instance['url_target'] ) : ''; 396 430 $instance['size'] = ( ! empty( $new_instance['size'] ) ) ? strip_tags( $new_instance['size'] ) : ''; 397 431 $instance['style'] = ( ! empty( $new_instance['style'] ) ) ? strip_tags( $new_instance['style'] ) : ''; -
image-widget-deluxe/trunk/js/media.js
r1238149 r1292022 41 41 42 42 }); 43 44 43 } 45 44 … … 60 59 61 60 }); 62 63 61 } 64 62 … … 77 75 78 76 sort.disableSelection(); 79 80 77 } 81 78 -
image-widget-deluxe/trunk/languages/image-widget-da_DK.po
r1238824 r1292022 2 2 msgstr "" 3 3 "Project-Id-Version: Image Widget\n" 4 "POT-Creation-Date: 2015- 09-05 18:36+0200\n"5 "PO-Revision-Date: 2015- 09-05 18:36+0200\n"4 "POT-Creation-Date: 2015-11-22 14:29+0100\n" 5 "PO-Revision-Date: 2015-11-22 14:29+0100\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 13 13 "X-Poedit-Basepath: ..\n" 14 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 "X-Poedit-KeywordsList: __;_e \n"15 "X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e\n" 16 16 "X-Poedit-SearchPath-0: .\n" 17 17 … … 24 24 msgstr "Brug dette billede" 25 25 26 #: image-widget-deluxe.php:11 326 #: image-widget-deluxe.php:111 27 27 msgid "Image widget Deluxe" 28 28 msgstr "Billede Widget Deluxe" 29 29 30 #: image-widget-deluxe.php:11 530 #: image-widget-deluxe.php:113 31 31 msgid "A widget that displays an image with title, description and a button." 32 32 msgstr "" … … 34 34 "link." 35 35 36 #: image-widget-deluxe.php:27 036 #: image-widget-deluxe.php:275 37 37 msgid "Widget Title" 38 38 msgstr "Widget titel" 39 39 40 #: image-widget-deluxe.php:27 240 #: image-widget-deluxe.php:277 41 41 msgid "Give the widget a title (If you need one)" 42 42 msgstr "Giv denne widget en titel. (Hvis du har brug for en)" 43 43 44 #: image-widget-deluxe.php:28 244 #: image-widget-deluxe.php:287 45 45 msgid "Title" 46 46 msgstr "Overskrift" 47 47 48 #: image-widget-deluxe.php:28 448 #: image-widget-deluxe.php:289 49 49 msgid "Add a title that will be displayed inside the widget" 50 50 msgstr "En overskrift der vil blive vist inde i widget" 51 51 52 #: image-widget-deluxe.php:29 152 #: image-widget-deluxe.php:296 53 53 msgid "Image" 54 54 msgstr "Billede" 55 55 56 #: image-widget-deluxe.php:29 256 #: image-widget-deluxe.php:297 57 57 msgid "Select image" 58 58 msgstr "Vælg billede" 59 59 60 #: image-widget-deluxe.php:3 1560 #: image-widget-deluxe.php:320 61 61 msgid "Text" 62 62 msgstr "Tekst" 63 63 64 #: image-widget-deluxe.php:3 1764 #: image-widget-deluxe.php:322 65 65 msgid "Add or edit a description for the widget" 66 66 msgstr "Tilføj eller rediger teksten i widget" 67 67 68 #: image-widget-deluxe.php:32 468 #: image-widget-deluxe.php:329 69 69 msgid "Button" 70 70 msgstr "Knap" 71 71 72 #: image-widget-deluxe.php:3 2672 #: image-widget-deluxe.php:331 73 73 msgid "Add a text that will be displayed in the button" 74 74 msgstr "Tilføj en tekst hvis du vil have vist en knap" 75 75 76 #: image-widget-deluxe.php:3 3876 #: image-widget-deluxe.php:341 77 77 msgid "Link" 78 78 msgstr "Link" 79 79 80 #: image-widget-deluxe.php:34 080 #: image-widget-deluxe.php:343 81 81 msgid "Add an url that the widget should refer to (Button and Image)" 82 82 msgstr "Tilføj en url som denne widget skal referere til (Knap & Billede)" 83 83 84 #: image-widget-deluxe.php:34 484 #: image-widget-deluxe.php:347 85 85 msgid "Widget Options" 86 86 msgstr "Widget indstillinger" 87 87 88 #: image-widget-deluxe.php:346 88 #: image-widget-deluxe.php:349 89 msgid "Link target" 90 msgstr "Link mål" 91 92 #: image-widget-deluxe.php:355 93 msgid "Same window" 94 msgstr "Samme vindue" 95 96 #: image-widget-deluxe.php:356 97 msgid "New window" 98 msgstr "Nyt vindue" 99 100 #: image-widget-deluxe.php:366 image-widget-deluxe.php:386 101 msgid "Select a style for the image" 102 msgstr "Vælg en stil billedet skal vises i" 103 104 #: image-widget-deluxe.php:369 89 105 msgid "Image style" 90 106 msgstr "Billede styling" 91 107 92 #: image-widget-deluxe.php:3 52108 #: image-widget-deluxe.php:375 93 109 msgid "Square" 94 110 msgstr "Uden style" 95 111 96 #: image-widget-deluxe.php:3 53112 #: image-widget-deluxe.php:376 97 113 msgid "Round" 98 114 msgstr "Rund style" 99 115 100 #: image-widget-deluxe.php:363 101 msgid "Select a style for the image" 102 msgstr "Vælg en stil billedet skal vises i" 103 104 #: image-widget-deluxe.php:367 116 #: image-widget-deluxe.php:389 105 117 msgid "Image size" 106 118 msgstr "Billedestørrelse" 107 119 108 #: image-widget-deluxe.php: 381120 #: image-widget-deluxe.php:403 109 121 msgid "Select an image size" 110 122 msgstr "Vælg en billedestørrelse" -
image-widget-deluxe/trunk/readme.txt
r1290508 r1292022 4 4 Requires at least: 3.8 5 5 Tested up to: 4.4 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 51 51 == Changelog == 52 52 53 = 1.0.4 - 22/11/2015 = 54 * Feature- Added link target option. 55 53 56 = 1.0.3 - 20/11/2015 = 54 57 * Feature- Added full image size as option.
Note: See TracChangeset
for help on using the changeset viewer.