Changeset 34242
- Timestamp:
- 09/16/2015 03:46:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-functions.php
r34240 r34242 985 985 global $wp_post_types, $wp_rewrite, $wp; 986 986 987 if ( ! is_array( $wp_post_types ) ) 987 if ( ! is_array( $wp_post_types ) ) { 988 988 $wp_post_types = array(); 989 } 990 991 // Sanitize post type name 992 $post_type = sanitize_key( $post_type ); 993 994 if ( empty( $args['_builtin'] ) ) { 995 /** 996 * Filter the arguments for registering a post type. 997 * 998 * Not available for built-in post types. 999 * 1000 * @since 4.4.0 1001 * 1002 * @param array|string $args Array or string of arguments for registering a post type. 1003 * @param string $post_type Post type key. 1004 */ 1005 $args = apply_filters( 'register_post_type_args', $args, $post_type ); 1006 } 989 1007 990 1008 // Args prefixed with an underscore are reserved for internal use. … … 1019 1037 $args = (object) $args; 1020 1038 1021 $post_type = sanitize_key( $post_type );1022 1039 $args->name = $post_type; 1023 1040
Note: See TracChangeset
for help on using the changeset viewer.