Skip to content

Add dynamic return type for generic functions #63

@johnbillion

Description

@johnbillion

There are several generic functions in WordPress that return a value of the same type as passed in. Here's my list so far:

  • addslashes_gpc()
  • map_deep()
  • rawurlencode_deep()
  • sanitize_category()
  • sanitize_post()
  • sanitize_term()
  • stripslashes_deep()
  • urldecode_deep()
  • urlencode_deep()
  • wp_slash()
  • wp_unslash()

We should be able to come up with a dynamic return type extension which makes the function behave like a generic and return the same type as passed in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions