A function to fetch blog content via rss feed

First things first, avoid defining functions inside functions. PHP doesn’t have a problem with it, but it’s usually a sign you’re “doing it wrong” and it just leads to unnecessary headaches. Second, your foreach loop at the bottom is a little malformed. You need to define the <ul> outside the loop, and then append to … Read more

Have WP Theme update from Git Repository

There’re a couple of libraries out there. One of the more well known is from Joey Kudish and hosted on GitHub itself. Basically it does the following: utilizes the GitHub API Adds a callback to the ‘pre_set_site_transient_update_plugins’ filter Adds another callback to the ‘plugins_api’ filter finally utilizes the WP HTTP API and does a wp_remote_get() … Read more

Plugins won’t auto-update on IIS

I had the same problem. When auto-updating, certain files would get “locked” somehow stopping the rest of the update process. Are you using Windows cache extension for PHP by any chance? Read the following post: http://ruslany.net/2011/04/wincache-and-wordpress-plugin-upgrade-problem/

How to update WordPress and plugins at specific day and time in PHP?

There’s a question and an answer regarding WP (auto) updates here, How To/What triggers a WordPress auto update? The answer also has a link to a blog post on how to force WordPress auto-update. Code snippet posted on the referenced blog, <?php // request-update.php require( dirname(__FILE__) . ‘/wp-load.php’ ); wp_maybe_auto_update(); ?> and php ./request-update.php Perhaps … Read more

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