Hooks::action_save_wplang( string $option, string $old, string $new )

Flush rewrite rules after the site language setting changes.


Parameters

$option

(string) (Required) The option name that was updated.

$old

(string) (Required) The option old value.

$new

(string) (Required) The option updated value.


Top ↑

Source

File: src/Tribe/Views/V2/Hooks.php

	public function action_save_wplang( $option, $old, $new ) {

		if ( 'WPLANG' !== $option ) {
			return;
		}

		// Deleting `rewrite_rules` given that this is being executed after `init`
		// And `flush_rewrite_rules()` doesn't take effect.
		delete_option( 'rewrite_rules' );
	}

Top ↑

Changelog

Changelog
Version Description
4.9.13 Introduced.