HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/advanced-ads-tracking/includes/functions.php
<?php
/**
 * The class hold functions for tracking.
 *
 * @package AdvancedAds\Tracking
 * @author  Advanced Ads <info@wpadvancedads.com>
 * @since   2.6.0
 *
 * phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralText
 * phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain
 * phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralContext
 */

/**
 * Wrapper for translation from other domains
 *
 * @param string $text   Text to translate.
 * @param string $domain Domain to translate from.
 *
 * @return string
 */
function advads__( $text, $domain = 'default' ): string {
	return translate( $text, $domain );
}

/**
 * Wrapper for translation from other domain with context
 *
 * @param string $text    Text to translate.
 * @param string $context Context information for the translators.
 * @param string $domain  Domain to translate from.
 *
 * @return string
 */
function advads_x( $text, $context, $domain = 'default' ): string {
	return translate_with_gettext_context( $text, $context, $domain );
}

/**
 * Wrapper for translation from other domain with plural
 *
 * @param string $single  Single text to translate.
 * @param string $plural  Plural text to translate.
 * @param int    $number  Number to use for plural.
 * @param string $domain  Domain to translate from.
 *
 * @return string
 */
function advads_n( $single, $plural, $number, $domain = 'default' ): string {
	$translations = get_translations_for_domain( $domain );
	$translation  = $translations->translate_plural( $single, $plural, $number );

	return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
}

/**
 * Echo translation from other domains
 *
 * @param string $text   Text to translate.
 * @param string $domain Domain to translate from.
 *
 * @return void
 */
function advads_e( $text, $domain = 'default' ): void {
	echo advads__( $text, $domain ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}