Title: Deprecated Function _admin_bar_bump_cb Usage in class-amp-theme-support.php
Last modified: November 12, 2024

---

# Deprecated Function _admin_bar_bump_cb Usage in class-amp-theme-support.php

 *  Resolved [ileiaeu](https://wordpress.org/support/users/ileiaeu/)
 * (@ileiaeu)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/deprecated-function-_admin_bar_bump_cb-usage-in-class-amp-theme-support-php/)
 * I am currently experiencing an issue with the AMP plugin on my WordPress website.
   The error logs indicate that the plugin is using a deprecated WordPress function,
   which is causing compatibility warnings. Below are the details of the issue:
 *     ```wp-block-code
       Deprecated: Function _admin_bar_bump_cb is deprecated since version 6.4.0! Use wp_enqueue_admin_bar_bump_styles instead. in /wp-includes/functions.php on line 6085
       ```
   
 * **Details:**
    - **Plugin File:** `class-amp-theme-support.php`
    - **Function in Question:** `_admin_bar_bump_cb`
    - **Recommended Replacement:** `wp_enqueue_admin_bar_bump_styles`
    - **WordPress Version:** 6.4.0
    - **AMP Plugin Version:** 2.5.4
 * **Description:**
 * Upon reviewing the plugin files, I located the usage of the deprecated function`
   _admin_bar_bump_cb` within the `class-amp-theme-support.php` file. This deprecated
   function has been replaced by `wp_enqueue_admin_bar_bump_styles` in WordPress
   version 6.4.0. Continuing to use the deprecated function may lead to further 
   compatibility issues and warnings.
 * **Request:**
 * Could you please update the AMP plugin to replace the deprecated `_admin_bar_bump_cb`
   function with the recommended `wp_enqueue_admin_bar_bump_styles` function? This
   update will help ensure compatibility with the latest WordPress version and prevent
   potential issues for users.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/deprecated-function-_admin_bar_bump_cb-usage-in-class-amp-theme-support-php/#post-18131151)
 * Hi [@ileiaeu](https://wordpress.org/support/users/ileiaeu/),
 * Thanks for contacting us. The AMP plugin adds scripts and styles to the WordPress
   admin bar. If your theme doesn’t support the admin bar, it uses a fallback method`
   _admin_bar_bump_cb`, You can refer to the [AMP plugin code](https://github.com/ampproject/amp-wp/blob/develop/includes/class-amp-theme-support.php#L1242-L1248)
   for more details.
 * **Please check your [theme’s support for the admin bar](https://developer.wordpress.org/reference/functions/add_theme_support/#parameters).**
 * WordPress core also uses a [similar approach](https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-admin-bar.php#L57)
   for the admin bar class.
 * We hope this helps!
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/deprecated-function-_admin_bar_bump_cb-usage-in-class-amp-theme-support-php/#post-18150739)
 * [@ileiaeu](https://wordpress.org/support/users/ileiaeu/) As we didn’t receive
   a response I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-post)
   if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprecated Function _admin_bar_bump_cb Usage in class-amp-theme-support.
php’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/deprecated-function-_admin_bar_bump_cb-usage-in-class-amp-theme-support-php/#post-18150739)
 * Status: resolved