Skip to content

Instantly share code, notes, and snippets.

@jeffikus
Created April 12, 2016 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffikus/4396c2f9abba6b7da672b1e2bfc7c6e0 to your computer and use it in GitHub Desktop.
Save jeffikus/4396c2f9abba6b7da672b1e2bfc7c6e0 to your computer and use it in GitHub Desktop.
woo_image() override
<?php
/*
Plugin Name: woo_image Override
Plugin URI: http://woothemes.com
Description: Override for the woo_image() function in the WooFramework. This will force the active theme to use native WordPress functions for image handling.
Author: Jeffikus
Version: 1.0.0
Author URI: http://woothemes.com
*/
/** WooFramework Override for woo_image()
*
* woo_image() is a legacy function that handled all image output in WooThemes products.
* However, WordPress has proper image handling now, and woo_image() fails in certain conditions.
*
* Instead of modifying extremely complex logic, there is an override filter to bypass its logic.
* Native WordPress functions like the_post_thumbnail() will be used instead of woo_image()
*
* NOTE: This only applies to WooFramework 6.2.1 and above.
*
*/
add_filter( 'woo_image_override', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment