Upgarded to 4.17.4

This commit is contained in:
2022-06-23 13:17:18 +01:00
parent 80f1e87db9
commit a04fb0c7af
404 changed files with 54683 additions and 4417 deletions

View File

@ -29,10 +29,11 @@ trait PageContentRetriever {
* If $post is not given, It then uses global $post if available.
*
* @since 4.11.0
* @since 4.14.5 Return empty string on failure instead of null.
*
* @param WP_Post|int $post Optional. WP_Post instance or Post ID. Default null.
*
* @return null|string null on failure, string on success.
* @return string Empty string on failure.
*/
public function get_entire_page_content( $post = null ) {
@ -52,8 +53,10 @@ trait PageContentRetriever {
$wp_post = \WP_Post::get_instance( $post );
}
// Return empty string on failure because the return value is mostly used along with
// PHP PCRE or String functions that require non-nullable value.
if ( ! $wp_post ) {
return null;
return '';
}
/**