add_filter and AP extra fields
-
My website uses a function to add buttons for thumbs up/down rating by inserting the button HTML with this filter:
add_filter('the_content', 'thumbs_rating_print')This filter is also adding the rating HTML to the AP Extra Fields items, after the content. It looks like this in the ActivityPub Blog Profile panel:
https://cutetropolis.com/wp-content/uploads/2025/12/Screenshot-from-2025-12-19-18-37-45.jpg
I need to modify the
thumbs_rating_printfunction to detect if the post is an Extra Fields item and prevent the buttons from being inserted. I noticed that the post type of Extra Fields items isap_extrafield_blogbut I don’t know how to use this information. Does anyone know what I should do?The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.