I am trying to update my plugins to be more user-friendly. One of the things i want to achieve is that i want my plugins output (e.g. for description-fields) to use the full functionality of all normal wordpress posts and pages (use TinyMCE and Loop-Output).
I've found a great article on using the tinyMCE right here but what I'm still stuck at is the usage of loop formatting by other plugins.
Given Example: I use a download manager plugin. In custom posts and pages i can write [download id=1]
and it get's nicely formatted by the asociated plugin.
I want this functionality in my custom plugins, too.
Right now this is the way i do my plugin output:
add_filter('the_content', array(&$myclass, 'myclass_callback'), 7);
and myclass_callback is the following:
public function myclass_callback($sIn)
{
if (isset($_GET['myc_id']) && is_numeric($_GET['myc_id'])) {
$sOut = $this->myclass_detail((int)$_GET['myc_id']);
return str_replace('[[MYCLASS_TAG]]', $sOut, $sIn);
}
$sOut = $this->myclass_index();
return str_replace('[[MYCLASS_TAG]]', $sOut, $sIn);
}
And this approach doesn't bring my wanted result :) So i am trying to figure out how to, but apparently I'm not good enoug of a googler to do so :S
Any links or keywords for me to search for will be greatly appreciated. Thanks in advance!