{$attributes[ $metaFieldPropertyNameKey ]} ) ) { return $field->{$attributes[ $metaFieldPropertyNameKey ]}; } elseif ( is_object( $field ) ) { return ''; } return $field; } /** * Load the author custom fields. * * @param mixed $value The field value. * @param string $author_id The author id. * @param array $attributes The block attributes. * * @return mixed|string The field value. */ public static function load_author_acf_fields( $value, $author_id, $attributes ) { return self::load_acf_fields( $value, 'user_' . $author_id, $attributes ); } /** * Load the link custom field. * * @param mixed $value The field value. * @param string $id The object id. * @param array $attributes The block attributes. * * @return mixed|string The field value. */ public static function load_link_acf_fields( $value, $id, $attributes ) { return self::load_acf_fields( $value, $id, $attributes, 'linkMetaFieldName', 'linkMetaFieldPropertyName' ); } /** * Load the author link custom field. * * @param mixed $value The field value. * @param string $author_id The author id. * @param array $attributes The block attributes. * * @return mixed|string The field value. */ public static function load_author_link_acf_fields( $value, $author_id, $attributes ) { return self::load_acf_fields( $value, 'user_' . $author_id, $attributes, 'linkMetaFieldName', 'linkMetaFieldPropertyName' ); } } GenerateBlocks_Pro_Advanced_Custom_Fields::get_instance();