Skip to content

Commit

Permalink
Prep for dotorg release:
Browse files Browse the repository at this point in the history
* Change license to GPLv2 or later for maximum flexibility and compatibility.
* Random whitespace fixes.
* Update Documentation.
* CSS coding standards.
* PHP coding standards.
* Bump version number.
* Update Readmes.
  • Loading branch information
Michael Fields committed Aug 6, 2013
1 parent aac6bde commit a99e24b
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 147 deletions.
74 changes: 45 additions & 29 deletions admin.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,57 @@
.taxonomy-images-modal .create-association .term-name {
font-style:italic;
font-style: italic;
}
.taxonomy-images-modal .create-association {
display:inline;
display: inline;
}
.taxonomy-images-modal .remove-association {
display:none;
color:#bc0b0b;
text-decoration:underline;
cursor:pointer;
color: #bc0b0b;
cursor: pointer;
display: none;
text-decoration: underline;
}
.taxonomy-images-modal #tab-type_url,
.taxonomy-images-modal .savesend input {
display:none !important;
display: none !important;
}
.taxonomy-image-thumbnail {
display:block;
height:77px;
width:77px;
overflow:hidden;
text-align:center;
margin-bottom:3px;
display: block;
margin-bottom: 3px;
overflow: hidden;
text-align: center;
width: 77px;
height: 77px;
}
.taxonomy-image-control .control {
display:block;
float:left;
text-indent:-9999em;
width:15px;
height:15px;
background:url( controls.png );
background-repeat:no-repeat;
}
.taxonomy-image-control .control:hover { cursor:pointer; }
.taxonomy-image-control .upload { background-position: 0 0; }
.taxonomy-image-control .upload:hover { background-position: -15px 0 }
.taxonomy-image-control .remove { background-position:-30px 0; }
.taxonomy-image-control .remove:hover { background-position:-45px 0; }
.taxonomy-image-control .library { background-position: -60px 0; }
.taxonomy-image-control .hide { visibility:hidden; }
.taxonomy-image-control .show { visibility:visible; }
background: url( controls.png );
background-repeat: no-repeat;
display: block;
float: left;
text-indent: -9999em;
width: 15px;
height: 15px;
}
.taxonomy-image-control .control:hover {
cursor: pointer;
}
.taxonomy-image-control .upload {
background-position: 0 0;
}
.taxonomy-image-control .upload:hover {
background-position: -15px 0;
}
.taxonomy-image-control .remove {
background-position: -30px 0;
}
.taxonomy-image-control .remove:hover {
background-position: -45px 0;
}
.taxonomy-image-control .library {
background-position: -60px 0;
}
.taxonomy-image-control .hide {
visibility: hidden;
}
.taxonomy-image-control .show {
visibility: visible;
}
8 changes: 4 additions & 4 deletions deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ function taxonomy_images_plugin_shortcode_deprecated( $atts = array() ) { // DEP

$terms = get_terms( $taxonomy );
$associations = taxonomy_image_plugin_get_associations( $refresh = false );

if ( ! is_wp_error( $terms ) ) {
foreach( (array) $terms as $term ) {
$url = get_term_link( $term, $term->taxonomy );
$title = apply_filters( 'the_title', $term->name );
$title_attr = esc_attr( $term->name . ' (' . $term->count . ')' );
$description = apply_filters( 'the_content', $term->description );

$img = '';
if ( array_key_exists( $term->term_taxonomy_id, $associations ) ) {
$img = wp_get_attachment_image( $associations[$term->term_taxonomy_id], 'detail', false );
}

if( $template === 'grid' ) {
$o.= "\n\t" . '<div class="taxonomy_image_plugin-' . $template . '">';
$o.= "\n\t\t" . '<a style="float:left;" title="' . $title_attr . '" href="' . $url . '">' . $img . '</a>';
Expand Down Expand Up @@ -100,4 +100,4 @@ public function get_image_html( $size = 'medium', $term_tax_id = false, $title =
return $o;
}
}
$taxonomy_images_plugin = new taxonomy_images_plugin();
$taxonomy_images_plugin = new taxonomy_images_plugin();
2 changes: 1 addition & 1 deletion media-upload-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ jQuery( document ).ready( function( $ ) {
} );
return false;
} );
} );
} );
6 changes: 3 additions & 3 deletions public-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
* @since 0.7
*/
function taxonomy_images_plugin_get_terms( $default, $args = array() ) {
$filter = 'taxonomy-images-get-terms';
$filter = 'taxonomy-images-get-terms';
if ( $filter !== current_filter() ) {
taxonomy_image_plugin_please_use_filter( __FUNCTION__, $filter );
}
Expand Down Expand Up @@ -297,7 +297,7 @@ function taxonomy_images_plugin_list_the_terms( $default, $args = array() ) {
/**
* Queried Term Image.
*
* Prints html markup for th image associated with
* Prints html markup for the image associated with
* the current queried term.
*
* Recognized Arguments:
Expand Down Expand Up @@ -553,4 +553,4 @@ function taxonomy_images_plugin_get_queried_term_image_data( $default, $args = a
}

return array();
}
}
20 changes: 17 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ This filter accepts an optional third parameter that you can use to customize it
* __before_image__ (string) - Text to prepend to each image. Default value is an open list-item element.

* __image_size__ (string) - Any registered image size. Values will vary from installation to installation. Image sizes defined in core include: "thumbnail", "medium" and "large". "Fullsize" may also be used to get the unmodified image that was uploaded. Defaults to "thumbnail".

* __post_id__ (int) - The post to retrieve terms from. Defaults to the ID property of the global $post object.

* __taxonomy__ (string) - Name of a registered taxonomy to return terms from. Defaults to "category".

Here's an example of what a fully customized version of this filter might look like:
Expand Down Expand Up @@ -207,6 +207,20 @@ Installation
Changelog
---------

__0.8.0__

* Pass an empty array as default second parameter of `taxonomy_images_plugin_get_the_terms()` and `taxonomy_images_plugin_list_the_terms()`.
* Use jQuery.on() instead of jQuery.live(). Props [jamiemchale](http://profiles.wordpress.org/jamiemchale).
* Give the button on the custom admin screen a class of `button-primary`.
* Store the return value of `get_posts()` in a variable called `$images`. Not sure why, but this should not harm anything.
* Change license to GPLv2 or later for maximum flexibility and compatibility.
* Add jamiemchale as a contributor.
* Random whitespace fixes.
* Update Documentation.
* CSS coding standards.
* Bump version number.
* Update Readmes.

__0.7.3__

* Fixed the delete image button on edit-terms.php.
Expand Down Expand Up @@ -290,4 +304,4 @@ __0.3__

__0.2__

* Original Release - Works With: wp 2.9.1.
* Original Release - Works With: wp 2.9.1.
20 changes: 18 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: mfields, jamiemchale
Donate link: http://wordpress.mfields.org/donate/
Tags: taxonomy, tag, category, image, upload, media
Requires at least: 3.1
Tested up to: 3.2-beta2-18055
Tested up to: 3.6
Stable tag: trunk

Associate images from your media library to categories, tags and custom taxonomies.
Expand Down Expand Up @@ -205,11 +205,27 @@ I've released a handfull of plugins dealing with taxonomies. Please see my [plug

== Upgrade Notice ==

= 0.8 =
Major and minor bug fixes tested with WordPres 3.6

= 0.7 =
Complete rewrite. Better everything. Many bug fixes.

==Changelog==

= 0.8.0 =
* Pass an empty array as default second parameter of `taxonomy_images_plugin_get_the_terms()` and `taxonomy_images_plugin_list_the_terms()`.
* Use jQuery.on() instead of jQuery.live(). Props [jamiemchale](http://profiles.wordpress.org/jamiemchale).
* Give the button on the custom admin screen a class of `button-primary`.
* Store the return value of `get_posts()` in a variable called `$images`. Not sure why, but this should not harm anything.
* Change license to GPLv2 or later for maximum flexibility and compatibility.
* Add jamiemchale as a contributor.
* Random whitespace fixes.
* Update Documentation.
* CSS coding standards.
* Bump version number.
* Update Readmes.

= 0.7.3 =
* Fixed the delete image button on edit-terms.php.
* Better escaping.
Expand Down Expand Up @@ -280,4 +296,4 @@ Complete rewrite. Better everything. Many bug fixes.
* __BUGFIX:__ Deleted the register_deactivation_hook() function -> sorry to all 8 who downloaded this plugin so far :)

= 0.2 =
* Original Release - Works With: wp 2.9.1.
* Original Release - Works With: wp 2.9.1.
18 changes: 9 additions & 9 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.taxonomy-images-the-terms {
margin:10px 0;
padding:0;
zoom:1;
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;
clear: both;
content: "\0020";
display: block;
height: 0;
visibility: hidden;
}
.taxonomy-images-the-terms li,
.taxonomy-images-the-terms a,
Expand All @@ -21,4 +21,4 @@
.taxonomy-images-the-terms li {
list-style-type:none;
margin:0 10px 10px 0;
}
}
Loading

0 comments on commit a99e24b

Please sign in to comment.