Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentytwenty_disallowed_post_types_for_meta_output

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
235      /**
236       * Filters post types array
237       *
238       * This filter can be used to hide post meta information of post, page or custom post type registerd by child themes or plugins
239       *
240       * @since 1.0.0
241       *
242       * @param array Array of post types
243       */
244      $disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) );
245      // Check whether the post type is allowed to output post meta.
246      if ( in_array( get_post_type( $post_id ), $disallowed_post_types, true ) ) {
247           return;
248      }
249
250      $post_meta_wrapper_classes = '';
251      $post_meta_classes         = '';
252
253      // Get the post meta settings for the location specified.