Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect inline documentation #243

Closed
15 tasks done
jaspermdegroot opened this issue Nov 15, 2015 · 2 comments
Closed
15 tasks done

Incorrect inline documentation #243

jaspermdegroot opened this issue Nov 15, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@jaspermdegroot
Copy link
Member

These are issues in the plugin as well as in WP core trunk.

wp_get_attachment_image_srcset():

  • param $image_meta missing "Default null"

wp_calculate_image_srcset():

  • param $attachment_id missing "Default 0"

wp_calculate_image_srcset:

  • variable $attachment_id: add to description " or 0".

wp_get_attachment_image_sizes():

  • param $image_meta missing "Default null"
  • Return description should be "A valid source size value for use in a 'sizes' attribute or false." instead of "A 'srcset' value string or false."

wp_calculate_image_sizes():

  • description of the function: "Create 'sizes' attribute value for an image." should be "Creates the 'sizes' attribute value for an image."
  • param $size: remove " Default 'medium'." since it doesn't have a default
  • param $image_src should be documented as second instead of fourth
  • param $image_src missing "Default null" (= null is missing in the code as well)
  • param $image_meta missing "Default null" (= null is missing in the code as well)
  • param $attachment_id missing "Default 0"

wp_calculate_image_sizes:

  • variable $size: remove " Default 'medium'." from description
  • variable $image_src type should be string|null and add to description " or null".
  • variable $image_meta type should be array|null and add to description " or null".
  • variable $attachment_id: add to description " or 0".
@joemcgill
Copy link
Member

Closed after manually merging #250

@joemcgill
Copy link
Member

I've added the changes in 88e8480 to the original ticket in Trac (#34612) for adding the wp_calculate_image_sizes() function.

All other docs changes should be handled in a big docs sweep through Core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants