• Resolved sanaconeltantra

    (@sanaconeltantra)


    Hi guys!
    Amazing plugin thank you.
    I just configured my multisite with Master template and central logging.
    I was wondering what is the best way to store the blog ID so that I can easily identify which sub sites generated a transaction in the global log?
    In your log structure here I can use :
    – ref_id : but I think it’d be better to have here the post_id of the blog which created the transaction
    – data : but it won’t show up in the admin log table view
    – entry : prepend [blog_id] to that field before giving more details

    I think I’ll go with the last option unless you suggest a better solution?
    It’d be cool in a future release to have a specific field blog_id in the log table for multisite config. That way we can filter easily on that field to check all the transaction of one subsite

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @sanaconeltantra,

    Thank you for contacting us, You can add the array in the data column.

    Thread Starter sanaconeltantra

    (@sanaconeltantra)

    Thank you for your answer but as I said the data info is not available in the admin view of the logs, is there a way to display it?

    Hi @sanaconeltantra,

    Please use the below-shared code also do let us know how is it working for you.

    function mycred_log_column_headers_func( $headers ) { 
    
    $headers['data'] = __( 'Data', 'mycred' );
    return $headers;
    }
    add_filter( 'mycred_log_column_headers', 'mycred_log_column_headers_func' );
    
    function mycred_log_data_func( $data, $log ) { 
    $unSerializeData = unserialize($log->data);
    
    return $unSerializeData['ref_type'];
    }
    add_filter( 'mycred_log_data', 'mycred_log_data_func', 10, 2 );

    Hi @sanaconeltantra ,

    Due to a lack of activity, we are going to mark this thread as resolved. If you have any other issues, please feel free to open a new thread.

    Have a great day!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Storing blog ID in multisite log table’ is closed to new replies.