Is it necessary to use escape functions on everything or is it only necessary if you’re taking input from a 3rd party? (End Users, APIs, Etc.)

that wordpress.org page was probably written by someone that do not get security.

Escaping is done to make sure that your output, when is part of an HTML page, is displayed to the user as you intend it to be which means converting thing like “<” to the appropriate HTML entity.

Yes, if you do not escape a bad actor that can insert content to site’s pages can trick the pages to display information you would not like to be displayed, but the root cause usually is that you do not escape your output to make sure it will display only the string as should have been displayed.

Escaping is context based and you should not apply html related escaping to email which contain simple text, so not realy sure what is that claim about wordpress apis always escaping.

double escaping is not needed but usually not something to worry about as the additional CPU power required is probably close to 0.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)