Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8028143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:02:35+00:00 2026-06-05T00:02:35+00:00

Why, when I want to use add_filter( ‘author_link’, ‘foo’, 10, 3 ); function foo

  • 0

Why, when I want to use

add_filter( 'author_link', 'foo', 10, 3 );
function foo ( $link, $author_id, $author_nicename ) {}

Why do I have to use 3 required parameters?

Why can’t I do this:

add_filter( 'author_link', 'foo' );
function foo ( $author_id ) {}

It would be nice to get some article(s) about this. Thanks in advance.

PS beginner in WP-dev.^

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:02:37+00:00Added an answer on June 5, 2026 at 12:02 am

    It’s allowed to do this theoretically, however it’s not guaranteed that 2nd and 3rd parameters would be properly delivered to your function. If you need to make sure that first two parameters are correctly passed you should declare this like:

    add_filter( ‘author_link’, ‘foo’, 10, 2 );
    function foo ( $link, $author_id ) {}

    You might like to read more about API at http://codex.wordpress.org/Plugin_API

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how I can use Elmah logger only when I want? I have ErrorsController and
I want to rewrite http://website.com/?slug=product_info.php&products_id=32 to http://website.com/product_info/32 and I use this code, add_filter('rewrite_rules_array','wp_insertMyRewriteRules'); add_filter('query_vars','wp_insertMyRewriteQueryVars');
I have UnityContainer in my app yet. Now I want to add use of
I have this in my web.config <add key=DateFormat value=dd/MM/yy/> And I want to use
Example I want use the_excerpt in two locations. On functions.php I add function new_excerpt_length($length)
Hey guys. I have the following situation. I want to use a TypeDescriptor to
I have a few questions about security using PHP, I dont want to use
If I have a file with few column and I want to use an
link text I want to use the TIFF IFilter built in to Windows 2008
I want to use jquery to add a rel=shadowbox to a <a> tag How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.