I'm trying to convert a plugin I wrote procedurally to be class based, and it's not working for some unknown reason. So I wrote cut down my plugin code to be about as minimilistic as possible. When it runs, it comes back with no content.
<?PHP
/**
* Plugin Name: A1 Test
* Version: 1.0.0
* Plugin URI:
* Description: Test
* Author:
* Author URI:
*/
if ( ! class_exists("TestingDemo") )
{
class TestingDemo
{
function TestingDemo_filter( $buffer )
{
$buffer = preg_replace_callback( '@\[testing\s*=\s*"(.*?)\s*"\]@si',
array(&$this, "TestingDemo_replace"), $buffer );
}
function TestingDemo_replace( $matches )
{
$message = $matches[1];
return "Testing Worked..... {$message}";
}
}
}
if ( class_exists("TestingDemo") )
{
$TestingDemos = new TestingDemo();
}
if ( isset($TestingDemos) )
{
add_filter( 'the_content', array(&$TestingDemos, 'TestingDemo_filter') );
}