GetSimple Support Forum
Strange problem with edit-content filter - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Strange problem with edit-content filter (/showthread.php?tid=955)



Strange problem with edit-content filter - force - 2010-08-28

Hi,

I have the following test code as a plugin (i have excluded the template for the plugin to enhance readability)

add_action('edit-content','show_test');

<?php

function show_test() {
echo 'this is a test string this is a test string';
}
?>

How ever its is not being displayed as expected under the text area in the edit.php section of the admin site, any ideas?


Strange problem with edit-content filter - Carlos - 2010-08-28

Is the add_action line between <?php ... ?> tags?

This works ok:
Code:
<?php
$thisfile = basename(__FILE__, ".php");
register_plugin($thisfile,'thisisatest','','','','');

add_action('edit-content','show_test');

function show_test() {
echo 'this is a test string this is a test string';
}
?>
(save it as thisisatest.php in your plugins folder)