[wp-hackers] public facing plugin script?

Computer Guru computerguru at neosmart.net
Tue May 22 12:49:13 GMT 2007

Hash: SHA1

Keith Thornhill wrote:
> Hi all,
> 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.
> Thanks!
> -keith

Well I'd say the "Cleanest" most-obvious answer is mod_rewrite - that'll
take care of it in a jiffy and keep you in control... Then again, that's
about as "hacky" as it gets :)

Can't you hook into the WP rewrite rules?

- --
Computer Guru
NeoSmart Technologies

Version: GnuPG v2.0.3 (GNU/Linux)


More information about the wp-hackers mailing list