{"id":995,"date":"2018-06-12T08:53:35","date_gmt":"2018-06-12T08:53:35","guid":{"rendered":"https:\/\/buddydev.com\/docs\/?p=995"},"modified":"2018-07-04T09:54:50","modified_gmt":"2018-07-04T09:54:50","slug":"architecture","status":"publish","type":"post","link":"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/","title":{"rendered":"Architecture"},"content":{"rendered":"<div class='ui-sc ui-info-message'><p> This document is aimed at developers. If you are not a developer, you can skip it safely<\/p><\/div>\n<p>BuddyPress Moderation tools is a modular plugin. At the core of the plugin is the concept of reportable types. A content which can be reported belongs to a reportable type.<\/p>\n<p>A developer can register new reportable types(dev docs coming in future) easily.<\/p>\n<p>At the moment, the plugin comes with following <strong>reportable types<\/strong><\/p>\n<ul>\n<li><strong>User<\/strong>:- BuddyPress User can be reported for abuse and moderated.<\/li>\n<li><strong>BuddyPress Activity<\/strong>:- BuddyPress Activities can be reported for abuse and moderated.<\/li>\n<li><strong>BuddyPress Activity Reply<\/strong>:- BuddyPress Activity Replies can be reported for abuse and moderated by the admin.<\/li>\n<li><strong>BuddyPress Groups<\/strong>:- A BuddPress group can be reported for abuse and can be moderated for the<\/li>\n<\/ul>\n<p>Upcoming Types:-<\/p>\n<ul>\n<li>WordPress Post:- Allow posts by BuddyPress Community to be repored for abuse and moderated.<\/li>\n<li>WordPress Comments:- Allow comments on WordPress posts to be reported for abuse.<\/li>\n<\/ul>\n<p>See notes if you are looking for a solution for MediaPress or User avatar moderation.<\/p>\n<p>When a reportable type is registered, admins can select to keep them active of deactivate them. These registered types are listed .<\/p>\n<p>The process of registering a new type involves<\/p>\n<ul>\n<li>Extending <strong>PressThemes\\ModerationTools\\Reportable_Type class <\/strong>and specifying a type\/label in that class.<\/li>\n<li>If you need to provide admin settings, you can specify using our Settings API<\/li>\n<li>Provide Action handler for sending emails on various report actions if needed<\/li>\n<li>Provide a UI Helper to help put the button somewhere.<\/li>\n<li>Also, we have organized these into a well structured patter and you can check it in the reportable-types directory on how we have implemented the core types.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Notes:-<\/p>\n<ul>\n<li><a href=\"https:\/\/buddydev.com\/plugins\/media-moderator-for-mediapress\/\">MediaPress Moderation<\/a><\/li>\n<li><a href=\"https:\/\/buddydev.com\/plugins\/buddypress-avatar-moderator\/\">BuddyPress User Avatar Moderator<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BuddyPress Moderation tools is a modular plugin. At the core of the plugin is the concept of reportable types. A content which can be reported belongs to a reportable type. A developer can register new reportable types(dev docs coming in future) easily. At the moment, the plugin comes with following reportable types User:- BuddyPress User &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9314],"tags":[],"class_list":["clearfix","post-995","post","type-post","status-publish","format-standard","hentry","category-buddypress-moderation-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Architecture &#8226; BuddyDev Help Center<\/title>\n<meta name=\"description\" content=\"Architecture of BuddyPress Moderation Tools. How to register new content types for BuddyPress Moderation. Inside look into how the report abuse works for BuddyPress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Architecture &#8226; BuddyDev Help Center\" \/>\n<meta property=\"og:description\" content=\"Architecture of BuddyPress Moderation Tools. How to register new content types for BuddyPress Moderation. Inside look into how the report abuse works for BuddyPress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/\" \/>\n<meta property=\"og:site_name\" content=\"BuddyDev Help Center\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-12T08:53:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-07-04T09:54:50+00:00\" \/>\n<meta name=\"author\" content=\"Brajesh Singh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brajesh Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/\",\"url\":\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/\",\"name\":\"Architecture &#8226; BuddyDev Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#website\"},\"datePublished\":\"2018-06-12T08:53:35+00:00\",\"dateModified\":\"2018-07-04T09:54:50+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"description\":\"Architecture of BuddyPress Moderation Tools. How to register new content types for BuddyPress Moderation. Inside look into how the report abuse works for BuddyPress.\",\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Architecture\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/buddydev.com\/docs\/#website\",\"url\":\"https:\/\/buddydev.com\/docs\/\",\"name\":\"BuddyDev Help Center\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/buddydev.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\",\"name\":\"Brajesh Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"caption\":\"Brajesh Singh\"},\"sameAs\":[\"http:\/\/buddydev.com\/members\/sbrajesh\/\",\"https:\/\/x.com\/sbrajesh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Architecture &#8226; BuddyDev Help Center","description":"Architecture of BuddyPress Moderation Tools. How to register new content types for BuddyPress Moderation. Inside look into how the report abuse works for BuddyPress.","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:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/","og_locale":"en_US","og_type":"article","og_title":"Architecture &#8226; BuddyDev Help Center","og_description":"Architecture of BuddyPress Moderation Tools. How to register new content types for BuddyPress Moderation. Inside look into how the report abuse works for BuddyPress.","og_url":"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/","og_site_name":"BuddyDev Help Center","article_published_time":"2018-06-12T08:53:35+00:00","article_modified_time":"2018-07-04T09:54:50+00:00","author":"Brajesh Singh","twitter_misc":{"Written by":"Brajesh Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/","url":"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/","name":"Architecture &#8226; BuddyDev Help Center","isPartOf":{"@id":"https:\/\/buddydev.com\/docs\/#website"},"datePublished":"2018-06-12T08:53:35+00:00","dateModified":"2018-07-04T09:54:50+00:00","author":{"@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"description":"Architecture of BuddyPress Moderation Tools. How to register new content types for BuddyPress Moderation. Inside look into how the report abuse works for BuddyPress.","breadcrumb":{"@id":"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/docs\/buddypress-moderation-tools\/architecture\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/docs\/"},{"@type":"ListItem","position":2,"name":"Architecture"}]},{"@type":"WebSite","@id":"https:\/\/buddydev.com\/docs\/#website","url":"https:\/\/buddydev.com\/docs\/","name":"BuddyDev Help Center","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buddydev.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb","name":"Brajesh Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","contentUrl":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","caption":"Brajesh Singh"},"sameAs":["http:\/\/buddydev.com\/members\/sbrajesh\/","https:\/\/x.com\/sbrajesh"]}]}},"_links":{"self":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/comments?post=995"}],"version-history":[{"count":6,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/995\/revisions"}],"predecessor-version":[{"id":1118,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/995\/revisions\/1118"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/categories?post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/tags?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}