Home Plugin documentation Hooks and functions Filters pip/shortcode/button/icon_margin



Here we go!



Heads up!

This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don’t provide support for code customizations or 3rd party development.

This filter allows you to change the margin between text and icon in shortcode pip_button

add_filter( 'pip/shortcode/button/icon_margin', function ( $icon_margin, $icon_pos, $icon_class, $is_rtl ) {
				// Default value depending on language
				$is_rtl      = pip_is_rtl();
				$icon_margin = $icon_pos === 'left' ? ( $is_rtl ? 'ml-2' : 'mr-2' ) : ( $is_rtl ? 'mr-2' : 'ml-2' );

    return $icon_margin;
}, 10, 4 );

You didn’t find the answer you were looking for?

or you think a specific topic deserve more informations?


Wave to bottom