Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: register_post_type_args

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
1008
1009      /**
1010       * Filter the arguments for registering a post type.
1011       *
1012       * @since 4.4.0
1013       *
1014       * @param array  $args      Array of arguments for registering a post type.
1015       * @param string $post_type Post type key.
1016       */
1017      $args = apply_filters( 'register_post_type_args', $args, $post_type );
1018
1019      $has_edit_link = ! empty( $args['_edit_link'] );
1020
1021      // Args prefixed with an underscore are reserved for internal use.
1022      $defaults = array(
1023           'labels'               => array(),
1024           'description'          => '',
1025           'public'               => false,
1026           'hierarchical'         => false,