[wp-hackers] public facing plugin script?
keith.thornhill at gmail.com
Tue May 22 06:07:13 GMT 2007
I'm fudging around with a plugin atm and getting into the depths of
wordpress. One part of my plugin involves showing public pages which run
some php code (aka not static). For example, this page may query a table
and print out some data.
What is the best way to accomplish running plugin code in a public-facing
way while still living within the theme and wordpress? In other words, i
don't want to point the browser directly to /wp-content/plugins/somefile.php
since i want the output to appear within the content part of the blog.
My current solution is to create a WP 'page' with a hook as the content.
("[replace_me]" for example) and then filter out that page with my output
buffered content for the file i want to show. This feels REALLY hacky and i
was wondering if there was a more elegant "wordpress way" to do this.
Everything else i've done has either been admin stuff or widgets.
More information about the wp-hackers