public function can_output($hook_suffix = '') { if (WPAlchemy_MetaBox::_is_post() or WPAlchemy_MetaBox::_is_page()) { return true; } return false; }
/** * Used to insert global SCRIPT tags into the footer, called on WordPress * admin_footer action. * * @static * @since 1.3 * @access private * @see _global_head() */ function _global_foot() { // must be creating or editing a post or page if (!WPAlchemy_MetaBox::_is_post() and !WPAlchemy_MetaBox::_is_page()) { return; } ?> <script type="text/javascript"> /* <![CDATA[ */ (function($){ /* not using jQuery ondomready, code runs right away in footer */ /* use a global dom element to attach events to */ $.wpalchemy = $('<div></div>').attr('id','wpalchemy').appendTo('body'); })(jQuery); /* ]]> */ </script> <?php }