[wp-hackers] default text for posts?

Viper007Bond viper at viper007bond.com
Thu Sep 6 00:24:46 GMT 2007


This will probably do the trick:

if ( 'post-new.php' == basename($_SERVER['REQUEST_URI']) ) add_filter(
'default_content', 'your_function' );

On 9/5/07, Mindshare Studios <info at mindsharestudios.com> wrote:
>
> Sweet thanks. Worked like a charm. One more question: any idea how I would
> go about ensuring that this only happened on posts and not pages?
>
> --Damian Taggart
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Jennifer
> Hodgdon
> Sent: Wednesday, September 05, 2007 4:57 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] default text for posts?
>
> Mindshare Studios wrote:
> > I was wondering if anyone knew of a way to set default text to come up
> for
> > new posts? I'm working on a site where all blog entries will follow a
> > similar template and it would be great if I could somehow embed default
> > text.
>
> There's a filter for 'default_content' that can be used in a plugin to
> define default content for posts.
>
> When all else fails, check the action/filter lists:
> http://codex.wordpress.org/Plugin_API/Action_Reference
> http://codex.wordpress.org/Plugin_API/Filter_Reference
>
> This one is in the "administrative screen" section of the filter
> reference.
>
>      --Jennifer
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Viper007Bond | http://www.viper007bond.com/


More information about the wp-hackers mailing list