function __construct() { new fireInit(); new chat_admin_menu(); $template = new _chatroom_tpl(); $shortcode = new chatroom_shortcode(); $template->__init(); $shortcode->__init(); self::wp_hooks(); }
function do_chat_room($atts) { $args = shortcode_atts(array('id' => ''), $atts); fire_chat()->load_scripts(); $template = new _chatroom_tpl(); if ('' === $args['id']) { return '<p>post_id must be set in shortcode to display chat room</p>'; } $content = '<div ng-app="chat_app" ng-controller="chat_controller" ng-init="startChat(' . absint($args['id']) . ')">'; $content .= $template->get_template(); $content .= '</div>'; return $content; }