init
action using the flush_rewrite_rules
, but this is a mistake. It can lead to unexpected behaviours, and has a large negative performance impact. Rewrite rules are expensive to build.post
)page
)attachment
)revision
)nav_menu_item
)nav_menu_item
posts, however, the menu itself is a term in a custom taxonomy that contains nav_menu_item
posts.revision
, revisions are historical copies of posts, and are tied to their original post via the post_parent field. To get a posts revisions, grab all its children of type revision
. If a database is growing very large or a particular post/page is frequently/automatically edited, you can limit the number of revisions stored.attachment
, and are referred to by their post ID. For example, when you set a featured image on a post, it stores your chosen image's post ID in that post's meta (_thumbnail_id
).post_parent
field is set to that of the post.get_post_meta
get_comment_meta
register_post_type
register_taxonomy
add_role add_cap
WP_Query
WP_Comment_Query
get_terms
WP_User_Query
wp_get_sites
wp_get_sites
get_links
get_option
get_site_option
setup_postdata
wp_posts
wp_comments
wp_terms
wp_term_relationships
wp_term_taxonomy
wp_users
wp_blogs
wp_site
wp_links
wp_options
wp_site_options
wp_postmeta
wp_commentmeta
wp_usermeta
wp_options
wp_sitemeta