WordPress.org

Make WordPress Core

Changeset 37882


Ignore:
Timestamp:
06/28/2016 06:26:40 AM (3 years ago)
Author:
DrewAPicture
Message:

Docs: Improve the usefulness, accuracy, and syntax of the register_post_type() DocBlock summary and description.

See #32246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r37857 r37882  
    883883
    884884/**
    885  * Register a post type. Do not use before init.
    886  *
    887  * A function for creating or modifying a post type based on the
    888  * parameters given. The function will accept an array (second optional
    889  * parameter), along with a string for the post type name.
     885 * Registers a post type.
     886 *
     887 * Note: Post type registrations should not be hooked before the
     888 * {@see 'init'} action. Also, any taxonomy connections should be
     889 * registered via the `$taxonomies` argument to ensure consistency
     890 * when hooks such as {@see 'parse_query'} or {@see 'pre_get_posts'}
     891 * are used.
     892 *
     893 * Post types can support any number of built-in core features such
     894 * as meta boxes, custom fields, post thumbnails, post statuses,
     895 * comments, and more. See the `$supports` argument for a complete
     896 * list of supported features.
    890897 *
    891898 * @since 2.9.0
Note: See TracChangeset for help on using the changeset viewer.