Features by WooThemes - Version 1.2.2

Version Description

  • Minor bugfixes to the "order" directions options and additions to the "woothemes_features_html" filter.
Download this release

Release Info

Developer woothemes
Plugin Icon wp plugin Features by WooThemes
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

classes/class-woothemes-features.php CHANGED
@@ -337,7 +337,7 @@ class Woothemes_Features {
337
  'section' => 'info'
338
  );
339
 
340
- return $fields;
341
  } // End get_custom_fields_settings()
342
 
343
  /**
@@ -352,7 +352,7 @@ class Woothemes_Features {
352
 
353
  if ( has_post_thumbnail( $id ) ) {
354
  // If not a string or an array, and not an integer, default to 150x9999.
355
- if ( is_int( $size ) || ( 0 < intval( $size ) ) ) {
356
  $size = array( intval( $size ), intval( $size ) );
357
  } elseif ( ! is_string( $size ) && ! is_array( $size ) ) {
358
  $size = array( 150, 9999 );
337
  'section' => 'info'
338
  );
339
 
340
+ return apply_filters( 'woothemes_features_custom_fields_settings', $fields );
341
  } // End get_custom_fields_settings()
342
 
343
  /**
352
 
353
  if ( has_post_thumbnail( $id ) ) {
354
  // If not a string or an array, and not an integer, default to 150x9999.
355
+ if ( ( is_int( $size ) || ( 0 < intval( $size ) ) ) && ! is_array( $size ) ) {
356
  $size = array( intval( $size ), intval( $size ) );
357
  } elseif ( ! is_string( $size ) && ! is_array( $size ) ) {
358
  $size = array( 150, 9999 );
classes/class-woothemes-widget-features.php CHANGED
@@ -209,7 +209,8 @@ class Woothemes_Widget_Features extends WP_Widget {
209
  'ID' => __( 'Entry ID', 'woothemes-features' ),
210
  'title' => __( 'Title', 'woothemes-features' ),
211
  'date' => __( 'Date Added', 'woothemes-features' ),
212
- 'menu_order' => __( 'Specified Order Setting', 'woothemes-features' )
 
213
  );
214
  } // End get_orderby_options()
215
 
@@ -220,8 +221,8 @@ class Woothemes_Widget_Features extends WP_Widget {
220
  */
221
  protected function get_order_options () {
222
  return array(
223
- 'asc' => __( 'Ascending', 'woothemes-features' ),
224
- 'desc' => __( 'Descending', 'woothemes-features' )
225
  );
226
  } // End get_order_options()
227
  } // End Class
209
  'ID' => __( 'Entry ID', 'woothemes-features' ),
210
  'title' => __( 'Title', 'woothemes-features' ),
211
  'date' => __( 'Date Added', 'woothemes-features' ),
212
+ 'menu_order' => __( 'Specified Order Setting', 'woothemes-features' ),
213
+ 'rand' => __( 'Random Order', 'woothemes-features' )
214
  );
215
  } // End get_orderby_options()
216
 
221
  */
222
  protected function get_order_options () {
223
  return array(
224
+ 'ASC' => __( 'Ascending', 'woothemes-features' ),
225
+ 'DESC' => __( 'Descending', 'woothemes-features' )
226
  );
227
  } // End get_order_options()
228
  } // End Class
lang/woothemes-features-en_GB.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Features v1.2.0\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2012-11-27 08:54:04+0000\n"
7
  "Last-Translator: Matt <matt@woothemes.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -235,12 +235,12 @@ msgstr ""
235
  msgid "Specified Order Setting"
236
  msgstr ""
237
 
238
- #: classes/class-woothemes-widget-features.php:223
239
  #@ woothemes-features
240
  msgid "Ascending"
241
  msgstr ""
242
 
243
- #: classes/class-woothemes-widget-features.php:224
244
  #@ woothemes-features
245
  msgid "Descending"
246
  msgstr ""
@@ -270,3 +270,8 @@ msgstr ""
270
  msgid "Display a specific feature, rather than a list."
271
  msgstr ""
272
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Features v1.2.2\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2013-01-03 08:18:28+0000\n"
7
  "Last-Translator: Matt <matt@woothemes.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
235
  msgid "Specified Order Setting"
236
  msgstr ""
237
 
238
+ #: classes/class-woothemes-widget-features.php:224
239
  #@ woothemes-features
