Created
May 4, 2016 18:05
-
-
Save nicdford/9e715f9661aa6fd0f688cc03c6e8064b to your computer and use it in GitHub Desktop.
Add Pods Shortcode Wizard to Beaver Builder Text Editer Module
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
function show_pods_modal_button() { | |
$fl_builder = pods_v('fl_builder', 'get', 'url'); | |
if (empty($fl_builder)) { | |
pods_view( PODS_DIR . 'ui/admin/shortcode.php', compact( array_keys( get_defined_vars() ) ) ); | |
echo '<a href="#TB_inline?width=640&inlineId=pods_shortcode_form" class="thickbox button" id="add_pod_button" title="Pods Shortcode"><img style="padding: 0px 6px 0px 0px; margin: -3px 0px 0px;" src="' . PODS_URL . 'ui/images/icon16.png" alt="' . __('Pods Shortcode' ,'pods') . '" />' . __('Pods Shortcode' ,'pods') . '</a>'; | |
} | |
} | |
add_action( 'media_buttons', 'show_pods_modal_button', 99999999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment