| 175 | function wp_getVersion($args){ |
| 176 | $this->escape($args); |
| 177 | $branch = (string) $args; |
| 178 | if ($branch == "2.0"){ |
| 179 | // Return the latest version in this branch |
| 180 | return "2.0.11"; |
| 181 | } elseif ($branch == "2.1") { |
| 182 | // If the branch is unsupported return 0 |
| 183 | return "0"; |
| 184 | } elseif ($branch == "2.2") { |
| 185 | return "2.2.2"; |
| 186 | } elseif ($branch == "0"){ |
| 187 | // Client is actually asking for the very latest version |
| 188 | return "2.2.2"; |
| 189 | } else { |
| 190 | // Client asked about a branch we know nothing about |
| 191 | // report as unsupported. |
| 192 | return "0"; |
| 193 | } |
| 194 | } |
| 195 | |