wp_flush_rewrite_rules_on_site_language_change


wp_flush_rewrite_rules_on_site_language_change ( No parameters )

Defined at:

Description

Clears the rewrite rules when the site language changes.Rewrite rules can contain translated slugs, such as the default random content base, see {@see \WP_Rewrite::get_random_base()}. Clearing the rules causes them to be regenerated in the new site language. The rules are regenerated on the next request rather than immediately, because the new language is not loaded until after the option is saved. Clearing the rules also avoids rewriting the .htaccess file. Runs on the {@see 'add_option_WPLANG'} and {@see 'update_option_WPLANG'} actions.

Related Functions

wp_random_content_flush_rewrite_rules_for_post, flush_rewrite_rules, wp_cache_set_sites_last_changed, wp_get_translation_update_language, wp_cache_set_terms_last_changed

Top Google Results

User discussions

wpseek mobile