WordPress.org

Support

Support » How-To and Troubleshooting » Proper way to use defaults?

Proper way to use defaults?

  • It seems that at least in some cases, using a null string for a function parameter does not cause the function to use the default. For instance, if you put “comments_popup_script(”,”,’comments.php’)” in your templete, you end up with the width and height being blank instead of 400. This is only mildly annoying in some browsers (Mozilla just ignores the bogus values), but some, like Konqueror and Safari, assume you meant 0 and open the smallest window allowed.
    Sure, I can work around it by actually assigning a value when I call the function, but it *is* a bit annoying not to be able to use the defaults in cases like this.
    (Incidentally, this is with PHP 4.3.2 on Apache 1.3.)

Viewing 1 replies (of 1 total)
  • I thought to leave a parameter blank you just put commas like this:
    comments_popup_script(,,’comments.php’);
    I don’t think you need the extra quotes.

Viewing 1 replies (of 1 total)
  • The topic ‘Proper way to use defaults?’ is closed to new replies.
Skip to toolbar