Skip to content

Instantly share code, notes, and snippets.

View bogdan-mainwp's full-sized avatar

Bogdan Rapaić bogdan-mainwp

View GitHub Profile
@bogdan-mainwp
bogdan-mainwp / branding-support-form.php
Created September 19, 2018 11:16
Enable MainWP Branding - Support Form for all or specific roles on child sites
<?php
// Add one of the following code snippet to the functions.php file of the active theme of your child site(s).
// Enable Support form for all roles
add_filter( 'mainwp_branding_role_cap_enable_contact_form', 'mycustom_mainwp_branding_role_cap_enable_contact_form' );
function mycustom_mainwp_branding_role_cap_enable_contact_form( $input = false ) {
return true;
}
@bogdan-mainwp
bogdan-mainwp / disable-wordfence-privacy-policy-change-notification.php
Created May 23, 2018 16:54
Custom snippet for the MainWP Code Snippets Extension that can be used for disabling the Privacy Policy change notification introduced in the recent Wordfence plugin update.
<?php
// Use this snippet in the MainWP Code Snippets Extension (https://mainwp.com/extension/code-snippets/)
// Snippet Type: This Code Snippet only returns information from Child Site
wfConfig::set('touppPromptNeeded', 0);
// To reverse the update, use wfConfig::set('touppPromptNeeded', 1);