wpsmith / genesis-sandbox-featured-content-widget

Genesis Sandbox Featured Content Widget. Based on Nick Croft's Genesis Featured Widget Amplified for additional functionality which allows support for custom post types, taxonomies, and extends the flexibility of the widget via action hooks to allow the elements to be re-positioned or other elements to be added.
39 stars 21 forks source link

Show all available image sizes #54

Closed laflier closed 9 years ago

laflier commented 9 years ago

Changes the plugin function "get_image_size_options()" on line 881 to show all available sizes in the "show featured image" options of the widget.

As it stands, the option shows only the thumbnail size, plus any additional sizes added by the theme. The WordPress standard sizes are excluded. If no additional sizes exist in the theme, the only option presented is the thumbnail.

This creates a problem in applications where larger sizes are required -- i.e., a front page application, where the widget is used in a div that is 100% of the width of the page. Here, a designer might need to use "large" or "medium" sizes.

My proposed solution is to substitute the "genesis_get_image_sizes()" function for "genesis_get_additional_image_sizes()" used in line 882 of the existing code. Then dispense with line 883, which is now superfluous, since the thumbnail size is included by the "genesis_get_image_sizes()" function.

For more information, see:

  1. http://genesis.wp-a2z.org/oik_api/genesis_get_image_sizes/
  2. http://designsbynickthegeek.com/tutorials/genesis-explained-image-functions
wpsmith commented 9 years ago

Extra unnecessary lines included.