MainWP useful code snippets

White label your WPRocket:

on child site in wp-config.php add –

define (‘WP_ROCKET_WHITE_LABEL_ACCOUNT’, true);

Enable SVG support in WordPress

functionsmartwp_enable_svg_upload( $mimes ) { //Only allow SVG upload by adminsif ( !current_user_can( ‘administrator’ ) ) { return $mimes; } $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘svgz’] = ‘image/svg+xml’; return $mimes; } add_filter(‘upload_mimes’, ‘smartwp_enable_svg_upload’);

Similar Posts