Changeset 1050299
- Timestamp:
- 12/20/2014 03:04:51 PM (10 years ago)
- 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 5 5 Description: Colorful text widget 6 6 Author: iniyan 7 Version: 1.0.07 Version: 8 8 Author URI: http://iniyan.in 9 9 */ … … 29 29 $widgetstyle = apply_filters('widget_title', $instance['widgetstyle']); 30 30 $text = $instance['text']; 31 32 33 34 31 35 32 echo '<div class="'.$widgetstyle.'">'."\n";36 echo ."\n"; 33 37 echo $before_widget; 34 echo $before_title.$title.$after_title;35 echo $text;38 echo ; 39 echo ; 36 40 echo $after_widget; 37 echo '</div>'."\n";41 echo '</div>'."\n"; 38 42 } 39 43 … … 43 47 $instance['widgetstyle'] = strip_tags($new_instance['widgetstyle']); 44 48 $instance['text'] = $new_instance['text']; 49 50 51 52 45 53 return $instance; 46 54 } 47 55 48 56 function form($instance) { 57 58 59 49 60 if($instance) { 50 61 $title = esc_attr($instance['title']); 51 62 $widgetstyle = esc_attr($instance['widgetstyle']); 52 63 $text = esc_attr($instance['text']); 64 53 65 } else { 54 66 $title = __('', 'text_domain'); 55 67 $widgetstyle = __('', 'text_domain'); 56 68 $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> 58 86 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>'; 60 88 echo '<input class="widefat" id="'.$this->get_field_id('title').'" name="'.$this->get_field_name('title').'" type="text" value="'.$title.'" /></p>'; 61 89 62 90 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 } 73 115 74 116 add_action('widgets_init', create_function('', 'return register_widget("colorful_text_widget");')); 117 118 119 120 121 122 123 124 125 126 75 127 ?> -
colorful-text-widget/tags/2.0.1/css/colorful-text-widget-style.css
r650023 r1050299 8 8 } 9 9 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{ 45 11 border-radius:10px; 46 12 -moz-border-radius:10px; 47 13 -webkit-border-radius:10px; 48 14 -o-border-radius:10px; 49 margin: 0 0 25px; 50 overflow: hidden; 51 padding: 20px; 15 padding: 15px; 52 16 color: #000; 17 53 18 } -
colorful-text-widget/tags/2.0.1/readme.txt
r660184 r1050299 2 2 Contributors: iniyan, logeshmba 3 3 Donate link: http://iniyan.in/donate 4 Tags: text, text widget, custom class, custom text, colorful4 Tags: text, text widget, custom 5 5 Requires at least: 2.8 6 Tested up to: 3.57 Stable tag: 2.0.06 Tested up to: 7 Stable tag: .0.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Colorful 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. 16 16 17 More style options will be added on further release.18 19 More style options will be added on further release.20 17 21 18 Check the <a href="http://iniyan.in/plugins/colorful-text-widget/#demo">colorful text widget</a> demo here … … 36 33 * first release 37 34 35 36 37 38 39 40 38 41 == Upgrade Notice == 39 42 … … 41 44 Fresh release. 42 45 46 47 48 49 50 51 43 52 == Screenshots == 44 53 -
colorful-text-widget/trunk/readme.txt
r660184 r1050299 5 5 Requires at least: 2.8 6 6 Tested up to: 3.5 7 Stable tag: 2.0. 07 Stable tag: 2.0. 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.