Last active
June 8, 2018 06:06
-
-
Save nextend/c7201df29919f5719cfed767584fc295 to your computer and use it in GitHub Desktop.
Fix for Insert PHP Code Snippet output buffer issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Fix: Insert PHP Code Snippet output buffer issue | |
Author: nextendweb | |
Version: 1.0.0 | |
Requires at least: 4.1 | |
Tested up to: 4.9 | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
add_action('plugins_loaded', 'fix_insert_php_code_snippet'); | |
function fix_insert_php_code_snippet() { | |
if (function_exists('xyz_ips_display_content')) { | |
add_shortcode('xyz-ips', 'fix_xyz_ips_display_content'); | |
} | |
} | |
function fix_xyz_ips_display_content($xyz_snippet_name) { | |
ob_start(); | |
return xyz_ips_display_content($xyz_snippet_name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://wordpress.org/plugins/insert-php-code-snippet/
https://wordpress.org/support/topic/plugin-breaks-output-buffers-started-in-other-plugins-and-themes/