wpdreams / ajax-search-pro-development

Issues and dev tracking repository for Ajax Search Pro for WordPress plugin
0 stars 0 forks source link

Advanced Title and Content Fields WP_Post and Object detection #93

Closed ernestmarcinko closed 4 months ago

ernestmarcinko commented 4 months ago

Describe the bug

While currently the is_post_id attribute is to indicate if a primitive numeric value should be used as an ID to a post type object, actual Objects (of WP_Post and derivates) and arrays of said objects are not properly detected and handled.

When an array of Objects with ID field or an Object with ID field is passed to the field parser they are not properly recognized.

Reference ticket.

Expected behavior

Objects containing and ID field as well as arrays of these objects (even nested) should be parsed and the get_the_title(ID) should be returned as the value.