Archive | WordPress RSS feed for this section

Add custom Javascript to a WordPress plugin’s admin page and pass PHP variables to it

6 Jan

I’m almost a WordPress geek by now, but I confess I always had trouble including a Javascript file with my own custom scripts in it. And I always used ‘wp_register_script’ and ‘wp_enqueue_script’ the wrong way. What’s worse, I literally echoed out the path to the Javascript file by assigning it to a variable first. See how I did it:

//blah blah code code....
//This is where I want to use my Javascript file
                $pluginurl = dirname(plugin_basename(__FILE__)).'/';
		$helperscripts = WP_PLUGIN_URL.'/'.$pluginurl.'js/scripts.js';
		echo "<script src='".$jquery."' type='text/javascript' charset='utf-8'></script>
			<script src='".$helperscripts."' type='text/javascript' charset='utf-8'></script>";

Continue reading


Enable MultiSite/MultiUser support in WordPress 3+

4 Oct

Now there’s one more reason to bow before the might of WordPress 3MultiSite/MultiUser support!

WordPress 3+ comes packed with the core of WordPress Multi-User (also known as WPMU) built in it. It allows you to run multiple blogs and have a ‘site of sites’ or a ‘network of sites’ within one installation, thus the name ‘MultiSite’ or WordPress MS. Creating, Maintaining and Removing sites, Managing user roles is very simple with the interface provided in your Administration area. However, the multi-site support is not enabled by default. There are a few easy steps you need to follow in order to enable multi-site support.

Continue reading