Skip to Content

always_get_post_custom()

Always get custom fields with post queries.

PHP April 26, 2017

Usage

This function runs automatically, so it is not called manually. Is this incorrect?

Source File

Located in /libs/Functions.php on line 2259.

No Hooks

This function does not have any filters or actions available. Request one?
PHP
    public function always_get_post_custom($posts){
        $posts_count = count($posts);
        for ( $i = 0; $i < $posts_count; $i++ ){
            $custom_fields = get_post_custom($posts[$i]->ID);
            $posts[$i]->custom_fields = $custom_fields;
        }
        return $posts;
    }

Override

This function can not be short-circuited with an override filter. Request one?