Archives

Force the HTML Uploader

If you need to force users to use the HTML uploader, you can do so with this

add_filter( 'flash_uploader', 'force_html_uploader' );
function force_html_uploader( $flash ) {
	remove_action('post-html-upload-ui', 'media_upload_html_bypass' );
	return false;
}

The remove_action() portion removes the “You are using the Browser uploader” text. The rest is what forces the flash setting to be false.

Remove “Generator” Tags

Don’t want those “generator” tags in your source? Add this

remove_action( 'wp_head', 'wp_generator' );

To modify the output, you can run in through a filter. In this case, the modification is removal.

add_filter('the_generator', 'remove_generated_by');
function remove_generated_by($footer_text) {
    return '';
}

If you want to be more specific about where the generator tags are are removed, you can change the filter to something like on of these

add_filter('get_the_generator_xhtml', 'remove_generated_by');

Just swap ‘xhtml’ for one of the following as needed: html, xhtml, atom, rss2, rdf, comment, export.