get_active_languages() ); $settings = array(); foreach ( $active_languages as $lang ) { $settings[ $lang ] = $REQUEST[ $lang ] === 'on' ? FB_WPML_Language_Status::VISIBLE : FB_WPML_Language_Status::HIDDEN; } update_option( 'fb_wmpl_language_visibility', $settings, false ); self::$settings = $settings; } } /** * Prints the content for Facebook Visibility section. * * The section is shown at the bottom of the WPML > Languages settings page. */ public function wpml_support() { /** @var object $sitepress */ global $sitepress; // there is no nonce to check here and the value of $_GET['page] is being compared against a known and safe string // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( isset( $_GET['page'] ) && false !== strpos( esc_url_raw( wp_unslash( $_GET['page'] ) ), 'languages.php' ) ) { /** @var array $active_languages */ $active_languages = $sitepress->get_active_languages(); $settings = get_option( self::OPTION ); // Default setting is only show default lang. if ( ! $settings ) { $settings = array_fill_keys( array_keys( $active_languages ), FB_WPML_Language_Status::HIDDEN ); if ( self::$default_lang ) { $settings[ self::$default_lang ] = FB_WPML_Language_Status::VISIBLE; } } ?>

$set ) : ?>