/i"; $replacement = ''; $content = preg_replace($pattern, $replacement, $content); return $content; } add_filter('the_content', 'parallel_add_image_responsive_class'); /** * Handles JavaScript detection. * Adds a js class to the root element when JavaScript is detected. */ function parallel_javascript_detection() { echo "\n"; } add_action( 'wp_head', 'parallel_javascript_detection', 0 ); /** * Handles Redux Gallery */ function parallel_wp_get_attachment( $attachment_id ) { $attachment = get_post( $attachment_id ); return array( 'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ), 'caption' => $attachment->post_excerpt, 'description' => $attachment->post_content, 'href' => get_permalink( $attachment->ID ), 'src' => $attachment->guid, 'title' => $attachment->post_title ); }