request ? trailingslashit( $wp->request ) : '/' );
}
/**
* Print the button.
*/
public static function render() {
if ( ! self::show() ) {
return;
}
$text = trim( (string) Kanasta_Settings::get( 'float_text' ) );
$position = 'left' === Kanasta_Settings::get( 'float_position' ) ? 'left' : 'right';
$classes = 'kanasta-float kanasta-float--' . $position . ( '' === $text ? ' kanasta-float--icon' : '' );
$notice = Kanasta_Buttons::notice( 'kanasta-float' );
printf(
'%5$s',
esc_url( Kanasta_Redirect::url( 'chat', array( 'ref' => self::current_url() ) ) ),
esc_attr( $classes ),
esc_attr( '' === $text ? __( 'Chat on WhatsApp', 'kanasta' ) : $text ),
'' === $notice ? '' : ' title="' . esc_attr( $notice ) . '"',
'' === $text ? '' : '' . esc_html( $text ) . ''
);
}
}