bookwyrm
Forum Replies Created
-
Forum: Plugins
In reply to: [SVG Support] WP 4.7.1 Kills SVGI’m using a filter in my theme to explicitly allow svg uploads:
add_filter( 'wp_check_filetype_and_ext', function($filetype_ext_data, $file, $filename, $mimes) { if ( substr($filename, -4) === '.svg' ) { $filetype_ext_data['ext'] = 'svg'; $filetype_ext_data['type'] = 'image/svg+xml'; } return $filetype_ext_data; }, 100, 4 );Seems a little safer than
ALLOW_UNFILTERED_UPLOADSand doesn’t require updates to core files.- This reply was modified 9 years, 3 months ago by bookwyrm. Reason: code formatting
Forum: Plugins
In reply to: [WP Hide Post] Does not hide from Blog pageJust an FYI – I also had to add:
add_filter('getarchives_where', 'wphp_query_posts_where');and
add_filter('getarchives_join', 'wphp_query_posts_join');To prevent generating a link to an empty archive page in the Archived Posts widget.
Forum: Networking WordPress
In reply to: Edit Media > broken image, can't crop or editAs an addition to this – I just fixed an issue with editing media by removing the closing PHP tag and trailing newlines in a theme file.
Be sure to look at the bottom of your PHP files too, not just the top.
Forum: Plugins
In reply to: [Custom Contact Forms] Fatal ErrorI sorted this out for my client. Their ISP had asp_tags turned on in the php.ini. That resulted in the JS template code in the class-ccf-form-manager.php being parsed as PHP.
Since I turned off asp_tags, everything looks like it’s working.
Forum: Plugins
In reply to: [Custom Contact Forms] Fatal ErrorI’m seeing the same error as @steffan on a client’s site.