Update references to pictures on website after moving to new URL

Besides doing a custom query in your MYSQL database, I’ve found this little script to be helpful in my development process, and I’ve incorporated into my regular workflow to keep my local, development and production servers synchronized: https://github.com/interconnectit/Search-Replace-DB Just be sure to read the documentation, especially about overwriting GUID values and also make sure to … Read more

detect referr page

If I understand you correctly, a) a user goes to any website, b) user clicks on “random article”, c) user is redirected to a random article, d) user loads that random article. Am I correct thus far? In that case, you’ll see the site from a) as your http referrer in d), because an HTTP … Read more

What is the better for call files: bloginfo() or echo esc_url()?

Note that bloginfo(‘template_url’) is a wrapper for get_template_directory_uri(). It doesn’t seems to explicitly escape it, though. It’s better to escape it in your example. Here are two examples how we can break the HTML in the case it’s not escaped: Break Example #1 add_filter( ‘template_directory_uri’, function( $uri ) { return $uri .'”>’; } ); Break … Read more