This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following code snippet to the PHP section in the MainWP Custom Dashbaord plugin | |
add_filter( 'mainwp_updatescheck_sendmail_at_time', 'mycustom_mainwp_updatescheck_sendmail_at_time', 10, 1 ); | |
function myhook_mainwp_updatescheck_sendmail_at_time( $hour ) { | |
$hour = '12:00'; // send email notifactions after 12:00 | |
return $hour; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following code snippet to the PHP section of the MainWP Custom Dashboard Extension, | |
// or the functions.php file of the active theme on your Dashboard site. | |
add_filter( 'mainwp_comments_widget_limit_string', 'mycustom_mainwp_comments_widget_limit_string', 10, 1 ); | |
function mycustom_mainwp_comments_widget_limit_string( $length = false ) { | |
return 99999; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following code snippet to the PHP section of the MainWP Custom Dashboard Extension, | |
// or the functions.php file of the active theme on your Dashboard site. | |
add_filter( 'mainwp_updatescheck_disable_sendmail', 'mycustom_mainwp_updatescheck_disable_sendmail', 10, 1 ); | |
function mycustom_mainwp_updatescheck_disable_sendmail( $input ) { | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following code snippet to the functions.php file of the MainWP Customisations plugin | |
// Download MainWP Customisations here: https://github.com/mainwp/mainwp-customisations | |
// More about the plugin: https://mainwp.com/mainwp-customisations/ | |
// Create Custom Client Report tokens | |
add_filter( 'mainwp_client_reports_tokens_groups', 'mycustom_reports_tokens_groups' ); | |
function mycustom_reports_tokens_groups( $tokens ) { | |
// examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following code snippet to the PHP section of the MainWP Custom Dashboard Extension | |
add_filter( 'mainwp_client_reports_newline_break', 'mycustom_client_reports_newline_break', 10, 1 ); | |
function mycustom_client_reports_newline_break( $value ){ | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Hide custom branidng for the user with specific ID | |
// Replace ID with actual ID number | |
add_filter( 'mainwp_child_branding_init_options', 'mycustom_mainwp_child_branding_init_options' ); | |
function mycustom_mainwp_child_branding_init_options( $option ) { | |
$current_user_id = get_current_user_id(); | |
if ( $current_user_id == 'ID' && is_array( $option ) && isset( $option[ 'cancelled_branding' ] ) ) { | |
$option[ 'cancelled_branding' ] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following code snippet to the functions.php file of the MainWP Customisations plugin | |
// Download MainWP Customisations here: https://github.com/mainwp/mainwp-customisations | |
// More about the plugin: https://mainwp.com/mainwp-customisations/ | |
add_filter( 'mainwp_client_report_pdf_page_format', 'mycustom_pdf_page_format', 10 , 1 ); | |
function mycustom_pdf_page_format( $format = '' ) { | |
return 'A4'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Available parameters: url, name, wpadmin, unique_id, groupids, ssl_verify, ssl_version, http_user, http_pass | |
$params = array( | |
'url' => 'demosite.com', | |
'name' => 'Site Friendly Name', | |
'wpadmin' => 'adminusername', | |
'unique_id' => 'unique_id' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'mainwp_manage_sites_edit', 'myhook_mainwp_manage_sites_edit', 10, 1 ); | |
function myhook_mainwp_manage_sites_edit( $website ) { | |
$myvalue = apply_filters( 'mainwp_getwebsiteoptions', false, $website, 'my_site_value' ); | |
?> | |
<div class="ui grid field"> | |
<label class="six wide column middle aligned"><?php esc_html_e( 'My Value', 'mainwp' ); ?></label> | |
<div class="ui six wide column" data-tooltip="<?php esc_attr_e( 'My Value', 'mainwp' ); ?>" data-inverted="" data-position="top left"> | |
<div class="ui left labeled input"> | |
<input type="text" id="mainwp_managesites_edit_my_value" name="mainwp_managesites_edit_my_value" value="<?php echo esc_html($myvalue); ?>"/> | |
</div> |