Skip to content
Browse files

Introduce public stylesheet and style the terms list.

  • Loading branch information...
1 parent 6caab0e commit a61b6e39e8d369f6204b7203e5cc8e0c37cb924f @mfields committed May 29, 2011
Showing with 53 additions and 1 deletion.
  1. +1 −1 public-filters.php
  2. +24 −0 style.css
  3. +28 −0 taxonomy-images.php
View
2 public-filters.php
@@ -239,7 +239,7 @@ function taxonomy_images_plugin_list_the_terms( $default, $args ) {
$args = wp_parse_args( $args, array(
'after' => '</ul>',
'after_image' => '</li>',
- 'before' => '<ul class="taxonomy-image-list">',
+ 'before' => '<ul class="taxonomy-images-the-terms">',
'before_image' => '<li>',
'image_size' => 'thumbnail',
'post_id' => 0,
View
24 style.css
@@ -0,0 +1,24 @@
+.taxonomy-images-the-terms {
+ margin:10px 0;
+ padding:0;
+ zoom:1;
+}
+.taxonomy-images-the-terms:before,
+.taxonomy-images-the-terms:after {
+ content:"\0020";
+ display:block;
+ height:0;
+ visibility:hidden;
+ clear:both;
+}
+.taxonomy-images-the-terms li,
+.taxonomy-images-the-terms a,
+.taxonomy-images-the-terms img {
+ float:left;
+ margin:0;
+ padding:0;
+}
+.taxonomy-images-the-terms li {
+ list-style-type:none;
+ margin:0 10px 10px 0;
+}
View
28 taxonomy-images.php
@@ -887,6 +887,34 @@ function taxonomy_image_plugin_css_thickbox() {
/**
+ * Public Styles.
+ *
+ * Prints custom css to all public pages. If you do not
+ * wish to have these styles included for you, please
+ * insert the following code into your theme's functions.php
+ * file:
+ *
+ * add_filter( 'taxonomy-images-disable-public-css', '__return_true' );
+ *
+ * @since 0.7
+ * @access private
+ */
+function taxonomy_image_plugin_css_public() {
+ if ( apply_filters( 'taxonomy-images-disable-public-css', false ) ) {
+ return;
+ }
+ wp_enqueue_style(
+ 'taxonomy-image-plugin-public',
+ taxonomy_image_plugin_url( 'style.css' ),
+ array(),
+ taxonomy_image_plugin_version(),
+ 'screen'
+ );
+}
+add_action( 'wp_print_styles', 'taxonomy_image_plugin_css_public' );
+
+
+/**
* Create associations setting in the options table on plugin activation.
*
* @access private

0 comments on commit a61b6e3

Please sign in to comment.
Something went wrong with that request. Please try again.