{"id":9199,"date":"2021-01-12T14:12:36","date_gmt":"2021-01-12T14:12:36","guid":{"rendered":"https:\/\/www.rumbletalk.com\/blog\/?post_type=epkb_post_type_1&#038;p=9199"},"modified":"2024-10-22T06:04:01","modified_gmt":"2024-10-22T06:04:01","slug":"wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in","status":"publish","type":"epkb_post_type_1","link":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/","title":{"rendered":"WordPress: Modifying the data sent to the chat by the plug-in"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/rumbletalk-chat-a-chat-with-themes\/\">RumbleTalk WordPress plug-in<\/a> is using the WP <strong>apply_filters<\/strong> function with the \u201c<strong>rumbletalk_login_args<\/strong>\u201d tag.<\/p>\n\n\n\n<p>This means you can add filters using the WP <strong>add_filter<\/strong> function to modify the data sent to your RumbleTalk chat when automatically logging users into your chat.<br><\/p>\n\n\n\n<p>You do so by adding a filter like this:<\/p>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background\">add_filter(&#8216;rumbletalk_login_args&#8217;, &#8216;your_callback&#8217;);<br><\/p>\n\n\n\n<p>Where \u2018your_callback\u2019 is the name of your modifying function.<\/p>\n\n\n\n<p>e.g.<\/p>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background\">function your_callback($loginInfo) {<br>&nbsp;&nbsp;$loginInfo[\u2018username\u2019] = \u2018My Site: \u2018 . $loginInfo[\u2018username\u2019];<br>&nbsp;&nbsp;return $loginInfo;<br>}<\/p>\n\n\n\n<p>This example will prefix your user names with the string &#8220;My Site: &#8220;<br>e.g. for the user &#8220;Joe&#8221;, the username &#8220;My Site: Joe&#8221; will be passed.<br><\/p>\n\n\n\n<p>Currently, you can modify the following items:<\/p>\n\n\n\n<ul>\n<li><strong>username <\/strong>&#8211; string: the username (fetched using the WP function wp_get_current_user and get_the_author_meta)<\/li>\n\n\n\n<li><strong>password <\/strong>&#8211; string: defaults to being empty but can be set to the chat user\u2019s RumbleTalk password for a more secure integration where the guest login option is disabled<\/li>\n\n\n\n<li><strong>forceLogin <\/strong>&#8211; boolean: whether or not to execute a logout function before the log in function (this can also be configured in the plug-in settings page)<\/li>\n\n\n\n<li><strong>image <\/strong>&#8211; string: the user\u2019s avatar (defaults to the users WP avatar fetched using the WP function get_avatar_url)<\/li>\n\n\n\n<li><strong>hash <\/strong>&#8211; string: the room your user is logging into (you most likely should not modify this value)<\/li>\n<\/ul>\n\n\n\n<p>For more information, refer to our latest WordPress plugin <a href=\"https:\/\/wordpress.org\/plugins\/rumbletalk-chat-a-chat-with-themes\/\">WP plug-in<\/a>.<\/p>\n\n\n\n<p>See the <strong>includes\/class-rumbletalk.php<\/strong> file for the full process.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress: Modifying the data sent to the chat by the plug-in &#8211; online group chat for web site<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"epkb_post_type_1_category":[339],"epkb_post_type_1_tag":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress: Modifying the data sent to the chat by the plug-in - Online Group Chat Room Plugin for Websites and Live events<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress: Modifying the data sent to the chat by the plug-in - Online Group Chat Room Plugin for Websites and Live events\" \/>\n<meta property=\"og:description\" content=\"WordPress: Modifying the data sent to the chat by the plug-in - online group chat for web site\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/\" \/>\n<meta property=\"og:site_name\" content=\"Online Group Chat Room Plugin for Websites and Live events\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/rumbletalk\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-22T06:04:01+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@rumbletalk\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/\",\"url\":\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/\",\"name\":\"WordPress: Modifying the data sent to the chat by the plug-in - Online Group Chat Room Plugin for Websites and Live events\",\"isPartOf\":{\"@id\":\"https:\/\/rumbletalk.com\/blog\/#website\"},\"datePublished\":\"2021-01-12T14:12:36+00:00\",\"dateModified\":\"2024-10-22T06:04:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rumbletalk.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress: Modifying the data sent to the chat by the plug-in\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rumbletalk.com\/blog\/#website\",\"url\":\"https:\/\/rumbletalk.com\/blog\/\",\"name\":\"Online Group Chat Plugin for Websites and Event\",\"description\":\"Embed a social group chat for communities and events. Grow your online audience with the next evolution of HTML chat room. Attach files, Mobile, Audio and Video calls.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rumbletalk.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/rumbletalk.com\/blog\/#\/schema\/person\/53a763b494aec8f004846c17ae8d90c3\",\"name\":\"Mary Alice\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rumbletalk.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/96b1fbff01b496d6a7d82bba8a4738f7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/96b1fbff01b496d6a7d82bba8a4738f7?s=96&d=mm&r=g\",\"caption\":\"Mary Alice\"},\"url\":\"https:\/\/rumbletalk.com\/blog\/index.php\/author\/mary-alice\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress: Modifying the data sent to the chat by the plug-in - Online Group Chat Room Plugin for Websites and Live events","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/","og_locale":"en_US","og_type":"article","og_title":"WordPress: Modifying the data sent to the chat by the plug-in - Online Group Chat Room Plugin for Websites and Live events","og_description":"WordPress: Modifying the data sent to the chat by the plug-in - online group chat for web site","og_url":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/","og_site_name":"Online Group Chat Room Plugin for Websites and Live events","article_publisher":"https:\/\/www.facebook.com\/rumbletalk","article_modified_time":"2024-10-22T06:04:01+00:00","twitter_card":"summary_large_image","twitter_site":"@rumbletalk","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/","url":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/","name":"WordPress: Modifying the data sent to the chat by the plug-in - Online Group Chat Room Plugin for Websites and Live events","isPartOf":{"@id":"https:\/\/rumbletalk.com\/blog\/#website"},"datePublished":"2021-01-12T14:12:36+00:00","dateModified":"2024-10-22T06:04:01+00:00","breadcrumb":{"@id":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rumbletalk.com\/blog\/index.php\/knowledge-base\/wordpress-modifying-the-data-sent-to-the-chat-by-the-plug-in\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rumbletalk.com\/blog\/"},{"@type":"ListItem","position":2,"name":"WordPress: Modifying the data sent to the chat by the plug-in"}]},{"@type":"WebSite","@id":"https:\/\/rumbletalk.com\/blog\/#website","url":"https:\/\/rumbletalk.com\/blog\/","name":"Online Group Chat Plugin for Websites and Event","description":"Embed a social group chat for communities and events. Grow your online audience with the next evolution of HTML chat room. Attach files, Mobile, Audio and Video calls.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rumbletalk.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/rumbletalk.com\/blog\/#\/schema\/person\/53a763b494aec8f004846c17ae8d90c3","name":"Mary Alice","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rumbletalk.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/96b1fbff01b496d6a7d82bba8a4738f7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/96b1fbff01b496d6a7d82bba8a4738f7?s=96&d=mm&r=g","caption":"Mary Alice"},"url":"https:\/\/rumbletalk.com\/blog\/index.php\/author\/mary-alice\/"}]}},"_links":{"self":[{"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/epkb_post_type_1\/9199"}],"collection":[{"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/epkb_post_type_1"}],"about":[{"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/epkb_post_type_1"}],"author":[{"embeddable":true,"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=9199"}],"version-history":[{"count":12,"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/epkb_post_type_1\/9199\/revisions"}],"predecessor-version":[{"id":15579,"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/epkb_post_type_1\/9199\/revisions\/15579"}],"wp:attachment":[{"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=9199"}],"wp:term":[{"taxonomy":"epkb_post_type_1_category","embeddable":true,"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/epkb_post_type_1_category?post=9199"},{"taxonomy":"epkb_post_type_1_tag","embeddable":true,"href":"https:\/\/rumbletalk.com\/blog\/index.php\/wp-json\/wp\/v2\/epkb_post_type_1_tag?post=9199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}