troyward
Member
Posted 3 months ago #
I am trying to add document feedback prompt to posts. I know there is a filter for that so I am trying to apply that filter using this in my theme's functions.php file but it is not working. I think I am using the wrong syntax, can you please provide an example of how to add posts?
$feedback_post_types = array(
'post',
'page',
);
apply_filters('document_feedback_post_types', $feedback_post_types);
http://wordpress.org/extend/plugins/document-feedback/
The apply_filters is used for 'applying' added filters, so you need to add a callback function with add_filter that returns your post types, more specifically:
function your_document_feedback_post_types( $post_types ) {
$feedback_post_types = array(
'post',
'page',
);
return $feedback_post_types;
}
add_filter( 'document_feedback_post_types', 'your_document_feedback_post_types' );