Plugin Directory

Changeset 1050299

Timestamp:
12/20/2014 03:04:51 PM (10 years ago)
Author:
iniyan
Message:

tagging version 2.0.1

Location:
colorful-text-widget
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • colorful-text-widget/tags/2.0.1/colorful-text-widget.php

    r650039 r1050299  
    55Description: Colorful text widget
    66Author: iniyan
    7 Version: 1.0.0
     7Version:
    88Author URI: http://iniyan.in
    99*/
     
    2929            $widgetstyle    = apply_filters('widget_title', $instance['widgetstyle']);
    3030            $text           = $instance['text'];
     31
     32
     33
     34
    3135 
    32             echo '<div class="'.$widgetstyle.'">'."\n";
     36            echo ."\n";
    3337            echo    $before_widget;
    34             echo    $before_title.$title.$after_title;
    35             echo    $text;
     38            echo    ;
     39            echo    ;
    3640            echo    $after_widget;
    37             echo '</div>'."\n";
     41            echo '</div>'."\n";
    3842        }
    3943 
     
    4347            $instance['widgetstyle']    = strip_tags($new_instance['widgetstyle']);
    4448            $instance['text']           = $new_instance['text'];
     49
     50
     51
     52
    4553            return $instance;
    4654        }
    4755 
    4856        function form($instance) {
     57
     58
     59
    4960            if($instance) {
    5061                $title          = esc_attr($instance['title']);
    5162                $widgetstyle    = esc_attr($instance['widgetstyle']);
    5263                $text           = esc_attr($instance['text']);
     64
    5365            } else {
    5466                $title          = __('', 'text_domain');
    5567                $widgetstyle    = __('', 'text_domain');
    5668                $text           = __('', 'text_domain');
    57             }
     69            } ?>
     70        <script type="text/javascript">
     71            //<![CDATA[
     72                jQuery(document).ready(function()
     73                {
     74                    // colorpicker field
     75                    jQuery('.cw-color-picker').each(function(){
     76                       var $this = jQuery(this),
     77                       id = $this.attr('rel');
     78                       $this.farbtastic('#' + id).hide();
     79                      jQuery('.cpr, .cpr-tile').click(function(){jQuery('.cw-color-picker').slideDown('slow')});   
     80                       
     81                       // jQuery('.cpr').bind('click', function(){jQuery('.cw-color-picker').slideToggle('slow')});
     82                    });
     83                });
     84            //]]>   
     85          </script>     
    5886 
    59             echo '<p><label for="'.$this->get_field_id('title').'">'._e('Title:').'</label>';
     87            echo '<p><label for="'.$this->get_field_id('title').'">'._e('Title:').'</label>';
    6088            echo '<input class="widefat" id="'.$this->get_field_id('title').'" name="'.$this->get_field_name('title').'" type="text" value="'.$title.'" /></p>';
    6189
    6290            echo '<p><label for="'.$this->get_field_id('text').'">'._e('Text:').'</label>';
    63             echo '<textarea class="widefat" id="'.$this->get_field_id('text').'" name="'.$this->get_field_name('text').'" rows="20">'.$text.'</textarea></p>';
    64 
    65 
    66             echo '<p><label for="'.$this->get_field_id('widgetstyle').'">'._e('Widget Style:').'</label>';
    67             echo '<input class="widefat" id="'.$this->get_field_id('widgetstyle').'" name="'.$this->get_field_name('widgetstyle').'" type="text"
    68 value="'.$widgetstyle.'" /></p>';
    69                 echo 'You can use these default styles:<p style="color:#d43;">ctw-blue, ctw-gray, ctw-green, ctw-purple, ctw-red, ctw-yellow</p> OR define some class and style it on your own.<br/><br/>';
    70                 echo 'Check the <a href="http://iniyan.in/plugins/colorful-text-widget/#demo">colorful text widget</a> demo here';
    71         }
    72     }
     91            echo '<textarea class="widefat" id="'.$this->get_field_id('text').'" name="'.$this->get_field_name('text').'" rows="10">'.$text.'</textarea></p>';?>
     92            <p>
     93            <label for="<?php echo $this->get_field_id('background'); ?>"><?php _e('Background Color:'); ?></label>
     94            <input class="widefat cpr" id="<?php echo $this->get_field_id('background'); ?>" name="<?php echo $this->get_field_name('background'); ?>"
     95            type="text"
     96            value="<?php if($background) { echo $background; } else { echo '#fff'; } ?>" />
     97            <div class="cw-color-picker" rel="<?php echo $this->get_field_id('background'); ?>"></div>
     98            </p>
     99           
     100            <p>
     101            <label for="<?php echo $this->get_field_id('titlecolor'); ?>"><?php _e('Title Color:'); ?></label>
     102            <input class="widefat cpr" id="<?php echo $this->get_field_id('titlecolor'); ?>" name="<?php echo $this->get_field_name('titlecolor'); ?>"
     103            type="text" value="<?php if($titlecolor) { echo $titlecolor; } else { echo '#fff'; } ?>" />
     104            <div class="cw-color-picker" rel="<?php echo $this->get_field_id('titlecolor'); ?>"></div>
     105            </p>
     106           
     107            <p>
     108            <label for="<?php echo $this->get_field_id('textcolor'); ?>"><?php _e('Text Color:'); ?></label>
     109            <input class="widefat cpr" id="<?php echo $this->get_field_id('textcolor'); ?>" name="<?php echo $this->get_field_name('textcolor'); ?>"
     110            type="text" value="<?php if($textcolor) { echo $textcolor; } else { echo '#fff'; } ?>" />
     111            <div class="cw-color-picker" rel="<?php echo $this->get_field_id('textcolor'); ?>"></div>
     112            </p>
     113            <?php }
     114}
    73115 
    74116    add_action('widgets_init', create_function('', 'return register_widget("colorful_text_widget");'));
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
    75127?>
  • colorful-text-widget/tags/2.0.1/css/colorful-text-widget-style.css

    r650023 r1050299  
    88}
    99
    10 .ctw-blue {
    11     background-color: #d8ecf7;
    12     border: 1px solid #afcde3;}
    13 
    14 .ctw-gray {
    15     background-color: #e2e2e2;
    16     border: 1px solid #bdbdbd;
    17 }
    18 
    19 .ctw-green {
    20     background-color: #d9edc2;
    21     border: 1px solid #b2ce96;
    22 }
    23 
    24 .ctw-purple {
    25     background-color: #e2e2f9;
    26     border: 1px solid #bebde9;
    27 }
    28 
    29 .ctw-red {
    30     background-color: #EF6151;
    31     border: 1px solid #e9b3b3;
    32 }
    33 
    34 .ctw-yellow {
    35     background-color: #fef5c4;
    36     border: 1px solid #fadf98;
    37 }
    38 
    39 .ctw-blue,
    40 .ctw-gray,
    41 .ctw-green,
    42 .ctw-purple,
    43 .ctw-red,
    44 .ctw-yellow{
     10.ctw{
    4511    border-radius:10px;
    4612    -moz-border-radius:10px;
    4713    -webkit-border-radius:10px;
    4814    -o-border-radius:10px;
    49     margin: 0 0 25px;
    50     overflow: hidden;
    51     padding: 20px;
     15    padding: 15px;
    5216    color: #000;   
     17
    5318    }
  • colorful-text-widget/tags/2.0.1/readme.txt

    r660184 r1050299  
    22Contributors: iniyan, logeshmba
    33Donate link: http://iniyan.in/donate
    4 Tags: text, text widget, custom class, custom text, colorful
     4Tags: text, text widget, custom
    55Requires at least: 2.8
    6 Tested up to: 3.5
    7 Stable tag: 2.0.0
     6Tested up to:
     7Stable tag: .0.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515Colorful Text Widgets is a normal text widget that makes your text widget a colorful one. You can change the color of Title, Background and Text using the color-pickers provided with in the widget itself.
    1616
    17 More style options will be added on further release.
    18 
    19 More style options will be added on further release.
    2017
    2118Check the <a href="http://iniyan.in/plugins/colorful-text-widget/#demo">colorful text widget</a> demo here
     
    3633* first release
    3734
     35
     36
     37
     38
     39
     40
    3841== Upgrade Notice ==
    3942
     
    4144Fresh release.
    4245
     46
     47
     48
     49
     50
     51
    4352== Screenshots ==
    4453
  • colorful-text-widget/trunk/readme.txt

    r660184 r1050299  
    55Requires at least: 2.8
    66Tested up to: 3.5
    7 Stable tag: 2.0.0
     7Stable tag: 2.0.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.