Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
pum_popup_close_text( null|int $popup_id = null )

Render the popup close button text.


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Parameters Parameters

$popup_id

(Optional)

Default value: null


Top ↑

Source Source

File: includes/functions/popups/template.php

function pum_popup_close_text( $popup_id = null ) {
	$popup = pum_get_popup( $popup_id );

	if ( ! pum_is_popup( $popup ) ) {
		return;
	}

	$close_text = $popup->close_text();

	// If the close text is a font awesome icon (E.g. "fas fa-camera"), add the icon instead of the text.
	if ( preg_match( "/^fa[srldb]?\s.+/i", $close_text ) ) {
		echo '<i class="' . esc_attr( $close_text ) . '"></i>';
	} else {
		echo esc_html( $close_text );
	}
}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.