Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/nandedex/public_html/wp-content/plugins/better-adsmanager/includes/fia/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : /home/nandedex/public_html/wp-content/plugins/better-adsmanager/includes/fia/bam-fia.php
<?php
/**
 * bam-fia.php
 *---------------------------
 * Handles all compatibility tasks for FIA
 *
 */


BAM_FIA::init();


/**
 * Better Ads Manager Facebook Instant Article compatibility
 *
 * @since 1.18.5
 */
class BAM_FIA {


	/**
	 *
	 * @since 1.18.5
	 */
	public static function init() {

		// Custom rules
		add_filter( 'instant_articles_transformer_custom_rules_loaded', array(
			'BAM_FIA',
			'customize_role_transformer'
		) );
	}


	/**
	 * Injects BAM custom rules into FIA plugin
	 *
	 * @param $transformer Transformer
	 *
	 * @return \Transformer
	 */
	public static function customize_role_transformer( $transformer ) {

		// Reads from child theme to override it
		$path = Better_Ads_Manager::dir_path( '/includes/fia/rules-configuration.json' );

		$json = bf_get_local_file_content( $path );

		$json = Better_Ads_Manager()->make_prefix_undetectable( $json );

		$transformer->loadRules( $json );

		return $transformer;
	}
} // BAM_FIA

F1le Man4ger