Created
April 12, 2016 11:48
-
-
Save jeffikus/4396c2f9abba6b7da672b1e2bfc7c6e0 to your computer and use it in GitHub Desktop.
woo_image() override
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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