WordPress.org

Plugin Directory

Changeset 1454587


Ignore:
Timestamp:
07/14/16 09:52:16 (17 months ago)
Author:
mRommel
Message:

Updated plugin to 1.0.6 - Added new features (custom classes, Hide title) and tested for WP 4.6

Location:
image-widget-deluxe/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • image-widget-deluxe/trunk/image-widget-deluxe.php

    r1397328 r1454587  
    66Description: A simple image widget that uses the native WordPress media manager to add widgets with and image and allowing you to change the display order of the fields via drag'n drop. 
    77Author: Rommel 
    8 Version: 1.0.5 
     8Version: 1.0.6 
    99Author URI: https://rommel.dk/ 
    1010*/ 
     
    143143        $style = ! empty( $instance['style'] ) ? esc_attr($instance['style']) : ''; 
    144144        $widget_id = ! empty( $args['widget_id'] ) ? esc_attr($args['widget_id']) : ''; 
     145        $title_visibility = ! empty( $instance['title-visibility'] ) ? esc_attr($instance['title-visibility']) : ''; 
     146 
     147        // Add out custom class. 
     148        $args['class'] = ! empty( $instance['class_custom'] ) ? $args['class'] . ' ' . esc_attr($instance['class_custom']) : $args['class']; 
     149 
    145150 
    146151        // Begin the widget. 
     
    154159        } 
    155160 
     161        echo '<span class="rommeled_widget_image_inner '.$args['class'].'">'; 
     162 
    156163        // Url Target. 
    157164        if ( ! empty($url_target) ) { 
     
    162169 
    163170        // Get the title. 
    164         if ( ! empty( $title ) ) { 
     171        if ( ! empty( $title ) && $title_visibility == 'on' ) { 
    165172 
    166173            echo $args['before_title']; 
     
    231238            endif; 
    232239        } 
     240 
     241        echo '</span>'; 
    233242 
    234243        // End the widget. 
     
    255264        $size = ! empty( $instance['size'] ) ? esc_attr($instance['size']) : ''; 
    256265        $style = ! empty( $instance['style'] ) ? esc_attr($instance['style']) : ''; 
     266        $title_visibility = ! empty( $instance['title-visibility'] ) ? esc_attr($instance['title-visibility']) : ''; 
     267        $class_custom = ! empty( $instance['class_custom'] ) ? esc_attr($instance['class_custom']) : ''; 
    257268 
    258269        // Make the order array. 
     
    273284        ?> 
    274285        <p id="<?php echo $this->id . '-title'; ?>"> 
     286            <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"> 
    275287            <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Widget Title', 'image-widget' ); ?>:</label> 
    276             <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"> 
    277288            <small><?php _e( 'Give the widget a title (If you need one)', 'image-widget' ); ?>.</small> 
     289        </p> 
     290 
     291        <p id="<?php echo $this->id . '-title-visibility'; ?>"> 
     292            <label for="<?php echo $this->get_field_id( 'title-visibility' ); ?>"><input <?php checked('on', esc_attr( $title_visibility ), true ); ?> id="<?php echo $this->get_field_id( 'title-visibility' ); ?>" name="<?php echo $this->get_field_name( 'title-visibility' ); ?>" type="checkbox"> <?php _e( 'Show on front-end', 'image-widget' ); ?></label> 
    278293        </p> 
    279294 
     
    402417                </select> 
    403418                <small><?php _e( 'Select an image size', 'image-widget' ); ?>.</small> 
     419            </label> 
     420 
     421            <label for="<?php echo $this->get_field_id( 'class_custom' ); ?>"><?php _e( 'Class(es)', 'image-widget' ); ?>: 
     422                <input class="widefat" id="<?php echo $this->get_field_id( 'class_custom' ); ?>" name="<?php echo $this->get_field_name( 'class_custom' ); ?>" type="text" value="<?php echo esc_attr( $class_custom ); ?>"> 
     423                <small><?php _e( 'Add your custom classes if you have any. E.g. mycustom-class cta-custom', 'image-widget' ); ?>.</small> 
    404424            </label> 
    405425        </div> 
     
    430450        $instance['size'] = ( ! empty( $new_instance['size'] ) ) ? strip_tags( $new_instance['size'] ) : ''; 
    431451        $instance['style'] = ( ! empty( $new_instance['style'] ) ) ? strip_tags( $new_instance['style'] ) : ''; 
     452        $instance['title-visibility'] = ( ! empty( $new_instance['title-visibility'] ) ) ? strip_tags( $new_instance['title-visibility'] ) : ''; 
     453        $instance['class_custom'] = ( ! empty( $new_instance['class_custom'] ) ) ? strip_tags( $new_instance['class_custom'] ) : ''; 
    432454 
    433455        return $instance; 
  • image-widget-deluxe/trunk/languages/image-widget-da_DK.po

    r1292022 r1454587  
    22msgstr "" 
    33"Project-Id-Version: Image Widget\n" 
    4 "POT-Creation-Date: 2015-11-22 14:29+0100\n" 
    5 "PO-Revision-Date: 2015-11-22 14:29+0100\n" 
     4"POT-Creation-Date: 2016-07-14 11:47+0200\n" 
     5"PO-Revision-Date: 2016-07-14 11:48+0200\n" 
    66"Last-Translator: \n" 
    77"Language-Team: \n" 
     
    1010"Content-Type: text/plain; charset=UTF-8\n" 
    1111"Content-Transfer-Encoding: 8bit\n" 
    12 "X-Generator: Poedit 1.8.3\n" 
     12"X-Generator: Poedit 1.8.8\n" 
    1313"X-Poedit-Basepath: ..\n" 
    1414"Plural-Forms: nplurals=2; plural=(n != 1);\n" 
     
    3434"link." 
    3535 
    36 #: image-widget-deluxe.php:275 
     36#: image-widget-deluxe.php:287 
    3737msgid "Widget Title" 
    3838msgstr "Widget titel" 
    3939 
    40 #: image-widget-deluxe.php:277 
     40#: image-widget-deluxe.php:288 
    4141msgid "Give the widget a title (If you need one)" 
    4242msgstr "Giv denne widget en titel. (Hvis du har brug for en)" 
    4343 
    44 #: image-widget-deluxe.php:287 
     44#: image-widget-deluxe.php:292 
     45msgid "Show on front-end" 
     46msgstr "Vis på front-end" 
     47 
     48#: image-widget-deluxe.php:302 
    4549msgid "Title" 
    4650msgstr "Overskrift" 
    4751 
    48 #: image-widget-deluxe.php:289 
     52#: image-widget-deluxe.php:304 
    4953msgid "Add a title that will be displayed inside the widget" 
    5054msgstr "En overskrift der vil blive vist inde i widget" 
    5155 
    52 #: image-widget-deluxe.php:296 
     56#: image-widget-deluxe.php:311 
    5357msgid "Image" 
    5458msgstr "Billede" 
    5559 
    56 #: image-widget-deluxe.php:297 
     60#: image-widget-deluxe.php:312 
    5761msgid "Select image" 
    5862msgstr "Vælg billede" 
    5963 
    60 #: image-widget-deluxe.php:320 
     64#: image-widget-deluxe.php:335 
    6165msgid "Text" 
    6266msgstr "Tekst" 
    6367 
    64 #: image-widget-deluxe.php:322 
     68#: image-widget-deluxe.php:337 
    6569msgid "Add or edit a description for the widget" 
    6670msgstr "Tilføj eller rediger teksten i widget" 
    6771 
    68 #: image-widget-deluxe.php:329 
     72#: image-widget-deluxe.php:344 
    6973msgid "Button" 
    7074msgstr "Knap" 
    7175 
    72 #: image-widget-deluxe.php:331 
     76#: image-widget-deluxe.php:346 
    7377msgid "Add a text that will be displayed in the button" 
    7478msgstr "Tilføj en tekst hvis du vil have vist en knap" 
    7579 
    76 #: image-widget-deluxe.php:341 
     80#: image-widget-deluxe.php:356 
    7781msgid "Link" 
    7882msgstr "Link" 
    7983 
    80 #: image-widget-deluxe.php:343 
     84#: image-widget-deluxe.php:358 
    8185msgid "Add an url that the widget should refer to (Button and Image)" 
    8286msgstr "Tilføj en url som denne widget skal referere til (Knap & Billede)" 
    8387 
    84 #: image-widget-deluxe.php:347 
     88#: image-widget-deluxe.php:362 
    8589msgid "Widget Options" 
    8690msgstr "Widget indstillinger" 
    8791 
    88 #: image-widget-deluxe.php:349 
     92#: image-widget-deluxe.php:364 
    8993msgid "Link target" 
    9094msgstr "Link mål" 
    9195 
    92 #: image-widget-deluxe.php:355 
     96#: image-widget-deluxe.php:370 
    9397msgid "Same window" 
    9498msgstr "Samme vindue" 
    9599 
    96 #: image-widget-deluxe.php:356 
     100#: image-widget-deluxe.php:371 
    97101msgid "New window" 
    98102msgstr "Nyt vindue" 
    99103 
    100 #: image-widget-deluxe.php:366 image-widget-deluxe.php:386 
     104#: image-widget-deluxe.php:381 image-widget-deluxe.php:401 
    101105msgid "Select a style for the image" 
    102106msgstr "Vælg en stil billedet skal vises i" 
    103107 
    104 #: image-widget-deluxe.php:369 
     108#: image-widget-deluxe.php:384 
    105109msgid "Image style" 
    106110msgstr "Billede styling" 
    107111 
    108 #: image-widget-deluxe.php:375 
     112#: image-widget-deluxe.php:390 
    109113msgid "Square" 
    110114msgstr "Uden style" 
    111115 
    112 #: image-widget-deluxe.php:376 
     116#: image-widget-deluxe.php:391 
    113117msgid "Round" 
    114118msgstr "Rund style" 
    115119 
    116 #: image-widget-deluxe.php:389 
     120#: image-widget-deluxe.php:404 
    117121msgid "Image size" 
    118122msgstr "Billedestørrelse" 
    119123 
    120 #: image-widget-deluxe.php:403 
     124#: image-widget-deluxe.php:418 
    121125msgid "Select an image size" 
    122126msgstr "Vælg en billedestørrelse" 
     127 
     128#: image-widget-deluxe.php:421 
     129msgid "Class(es)" 
     130msgstr "Klasse(r)" 
     131 
     132#: image-widget-deluxe.php:423 
     133msgid "Add your custom classes if you have any. E.g. mycustom-class cta-custom" 
     134msgstr "" 
     135"Tilføj særlig klasse(r) (hvis du har brug for det). Eksempelvis minklasse " 
     136"cta-widget" 
    123137 
    124138#~ msgid "Inner Title" 
  • image-widget-deluxe/trunk/readme.txt

    r1413593 r1454587  
    33Tags: widgets, image, images, ecommerce, e-commerce, commerce, wordpress ecommerce, sales, shop, configurable, variable, sidebar, widget 
    44Requires at least: 3.8 
    5 Tested up to: 4.5.2 
    6 Stable tag: 1.0.5 
     5Tested up to: 4.6 
     6Stable tag: 1.0.6 
    77License: GPLv3 
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html 
     
    5151== Changelog == 
    5252 
     53= 1.0.6 - 14/07/2016 = 
     54* Test- Tested the plugins compatibility for WordPress 4.6. 
     55* Feature- Added checkbox option to hide/display the title on the front-end. 
     56* Feature- Added option to add custom classes. 
     57 
    5358= 1.0.5 - 16/04/2016 = 
    5459* Test- Tested the plugins compatibility for WordPress 4.5. 
Note: See TracChangeset for help on using the changeset viewer.