Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strange problem with edit-content filter
#1
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?
Reply
#2
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)
Reply




Users browsing this thread: 1 Guest(s)