How to change src to data-src for iframe inside WP content?

The code snippet in your question is a filter, but it isn’t built properly: A filter needs a function that takes in the thing to be filtered as the first parameter, and returns the new version Your function ignores the first parameter, breaking any changes that have already been made Your function doesn’t always return … Read more

A message to clients in the dashboard widget received from another site

No, iframe is not a good desicion. The best option is creating a custom api. WordPress has a REST API with the ability to add custom endpoints: https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/ If you’re familiar enoigh with coding, you can create a custom api that shows the message that you want and in the client site, write a code … Read more