Is there any reason why some of WP’s functions start with wp_get_… and some functions start with get_…?

[ad_1]

Hi

I was just wondering if there is any reason or difference why there are `get_…` functions like `get_the_title()` and also `wp_get_…` like `wp_get_post_parent_id()`

Thanks

[ad_2]
1 Comment
  1. Most likely it is due to correcting a shortcoming of legacy code. The `wp_` prefixed code is from the “modern” era of WordPress code, where the `wp_` prefix is used to signal a core WP function. For reference `get_the_title()` is from v0.71.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer