Last active
December 28, 2015 04:19
-
-
Save peterchester/7441906 to your computer and use it in GitHub Desktop.
WordPress Image Widget support for SiteOrigin's Page Builder plugin. Put this in your functions.php file if you want the Image Widget (http://wordpress.org/plugins/image-widget/) to work with Page Builder (http://siteorigin.com/page-builder/).
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
/** | |
* Enqueue the necessary javascript to support the Image Widget in Site Origin's Page Builder | |
*/ | |
function tribe_image_widget_siteorigin_page_builder_support() { | |
global $wp_widget_factory; | |
if ( isset( $wp_widget_factory->widgets ) && isset( $wp_widget_factory->widgets['Tribe_Image_Widget'] ) ) { | |
add_action( 'siteorigin_panel_enqueue_admin_scripts', array( $wp_widget_factory->widgets['Tribe_Image_Widget'], 'admin_setup' ) ); | |
} | |
} | |
add_action('widgets_init', 'tribe_image_widget_siteorigin_page_builder_support', 999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment