[wp-hackers] Filter/Action for non-standard front page?

John Eckman eckman.john at gmail.com
Sun Jan 18 22:29:43 GMT 2009


Hello all.

I've written a plugin that enables the user to set up their WordPress  
blog as a Facebook application:
	http://www.wordpress.org/extend/plugins/wpbook/

In essence, users of the plugin give their blog's url as the callback  
URL for a Facebook app. When the Facebook servers call the callback  
url in an iFrame, the plugin uses the filters for theme_root,  
theme_root_url, and template_directory so that a different theme gets  
served.

("fb_sig_in_iframe" gets added to the query string when the callback  
url is called from Facebook's servers - this is how I know the call is  
from Facebook).

It's working pretty well for most people, but folks are reporting  
issues and I believe one issue is when users have set something else  
as the front page.

Is it possible to use a filter or action which will know that the user  
has a custom front page set, and whenever a request comes in that is  
from facebook, know to redirect to my custom theme's index.php, rather  
than the custom from page the user has set?

Or, could I just tell users to provide as the callback url the "Posts"  
page from Settings->Reading, where they've indicated a different front  
page?


Thanks -

John


----------------------------------------
John Eckman
eckman.john at gmail.com
http://www.johneckman.com/







More information about the wp-hackers mailing list