Getting $sep from wp_title

View: New views
3 Messages — Rating Filter:   Alert me  

Getting $sep from wp_title

by Alex Andrews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm probably being stupid, but I can't work out how to get the
variable $sep which is the second parameter of wp_title

wp_title($sep = '»', $display = true, $seplocation = '')

I want to get $sep out, so when I do a add_filter('wp_title',
'ribcage_page_title'); then ribcage_page_title can get $sep from
wp_title somehow and

Looking at the source it seems that wp_title, when it applies the
filters, passes the variables along. So does that mean that
ribcage_page_title gets these variables?

Cheers very much

Alex
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Getting $sep from wp_title

by Austin Matzko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jun 10, 2009 at 1:21 PM, Alex Andrews<awgandrews@...> wrote:
> I'm probably being stupid, but I can't work out how to get the
> variable $sep which is the second parameter of wp_title
>
> wp_title($sep = '»', $display = true, $seplocation = '')
>
> I want to get $sep out, so when I do a add_filter('wp_title',
> 'ribcage_page_title'); then ribcage_page_title can get $sep from
> wp_title somehow and

Please see the Codex: http://codex.wordpress.org/Function_Reference/add_filter

The fourth argument passed to add_filter is the number of accepted
arguments.  Since $sep is the second, this needs to be 2.

In the future, please post support questions at the WP support forums:
http://wordpress.org/support/ .  This list is meant for development
issues.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Getting $sep from wp_title

by Alex Andrews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not wanting to be rude, but I've asked plenty of similar questions
like this here before.

Apologies though for perhaps not searching the codex better.

And, of course, thank you for your prompt reply!

Alex

2009/6/10 Austin Matzko <if.website@...>:

> On Wed, Jun 10, 2009 at 1:21 PM, Alex Andrews<awgandrews@...> wrote:
>> I'm probably being stupid, but I can't work out how to get the
>> variable $sep which is the second parameter of wp_title
>>
>> wp_title($sep = '»', $display = true, $seplocation = '')
>>
>> I want to get $sep out, so when I do a add_filter('wp_title',
>> 'ribcage_page_title'); then ribcage_page_title can get $sep from
>> wp_title somehow and
>
> Please see the Codex: http://codex.wordpress.org/Function_Reference/add_filter
>
> The fourth argument passed to add_filter is the number of accepted
> arguments.  Since $sep is the second, this needs to be 2.
>
> In the future, please post support questions at the WP support forums:
> http://wordpress.org/support/ .  This list is meant for development
> issues.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers