| 1594 | * Removes callbacks for background image display. |
| 1595 | * |
| 1596 | * The parameter $header_callback callback needs to be exactly the same as |
| 1597 | * the one used to add the custom background |
| 1598 | * |
| 1599 | * @since 3.1.0 |
| 1600 | * |
| 1601 | * @param callback $header_callback Call on 'wp_head' action. |
| 1602 | */ |
| 1603 | function remove_custom_background($header_callback = '') { |
| 1604 | if ( empty($header_callback) ) |
| 1605 | $header_callback = '_custom_background_cb'; |
| 1606 | |
| 1607 | remove_action( 'wp_head', $header_callback ); |
| 1608 | remove_theme_support( 'custom-background' ); |
| 1609 | |
| 1610 | if ( ! is_admin() || ! isset( $GLOBALS['custom_background'] ) ) |
| 1611 | return; |
| 1612 | |
| 1613 | remove_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init') ); |
| 1614 | unset( $GLOBALS['custom_background'] ); |
| 1615 | } |
| 1616 | |
| 1617 | /** |