Wikimedia general text:
> Text is available under the [[https://creativecommons.org/licenses/by-sa/3.0/ | Creative Commons Attribution-ShareAlike License]]; additional terms may apply. See [[https://foundation.wikimedia.org/wiki/Terms_of_Use | Terms of Use]] for details.
Wikidata text:
> All structured data from the main, property and lexeme namespaces is available under the [[https://creativecommons.org/publicdomain/zero/1.0/ | Creative Commons CC0 Licence]]; text in the other namespaces is available under the [[https://creativecommons.org/licenses/by-sa/3.0/ | Creative Commons Attribution-ShareAlike License]]; additional terms may apply. By using this site, you agree to the [[https://foundation.wikimedia.org/wiki/Terms_of_Use | Terms of Use]] and [[https://foundation.wikimedia.org/wiki/Privacy_policy | Privacy Policy]].
Commons text to use:
> Files are available under licenses specified on their description page. All structured data from the file and property namespaces is available under the [[https://creativecommons.org/publicdomain/zero/1.0/ | Creative Commons CC0 Licence]]; all unstructured text is available under the [[https://creativecommons.org/licenses/by-sa/3.0/ | Creative Commons Attribution-ShareAlike License]]; additional terms may apply. See [[https://foundation.wikimedia.org/wiki/Terms_of_Use | Terms of Use]] for details.
[No, I don't know why Wikidata doesn't have the normal ToU text.]