{"id":172,"date":"2015-10-07T08:05:25","date_gmt":"2015-10-07T08:05:25","guid":{"rendered":"http:\/\/buddydev.com\/docs\/?p=172"},"modified":"2016-08-03T02:03:56","modified_gmt":"2016-08-03T02:03:56","slug":"customizing-buddypress-message-privacy-default-settings","status":"publish","type":"post","link":"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/","title":{"rendered":"Customizing BuddyPress message Privacy Default settings"},"content":{"rendered":"<p>By default, the<a title=\"Link to BuddyPress message privacy plugin\" href=\"https:\/\/buddydev.com\/plugins\/buddypress-message-privacy\/\"> BuddyPress Message Privacy<\/a> plugin sets the privacy type to everyone. If you want to modify\u00a0the default settings for the BuddyPress message privacy plugin and set the privacy or default banned list, allowed list, you can do that easily by putting this code in your theme&#8217;s functions.php or the bp-custom.php.<\/p>\n<p>The following code changes the default message privacy to friends only.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:php decode:true \">\/\/change default settings\r\nfunction bpdm_change_default_settings( $settings ) {\r\n\t\/**\r\n\t * 'privacy_type'\t=&gt; 'everyone',\r\n\t * 'allowed_users'\t=&gt; '',\r\n\t * 'banned_users'\t=&gt; ''\r\n\t *\/\r\n\t\r\n\t$settings['privacy_type'] = 'friends_only';\r\n\t\r\n\treturn $settings;\r\n\t\r\n}\r\n\r\nadd_filter( 'bpdmp_default_settings', 'bpdm_change_default_settings' );<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, the BuddyPress Message Privacy plugin sets the privacy type to everyone. If you want to modify\u00a0the default settings for the BuddyPress message privacy plugin and set the privacy or default banned list, allowed list, you can do that easily by putting this code in your theme&#8217;s functions.php or the bp-custom.php. The following code &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5698],"tags":[],"class_list":["clearfix","post-172","post","type-post","status-publish","format-standard","hentry","category-buddypress-message-privacy"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Customizing BuddyPress message Privacy Default settings &#8226; BuddyDev Help Center<\/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:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customizing BuddyPress message Privacy Default settings &#8226; BuddyDev Help Center\" \/>\n<meta property=\"og:description\" content=\"By default, the BuddyPress Message Privacy plugin sets the privacy type to everyone. If you want to modify\u00a0the default settings for the BuddyPress message privacy plugin and set the privacy or default banned list, allowed list, you can do that easily by putting this code in your theme&#8217;s functions.php or the bp-custom.php. The following code ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/\" \/>\n<meta property=\"og:site_name\" content=\"BuddyDev Help Center\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-07T08:05:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-08-03T02:03:56+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-message-privacy\/customizing-buddypress-message-privacy-default-settings\/\",\"url\":\"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/\",\"name\":\"Customizing BuddyPress message Privacy Default settings &#8226; BuddyDev Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#website\"},\"datePublished\":\"2015-10-07T08:05:25+00:00\",\"dateModified\":\"2016-08-03T02:03:56+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customizing BuddyPress message Privacy Default settings\"}]},{\"@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":"Customizing BuddyPress message Privacy Default settings &#8226; BuddyDev Help Center","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-message-privacy\/customizing-buddypress-message-privacy-default-settings\/","og_locale":"en_US","og_type":"article","og_title":"Customizing BuddyPress message Privacy Default settings &#8226; BuddyDev Help Center","og_description":"By default, the BuddyPress Message Privacy plugin sets the privacy type to everyone. If you want to modify\u00a0the default settings for the BuddyPress message privacy plugin and set the privacy or default banned list, allowed list, you can do that easily by putting this code in your theme&#8217;s functions.php or the bp-custom.php. The following code ...","og_url":"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/","og_site_name":"BuddyDev Help Center","article_published_time":"2015-10-07T08:05:25+00:00","article_modified_time":"2016-08-03T02:03:56+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-message-privacy\/customizing-buddypress-message-privacy-default-settings\/","url":"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/","name":"Customizing BuddyPress message Privacy Default settings &#8226; BuddyDev Help Center","isPartOf":{"@id":"https:\/\/buddydev.com\/docs\/#website"},"datePublished":"2015-10-07T08:05:25+00:00","dateModified":"2016-08-03T02:03:56+00:00","author":{"@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"breadcrumb":{"@id":"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/docs\/buddypress-message-privacy\/customizing-buddypress-message-privacy-default-settings\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/docs\/"},{"@type":"ListItem","position":2,"name":"Customizing BuddyPress message Privacy Default settings"}]},{"@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\/172","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=172"}],"version-history":[{"count":3,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"predecessor-version":[{"id":243,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/172\/revisions\/243"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}