Skip to main content

fc_pro_cart_sidebar_attributes

Type: Filter

Filters the HTML attributes for cart sidebar.

Signature​

apply_filters( 'fc_pro_cart_sidebar_attributes', $sidebar_attributes );

Parameters​

NameTypeDescription
$sidebar_attributesarrayHTML attributes for the sidebar element.

Since​

  • 1.3.0

Source: inc/cart-page.php

Examples​

add_filter( 'fc_pro_cart_sidebar_attributes',
/**
* Add custom data attribute to cart sidebar.
*
* @param array $sidebar_attributes HTML attributes for the sidebar element.
* @return array Filtered value.
*/
function( $sidebar_attributes ) {
$sidebar_attributes['custom-data'] = 'custom-attribute';
return $sidebar_attributes;
},
10
);