Skip to content

Instantly share code, notes, and snippets.

@polevaultweb
Created January 3, 2019 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polevaultweb/c6daeb241c2173f7bd27c15ddb9449b3 to your computer and use it in GitHub Desktop.
Save polevaultweb/c6daeb241c2173f7bd27c15ddb9449b3 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'wpmdb_process_column_as_binary', function( Bool $process_as_binary, stdClass $struct ) {
return ( true == $process_as_binary ) ? true :
in_array( strtolower( trim( $struct->Type ) ), [
'geometry',
'point',
'linestring',
'polygon',
'multipoint',
'multilinestring',
'multipolygon',
'geometrycollection',
] );
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment