Changeset 635012
- Timestamp:
- 12/06/2012 06:03:09 PM (13 years ago)
- Location:
- f2-tag-cloud-widget
- Files:
-
- 6 edited
- 1 copied
-
tags/0.3.0 (copied) (copied from f2-tag-cloud-widget/trunk)
-
tags/0.3.0/f2-tagcloud.php (modified) (5 diffs)
-
tags/0.3.0/readme.txt (modified) (3 diffs)
-
tags/0.3.0/screenshot-1.png (modified) (previous)
-
trunk/f2-tagcloud.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-1.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
f2-tag-cloud-widget/tags/0.3.0/f2-tagcloud.php
r594867 r635012 3 3 Plugin Name: F2 Tag Cloud Widget 4 4 Plugin URI: http://www.fsquared.co.uk/software/f2-tagcloud/ 5 Version: 0. 2.05 Version: 0.3.0 6 6 Author: fsquared limited 7 7 Author URI: http://www.fsquared.co.uk … … 50 50 'orderby' => 'name', 51 51 'order' => 'ASC', 52 'alignment' => 'default', 53 'padding' => '0', 52 54 'taxonomy' => 'post_tag', 53 55 'exclude' => null, … … 95 97 96 98 /* The actual content. */ 97 echo '<div class="tagcloud">';98 99 $l_tag_params = wp_parse_args( $p_instance, $this->m_defaults ); 99 wp_tag_cloud( apply_filters('widget_tag_cloud_args', $l_tag_params ) ); 100 $l_tag_params["echo"] = 0; 101 $l_tag_cloud_text = wp_tag_cloud( apply_filters('widget_tag_cloud_args', $l_tag_params ) ); 102 103 echo '<div class="tagcloud"'; 104 if ( 'default' != $l_tag_params["alignment"] ) { 105 echo ' style="text-align: ' . $l_tag_params["alignment"] . ';"'; 106 } 107 echo '>'; 108 echo preg_replace( '/style=\'/', 'style=\'padding: ' . 109 $l_tag_params["padding"] . 'px; ', $l_tag_cloud_text ); 100 110 echo '</div>'; 101 111 … … 183 193 ' value="RAND">random</option>'; 184 194 echo '</select>'; 195 echo '</p>'; 196 197 echo '<p>'; 198 echo '<label for="' . $this->get_field_id( 'alignment' ) . '">' . 199 __( 'Tag cloud alignment:' ) . '</label>'; 200 echo '<select class="widefat" id="' . $this->get_field_id( 'alignment' ) . 201 '" name="' . $this->get_field_name( 'alignment' ) . '">'; 202 echo '<option ' . selected( 'default', $l_instance['alignment'], false ) . 203 ' value="default">theme default</option>'; 204 echo '<option ' . selected( 'left', $l_instance['alignment'], false ) . 205 ' value="left">left</option>'; 206 echo '<option ' . selected( 'center', $l_instance['alignment'], false ) . 207 ' value="center">center</option>'; 208 echo '<option ' . selected( 'right', $l_instance['alignment'], false ) . 209 ' value="right">right</option>'; 210 echo '</select>'; 211 echo '</p>'; 212 213 echo '<p>'; 214 echo '<label for="' . $this->get_field_id( 'padding' ) . '">' . 215 __( 'Padding between tags:' ) . '</label>'; 216 echo '<input class="widefat" id="' . $this->get_field_id( 'padding' ) . 217 '" name="' . $this->get_field_name( 'padding' ) . '" type="text" ' . 218 'value="' . esc_attr( $l_instance['padding'] ) . '" />'; 185 219 echo '</p>'; 186 220 … … 265 299 } 266 300 301 if ( 'default' == $p_new_instance['alignment'] ) { 302 $l_instance['default'] = 'default'; 303 } else if ( 'left' == $p_new_instance['alignment'] ) { 304 $l_instance['alignment'] = 'left'; 305 } else if ( 'center' == $p_new_instance['alignment'] ) { 306 $l_instance['alignment'] = 'center'; 307 } else if ( 'right' == $p_new_instance['alignment'] ) { 308 $l_instance['alignment'] = 'right'; 309 } else { 310 $l_instance['alignment'] = $p_old_instance['alignment']; 311 } 312 313 if ( is_numeric( $p_new_instance['padding'] ) ) { 314 /* Force it to be a number. */ 315 $l_instance['padding'] = $p_new_instance['padding'] + 0; 316 } else { 317 /* Return to the original value. */ 318 $l_instance['padding'] = $p_old_instance['padding'] + 0; 319 } 320 267 321 if ( "" != 268 322 get_taxonomy( stripslashes( $p_new_instance['taxonomy'] ) ) ) { -
f2-tag-cloud-widget/tags/0.3.0/readme.txt
r594867 r635012 3 3 Tags: tags widget 4 4 Requires at least: 2.8 5 Tested up to: 3.4. 15 Tested up to: 3.4.2 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 27 27 of these options are explained in the main WordPress documentation. 28 28 29 In addition, there are additional options now available to control the 30 typography of tags with greater precision. 31 32 * tag cloud alignment - left, center, right or theme default (default) 33 * tag padding - defaults to 0 34 29 35 == Installation == 30 36 … … 49 55 Added the ability to select different taxonomies. 50 56 57 = 0.3.0 = 58 Added new options, to set padding between individual tags, and also to set 59 the horizontal alignment of the tags within the cloud. 60 51 61 == Upgrade Notice == 52 62 53 63 = 0.2.0 = 54 64 Adds the ability to render clouds for different taxonomies. 65 66 = 0.3.0 = 67 Adds the ability to set padding and alignment of tags. -
f2-tag-cloud-widget/trunk/f2-tagcloud.php
r594867 r635012 3 3 Plugin Name: F2 Tag Cloud Widget 4 4 Plugin URI: http://www.fsquared.co.uk/software/f2-tagcloud/ 5 Version: 0. 2.05 Version: 0.3.0 6 6 Author: fsquared limited 7 7 Author URI: http://www.fsquared.co.uk … … 50 50 'orderby' => 'name', 51 51 'order' => 'ASC', 52 'alignment' => 'default', 53 'padding' => '0', 52 54 'taxonomy' => 'post_tag', 53 55 'exclude' => null, … … 95 97 96 98 /* The actual content. */ 97 echo '<div class="tagcloud">';98 99 $l_tag_params = wp_parse_args( $p_instance, $this->m_defaults ); 99 wp_tag_cloud( apply_filters('widget_tag_cloud_args', $l_tag_params ) ); 100 $l_tag_params["echo"] = 0; 101 $l_tag_cloud_text = wp_tag_cloud( apply_filters('widget_tag_cloud_args', $l_tag_params ) ); 102 103 echo '<div class="tagcloud"'; 104 if ( 'default' != $l_tag_params["alignment"] ) { 105 echo ' style="text-align: ' . $l_tag_params["alignment"] . ';"'; 106 } 107 echo '>'; 108 echo preg_replace( '/style=\'/', 'style=\'padding: ' . 109 $l_tag_params["padding"] . 'px; ', $l_tag_cloud_text ); 100 110 echo '</div>'; 101 111 … … 183 193 ' value="RAND">random</option>'; 184 194 echo '</select>'; 195 echo '</p>'; 196 197 echo '<p>'; 198 echo '<label for="' . $this->get_field_id( 'alignment' ) . '">' . 199 __( 'Tag cloud alignment:' ) . '</label>'; 200 echo '<select class="widefat" id="' . $this->get_field_id( 'alignment' ) . 201 '" name="' . $this->get_field_name( 'alignment' ) . '">'; 202 echo '<option ' . selected( 'default', $l_instance['alignment'], false ) . 203 ' value="default">theme default</option>'; 204 echo '<option ' . selected( 'left', $l_instance['alignment'], false ) . 205 ' value="left">left</option>'; 206 echo '<option ' . selected( 'center', $l_instance['alignment'], false ) . 207 ' value="center">center</option>'; 208 echo '<option ' . selected( 'right', $l_instance['alignment'], false ) . 209 ' value="right">right</option>'; 210 echo '</select>'; 211 echo '</p>'; 212 213 echo '<p>'; 214 echo '<label for="' . $this->get_field_id( 'padding' ) . '">' . 215 __( 'Padding between tags:' ) . '</label>'; 216 echo '<input class="widefat" id="' . $this->get_field_id( 'padding' ) . 217 '" name="' . $this->get_field_name( 'padding' ) . '" type="text" ' . 218 'value="' . esc_attr( $l_instance['padding'] ) . '" />'; 185 219 echo '</p>'; 186 220 … … 265 299 } 266 300 301 if ( 'default' == $p_new_instance['alignment'] ) { 302 $l_instance['default'] = 'default'; 303 } else if ( 'left' == $p_new_instance['alignment'] ) { 304 $l_instance['alignment'] = 'left'; 305 } else if ( 'center' == $p_new_instance['alignment'] ) { 306 $l_instance['alignment'] = 'center'; 307 } else if ( 'right' == $p_new_instance['alignment'] ) { 308 $l_instance['alignment'] = 'right'; 309 } else { 310 $l_instance['alignment'] = $p_old_instance['alignment']; 311 } 312 313 if ( is_numeric( $p_new_instance['padding'] ) ) { 314 /* Force it to be a number. */ 315 $l_instance['padding'] = $p_new_instance['padding'] + 0; 316 } else { 317 /* Return to the original value. */ 318 $l_instance['padding'] = $p_old_instance['padding'] + 0; 319 } 320 267 321 if ( "" != 268 322 get_taxonomy( stripslashes( $p_new_instance['taxonomy'] ) ) ) { -
f2-tag-cloud-widget/trunk/readme.txt
r594867 r635012 3 3 Tags: tags widget 4 4 Requires at least: 2.8 5 Tested up to: 3.4. 15 Tested up to: 3.4.2 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 27 27 of these options are explained in the main WordPress documentation. 28 28 29 In addition, there are additional options now available to control the 30 typography of tags with greater precision. 31 32 * tag cloud alignment - left, center, right or theme default (default) 33 * tag padding - defaults to 0 34 29 35 == Installation == 30 36 … … 49 55 Added the ability to select different taxonomies. 50 56 57 = 0.3.0 = 58 Added new options, to set padding between individual tags, and also to set 59 the horizontal alignment of the tags within the cloud. 60 51 61 == Upgrade Notice == 52 62 53 63 = 0.2.0 = 54 64 Adds the ability to render clouds for different taxonomies. 65 66 = 0.3.0 = 67 Adds the ability to set padding and alignment of tags.
Note: See TracChangeset
for help on using the changeset viewer.