HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: /volume1/web/wordpress/wp-content/brizy/compatibilities/polylang.php
<?php
/*
 * https://wordpress.org/plugins/polylang/
 */
class Brizy_Compatibilities_Polylang {

	public function __construct() {
		add_action( 'brizy_post_loop_args', [ $this, 'post_loop_args' ] );
		add_filter( 'pll_home_url_white_list', [ $this, 'home_url_white_list' ] );
	}

	public function post_loop_args( $args ) {
		$args['lang'] = '';

		return $args;
	}

	/**
	 * Filters home url
	 *
	 * @param array $arr
	 * @return array
	 */
	public function home_url_white_list( $arr ) {
		return array_merge( $arr, [ [ 'file' => 'brizy-pro/content' ] ] );
	}
}