Skip to content
Snippets Groups Projects

Filtering special characters for image links

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Krzysztof Dyszczyk
    dropshipping_mapper_images.php 289 B
    add_filter( 'wpdesk_dropshipping_mapper_images', function ( $images ) {
    
    	if ( !empty($images) ) {
    		$json = json_decode($images);
    		if (json_last_error() === JSON_ERROR_NONE) {
    			if( is_array($json) && !empty($json) ){
    				$images = implode(',', $json);
    			}
    		}
    	}
    	return $images;
    } );
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment