Inpsyde\MultilingualPress\API\WPDBLanguages::update_languages_by_id PHP Method

update_languages_by_id() public method

Updates the given languages.
Since: 3.0.0
public update_languages_by_id ( array $languages ) : integer
$languages array An array with language IDs as keys and one or more fields as values.
return integer The number of updated languages.
    public function update_languages_by_id(array $languages)
    {
        $updated = 0;
        foreach ($languages as $id => $language) {
            $updated += (int) $this->db->update($this->table, (array) $language, ['ID' => $id], $this->get_field_specifications($language), '%d');
        }
        return $updated;
    }