Automatically Insert Into Post when uploading Media

That’s the pre-3.5 media interface so I think you must be on 3.4.x? Anyway the first way should work as long as you’re using the browser (non-multifile) upload… try changing add_filter( ‘flash_uploader’, ‘_force_html_uploader’ ); to add_action( ‘pre-html-upload-ui’, ‘_force_html_uploader’ ); and the “js/upload.js” (note the subdirectory – it’s expected to be in a “js” subdirectory of … Read more

After setting up multisite on localhost, requests to localhost redirect to production domain

OK. I figured it out: When moving to multisite, manually overriding WP_HOME and WP_SITEURL like below doesn’t work anymore: // Overwrites the database to save from constantly editing the DB define(‘WP_HOME’,’http://localhost’); define(‘WP_SITEURL’,’http://localhost/wp’); I fixed this by manually changing the database so WP_HOME is http://localhost and WP_SITEURL is http://localhost/wp.

Customize or avoid new admin email address notification

It seems that my edit to your answer was declined, so here you go. All that was missing was the $priority and $accepted_args parameters for the add_action() calls, and the the fixed code below should accomplish what you require. remove_action( ‘add_option_new_admin_email’, ‘update_option_new_admin_email’ ); remove_action( ‘update_option_new_admin_email’, ‘update_option_new_admin_email’ ); /** * Disable the confirmation notices when an … Read more

404 not working on main site on multisite

The cause of your problems is this line: define( ‘NOBLOGREDIRECT’, ‘http://www.ncc.my’ ); If a user visits a blog that doesn’t exist, e.g. http://example.ncc.my this is where the user is sent. However there are also sub directory installs, so all requests that aren’t found are sent there. The easy fix would be to set up a … Read more

WordPress multisite, allow non super admins to create sites

In multisite installation there already is a default admin and super-admin role, and if standard capabilities are different than what you want you can modify them: A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced … Read more