cp_recognized_relationship_objects()
Specifies the names of objects that will be stored in the object-relationships table.
Return
(array) $objects Filtered array of recognized relationship objects.
Source
File: wp-includes/object-relationships.php
function cp_recognized_relationship_objects() {
// Names of post types (including custom post types).
$post_types = get_post_types();
// Names of taxonomies (including custom taxonomies).
$taxonomies = get_taxonomies();
// Merge arrays and add comments, users, and thumbnails.
$objects = array_merge( $post_types, $taxonomies );
$objects['comment'] = 'comment';
$objects['user'] = 'user';
$objects['thumbnail'] = 'thumbnail';
/**
* Filter enabling modification of the list of recognized relationship objects.
*
* @since CP-2.2.0
*
* @param array $objects Default array of recognized relationship objects.
*
* @return array $objects Filtered array of recognized relationship objects.
*/
return apply_filters( 'recognized_relationship_objects', $objects );
}
Changelog
Version | Description |
---|---|
CP-2.2.0 | Introduced. CP-2.2.0 |