That sounds like a great idea. It’s not something the plugin can do currently (it’s designed for frontend use), but I’ll take a closer look and see what would be required to include a chat box anywhere in the Admin Area. Thank you for the idea, @heisel. Let me know if any further feedback, questions, etc. Glad to help anytime.
Thread Starter
heisel
(@heisel)
Thanks for the positive response. Very happy to hear!
One solution I looked into was creating a meta box and populate it with the PHP code. This almost works, but you can’t post any messages as i think the submit button clashes with the ‘core’ submit button, so it submits the actual page rather than the message.
I used this code to test:
function add_custom_meta_box()
{
add_meta_box(“demo-meta-box”, “Custom Meta Box”, “custom_meta_box_markup”, “post”, “side”, “high”, null);
}
add_action(“add_meta_boxes”, “add_custom_meta_box”);
function custom_meta_box_markup($object)
{
wp_nonce_field(basename(__FILE__), “meta-box-nonce”);
?>
<?php if (function_exists(‘simple_ajax_chat’)) simple_ajax_chat(); ?>
<?php
}
Hmm interesting approach, probably would be a lot more complicated to get it to work. Are you using the Gutenberg/block editor or classic editor?
Thread Starter
heisel
(@heisel)
For this instance, I am using the classic editor (have opted for that one to make a more consistent editorial flow for the editors). Have not tested with gutenberg.
Ok thanks. Gutenberg probably would require even more code to make it work, assuming it’s possible to go the meta box route.