240
  msgid "Ascending"
241
  msgstr ""
242
 
243
+ #: classes/class-woothemes-widget-features.php:225
244
  #@ woothemes-features
245
  msgid "Descending"
246
  msgstr ""
270
  msgid "Display a specific feature, rather than a list."
271
  msgstr ""
272
 
273
+ #: classes/class-woothemes-widget-features.php:213
274
+ #@ woothemes-features
275
+ msgid "Random Order"
276
+ msgstr ""
277
+
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: woothemes, mattyza, jameskoster
3
  Donate link: http://woothemes.com/
4
  Tags: features, widget, shortcode, template-tag, services
5
  Requires at least: 3.4.2
6
- Tested up to: 3.5-beta3
7
- Stable tag: 1.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -101,6 +101,9 @@ We encourage everyone to contribute their ideas, thoughts and code snippets. Thi
101
 
102
  == Upgrade Notice ==
103
 
 
 
 
104
  = 1.2.1 =
105
  * Minor bugfix to the output of the "Features" widget.
106
 
@@ -120,6 +123,14 @@ We encourage everyone to contribute their ideas, thoughts and code snippets. Thi
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
123
  = 1.2.1 =
124
  * 2012-11-29
125
  * Makes sure the ending wrapping markup for the widget is declared in the appropriate location, before calling the woothemes_features() function.
3
  Donate link: http://woothemes.com/
4
  Tags: features, widget, shortcode, template-tag, services
5
  Requires at least: 3.4.2
6
+ Tested up to: 3.5
7
+ Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
101
 
102
  == Upgrade Notice ==
103
 
104
+ = 1.2.2 =
105
+ * Minor bugfixes to the "order" directions options and additions to the "woothemes_features_html" filter.
106
+
107
  = 1.2.1 =
108
  * Minor bugfix to the output of the "Features" widget.
109
 
123
 
124
  == Changelog ==
125
 
126
+ = 1.2.2 =
127
+ * 2013-01-03
128
+ * Fix the "order" direction options to be in capitals.
129
+ * Enhance the "woothemes_features_html" filter.
130
+ * Make sure to use the_content() if there is no custom excerpt.
131
+ * Add support for ordering by "rand" to the widget.
132
+ * Allow the "size" parameter to receive an array of dimensions.
133
+
134
  = 1.2.1 =
135
  * 2012-11-29
136
  * Makes sure the ending wrapping markup for the widget is declared in the appropriate location, before calling the woothemes_features() function.
woothemes-features-template.php CHANGED
@@ -104,12 +104,14 @@ function woothemes_features ( $args = '' ) {
104
  $template = str_replace( '%%CLASS%%', $class, $template );
105
  $template = str_replace( '%%TITLE%%', $title, $template );
106
 
107
- if ( '' != get_the_excerpt() ) {
108
  $template = str_replace( '%%CONTENT%%', get_the_excerpt(), $template );
109
  } else {
110
  $template = str_replace( '%%CONTENT%%', get_the_content(), $template );
111
  }
112
 
 
 
113
  $html .= $template;
114
 
115
  if( ( 0 == $i % $args['per_row'] ) ) {
104
  $template = str_replace( '%%CLASS%%', $class, $template );
105
  $template = str_replace( '%%TITLE%%', $title, $template );
106
 
107
+ if ( '' != $post->post_excerpt ) {
108
  $template = str_replace( '%%CONTENT%%', get_the_excerpt(), $template );
109
  } else {
110
  $template = str_replace( '%%CONTENT%%', get_the_content(), $template );
111
  }
112
 
113
+ $template = apply_filters( 'woothemes_features_template', $template, $post );
114
+
115
  $html .= $template;
116
 
117
  if( ( 0 == $i % $args['per_row'] ) ) {
woothemes-features.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://woothemes.com/
5
  * Description: Hi, I'm your feature showcase plugin for WordPress. Show off what features your company, product or service offers, using our shortcode, widget or template tag.
6
  * Author: WooThemes
7
- * Version: 1.2.1
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
4
  * Plugin URI: http://woothemes.com/
5
  * Description: Hi, I'm your feature showcase plugin for WordPress. Show off what features your company, product or service offers, using our shortcode, widget or template tag.
6
  * Author: WooThemes
7
+ * Version: 1.2.2
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress