Skip to content

Commit

Permalink
Add a method to set the active langs (mainly for testing purposes)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Wheatley committed Mar 13, 2012
1 parent 32dd0a0 commit e59fe83
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions class-languages.php
Expand Up @@ -178,6 +178,17 @@ public function options() {
// ==============

/**
* Set the active language objects for the current site, keyed
*
* @return array An array of Babble language objects
**/
public function set_active_langs( $lang_codes ) {
$this->parse_available_languages();
error_log( "SW: WP_LANG_DIR: " . WP_LANG_DIR );
$this->active_langs = $lang_codes;
}

/**
* Return the active language objects for the current site, keyed
* by URL prefix. A language object looks like:
* 'ar' =>
Expand Down

0 comments on commit e59fe83

Please sign in to comment.