Example #1
0
/**
 * Creates and retrives an new post report object from a comment array
 *
 * @param object $comment The WP_Comment_Query array that will be used as the report object
 * @param array $args (optional) Additional optional params to be passed to the report object.
 *        Expects user ($args['user_meta']) or post meta ($args['post_meta']) as associative arrays.
 *        Meta passed trough 'user_meta' is stored in the reporter user meta and the 'post_meta' in the post meta for the post being reported
 *
 * @return object The report object
 */
function appthemes_create_report($comment, $args = array())
{
    return APP_Report_Factory::create_post_report($comment, $args);
}