PluginProbe
Polylang / 3.8.4
Polylang v3.8.4
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / src / modules / Blocks / load.php

load.php in Polylang 3.8.4, at src/modules/Blocks/load.php

24 lines 575 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Polylang
4 */
5
6 namespace WP_Syntex\Polylang\Blocks;
7
8 use WP_Syntex\Polylang\Blocks\Language_Switcher\Standard\Block as Standard_Block;
9 use WP_Syntex\Polylang\Blocks\Language_Switcher\Navigation\Block as Navigation_Block;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Don't access directly.
13 }
14
15 add_action(
16 'pll_init',
17 function ( $polylang ) {
18 if ( $polylang->model->has_languages() ) {
19 $polylang->switcher_block = ( new Standard_Block( $polylang ) )->init();
20 $polylang->navigation_block = ( new Navigation_Block( $polylang ) )->init();
21 }
22 }
23 );
24