Title: wp_body_open and //phpcs:ignore notation
Last modified: December 3, 2020

---

# wp_body_open and //phpcs:ignore notation

 *  Resolved [sprowt](https://wordpress.org/support/users/sprowt/)
 * (@sprowt)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wp_body_open-and-phpcsignore-notation/)
 * hello kind GP ppl,
 * is the comment `//phpcs:ignore` is specifically for Theme Check purposes, best
   practices, or simply a coding courtesy? i see it a lot in GP.
 * i read about wp_body_open here:
 * [wp_body_open](https://developer.wordpress.org/reference/functions/wp_body_open/)
 * [generatewp.com](https://generatewp.com/wordpress-5-2-action-that-every-theme-should-use/)
 * [wp 5.2 update](https://make.wordpress.org/core/2019/04/24/miscellaneous-developer-updates-in-5-2/)
 * i’m as of yet unfamiliar with php codesniffer.
 * to my self-trained eye, the GP implementation of wp_body_open is an alternative
   backwards compat w added benefit of using less code.
 * if there’s a better place to submit non-support Qs and comments, please advise.
   i don’t want to be an annoyance, but i really enjoy learning about programming,
   php and WP using GP theme.
 * thank you, L

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wp_body_open-and-phpcsignore-notation/#post-13742785)
 * Hi there,
 * We opted to simply include the action instead of checking for the existence of
   the function.
 * As you can see here, the function simply calls the action like we do: [https://developer.wordpress.org/reference/functions/wp_body_open/](https://developer.wordpress.org/reference/functions/wp_body_open/)
 * We may change this in the future, but for now this works great.
 * The `phpcs:ignore` comment is necessary as phpcs will output an error if a hook
   is present without the theme prefix (`generate_`).
 * In this case, it’s the correct usage of `phpcs:ignore`.
 * Hope this helps!
 *  Thread Starter [sprowt](https://wordpress.org/support/users/sprowt/)
 * (@sprowt)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wp_body_open-and-phpcsignore-notation/#post-13743216)
 * got it, thank you, Tom <3
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wp_body_open-and-phpcsignore-notation/#post-13746817)
 * No problem! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

 The topic ‘wp_body_open and //phpcs:ignore notation’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

## Tags

 * [wordpress 5.2](https://wordpress.org/support/topic-tag/wordpress-5-2/)
 * [wp_body_open](https://wordpress.org/support/topic-tag/wp_body_open/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tom](https://wordpress.org/support/users/edge22/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/wp_body_open-and-phpcsignore-notation/#post-13746817)
 * Status: resolved