'; $output = ''. $img.$buttonTitle.''; } echo $output; } add_action('media_buttons', 'anypopupMediaButton', 11); function anypopuppbPopupVariable() { $showCurrentUser = ANYPOPUPFunctions::isShowMenuForCurrentUser(); if (!$showCurrentUser) { return; } $buttonTitle = 'Insert custom JS variable'; $output = ''; require_once(ABSPATH .'wp-admin/includes/screen.php'); $currentScreen = get_current_screen(); $currentPageParams = get_object_vars($currentScreen); if ($currentPageParams['id'] != 'any-popup_page_edit-popup') { return ''; } wp_enqueue_script('jquery-ui-dialog'); wp_register_style('anypopup_jQuery_ui', ANYPOPUP_APP_POPUP_URL . "/style/jQueryDialog/jquery-ui.css"); wp_enqueue_style('anypopup_jQuery_ui'); $img = ''; $output = ''. $img.$buttonTitle.''; echo $output; return ''; } add_action('media_buttons', 'anypopuppbPopupVariable', 11); function anypopupJsVariableThickbox() { require_once(ABSPATH .'wp-admin/includes/screen.php'); $currentScreen = get_current_screen(); $currentPageParams = get_object_vars($currentScreen); if($currentPageParams['id'] != 'any-popup_page_edit-popup') { return ''; } ?>