| | 1384 | $defaults = array( |
| | 1385 | 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, |
| | 1386 | 'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC', |
| | 1387 | 'exclude' => '', 'include' => '', 'title' => __('Tags') |
| | 1388 | ); |
| | 1389 | $r = wp_parse_args($options, $defaults); |
| | 1390 | extract($r); |
| | 1391 | |
| | 1394 | $newoptions['smallest'] = strip_tags(stripslashes($_POST['tag-cloud-minsize'])); |
| | 1395 | $newoptions['largest'] = strip_tags(stripslashes($_POST['tag-cloud-maxsize'])); |
| | 1396 | $newoptions['unit'] = strip_tags(stripslashes($_POST['tag-cloud-unit'])); |
| | 1397 | $newoptions['number'] = strip_tags(stripslashes($_POST['tag-cloud-number'])); |
| | 1398 | $newoptions['format'] = strip_tags(stripslashes($_POST['tag-cloud-format'])); |
| | 1399 | $newoptions['orderby'] = strip_tags(stripslashes($_POST['tag-cloud-orderby'])); |
| | 1400 | $newoptions['order'] = strip_tags(stripslashes($_POST['tag-cloud-order'])); |
| | 1401 | if ( $options != $newoptions ) { |
| | 1402 | $options = $newoptions; |
| | 1403 | update_option('widget_tag_cloud', $options); |
| | 1404 | } |
| | 1411 | <p><label for="tag-cloud-maxsize"> |
| | 1412 | <?php _e('Maximum Font Size:')?> <input class="widefat" type="text" id="tag-cloud-maxsize" name="tag-cloud-maxsize" value="<?php echo attribute_escape($largest) ?>" size="4" /></label> |
| | 1413 | </p> |
| | 1414 | <p><label for="tag-cloud-minsize"> |
| | 1415 | <?php _e('Minimum Font Size:')?> <input class="widefat" type="text" id="tag-cloud-minsize" name="tag-cloud-minsize" value="<?php echo attribute_escape($smallest) ?>" size="4" /></label> |
| | 1416 | </p> |
| | 1417 | <p><label for="tag-cloud-unit"> |
| | 1418 | <?php _e('Font size unit:')?> <input class="widefat" type="text" id="tag-cloud-unit" name="tag-cloud-unit" value="<?php echo attribute_escape($unit) ?>" size="4" /></label> |
| | 1419 | </p> |
| | 1420 | <p><label for="tag-cloud-number"> |
| | 1421 | <?php _e('Number to show:')?> <input class="widefat" type="text" id="tag-cloud-number" name="tag-cloud-number" value="<?php echo attribute_escape($number) ?>" size="4" /></label> |
| | 1422 | </p> |
| | 1423 | <p><label for="tag-cloud-format"> |
| | 1424 | <?php _e('Display Format:')?> <select class="widefat" size="1" id="tag-cloud-format" name="tag-cloud-format"> |
| | 1425 | <option value="flat" <?php selected($format, 'flat') ?>><?php _e('Flat') ?></option> |
| | 1426 | <option value="list" <?php selected($format, 'list') ?>><?php _e('List') ?></option> |
| | 1427 | </select></label> |
| | 1428 | </p> |
| | 1429 | <p><label for="tag-cloud-orderby"> |
| | 1430 | <?php _e('Order By:')?> <select class="widefat" size="1" id="tag-cloud-orderby" name="tag-cloud-orderby"> |
| | 1431 | <option value="name" <?php selected($orderby, 'name') ?>><?php _e('Name') ?></option> |
| | 1432 | <option value="count" <?php selected($orderby, 'count') ?>><?php _e('Count') ?></option> |
| | 1433 | </select></label> |
| | 1434 | </p> |
| | 1435 | <p><label for="tag-cloud-order"> |
| | 1436 | <?php _e('Order:')?> <select class="widefat" size="1" id="tag-cloud-order" name="tag-cloud-order"> |
| | 1437 | <option value="ASC" <?php selected($order, 'ASC' )?>><?php _e('Ascending') ?></option> |
| | 1438 | <option value="DESC" <?php selected($order, 'DESC') ?>><?php _e('Descending') ?></option> |
| | 1439 | </select></label> |
| | 1440 | </p> |