/** * Registers scripts for CMB2 * @since 2.0.7 */ protected static function register_js() { if (self::$js_registration_done) { return; } $hook = is_admin() ? 'admin_footer' : 'wp_footer'; add_action($hook, array('CMB2_JS', 'enqueue'), 8); self::$js_registration_done = true; }