Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: comments_open

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1320
1321      /**
1322       * Filters whether the current post is open for comments.
1323       *
1324       * @since 2.5.0
1325       *
1326       * @param bool $comments_open Whether the current post is open for comments.
1327       * @param int  $post_id       The post ID.
1328       */
1329      return apply_filters( 'comments_open', $comments_open, $post_id );
1330 }
1331
1332 /**
1333  * Determines whether the current post is open for pings.
1334  *
1335  * For more information on this and similar theme functions, check out
1336  * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
1337  * Conditional Tags} article in the Theme Developer Handbook.
1338  *