Initial Developer Docs

This commit is contained in:
Dennis Dornon 2025-03-18 16:29:31 -04:00
parent 25c8868cef
commit 718a119275
68 changed files with 56904 additions and 158 deletions

View file

@ -0,0 +1,24 @@
# API Integration Best Practices for MainWP Add-ons

*This guide is a placeholder and will be expanded in the future.*

This guide will cover best practices for integrating third-party APIs with MainWP add-ons, including:

- Security considerations for API keys and tokens
- Performance optimization for API requests
- Error handling and graceful degradation
- User experience design for API-dependent features
- Data synchronization strategies
- Handling API rate limits and quotas
- Implementing proper logging and debugging
- Testing API integrations
- Maintaining compatibility with API changes
- Documentation standards for API integrations

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic Integration](../how-to/create-basic-integration.md)
- [Working with Third-Party APIs](../how-to/third-party-apis.md)
- [Writing Clean & Maintainable Code](coding-standards.md)

View file

@ -0,0 +1,20 @@
# Writing Clean & Maintainable MainWP Code: Best Practices

*This guide is a placeholder and will be expanded in the future.*

This guide will cover best practices for writing clean, maintainable code for MainWP extensions, including:

- Following WordPress coding standards
- Proper documentation practices
- Error handling and logging
- Security best practices
- Performance optimization
- Code organization and structure

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic MainWP Extension](../how-to/create-basic-extension.md)
- [Using MainWP Actions & Filters](../how-to/actions-filters.md)
- [Extension Development Lifecycle](../concepts/extension-lifecycle.md)

View file

@ -0,0 +1,358 @@
# Add-on Development Lifecycle

This guide explains the lifecycle of a MainWP add-on (extension or integration), from initial concept to ongoing maintenance. Understanding this lifecycle will help you plan, develop, and maintain successful add-ons.

## Understanding MainWP Add-on Types

Before diving into the lifecycle, it's important to understand the terminology:

- **Add-on**: The umbrella term for all MainWP plugins that extend functionality
- **Extension**: An add-on that works WITHOUT requiring a third-party plugin or API
- **Integration**: An add-on that works WITH a third-party plugin or API

This guide applies to both extensions and integrations, with specific considerations noted where relevant.

## Overview

The MainWP add-on development lifecycle consists of several distinct phases:

```mermaid
flowchart TD
A[Planning] --> B[Development]
B --> C[Testing]
C --> D[Distribution]
D --> E[Maintenance]
E --> F[Updates]
F --> C
```

Each phase has specific goals, activities, and deliverables that contribute to creating a successful extension.

## 1. Planning Phase

The planning phase is where you define what your add-on will do and how it will work. This phase is critical for ensuring your add-on meets real user needs and integrates well with MainWP.

### Key Activities

1. **Market Research**: Identify user needs and potential competitors
2. **Feature Definition**: Determine the core functionality of your add-on
3. **Technical Assessment**: Evaluate technical feasibility and requirements
4. **Integration Planning**: Determine how your add-on will integrate with MainWP
5. **Resource Planning**: Estimate time, effort, and resources needed
6. **Add-on Type Decision**: Determine whether you need to build an extension or integration

For integrations, additional planning is required:
- Identify the third-party service or plugin you'll integrate with
- Research API documentation and requirements
- Evaluate authentication methods and security considerations
- Plan for handling API rate limits and service disruptions

### Deliverables

- Add-on concept document
- Feature list and prioritization
- Technical requirements document
- Development timeline
- Third-party API requirements (for integrations)

### Best Practices

- **Focus on Solving Real Problems**: Ensure your add-on addresses actual pain points for MainWP users
- **Start Small**: Begin with a core set of features that deliver value, then expand
- **Consider Integration Points**: Plan how your add-on will interact with MainWP Dashboard and Child sites
- **Research Existing Add-ons**: Understand what's already available to avoid duplication or identify partnership opportunities
- **Choose the Right Add-on Type**: Carefully consider whether you need an extension or integration based on your requirements
- **Plan for API Changes** (for integrations): Consider how you'll handle third-party API changes or service disruptions

## 2. Development Phase

The development phase is where you build your add-on, transforming your plans into working code.

### Key Activities

1. **Environment Setup**: Create a development environment with MainWP Dashboard and Child sites
2. **Architecture Design**: Design the structure and components of your add-on
3. **Coding**: Implement the add-on's functionality
4. **Documentation**: Create inline code documentation and user documentation
5. **Internal Testing**: Perform ongoing testing during development

For integrations, additional activities include:
- Implementing API client and authentication
- Creating fallback mechanisms for API failures
- Developing data synchronization between MainWP and the third-party service
- Implementing caching to reduce API calls

### Deliverables

- Working add-on code
- Technical documentation
- User documentation
- API client implementation (for integrations)

### Best Practices

- **Use the Development Extension**: Start with the [MainWP Development Extension](https://github.com/mainwp/mainwp-development-extension) as a template
- **Follow WordPress Coding Standards**: Adhere to [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/) for consistent, maintainable code
- **Implement Proper Error Handling**: Include robust error handling to ensure your add-on gracefully handles unexpected situations
- **Use Version Control**: Use Git or another version control system to track changes and collaborate
- **Create Modular Code**: Design your add-on with modular, reusable components
- **Document as You Go**: Write documentation alongside your code, not as an afterthought
- **Implement Robust API Error Handling** (for integrations): Handle API timeouts, rate limits, and service disruptions gracefully
- **Cache API Responses** (for integrations): Minimize API calls by implementing appropriate caching

## 3. Testing Phase

The testing phase ensures your add-on works correctly, integrates properly with MainWP, and provides a good user experience.

### Key Activities

1. **Functional Testing**: Verify all features work as expected
2. **Integration Testing**: Ensure proper integration with MainWP Dashboard and Child sites
3. **Compatibility Testing**: Test with different WordPress versions, themes, and plugins
4. **Performance Testing**: Evaluate the add-on's impact on site performance
5. **Security Testing**: Identify and address potential security vulnerabilities
6. **User Testing**: Get feedback from real users

For integrations, additional testing includes:
- API failure testing: Verify graceful handling of API timeouts and errors
- Rate limit testing: Ensure your add-on respects API rate limits
- Data synchronization testing: Verify data consistency between MainWP and the third-party service
- Authentication testing: Ensure secure handling of API credentials

### Deliverables

- Test plan and test cases
- Bug reports and fixes
- Performance benchmarks
- Security assessment

### Best Practices

- **Create a Test Environment**: Set up a dedicated testing environment with multiple child sites
- **Test with Different Configurations**: Test with various WordPress versions, PHP versions, and server configurations
- **Automate Testing Where Possible**: Use automated tests for repetitive test cases
- **Perform Security Audits**: Review code for security vulnerabilities
- **Get External Feedback**: Have other developers or users test your add-on
- **Document Test Results**: Keep records of test results and fixes
- **Test API Edge Cases** (for integrations): Test with invalid API responses, rate limiting, and service outages
- **Implement Sandbox Testing** (for integrations): Use API sandbox environments when available

## 4. Distribution Phase

The distribution phase is where you package your add-on and make it available to users.

### Key Activities

1. **Packaging**: Prepare your add-on for distribution
2. **Documentation Finalization**: Complete user documentation
3. **Marketing Materials**: Create screenshots, videos, and promotional content
4. **Distribution Channel Setup**: Determine how you'll distribute your add-on
5. **Launch Planning**: Plan the launch of your add-on

For integrations, additional activities include:
- Documenting third-party API requirements and limitations
- Creating setup guides for API credentials
- Preparing support documentation for common API issues

### Deliverables

- Distribution package
- Complete user documentation
- Marketing materials
- Distribution channel presence
- API setup guides (for integrations)

### Distribution Options

1. **MainWP Add-ons Directory**: Official marketplace for MainWP add-ons
2. **Your Own Website**: Sell or distribute through your own site
3. **GitHub or Other Repositories**: Open-source distribution
4. **WordPress.org**: If your add-on has standalone functionality

### Best Practices

- **Create Clear Documentation**: Provide comprehensive documentation for installation, configuration, and usage
- **Include Screenshots and Videos**: Visual aids help users understand your add-on
- **Prepare Marketing Materials**: Create compelling descriptions and visuals
- **Plan Your Pricing Strategy**: Determine whether your add-on will be free, premium, or freemium
- **Consider Support Channels**: Decide how you'll provide support to users
- **Document API Requirements** (for integrations): Clearly explain what third-party accounts or plugins are required
- **Provide API Setup Guides** (for integrations): Include step-by-step instructions for obtaining API credentials

## 5. Maintenance Phase

The maintenance phase involves supporting your add-on, fixing bugs, and making minor improvements.

### Key Activities

1. **User Support**: Respond to user questions and issues
2. **Bug Fixing**: Address reported bugs and issues
3. **Minor Enhancements**: Implement small improvements
4. **Compatibility Updates**: Ensure compatibility with new MainWP and WordPress versions
5. **Performance Optimization**: Improve performance based on real-world usage

For integrations, additional activities include:
- Monitoring third-party API changes and updates
- Adapting to API deprecations or new features
- Addressing API-related issues reported by users

### Deliverables

- Bug fixes and patches
- Minor feature enhancements
- Updated documentation
- Compatibility updates

### Best Practices

- **Establish Support Channels**: Create clear channels for users to get help
- **Set Response Time Expectations**: Let users know how quickly they can expect support
- **Track Issues Systematically**: Use an issue tracking system to manage bug reports and feature requests
- **Communicate with Users**: Keep users informed about known issues and upcoming fixes
- **Monitor Performance**: Watch for performance issues in real-world usage
- **Stay Current with MainWP**: Keep up with MainWP updates and changes
- **Monitor API Changes** (for integrations): Subscribe to API change notifications and developer newsletters
- **Maintain API Compatibility** (for integrations): Quickly adapt to API changes to minimize disruption

## 6. Update Phase

The update phase involves developing significant new features or major changes to your add-on.

### Key Activities

1. **Feature Planning**: Plan new features based on user feedback and market needs
2. **Major Enhancements**: Implement significant new functionality
3. **Architecture Improvements**: Make major structural improvements
4. **Testing New Features**: Thoroughly test new functionality
5. **Update Documentation**: Update documentation to reflect new features
6. **Release Planning**: Plan and execute the release of updates

For integrations, additional activities include:
- Implementing support for new API features or versions
- Redesigning integration architecture for better performance or reliability
- Adding support for additional third-party services

### Deliverables

- New features and enhancements
- Updated extension package
- Updated documentation
- Release notes

### Best Practices

- **Prioritize Based on User Feedback**: Focus on features that users are requesting
- **Maintain Backward Compatibility**: Ensure updates don't break existing functionality
- **Use Semantic Versioning**: Follow [semantic versioning](https://semver.org/) for clear communication about the nature of updates
- **Create Detailed Release Notes**: Document what's new, what's changed, and any breaking changes
- **Test Thoroughly**: Test new features as rigorously as the initial release
- **Plan for Data Migration**: If updates change data structures, plan for migrating existing data
- **Coordinate with API Changes** (for integrations): Time major updates to coincide with third-party API changes when possible
- **Provide Migration Paths** (for integrations): Help users transition when third-party services make breaking changes

## Lifecycle Management Considerations

### Version Control

Using a version control system like Git is essential for managing your add-on's lifecycle:

- **Track Changes**: Keep a history of all code changes
- **Branch Management**: Use branches for features, fixes, and releases
- **Collaboration**: Enable multiple developers to work together
- **Rollback Capability**: Easily revert to previous versions if needed

### Documentation Management

Documentation should evolve alongside your add-on:

- **Code Documentation**: Keep inline code documentation up to date
- **User Documentation**: Update user guides with new features and changes
- **Changelog**: Maintain a detailed changelog of all versions
- **Known Issues**: Document known issues and workarounds
- **API Documentation** (for integrations): Document third-party API versions supported and known limitations

### Communication with Users

Maintaining clear communication with users throughout the lifecycle:

- **Release Announcements**: Inform users about new versions
- **Support Channels**: Provide accessible support options
- **Feedback Collection**: Actively seek and respond to user feedback
- **Roadmap Sharing**: Share your plans for future development

## Add-on Lifecycle Tools

Several tools can help manage your add-on's lifecycle:

1. **Version Control**: GitHub, GitLab, Bitbucket
2. **Issue Tracking**: GitHub Issues, JIRA, Trello
3. **Documentation**: GitHub Wiki, ReadTheDocs, WordPress Codex
4. **Continuous Integration**: GitHub Actions, Travis CI, Jenkins
5. **Testing**: PHPUnit, WP-CLI, Browser Testing Tools

## Case Studies: Add-on Lifecycle in Action

Let's look at hypothetical case studies of MainWP add-ons through their lifecycle:

### Extension Example: Client Reports Pro

#### Planning
A developer identifies that MainWP users need better reporting capabilities for client sites. They research existing solutions, define key features, and create a development plan for a "Client Reports Pro" extension.

#### Development
The developer uses the MainWP Development Extension as a starting point, implements the reporting features, creates a database structure for storing report templates, and builds a user interface for creating and scheduling reports.

#### Testing
The extension is tested with multiple child sites, various WordPress configurations, and different report types. Beta testers provide feedback on usability and feature requests.

#### Distribution
The developer creates comprehensive documentation, screenshots, and a demo video. They set up a website to sell the extension and establish a support system.

#### Maintenance
After launch, the developer responds to support requests, fixes bugs, and makes minor improvements based on user feedback.

#### Updates
Based on user requests, the developer plans and implements a major update that adds PDF export capabilities and more report templates.

### Integration Example: Analytics Connect

#### Planning
A developer notices that MainWP users want to see Google Analytics data directly in their MainWP Dashboard. They research the Google Analytics API, authentication requirements, and plan an integration that will connect MainWP sites with Google Analytics accounts.

#### Development
The developer creates an API client for Google Analytics, implements OAuth authentication, develops data synchronization between MainWP and Google Analytics, and builds dashboard widgets to display analytics data.

#### Testing
The integration is tested with various Google Analytics account configurations, different permission levels, and edge cases like API rate limiting. Beta testers provide feedback on the authentication process and data visualization.

#### Distribution
The developer creates documentation explaining how to connect Google Analytics accounts, obtain API credentials, and interpret the analytics data. They create marketing materials highlighting the time-saving benefits of viewing analytics directly in MainWP.

#### Maintenance
After launch, the developer monitors Google Analytics API changes, responds to authentication issues reported by users, and optimizes API calls to stay within rate limits.

#### Updates
When Google releases a new Analytics API version, the developer plans and implements support for the new API while maintaining backward compatibility with the old version.

## Conclusion

Understanding the MainWP add-on development lifecycle helps you create, distribute, and maintain successful extensions and integrations. By following best practices at each phase, you can create add-ons that provide real value to users and integrate seamlessly with the MainWP ecosystem.

Whether you're building a standalone extension or integrating with a third-party service, the same lifecycle principles apply, with additional considerations for integrations to ensure reliable connections with external services.

## Next Steps

Now that you understand the add-on development lifecycle, you can:

- [Set Up a Development Environment](../how-to/setup-environment.md)
- [Create a Basic MainWP Extension](../how-to/create-basic-extension.md) (standalone add-on)
- [Create a Basic MainWP Integration](../how-to/create-basic-integration.md) (third-party add-on)
- [Learn About the MainWP Development Extension](../how-to/mainwp-development-extension.md)

## Related Resources

- [MainWP Development Extension on GitHub](https://github.com/mainwp/mainwp-development-extension)
- [WordPress Plugin Developer Handbook](https://developer.wordpress.org/plugins/)
- [Semantic Versioning](https://semver.org/)
- [Working with Third-Party APIs](../how-to/third-party-apis.md)
- [API Integration Best Practices](../best-practices/api-integration.md)

View file

@ -0,0 +1,597 @@
# Using MainWP Actions & Filters

This guide explains how to use MainWP's actions and filters (hooks) to integrate your extension with the MainWP Dashboard and Child plugins. Understanding these hooks is essential for creating powerful, well-integrated extensions.

## Quick Start for Experienced Developers

```php
// Hook into MainWP Dashboard actions
add_action('mainwp_pageheader_extensions', function() {
// Add content to extension page header
});

// Filter MainWP Dashboard data
add_filter('mainwp_getextensions', function($extensions) {
// Register your extension
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MyExtension',
'mainwp' => true,
'callback' => array('MyCompany\\MyExtension\\MyExtension', 'get_instance'),
'name' => 'My Extension'
);
return $extensions;
});

// Hook into child site actions
add_action('mainwp_child_call', function($action) {
// Handle requests from the dashboard
if ($action == 'my_custom_action') {
// Process the request
}
});
```

Key hook categories:
- Registration hooks (`mainwp_getextensions`)
- UI hooks (`mainwp_pageheader_extensions`, `mainwp_admin_menu`)
- Site management hooks (`mainwp_site_synced`, `mainwp_site_actions`)
- Data hooks (`mainwp_site_sync_data`, `mainwp_get_site_option`)
- Child communication hooks (`mainwp_child_call`, `mainwp_child_init`)

## Understanding WordPress Hooks

Before diving into MainWP-specific hooks, it's important to understand the WordPress hooks system:

- **Actions**: Allow you to add custom functionality at specific points in execution
- **Filters**: Allow you to modify data before it's used by WordPress

### Actions

Actions are triggered at specific points during execution and allow you to add custom functionality:

```php
add_action('hook_name', 'callback_function', 10, 2);

function callback_function($arg1, $arg2) {
// Do something when the hook is triggered
}
```

### Filters

Filters allow you to modify data before it's used:

```php
add_filter('hook_name', 'filter_function', 10, 1);

function filter_function($value) {
// Modify $value
return $modified_value;
}
```

## MainWP Dashboard Hooks

MainWP Dashboard provides numerous hooks for extending its functionality. Here are the most important ones for extension developers:

### Extension Registration

The most important hook for any MainWP extension is `mainwp_getextensions`, which registers your extension with the MainWP Dashboard:

```php
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MyExtension',
'mainwp' => true,
'callback' => array('MyCompany\\MyExtension\\MyExtension', 'get_instance'),
'name' => 'My Extension'
);
return $extensions;
});
```

This tells MainWP:
- The location of your plugin file
- The API identifier for your extension
- That this is a MainWP extension (not a third-party integration)
- The callback function to initialize your extension
- The display name of your extension

### Admin Menu Integration

To add menu items to the MainWP Dashboard:

```php
add_action('mainwp_admin_menu', function() {
add_submenu_page(
'mainwp_tab',
__('My Extension', 'my-extension'),
__('My Extension', 'my-extension'),
'read',
'MyExtension',
array($this, 'render_admin_page')
);
});
```

### Page Header and Footer

To add content to the header or footer of your extension's pages:

```php
add_action('mainwp_pageheader_extensions', function() {
// Add content to the page header
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('My Extension Header', 'my-extension'); ?></h2>
</div>
<?php
});

add_action('mainwp_pagefooter_extensions', function() {
// Add content to the page footer
?>
<div class="ui segment">
<p><?php esc_html_e('My Extension Footer', 'my-extension'); ?></p>
</div>
<?php
});
```

### Dashboard Widgets

To add widgets to the MainWP Dashboard:

```php
add_action('mainwp_dashboard_widgets', function() {
add_meta_box(
'my_extension_widget',
__('My Extension Widget', 'my-extension'),
array($this, 'render_dashboard_widget'),
'mainwp_dashboard',
'normal',
'default'
);
});

public function render_dashboard_widget() {
// Widget content
?>
<div class="ui segment">
<p><?php esc_html_e('Widget content here', 'my-extension'); ?></p>
</div>
<?php
}
```

### Site Actions

To add actions to the site actions dropdown menu:

```php
add_filter('mainwp_site_actions', function($actions, $website) {
$actions['my_action'] = array(
'label' => __('My Custom Action', 'my-extension'),
'url' => admin_url('admin.php?page=MyExtension&site_id=' . $website->id),
'icon' => 'cog',
);
return $actions;
}, 10, 2);
```

### Site Sync Data

To add custom data to the site sync process:

```php
add_filter('mainwp_site_sync_data', function($data, $website) {
// Add custom data to the sync process
$data['my_extension'] = array(
'custom_field' => 'custom_value',
);
return $data;
}, 10, 2);
```

### After Site Sync

To perform actions after a site is synced:

```php
add_action('mainwp_site_synced', function($website, $data) {
// Process data after site sync
if (isset($data['my_extension'])) {
// Process my_extension data
}
}, 10, 2);
```

## MainWP Child Hooks

If your extension needs to interact with child sites, you'll need to use MainWP Child hooks:

### Handling Dashboard Requests

To handle requests from the MainWP Dashboard:

```php
add_action('mainwp_child_call', function($action) {
// Check if this is a request for your extension
if ($action == 'my_extension') {
// Get the specific action
$specific_action = $_POST['specific_action'] ?? '';
// Handle the specific action
switch ($specific_action) {
case 'get_data':
// Get and return data
$data = array('result' => 'success', 'data' => 'your_data');
wp_send_json($data);
break;
case 'update_data':
// Update data
$data = array('result' => 'success', 'message' => 'Data updated');
wp_send_json($data);
break;
default:
// Handle unknown action
$data = array('result' => 'error', 'message' => 'Unknown action');
wp_send_json($data);
break;
}
}
});
```

### Child Plugin Initialization

To initialize your child plugin:

```php
add_action('mainwp_child_init', function() {
// Initialize your child plugin
});
```

## Communication Between Dashboard and Child Sites

One of the most powerful features of MainWP is the ability to communicate between the dashboard and child sites. Here's how to implement this in your extension:

### Sending Requests from Dashboard to Child

```php
// In your dashboard extension
public function send_request_to_child($website_id, $action, $data = array()) {
// Get the website
$website = MainWP\Dashboard\MainWP_DB::instance()->get_website_by_id($website_id);
if (!$website) {
return array('error' => 'Website not found');
}
// Prepare the data
$data['action'] = $action;
// Send the request
try {
$information = MainWP\Dashboard\MainWP_Connect::fetch_url_authed(
$website,
'my_extension',
$data
);
// Process the response
if (is_array($information) && isset($information['result'])) {
return $information;
} else {
return array('error' => 'Invalid response from child site');
}
} catch (Exception $e) {
return array('error' => $e->getMessage());
}
}
```

### Handling Requests on the Child Site

```php
// In your child plugin
add_action('mainwp_child_call', function($action) {
if ($action == 'my_extension') {
// Get the specific action
$specific_action = $_POST['action'] ?? '';
// Handle the specific action
switch ($specific_action) {
case 'get_plugin_data':
// Get plugin data
$plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/my-plugin/my-plugin.php');
wp_send_json(array(
'result' => 'success',
'data' => $plugin_data
));
break;
// Handle other actions
default:
wp_send_json(array(
'result' => 'error',
'message' => 'Unknown action'
));
break;
}
}
});
```

## Common Hook Use Cases

### Adding a Settings Page

```php
// Add a settings page to the MainWP Dashboard
add_action('mainwp_admin_menu', function() {
add_submenu_page(
'mainwp_tab',
__('My Extension Settings', 'my-extension'),
__('My Extension Settings', 'my-extension'),
'read',
'MyExtensionSettings',
array($this, 'render_settings_page')
);
});

// Render the settings page
public function render_settings_page() {
// Check if user has permissions
if (!mainwp_current_user_can('read')) {
mainwp_do_not_have_permissions(__('My Extension Settings', 'my-extension'));
return;
}
// Save settings if form is submitted
if (isset($_POST['submit'])) {
// Verify nonce
check_admin_referer('my_extension_settings_nonce', 'my_extension_settings_nonce');
// Save settings
$settings = array(
'setting1' => sanitize_text_field($_POST['setting1'] ?? ''),
'setting2' => sanitize_text_field($_POST['setting2'] ?? ''),
);
update_option('my_extension_settings', $settings);
// Show success message
?>
<div class="ui green message"><?php esc_html_e('Settings saved successfully.', 'my-extension'); ?></div>
<?php
}
// Get current settings
$settings = get_option('my_extension_settings', array(
'setting1' => '',
'setting2' => '',
));
// Render settings form
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('My Extension Settings', 'my-extension'); ?></h2>
<form class="ui form" method="post" action="">
<?php wp_nonce_field('my_extension_settings_nonce', 'my_extension_settings_nonce'); ?>
<div class="field">
<label><?php esc_html_e('Setting 1', 'my-extension'); ?></label>
<input type="text" name="setting1" value="<?php echo esc_attr($settings['setting1']); ?>">
</div>
<div class="field">
<label><?php esc_html_e('Setting 2', 'my-extension'); ?></label>
<input type="text" name="setting2" value="<?php echo esc_attr($settings['setting2']); ?>">
</div>
<button class="ui green button" type="submit" name="submit"><?php esc_html_e('Save Settings', 'my-extension'); ?></button>
</form>
</div>
<?php
}
```

### Adding a Custom Tab to Individual Sites

```php
// Add a custom tab to individual site pages
add_filter('mainwp_getsubpages_sites', function($subpages, $website) {
$subpages[] = array(
'title' => __('My Extension', 'my-extension'),
'slug' => 'MyExtension',
'callback' => array($this, 'render_site_tab'),
);
return $subpages;
}, 10, 2);

// Render the custom tab
public function render_site_tab($website) {
// Render tab content
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('My Extension', 'my-extension'); ?></h2>
<p><?php esc_html_e('Site ID:', 'my-extension'); ?> <?php echo esc_html($website->id); ?></p>
<!-- Tab content here -->
</div>
<?php
}
```

### Adding a Bulk Action

```php
// Add a bulk action to the sites page
add_filter('mainwp_managesites_bulk_actions', function($actions) {
$actions['my_bulk_action'] = __('My Bulk Action', 'my-extension');
return $actions;
});

// Handle the bulk action
add_action('mainwp_managesites_bulk_action', function($action, $sites) {
if ($action == 'my_bulk_action') {
// Process the bulk action for each site
foreach ($sites as $site_id) {
// Process the site
}
// Redirect back to the sites page
wp_redirect(admin_url('admin.php?page=managesites&bulk_my_bulk_action=success'));
exit;
}
}, 10, 2);
```

## Best Practices for Using Hooks

### Use Unique Hook Names

If you need to create your own hooks for your extension, use a unique prefix to avoid conflicts:

```php
do_action('my_extension_custom_hook', $data);
apply_filters('my_extension_custom_filter', $value);
```

### Check Hook Availability

Some hooks may not be available in all versions of MainWP. Always check if a hook exists before using it:

```php
if (has_action('mainwp_hook_name')) {
// Hook exists, safe to use
}
```

### Use Proper Priority

The priority parameter in `add_action()` and `add_filter()` determines the order in which callbacks are executed. Lower numbers run earlier:

```php
// Run early (priority 5)
add_action('mainwp_hook_name', 'early_function', 5);

// Run at default priority (10)
add_action('mainwp_hook_name', 'default_function');

// Run late (priority 20)
add_action('mainwp_hook_name', 'late_function', 20);
```

### Remove Hooks When Necessary

If you need to temporarily disable a hook, you can remove it:

```php
// Remove a hook
remove_action('mainwp_hook_name', 'callback_function');

// Do something without the hook

// Add the hook back
add_action('mainwp_hook_name', 'callback_function');
```

### Use Proper Error Handling

Always include error handling in your hook callbacks:

```php
add_action('mainwp_hook_name', function() {
try {
// Do something that might fail
} catch (Exception $e) {
// Handle the error
error_log('My Extension Error: ' . $e->getMessage());
}
});
```

## Debugging Hooks

### Check if a Hook is Firing

To check if a hook is firing, you can add a temporary debug callback:

```php
add_action('mainwp_hook_name', function() {
error_log('mainwp_hook_name fired at ' . current_time('mysql'));
});
```

### List All Hooks

To see all hooks that are registered, you can use a plugin like [Query Monitor](https://wordpress.org/plugins/query-monitor/) or add this code:

```php
add_action('admin_footer', function() {
global $wp_filter;
echo '<pre>';
print_r($wp_filter);
echo '</pre>';
});
```

### Check Hook Parameters

To see what parameters a hook passes, you can use this debug callback:

```php
add_action('mainwp_hook_name', function() {
$args = func_get_args();
error_log('mainwp_hook_name parameters: ' . print_r($args, true));
}, 10, 99); // Accept up to 99 parameters
```

## Finding Available Hooks

MainWP provides many hooks for extension developers. Here are some ways to find them:

### MainWP Hooks Documentation

The [MainWP Hooks Documentation](../../mainwp-hooks/) provides a comprehensive list of available hooks, organized by category.

### Source Code

You can search the MainWP source code for hooks:

1. Look for `do_action()` and `apply_filters()` calls in the MainWP Dashboard and Child plugins
2. Check the [MainWP GitHub repositories](https://github.com/mainwp)

### Hook Categories

MainWP hooks are generally organized into these categories:

1. **Dashboard UI Hooks**: For modifying the MainWP Dashboard interface
2. **Site Management Hooks**: For interacting with managed sites
3. **Data Hooks**: For modifying data before it's used or displayed
4. **Communication Hooks**: For handling communication between Dashboard and Child sites
5. **Extension Hooks**: For registering and managing extensions

## Complete Hook Reference

For a complete reference of all available hooks, see the [MainWP Hooks Documentation](../../mainwp-hooks/):

- [MainWP Dashboard Actions](../../mainwp-hooks/dashboard/actions/)
- [MainWP Dashboard Filters](../../mainwp-hooks/dashboard/filters/)
- [MainWP Child Actions](../../mainwp-hooks/child/actions/)
- [MainWP Child Filters](../../mainwp-hooks/child/filters/)

## Next Steps

Now that you understand how to use MainWP actions and filters, you can:

- [Create a Basic MainWP Extension](create-basic-extension.md) that integrates with MainWP
- Learn about [Building Admin Interfaces](admin-interfaces.md) for your extension
- Explore [Data Storage and Retrieval](data-storage.md) for managing extension data

## Related Resources

- [WordPress Plugin API Documentation](https://developer.wordpress.org/plugins/hooks/)
- [MainWP Dashboard API Documentation](../../source-code/dashboard/)
- [MainWP Child API Documentation](../../source-code/child/)

View file

@ -0,0 +1,23 @@
# Building Admin Interfaces for MainWP Extensions

*This guide is a placeholder and will be expanded in the future.*

This guide will cover best practices for building intuitive admin interfaces for MainWP extensions, including:

- Adding menu items to the MainWP Dashboard
- Creating settings pages
- Building custom admin pages
- Using MainWP UI components and styles
- Creating dashboard widgets
- Adding custom tabs to individual site pages
- Form handling and validation
- AJAX interactions
- Responsive design considerations

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic MainWP Extension](create-basic-extension.md)
- [Using MainWP Actions & Filters](actions-filters.md)
- [Understanding the MainWP Development Extension](mainwp-development-extension.md)

View file

@ -0,0 +1,348 @@
# Creating a Basic MainWP Extension

This guide walks you through the process of creating a basic MainWP extension. By the end, you'll have a functional extension that integrates with the MainWP Dashboard.

## Quick Start for Experienced Developers

```php
// 1. Clone the development extension
// git clone https://github.com/mainwp/mainwp-development-extension.git my-extension

// 2. Rename files and update plugin header
// mainwp-development-extension.php → my-extension.php

// 3. Update namespace and class names
namespace MyCompany\MyExtension;

// 4. Register your extension with MainWP
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MyExtension',
'mainwp' => true,
'callback' => array('MyCompany\\MyExtension\\MyExtension', 'get_instance'),
'name' => 'My Extension'
);
return $extensions;
});

// 5. Implement core functionality in your main class
class MyExtension {
public static function get_instance() {
static $instance = null;
if (null === $instance) {
$instance = new self();
}
return $instance;
}
public function __construct() {
// Hook into MainWP actions and filters
add_action('mainwp_pageheader_extensions', array($this, 'page_header'));
add_action('mainwp_pagefooter_extensions', array($this, 'page_footer'));
}
// Implement required methods...
}
```

## Prerequisites

Before you begin creating a MainWP extension, ensure you have:

- A development environment with WordPress and MainWP Dashboard installed (see [Setting Up a Development Environment](setup-environment.md))
- Basic understanding of WordPress plugin development
- Familiarity with PHP object-oriented programming
- A code editor (like VS Code, PhpStorm, or Sublime Text)

## Step 1: Plan Your Extension

Before writing any code, clearly define what your extension will do:

1. **Purpose**: What problem will your extension solve for MainWP users?
2. **Features**: What specific functionality will it provide?
3. **Integration Points**: How will it interact with the MainWP Dashboard and child sites?
4. **User Interface**: What admin pages, settings, or widgets will it need?

Having a clear plan will guide your development process and help you create a more focused, useful extension.

## Step 2: Start with the Development Extension

MainWP provides a development extension template that includes the basic structure and boilerplate code you need to get started quickly.

1. Clone or download the MainWP Development Extension from GitHub:
```bash
git clone https://github.com/mainwp/mainwp-development-extension.git my-extension
```

2. Navigate to your new extension directory:
```bash
cd my-extension
```

The development extension includes a well-structured codebase with classes for different aspects of extension functionality, making it easier to understand and extend.

## Step 3: Customize the Plugin Information

1. Rename the main plugin file from `mainwp-development-extension.php` to match your extension name (e.g., `my-extension.php`).

2. Update the plugin header information in the main file:

```php
/**
* Plugin Name: My Extension for MainWP
* Plugin URI: https://yourwebsite.com/my-extension
* Description: A brief description of what your extension does.
* Version: 1.0
* Author: Your Name
* Author URI: https://yourwebsite.com
* Text Domain: my-extension
*/
```

3. Update the text domain throughout the plugin to match your extension's slug.

## Step 4: Update Namespace and Class Names

1. Change the namespace in all PHP files from `MainWP\Dev` to your own namespace (e.g., `MyCompany\MyExtension`).

2. Rename the main class and other classes to match your extension name.

3. Update all references to these classes throughout the codebase.

For example:

```php
namespace MyCompany\MyExtension;

class MyExtension {
// Class implementation
}
```

## Step 5: Register Your Extension with MainWP

MainWP uses a filter to discover and load extensions. Update the `mainwp_getextensions` filter in your main plugin file:

```php
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MyExtension',
'mainwp' => true,
'callback' => array('MyCompany\\MyExtension\\MyExtension', 'get_instance'),
'name' => 'My Extension'
);
return $extensions;
});
```

This tells MainWP:
- The location of your plugin file
- The API identifier for your extension
- That this is a MainWP extension (not a third-party integration)
- The callback function to initialize your extension
- The display name of your extension

## Step 6: Implement Core Functionality

The development extension includes several classes that handle different aspects of extension functionality:

1. **Main Class** (`class/class-mainwp-development-extension.php`): The core class that initializes your extension and hooks into MainWP.

2. **Admin Class** (`class/class-mainwp-development-extension-admin.php`): Handles admin pages, settings, and UI elements.

3. **Database Class** (`class/class-mainwp-development-extension-db.php`): Manages database operations for your extension.

4. **Utility Class** (`class/class-mainwp-development-extension-utility.php`): Contains helper functions and utilities.

5. **AJAX Class** (`class/class-mainwp-development-extension-ajax.php`): Handles AJAX requests for your extension.

Modify these classes to implement your extension's specific functionality. The development extension includes examples and comments to guide you.

## Step 7: Create Admin Pages

Most MainWP extensions provide admin pages for configuration and displaying information. The development extension includes examples of how to create these pages.

1. Register your admin pages in the Admin class:

```php
public function init_menu() {
add_submenu_page(
'mainwp_tab',
__('My Extension', 'my-extension'),
__('My Extension', 'my-extension'),
'read',
'MyExtension',
array($this, 'render_admin_page')
);
}
```

2. Create the page rendering function:

```php
public function render_admin_page() {
// Check if user has permissions
if (!mainwp_current_user_can('read')) {
mainwp_do_not_have_permissions(__('My Extension', 'my-extension'));
return;
}
// Render your admin page content
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('My Extension', 'my-extension'); ?></h2>
<!-- Your admin page content here -->
</div>
<?php
}
```

## Step 8: Interact with Child Sites

If your extension needs to interact with child sites, you can use MainWP's communication system:

1. **Dashboard to Child**: Send requests from the dashboard to child sites.

```php
// Example of sending a request to a child site
$data = array('action' => 'my_custom_action', 'param' => 'value');
$website = MainWP\Dashboard\MainWP_DB::instance()->get_website_by_id($website_id);
$information = MainWP\Dashboard\MainWP_Connect::fetch_url_authed($website, 'my_extension', $data);
```

2. **Child to Dashboard**: Process requests on the child site.

You'll need to create a separate child plugin or use the MainWP Child plugin's hooks to handle these requests.

## Step 9: Test Your Extension

Thoroughly test your extension to ensure it works correctly:

1. Install and activate it on a test MainWP Dashboard.
2. Test all features and functionality.
3. Check for any errors or warnings in the browser console and PHP error logs.
4. Test with multiple child sites to ensure compatibility.

## Step 10: Package Your Extension

When your extension is ready for distribution:

1. Remove any development or debugging code.
2. Ensure all text is properly internationalized.
3. Create a readme.txt file with installation and usage instructions.
4. Package your extension as a ZIP file for distribution.

## Common Integration Points

Here are some common MainWP hooks you might use in your extension:

### Actions

- `mainwp_pageheader_extensions`: Add content to the page header in extension pages
- `mainwp_pagefooter_extensions`: Add content to the page footer in extension pages
- `mainwp_after_header`: Add content after the MainWP header
- `mainwp_before_footer`: Add content before the MainWP footer
- `mainwp_site_synced`: Triggered when a site is synced

### Filters

- `mainwp_getextensions`: Register your extension with MainWP
- `mainwp_extension_enabled_check`: Check if your extension is enabled
- `mainwp_extension_available_check`: Check if your extension is available

For a complete list of available hooks, see the [MainWP Hooks Reference](../../mainwp-hooks/).

## Example: A Simple "Hello World" Extension

Here's a minimal example of a MainWP extension that adds a new admin page:

```php
<?php
/**
* Plugin Name: Hello World for MainWP
* Plugin URI: https://example.com/hello-world
* Description: A simple Hello World extension for MainWP.
* Version: 1.0
* Author: Your Name
* Author URI: https://example.com
* Text Domain: hello-world-mainwp
*/

namespace MyCompany\HelloWorld;

// Register the extension with MainWP
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'HelloWorld',
'mainwp' => true,
'callback' => array('MyCompany\\HelloWorld\\HelloWorld', 'get_instance'),
'name' => 'Hello World'
);
return $extensions;
});

class HelloWorld {
public static function get_instance() {
static $instance = null;
if (null === $instance) {
$instance = new self();
}
return $instance;
}
public function __construct() {
add_action('admin_init', array($this, 'admin_init'));
add_action('mainwp_admin_menu', array($this, 'init_menu'));
}
public function admin_init() {
// Initialize admin functionality
}
public function init_menu() {
// Add submenu page to MainWP menu
add_submenu_page(
'mainwp_tab',
__('Hello World', 'hello-world-mainwp'),
__('Hello World', 'hello-world-mainwp'),
'read',
'HelloWorld',
array($this, 'render_admin_page')
);
}
public function render_admin_page() {
// Check if user has permissions
if (!mainwp_current_user_can('read')) {
mainwp_do_not_have_permissions(__('Hello World', 'hello-world-mainwp'));
return;
}
// Render admin page
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('Hello World Extension', 'hello-world-mainwp'); ?></h2>
<p><?php esc_html_e('Welcome to your first MainWP extension!', 'hello-world-mainwp'); ?></p>
</div>
<?php
}
}
```

## Next Steps

After creating your basic extension, you might want to explore:

- [Using MainWP Actions & Filters](actions-filters.md) for deeper integration
- [Building Admin Interfaces](admin-interfaces.md) for more advanced UI elements
- [Data Storage and Retrieval](data-storage.md) for managing extension data
- [Debugging Extensions](debugging.md) for troubleshooting issues

## Related Resources

- [MainWP Development Extension on GitHub](https://github.com/mainwp/mainwp-development-extension)
- [MainWP Dashboard API Documentation](../../source-code/dashboard/)
- [MainWP Dashboard Hooks](../../mainwp-hooks/dashboard/)

View file

@ -0,0 +1,779 @@
# Creating a Basic MainWP Integration

This guide walks you through the process of creating a basic MainWP integration that connects with a third-party plugin or API. By the end, you'll have a functional integration that extends MainWP with third-party capabilities.

## Quick Start for Experienced Developers

```php
// 1. Clone the development extension
// git clone https://github.com/mainwp/mainwp-development-extension.git my-integration

// 2. Rename files and update plugin header
// mainwp-development-extension.php → my-integration.php

// 3. Update namespace and class names
namespace MyCompany\MyIntegration;

// 4. Register your integration with MainWP
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MyIntegration',
'mainwp' => true,
'callback' => array('MyCompany\\MyIntegration\\MyIntegration', 'get_instance'),
'name' => 'My Integration'
);
return $extensions;
});

// 5. Implement core functionality in your main class
class MyIntegration {
public static function get_instance() {
static $instance = null;
if (null === $instance) {
$instance = new self();
}
return $instance;
}
public function __construct() {
// Hook into MainWP actions and filters
add_action('mainwp_pageheader_extensions', array($this, 'page_header'));
add_action('mainwp_pagefooter_extensions', array($this, 'page_footer'));
// Initialize third-party API connection
$this->init_api_connection();
}
private function init_api_connection() {
// Initialize connection to third-party API
// Check if required third-party plugin is active
if ($this->is_third_party_plugin_active()) {
// Set up API credentials
$this->api_key = get_option('my_integration_api_key', '');
// Initialize API client
$this->api_client = new ApiClient($this->api_key);
}
}
private function is_third_party_plugin_active() {
// Check if the required third-party plugin is active
return is_plugin_active('third-party-plugin/third-party-plugin.php');
}
// Implement required methods...
}
```

## Prerequisites

Before you begin creating a MainWP integration, ensure you have:

- A development environment with WordPress and MainWP Dashboard installed (see [Setting Up a Development Environment](setup-environment.md))
- Basic understanding of WordPress plugin development
- Familiarity with PHP object-oriented programming
- A code editor (like VS Code, PhpStorm, or Sublime Text)
- Access to the third-party API or plugin you want to integrate with
- API credentials or documentation for the third-party service

## Step 1: Plan Your Integration

Before writing any code, clearly define what your integration will do:

1. **Purpose**: What problem will your integration solve for MainWP users?
2. **Features**: What specific functionality will it provide?
3. **Third-Party Requirements**: What API or plugin will you integrate with?
4. **Integration Points**: How will it interact with both MainWP and the third-party service?
5. **User Interface**: What admin pages, settings, or widgets will it need?

Having a clear plan will guide your development process and help you create a more focused, useful integration.

## Step 2: Start with the Development Extension

MainWP provides a development extension template that includes the basic structure and boilerplate code you need to get started quickly.

1. Clone or download the MainWP Development Extension from GitHub:
```bash
git clone https://github.com/mainwp/mainwp-development-extension.git my-integration
```

2. Navigate to your new integration directory:
```bash
cd my-integration
```

The development extension includes a well-structured codebase with classes for different aspects of extension functionality, making it easier to understand and extend.

## Step 3: Customize the Plugin Information

1. Rename the main plugin file from `mainwp-development-extension.php` to match your integration name (e.g., `my-integration.php`).

2. Update the plugin header information in the main file:

```php
/**
* Plugin Name: My Integration for MainWP
* Plugin URI: https://yourwebsite.com/my-integration
* Description: Integrates MainWP with [Third-Party Service/Plugin].
* Version: 1.0
* Author: Your Name
* Author URI: https://yourwebsite.com
* Text Domain: my-integration
* Requires at least: 4.6
* Requires PHP: 7.0
* WC requires at least: 3.0 (if integrating with WooCommerce)
* WC tested up to: 6.0 (if integrating with WooCommerce)
*/
```

3. Update the text domain throughout the plugin to match your integration's slug.

## Step 4: Update Namespace and Class Names

1. Change the namespace in all PHP files from `MainWP\Dev` to your own namespace (e.g., `MyCompany\MyIntegration`).

2. Rename the main class and other classes to match your integration name.

3. Update all references to these classes throughout the codebase.

For example:

```php
namespace MyCompany\MyIntegration;

class MyIntegration {
// Class implementation
}
```

## Step 5: Register Your Integration with MainWP

MainWP uses a filter to discover and load extensions. Update the `mainwp_getextensions` filter in your main plugin file:

```php
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MyIntegration',
'mainwp' => true,
'callback' => array('MyCompany\\MyIntegration\\MyIntegration', 'get_instance'),
'name' => 'My Integration'
);
return $extensions;
});
```

This tells MainWP:
- The location of your plugin file
- The API identifier for your integration
- That this is a MainWP extension (not a third-party integration)
- The callback function to initialize your integration
- The display name of your integration

## Step 6: Add Third-Party Integration Code

This is where your integration differs from a standard extension. You'll need to add code to connect with the third-party API or plugin:

1. **Check for Third-Party Plugin**: If your integration requires a specific plugin, check if it's installed and activated:

```php
private function is_third_party_plugin_active() {
// Check if the required third-party plugin is active
if (!function_exists('is_plugin_active')) {
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
return is_plugin_active('third-party-plugin/third-party-plugin.php');
}
```

2. **Initialize API Connection**: Set up the connection to the third-party API:

```php
private function init_api_connection() {
// Initialize connection to third-party API
if ($this->is_third_party_plugin_active()) {
// Set up API credentials
$this->api_key = get_option('my_integration_api_key', '');
// Initialize API client
$this->api_client = new ApiClient($this->api_key);
}
}
```

3. **Create API Client Class**: Create a dedicated class for handling API communication:

```php
class ApiClient {
private $api_key;
private $api_url = 'https://api.third-party-service.com/v1/';
public function __construct($api_key) {
$this->api_key = $api_key;
}
public function get_data($endpoint, $params = array()) {
$url = $this->api_url . $endpoint;
$args = array(
'headers' => array(
'Authorization' => 'Bearer ' . $this->api_key,
'Content-Type' => 'application/json'
),
'timeout' => 30
);
if (!empty($params)) {
$url = add_query_arg($params, $url);
}
$response = wp_remote_get($url, $args);
if (is_wp_error($response)) {
return array('error' => $response->get_error_message());
}
$body = wp_remote_retrieve_body($response);
return json_decode($body, true);
}
public function post_data($endpoint, $data) {
$url = $this->api_url . $endpoint;
$args = array(
'headers' => array(
'Authorization' => 'Bearer ' . $this->api_key,
'Content-Type' => 'application/json'
),
'body' => json_encode($data),
'method' => 'POST',
'timeout' => 30
);
$response = wp_remote_post($url, $args);
if (is_wp_error($response)) {
return array('error' => $response->get_error_message());
}
$body = wp_remote_retrieve_body($response);
return json_decode($body, true);
}
}
```

## Step 7: Create Settings Page for API Credentials

Most integrations require API credentials or configuration settings:

```php
public function render_settings_page() {
// Check if user has permissions
if (!mainwp_current_user_can('read')) {
mainwp_do_not_have_permissions(__('My Integration Settings', 'my-integration'));
return;
}
// Save settings if form is submitted
if (isset($_POST['submit'])) {
// Verify nonce
check_admin_referer('my_integration_settings_nonce', 'my_integration_settings_nonce');
// Save API key
$api_key = sanitize_text_field($_POST['api_key'] ?? '');
update_option('my_integration_api_key', $api_key);
// Test API connection
$test_result = $this->test_api_connection($api_key);
if ($test_result['success']) {
?>
<div class="ui green message"><?php esc_html_e('API connection successful.', 'my-integration'); ?></div>
<?php
} else {
?>
<div class="ui red message"><?php echo esc_html($test_result['message']); ?></div>
<?php
}
}
// Get current settings
$api_key = get_option('my_integration_api_key', '');
// Render settings form
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('My Integration Settings', 'my-integration'); ?></h2>
<form class="ui form" method="post" action="">
<?php wp_nonce_field('my_integration_settings_nonce', 'my_integration_settings_nonce'); ?>
<div class="field">
<label><?php esc_html_e('API Key', 'my-integration'); ?></label>
<input type="text" name="api_key" value="<?php echo esc_attr($api_key); ?>">
<p class="description"><?php esc_html_e('Enter your API key from your Third-Party Service account.', 'my-integration'); ?></p>
</div>
<button class="ui green button" type="submit" name="submit"><?php esc_html_e('Save Settings', 'my-integration'); ?></button>
</form>
</div>
<?php
}

private function test_api_connection($api_key) {
// Create temporary API client with the provided key
$api_client = new ApiClient($api_key);
// Try to make a simple API request
$response = $api_client->get_data('test-endpoint');
if (isset($response['error'])) {
return array(
'success' => false,
'message' => sprintf(__('API connection failed: %s', 'my-integration'), $response['error'])
);
}
return array(
'success' => true,
'message' => __('API connection successful.', 'my-integration')
);
}
```

## Step 8: Implement Integration Features

Now implement the specific features of your integration. This will depend on what your integration does, but here are some common patterns:

### Syncing Data from Third-Party Service to MainWP

```php
public function sync_third_party_data() {
// Get data from third-party API
$data = $this->api_client->get_data('some-endpoint');
if (isset($data['error'])) {
// Handle error
return;
}
// Process and store the data
update_option('my_integration_synced_data', $data);
update_option('my_integration_last_sync', current_time('mysql'));
}
```

### Sending MainWP Data to Third-Party Service

```php
public function send_data_to_third_party($website_id, $data) {
// Get website details
$website = MainWP\Dashboard\MainWP_DB::instance()->get_website_by_id($website_id);
if (!$website) {
return array('error' => 'Website not found');
}
// Prepare data for third-party service
$prepared_data = array(
'website_name' => $website->name,
'website_url' => $website->url,
'custom_data' => $data
);
// Send data to third-party API
$response = $this->api_client->post_data('some-endpoint', $prepared_data);
return $response;
}
```

### Adding Integration-Specific UI Elements

```php
public function render_dashboard_widget() {
// Get synced data
$data = get_option('my_integration_synced_data', array());
$last_sync = get_option('my_integration_last_sync', '');
?>
<div class="ui segment">
<h3 class="ui header"><?php esc_html_e('Third-Party Service Data', 'my-integration'); ?></h3>
<?php if (!empty($last_sync)) : ?>
<p><?php echo sprintf(__('Last synced: %s', 'my-integration'), $last_sync); ?></p>
<?php endif; ?>
<?php if (!empty($data)) : ?>
<!-- Display data here -->
<div class="ui list">
<?php foreach ($data as $item) : ?>
<div class="item">
<?php echo esc_html($item['name']); ?>
</div>
<?php endforeach; ?>
</div>
<?php else : ?>
<p><?php esc_html_e('No data available. Please sync with the third-party service.', 'my-integration'); ?></p>
<?php endif; ?>
<button class="ui green button sync-button" data-nonce="<?php echo wp_create_nonce('my_integration_sync_nonce'); ?>">
<?php esc_html_e('Sync Now', 'my-integration'); ?>
</button>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.sync-button').on('click', function() {
var button = $(this);
button.addClass('loading');
$.ajax({
url: ajaxurl,
type: 'POST',
data: {
action: 'my_integration_sync',
nonce: button.data('nonce')
},
success: function(response) {
button.removeClass('loading');
if (response.success) {
location.reload();
} else {
alert(response.data.message);
}
},
error: function() {
button.removeClass('loading');
alert('An error occurred. Please try again.');
}
});
});
});
</script>
<?php
}
```

## Step 9: Handle Dependency Management

Your integration may depend on third-party libraries or plugins. Here's how to handle these dependencies:

### Check for Required Plugins

```php
public function check_required_plugins() {
if (!$this->is_third_party_plugin_active()) {
add_action('admin_notices', function() {
?>
<div class="notice notice-error">
<p><?php echo sprintf(__('My Integration requires the %s plugin to be installed and activated.', 'my-integration'), '<a href="https://example.com/third-party-plugin" target="_blank">Third-Party Plugin</a>'); ?></p>
</div>
<?php
});
return false;
}
return true;
}
```

### Include Third-Party Libraries

If your integration requires PHP libraries, you can use Composer to manage them:

1. Create a `composer.json` file in your integration directory:

```json
{
"name": "mycompany/my-integration",
"description": "MainWP integration with Third-Party Service",
"type": "wordpress-plugin",
"require": {
"php": ">=7.0",
"third-party/api-client": "^1.0"
},
"autoload": {
"psr-4": {
"MyCompany\\MyIntegration\\": "src/"
}
}
}
```

2. Install dependencies:

```bash
composer install --no-dev
```

3. Include the Composer autoloader in your main plugin file:

```php
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
}
```

## Step 10: Test Your Integration

Thoroughly test your integration to ensure it works correctly:

1. Install and activate it on a test MainWP Dashboard.
2. Configure the API credentials or third-party plugin settings.
3. Test all features and functionality.
4. Check for any errors or warnings in the browser console and PHP error logs.
5. Test with multiple child sites to ensure compatibility.
6. Verify that data is correctly synced between MainWP and the third-party service.

## Step 11: Package Your Integration

When your integration is ready for distribution:

1. Remove any development or debugging code.
2. Ensure all text is properly internationalized.
3. Create a readme.txt file with installation and usage instructions.
4. Package your integration as a ZIP file for distribution.

## Example: A Simple "Third-Party Service" Integration

Here's a minimal example of a MainWP integration that connects with a third-party service:

```php
<?php
/**
* Plugin Name: Third-Party Service Integration for MainWP
* Plugin URI: https://example.com/third-party-integration
* Description: Integrates MainWP with Third-Party Service.
* Version: 1.0
* Author: Your Name
* Author URI: https://example.com
* Text Domain: third-party-integration
*/

namespace MyCompany\ThirdPartyIntegration;

// Register the integration with MainWP
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'ThirdPartyIntegration',
'mainwp' => true,
'callback' => array('MyCompany\\ThirdPartyIntegration\\ThirdPartyIntegration', 'get_instance'),
'name' => 'Third-Party Service Integration'
);
return $extensions;
});

class ThirdPartyIntegration {
private static $instance = null;
private $api_client = null;
public static function get_instance() {
if (null === self::$instance) {
self::$instance = new self();
}
return self::$instance;
}
public function __construct() {
// Initialize the integration
add_action('admin_init', array($this, 'admin_init'));
add_action('mainwp_admin_menu', array($this, 'init_menu'));
// Initialize API client
$this->init_api_client();
}
public function admin_init() {
// Check for required dependencies
$this->check_required_plugins();
}
public function init_menu() {
// Add submenu page to MainWP menu
add_submenu_page(
'mainwp_tab',
__('Third-Party Service', 'third-party-integration'),
__('Third-Party Service', 'third-party-integration'),
'read',
'ThirdPartyIntegration',
array($this, 'render_admin_page')
);
// Add settings page
add_submenu_page(
'mainwp_tab',
__('Third-Party Settings', 'third-party-integration'),
__('Third-Party Settings', 'third-party-integration'),
'read',
'ThirdPartyIntegrationSettings',
array($this, 'render_settings_page')
);
}
private function init_api_client() {
$api_key = get_option('third_party_integration_api_key', '');
if (!empty($api_key)) {
$this->api_client = new ApiClient($api_key);
}
}
private function check_required_plugins() {
if (!function_exists('is_plugin_active')) {
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
if (!is_plugin_active('third-party-plugin/third-party-plugin.php')) {
add_action('admin_notices', function() {
?>
<div class="notice notice-error">
<p><?php echo sprintf(__('Third-Party Service Integration requires the %s plugin to be installed and activated.', 'third-party-integration'), '<a href="https://example.com/third-party-plugin" target="_blank">Third-Party Plugin</a>'); ?></p>
</div>
<?php
});
}
}
public function render_admin_page() {
// Check if user has permissions
if (!mainwp_current_user_can('read')) {
mainwp_do_not_have_permissions(__('Third-Party Service', 'third-party-integration'));
return;
}
// Check if API key is set
if (empty($this->api_client)) {
?>
<div class="ui segment">
<div class="ui yellow message">
<?php echo sprintf(__('Please configure your API key in the %s settings page.', 'third-party-integration'), '<a href="admin.php?page=ThirdPartyIntegrationSettings">Third-Party Service</a>'); ?>
</div>
</div>
<?php
return;
}
// Render admin page
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('Third-Party Service Integration', 'third-party-integration'); ?></h2>
<!-- Your integration UI here -->
</div>
<?php
}
public function render_settings_page() {
// Check if user has permissions
if (!mainwp_current_user_can('read')) {
mainwp_do_not_have_permissions(__('Third-Party Settings', 'third-party-integration'));
return;
}
// Save settings if form is submitted
if (isset($_POST['submit'])) {
// Verify nonce
check_admin_referer('third_party_settings_nonce', 'third_party_settings_nonce');
// Save API key
$api_key = sanitize_text_field($_POST['api_key'] ?? '');
update_option('third_party_integration_api_key', $api_key);
// Reinitialize API client
$this->init_api_client();
?>
<div class="ui green message"><?php esc_html_e('Settings saved successfully.', 'third-party-integration'); ?></div>
<?php
}
// Get current settings
$api_key = get_option('third_party_integration_api_key', '');
// Render settings form
?>
<div class="ui segment">
<h2 class="ui header"><?php esc_html_e('Third-Party Service Settings', 'third-party-integration'); ?></h2>
<form class="ui form" method="post" action="">
<?php wp_nonce_field('third_party_settings_nonce', 'third_party_settings_nonce'); ?>
<div class="field">
<label><?php esc_html_e('API Key', 'third-party-integration'); ?></label>
<input type="text" name="api_key" value="<?php echo esc_attr($api_key); ?>">
<p class="description"><?php esc_html_e('Enter your API key from your Third-Party Service account.', 'third-party-integration'); ?></p>
</div>
<button class="ui green button" type="submit" name="submit"><?php esc_html_e('Save Settings', 'third-party-integration'); ?></button>
</form>
</div>
<?php
}
}

class ApiClient {
private $api_key;
private $api_url = 'https://api.third-party-service.com/v1/';
public function __construct($api_key) {
$this->api_key = $api_key;
}
public function get_data($endpoint, $params = array()) {
$url = $this->api_url . $endpoint;
$args = array(
'headers' => array(
'Authorization' => 'Bearer ' . $this->api_key,
'Content-Type' => 'application/json'
),
'timeout' => 30
);
if (!empty($params)) {
$url = add_query_arg($params, $url);
}
$response = wp_remote_get($url, $args);
if (is_wp_error($response)) {
return array('error' => $response->get_error_message());
}
$body = wp_remote_retrieve_body($response);
return json_decode($body, true);
}
public function post_data($endpoint, $data) {
$url = $this->api_url . $endpoint;
$args = array(
'headers' => array(
'Authorization' => 'Bearer ' . $this->api_key,
'Content-Type' => 'application/json'
),
'body' => json_encode($data),
'method' => 'POST',
'timeout' => 30
);
$response = wp_remote_post($url, $args);
if (is_wp_error($response)) {
return array('error' => $response->get_error_message());
}
$body = wp_remote_retrieve_body($response);
return json_decode($body, true);
}
}
```

## Next Steps

After creating your basic integration, you might want to explore:

- [Using MainWP Actions & Filters](actions-filters.md) for deeper integration
- [Building Admin Interfaces](admin-interfaces.md) for more advanced UI elements
- [Working with Third-Party APIs](third-party-apis.md) for more advanced API integration techniques
- [API Integration Best Practices](../best-practices/api-integration.md) for security and performance considerations

## Related Resources

- [MainWP Development Extension on GitHub](https://github.com/mainwp/mainwp-development-extension)
- [MainWP Dashboard API Documentation](../../source-code/dashboard/)
- [MainWP Dashboard Hooks](../../mainwp-hooks/dashboard/)
- [WordPress HTTP API Documentation](https://developer.wordpress.org/plugins/http-api/)

View file

@ -0,0 +1,21 @@
# Data Storage and Retrieval in MainWP Extensions

*This guide is a placeholder and will be expanded in the future.*

This guide will cover best practices for storing and retrieving data in MainWP extensions, including:

- Using WordPress options API
- Creating and managing custom database tables
- Transient API for caching
- Storing data for individual sites
- Handling data synchronization between Dashboard and Child sites
- Data validation and sanitization
- Security considerations

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic MainWP Extension](create-basic-extension.md)
- [Using MainWP Actions & Filters](actions-filters.md)
- [Understanding the MainWP Development Extension](mainwp-development-extension.md)

View file

@ -0,0 +1,22 @@
# Debugging MainWP Extensions

*This guide is a placeholder and will be expanded in the future.*

This guide will cover techniques and best practices for debugging MainWP extensions, including:

- Setting up a proper debugging environment
- Using WordPress debugging constants
- Logging techniques
- Common debugging tools and plugins
- Troubleshooting communication between Dashboard and Child sites
- Debugging AJAX requests
- Performance profiling
- Common issues and solutions

Check back soon for the complete guide.

## Related Resources

- [Setting Up a Development Environment](setup-environment.md)
- [Creating a Basic MainWP Extension](create-basic-extension.md)
- [Using MainWP Actions & Filters](actions-filters.md)

View file

@ -0,0 +1,490 @@
# Understanding the MainWP Development Extension

The MainWP Development Extension is a template provided by MainWP to help developers create new extensions quickly and efficiently. This guide explains the structure and components of the development extension, helping you understand how to use it effectively in your own projects.

## Quick Start for Experienced Developers

The MainWP Development Extension follows a standard object-oriented structure:

- **Main Class** (`MainWP_Development_Extension`): Initializes the extension and hooks into MainWP
- **Admin Class**: Handles admin pages, settings, and UI elements
- **Database Class**: Manages database operations
- **Utility Class**: Contains helper functions
- **AJAX Class**: Handles AJAX requests
- **Overview/Individual Classes**: Manage site overview and individual site pages

Key files to modify:
1. `mainwp-development-extension.php`: Main plugin file with registration
2. `class/class-mainwp-development-extension.php`: Core functionality
3. `class/class-mainwp-development-extension-admin.php`: Admin interface

## Repository Overview

The [MainWP Development Extension](https://github.com/mainwp/mainwp-development-extension) is available on GitHub and serves as a starting point for creating new extensions. It includes:

- A complete extension structure
- Example code for common MainWP integration points
- Properly formatted code following WordPress coding standards
- Comments explaining key functionality

## Directory Structure

```
mainwp-development-extension/
├── assets/
│ ├── css/
│ │ └── mainwp-development-extension.css
│ ├── images/
│ └── js/
│ └── mainwp-development-extension.js
├── class/
│ ├── class-mainwp-development-extension.php
│ ├── class-mainwp-development-extension-admin.php
│ ├── class-mainwp-development-extension-ajax.php
│ ├── class-mainwp-development-extension-db.php
│ ├── class-mainwp-development-extension-individual.php
│ ├── class-mainwp-development-extension-overview.php
│ └── class-mainwp-development-extension-utility.php
├── includes/
│ └── functions.php
├── languages/
│ └── mainwp-development-extension.pot
├── readme.txt
└── mainwp-development-extension.php
```

## Key Components

### Main Plugin File

The `mainwp-development-extension.php` file is the entry point for your extension. It includes:

- Plugin header information
- Extension registration with MainWP
- Basic setup and initialization

```php
/**
* Plugin Name: MainWP Development Extension
* Plugin URI: https://mainwp.com
* Description: MainWP Development Extension example.
* Version: 4.0
* Author: MainWP
* Author URI: https://mainwp.com
* Documentation URI: https://mainwp.com/help/
*/

// Registration with MainWP
add_filter('mainwp_getextensions', function($extensions) {
$extensions[] = array(
'plugin' => __FILE__,
'api' => 'MainWP_Development_Extension',
'mainwp' => true,
'callback' => array('MainWP_Development_Extension', 'get_instance'),
'name' => 'Development Extension'
);
return $extensions;
});
```

### Main Class

The `class-mainwp-development-extension.php` file contains the main class that initializes your extension and hooks into MainWP. Key features include:

- Singleton pattern implementation
- Hooks and filters registration
- Class loading and initialization

```php
class MainWP_Development_Extension {
// Singleton instance
private static $instance = null;
// Get singleton instance
public static function get_instance() {
if (null === self::$instance) {
self::$instance = new self();
}
return self::$instance;
}
// Constructor
public function __construct() {
// Load classes
$this->includes();
// Register hooks
$this->setup_hooks();
}
// Load required files
private function includes() {
// Load classes and dependencies
}
// Set up hooks and filters
private function setup_hooks() {
// Register actions and filters
}
}
```

### Admin Class

The `class-mainwp-development-extension-admin.php` file handles the admin interface for your extension, including:

- Admin menu registration
- Settings pages
- Admin UI elements

```php
class MainWP_Development_Extension_Admin {
// Initialize admin functionality
public function init() {
// Add admin menu items
add_action('mainwp_admin_menu', array($this, 'init_menu'));
}
// Register admin menu items
public function init_menu() {
// Add submenu pages
add_submenu_page(
'mainwp_tab',
__('Development Extension', 'mainwp-development-extension'),
__('Development Extension', 'mainwp-development-extension'),
'read',
'DevelopmentExtension',
array($this, 'render_admin_page')
);
}
// Render admin page
public function render_admin_page() {
// Display admin interface
}
}
```

### Database Class

The `class-mainwp-development-extension-db.php` file manages database operations for your extension, including:

- Table creation and management
- Data storage and retrieval
- Database optimization

```php
class MainWP_Development_Extension_DB {
// Database table name
private $table_name;
// Constructor
public function __construct() {
global $wpdb;
$this->table_name = $wpdb->prefix . 'mainwp_development_extension';
}
// Create database tables
public function create_table() {
global $wpdb;
// SQL for table creation
$sql = "CREATE TABLE IF NOT EXISTS $this->table_name (
id int(11) NOT NULL AUTO_INCREMENT,
site_id int(11) NOT NULL,
data text NOT NULL,
created_at datetime NOT NULL,
PRIMARY KEY (id)
) $wpdb->get_charset_collate();";
// Create table
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
}
// Add data
public function add_data($site_id, $data) {
global $wpdb;
// Insert data
$wpdb->insert(
$this->table_name,
array(
'site_id' => $site_id,
'data' => $data,
'created_at' => current_time('mysql')
),
array('%d', '%s', '%s')
);
return $wpdb->insert_id;
}
// Get data
public function get_data($site_id) {
global $wpdb;
// Retrieve data
return $wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM $this->table_name WHERE site_id = %d",
$site_id
)
);
}
}
```

### Utility Class

The `class-mainwp-development-extension-utility.php` file contains helper functions and utilities for your extension:

```php
class MainWP_Development_Extension_Utility {
// Format data for display
public static function format_data($data) {
// Format and return data
}
// Validate input
public static function validate_input($input) {
// Validate and sanitize input
}
// Generate unique ID
public static function generate_id() {
// Generate and return unique ID
}
}
```

### AJAX Class

The `class-mainwp-development-extension-ajax.php` file handles AJAX requests for your extension:

```php
class MainWP_Development_Extension_Ajax {
// Constructor
public function __construct() {
// Register AJAX handlers
add_action('wp_ajax_mainwp_development_extension_action', array($this, 'ajax_action'));
}
// Handle AJAX request
public function ajax_action() {
// Verify nonce
check_ajax_referer('mainwp_development_extension_nonce', 'security');
// Process request
$action = isset($_POST['action_type']) ? sanitize_text_field($_POST['action_type']) : '';
switch ($action) {
case 'get_data':
// Handle get_data action
break;
case 'save_data':
// Handle save_data action
break;
default:
// Handle unknown action
break;
}
// Return response
wp_send_json_success(array('message' => 'Action completed'));
}
}
```

### Overview and Individual Classes

The development extension includes classes for managing site overview and individual site pages:

- `class-mainwp-development-extension-overview.php`: Handles the extension's functionality on the MainWP Overview page
- `class-mainwp-development-extension-individual.php`: Handles the extension's functionality on individual site pages

These classes allow your extension to integrate with MainWP's site management interface.

## Common Integration Points

The development extension demonstrates several common integration points with MainWP:

### Dashboard Menu Integration

```php
add_action('mainwp_admin_menu', array($this, 'init_menu'));
```

### Site Actions

```php
add_filter('mainwp_site_actions', array($this, 'site_actions'), 10, 2);
```

### AJAX Handlers

```php
add_action('wp_ajax_mainwp_development_extension_action', array($this, 'ajax_action'));
```

### Dashboard Widgets

```php
add_action('mainwp_dashboard_widgets', array($this, 'dashboard_widgets'));
```

### Site Sync Data

```php
add_filter('mainwp_site_sync_data', array($this, 'sync_data'), 10, 2);
```

## Customizing the Development Extension

When using the development extension as a template for your own extension, follow these steps:

1. **Rename Files and Classes**: Change all file names and class names to match your extension name
2. **Update Namespaces**: Change the namespace from `MainWP\Dev` to your own namespace
3. **Modify Plugin Information**: Update the plugin header with your extension's details
4. **Customize Functionality**: Modify the classes to implement your extension's specific functionality
5. **Update Text Domain**: Change the text domain for internationalization
6. **Customize UI**: Modify the admin interface to match your extension's needs

## Best Practices

When working with the MainWP Development Extension, follow these best practices:

### Maintain the Structure

The development extension follows a well-organized structure that separates concerns and makes the code maintainable. Try to maintain this structure in your own extension.

### Use Proper Namespacing

Use proper PHP namespaces to avoid conflicts with other plugins and extensions:

```php
namespace MyCompany\MyExtension;
```

### Follow WordPress Coding Standards

Adhere to [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/) for consistent, readable code.

### Implement Proper Error Handling

Include robust error handling to ensure your extension gracefully handles unexpected situations:

```php
try {
// Attempt an operation
} catch (Exception $e) {
// Handle the error
error_log('MyExtension Error: ' . $e->getMessage());
// Display user-friendly message
}
```

### Use Prepared SQL Statements

Always use prepared statements for database queries to prevent SQL injection:

```php
$wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM $table_name WHERE site_id = %d",
$site_id
)
);
```

### Internationalize Your Extension

Make your extension translatable by using proper internationalization functions:

```php
__('Text to translate', 'your-text-domain');
esc_html__('Text to translate and escape', 'your-text-domain');
```

## Advanced Customization

### Adding Custom Database Tables

If your extension requires custom database tables, modify the Database class:

1. Define your table structure in the `create_table()` method
2. Add methods for CRUD operations on your tables
3. Call `create_table()` during plugin activation

### Creating Custom Admin Pages

To add custom admin pages:

1. Register your pages in the `init_menu()` method of the Admin class
2. Create rendering methods for each page
3. Implement the necessary functionality for each page

### Extending MainWP Dashboard Widgets

To add widgets to the MainWP Dashboard:

1. Hook into the `mainwp_dashboard_widgets` action
2. Register your widget with a unique ID
3. Create a callback function to render the widget content

```php
public function dashboard_widgets() {
add_meta_box(
'my_extension_widget',
__('My Extension Widget', 'my-extension'),
array($this, 'render_dashboard_widget'),
'mainwp_dashboard',
'normal',
'default'
);
}

public function render_dashboard_widget() {
// Widget content
}
```

## Troubleshooting Common Issues

### Class Not Found Errors

If you encounter "Class not found" errors:

1. Check that all file paths in the `includes()` method are correct
2. Ensure you've updated all class references when renaming
3. Verify that your autoloader (if used) is properly configured

### Database Errors

For database-related issues:

1. Check that your table creation SQL is valid
2. Ensure you're using proper data types and prepared statements
3. Verify that your database prefix is correct

### Integration Issues

If your extension doesn't integrate properly with MainWP:

1. Verify that you've registered your extension correctly with the `mainwp_getextensions` filter
2. Check that your callback function returns a valid instance
3. Ensure you're hooking into the correct MainWP actions and filters

## Next Steps

Now that you understand the MainWP Development Extension, you can:

- [Create a Basic MainWP Extension](create-basic-extension.md) using this template
- Learn about [Using MainWP Actions & Filters](actions-filters.md) for deeper integration
- Explore [Building Admin Interfaces](admin-interfaces.md) for your extension

## Related Resources

- [MainWP Development Extension on GitHub](https://github.com/mainwp/mainwp-development-extension)
- [MainWP Dashboard API Documentation](../../source-code/dashboard/)
- [MainWP Dashboard Hooks](../../mainwp-hooks/dashboard/)

View file

@ -0,0 +1,23 @@
# Packaging and Distributing MainWP Extensions

*This guide is a placeholder and will be expanded in the future.*

This guide will cover best practices for packaging and distributing MainWP extensions, including:

- Preparing your extension for distribution
- Creating a readme.txt file
- Adding screenshots and assets
- Version numbering and changelog management
- Distribution options (MainWP Extensions Directory, your own website, etc.)
- Licensing considerations
- Update mechanisms
- Marketing and promotion strategies
- Supporting your extension

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic MainWP Extension](create-basic-extension.md)
- [Extension Development Lifecycle](../concepts/extension-lifecycle.md)
- [Writing Clean & Maintainable Code](../best-practices/coding-standards.md)

View file

@ -0,0 +1,227 @@
# Setting Up a MainWP Development Environment

This guide walks you through setting up a development environment for MainWP extension development. A proper development environment will make your development process more efficient and help you avoid common issues.

## Quick Start for Experienced Developers

1. **Install Laragon** (or similar local development environment)
2. **Set up WordPress** (latest version)
3. **Install and configure MainWP Dashboard plugin**
4. **Add at least one test child site** (local or remote)
5. **Clone the MainWP Development Extension**:
```bash
git clone https://github.com/mainwp/mainwp-development-extension.git
```
6. **Start developing your extension**

## Why Use a Local Development Environment?

Developing MainWP extensions in a local environment offers several advantages:

- **Speed**: Local development is faster than working on a remote server
- **Safety**: You can experiment without affecting live sites
- **Offline Work**: You can work without an internet connection
- **Version Control**: Easier integration with Git or other version control systems
- **Debugging**: Better access to logs and debugging tools

## Recommended Development Tools

### Local Development Environment

We recommend using [Laragon](https://laragon.org/) for MainWP extension development because it:

- Is easy to set up and use
- Includes all necessary components (Apache, MySQL, PHP)
- Supports multiple PHP versions
- Includes helpful developer tools
- Makes it easy to create and manage multiple local sites

Other options include:
- [LocalWP](https://localwp.com/)
- [XAMPP](https://www.apachefriends.org/)
- [MAMP](https://www.mamp.info/)
- [Docker](https://www.docker.com/) with [WordPress containers](https://hub.docker.com/_/wordpress/)

### Code Editor

A good code editor will make your development more efficient. We recommend:

- [Visual Studio Code](https://code.visualstudio.com/) with PHP extensions
- [PhpStorm](https://www.jetbrains.com/phpstorm/)
- [Sublime Text](https://www.sublimetext.com/)

### Version Control

Using Git for version control is highly recommended:

- [Git](https://git-scm.com/)
- [GitHub Desktop](https://desktop.github.com/) (for a user-friendly interface)
- [GitKraken](https://www.gitkraken.com/)

### Browser Developer Tools

Modern browsers include developer tools that are essential for debugging:

- [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools)
- [Firefox Developer Tools](https://developer.mozilla.org/en-US/docs/Tools)

## Step-by-Step Setup Guide

### 1. Install Laragon

1. Download Laragon from [laragon.org](https://laragon.org/download/)
2. Install Laragon following the installation wizard
3. Launch Laragon

### 2. Create a WordPress Installation

1. In Laragon, click "Menu" > "Quick app" > "WordPress"
2. Enter a name for your site (e.g., "mainwp-dev")
3. Laragon will create a new WordPress installation
4. Once complete, click the link to open your new WordPress site
5. Complete the WordPress installation process

### 3. Install MainWP Dashboard

1. Log in to your WordPress admin dashboard
2. Go to "Plugins" > "Add New"
3. Search for "MainWP Dashboard"
4. Click "Install Now" and then "Activate"
5. Follow the MainWP setup wizard to configure the dashboard

### 4. Set Up Test Child Sites

For a complete development environment, you'll need at least one child site to test your extension with.

#### Option 1: Create Local Child Sites

1. In Laragon, create additional WordPress installations for child sites
2. Install and activate the MainWP Child plugin on each site
3. Connect these sites to your MainWP Dashboard

#### Option 2: Use Existing Remote Sites

If you have existing WordPress sites, you can use them as test child sites:

1. Install and activate the MainWP Child plugin on each site
2. Connect these sites to your MainWP Dashboard

### 5. Clone the MainWP Development Extension

1. Open a terminal or command prompt
2. Navigate to your WordPress plugins directory:
```bash
cd path/to/laragon/www/mainwp-dev/wp-content/plugins
```
3. Clone the MainWP Development Extension:
```bash
git clone https://github.com/mainwp/mainwp-development-extension.git
```
4. Activate the extension in your WordPress admin dashboard

### 6. Configure PHP Development Settings

For effective development and debugging, configure PHP with appropriate settings:

1. In Laragon, click "Menu" > "PHP" > "php.ini"
2. Ensure the following settings are enabled:
```ini
display_errors = On
error_reporting = E_ALL
```
3. Save the file and restart Laragon

### 7. Install Additional Development Tools

#### Composer

[Composer](https://getcomposer.org/) is a dependency manager for PHP that makes it easy to manage libraries and dependencies:

1. Laragon includes Composer by default
2. To use it, open Laragon Terminal and run:
```bash
composer --version
```

#### WP-CLI

[WP-CLI](https://wp-cli.org/) is a command-line tool for managing WordPress:

1. Laragon includes WP-CLI by default
2. To use it, open Laragon Terminal and run:
```bash
wp --version
```

#### Query Monitor

[Query Monitor](https://wordpress.org/plugins/query-monitor/) is a debugging plugin for WordPress:

1. In your WordPress admin, go to "Plugins" > "Add New"
2. Search for "Query Monitor"
3. Install and activate the plugin

## Development Workflow

Once your environment is set up, here's a recommended workflow for developing MainWP extensions:

1. **Plan your extension**: Define its purpose, features, and how it will integrate with MainWP
2. **Create a new extension** based on the MainWP Development Extension template
3. **Implement features** incrementally, testing each one as you go
4. **Test thoroughly** with different configurations and child sites
5. **Debug and refine** your code
6. **Package for distribution** when ready

## Debugging Tips

### WordPress Debugging

Enable WordPress debugging by adding these lines to your `wp-config.php` file:

```php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
```

Debug logs will be saved to `wp-content/debug.log`.

### MainWP Specific Debugging

MainWP includes several debugging options:

1. Go to "MainWP" > "Settings" > "Advanced Options"
2. Enable "Development Mode" for additional debugging information
3. Use the "MainWP Tools" section for diagnostics

## Common Issues and Solutions

### Connection Issues Between Dashboard and Child Sites

If you're having trouble connecting your MainWP Dashboard to child sites:

1. Ensure both sites are accessible from the internet (or use a tool like [ngrok](https://ngrok.com/) for local sites)
2. Check that the MainWP Child plugin is properly installed and activated
3. Verify that your server meets the [MainWP requirements](https://kb.mainwp.com/docs/mainwp-server-requirements/)
4. Try using the Connection Recovery process in MainWP Dashboard

### PHP Version Compatibility

MainWP requires PHP 7.0 or higher. To change PHP versions in Laragon:

1. Click "Menu" > "PHP"
2. Select the desired PHP version
3. Restart Laragon

## Next Steps

Now that your development environment is set up, you're ready to start creating your MainWP extension:

- [Creating a Basic MainWP Extension](create-basic-extension.md)
- [Understanding the MainWP Development Extension](mainwp-development-extension.md)

## Related Resources

- [MainWP Knowledge Base](https://kb.mainwp.com/)
- [WordPress Developer Resources](https://developer.wordpress.org/)
- [PHP Documentation](https://www.php.net/docs.php)

View file

@ -0,0 +1,24 @@
# Working with Third-Party APIs in MainWP Integrations

*This guide is a placeholder and will be expanded in the future.*

This guide will cover best practices for working with third-party APIs in MainWP integrations, including:

- Designing a robust API client
- Authentication methods (API keys, OAuth, etc.)
- Error handling and retry strategies
- Rate limiting considerations
- Caching API responses
- Handling API versioning
- Synchronizing data between MainWP and third-party services
- Security considerations
- Testing API integrations
- Debugging API issues

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic Integration](create-basic-integration.md)
- [API Integration Best Practices](../best-practices/api-integration.md)
- [Using MainWP Actions & Filters](actions-filters.md)

106
guides/index.md Normal file
View file

@ -0,0 +1,106 @@
# MainWP Developer Guides

Welcome to the MainWP Developer Guides! This documentation is designed to help you create add-ons for the MainWP platform, whether you're building a standalone extension or integrating with a third-party service.

## Understanding MainWP Add-on Types

MainWP uses specific terminology to distinguish between different types of add-ons:

- **Add-on**: The umbrella term for all MainWP plugins that extend functionality
- **Extension**: An add-on that works WITHOUT requiring a third-party plugin or API
- **Integration**: An add-on that works WITH a third-party plugin or API

## Which Type Should You Build?

Use this decision tree to determine whether you should build an Extension or an Integration:

```mermaid
flowchart TD
A[Do you need to connect with\na third-party service or plugin?] -->|Yes| B[Integration]
A -->|No| C[Extension]
B --> D[Examples: WooCommerce Integration,\nGoogle Analytics Integration]
C --> E[Examples: Advanced Uptime Monitor,\nAdvanced Reports Extension]
```

## Who These Guides Are For

These guides are intended for developers who want to:

- Create custom extensions for MainWP (standalone add-ons)
- Build integrations with third-party services or plugins
- Customize MainWP functionality for specific needs
- Understand the MainWP architecture and development patterns

Whether you're new to MainWP development or an experienced developer looking for specific information, you'll find resources tailored to your needs. We've optimized these guides for part-time developers who want to create MainWP add-ons efficiently.

## Guide Categories

### [Getting Started](getting-started/)

Essential information for beginning your MainWP development journey:

- [Setting Up a Development Environment](how-to/setup-environment.md)
- [Creating a Basic Extension](how-to/create-basic-extension.md) (standalone add-on)
- [Creating a Basic Integration](how-to/create-basic-integration.md) (third-party add-on)
- [Understanding the MainWP Development Extension](how-to/mainwp-development-extension.md)
- [Add-on Development Lifecycle](concepts/extension-lifecycle.md)

### [Core Development Topics](core-topics/)

Detailed guides for key development areas:

- [Building Admin Interfaces](how-to/admin-interfaces.md)
- [Data Storage and Retrieval](how-to/data-storage.md)
- [Using MainWP Actions & Filters](how-to/actions-filters.md)
- [Debugging Add-ons](how-to/debugging.md)
- [Packaging and Distribution](how-to/packaging-distribution.md)
- [Working with Third-Party APIs](how-to/third-party-apis.md) (for Integrations)

### [Best Practices](best-practices/)

Recommendations for creating high-quality MainWP add-ons:

- [Writing Clean & Maintainable Code](best-practices/coding-standards.md)
- [Security Considerations](best-practices/security.md)
- [Performance Optimization](best-practices/performance.md)
- [Documentation Standards](best-practices/documentation.md)
- [API Integration Best Practices](best-practices/api-integration.md)

### [Reference](reference/)

Technical reference material:

- [Common Hooks Reference](reference/common-hooks.md)
- [Add-on API Reference](reference/extension-api.md)
- [MainWP Dashboard Integration Points](reference/dashboard-integration.md)
- [Child Site Communication](reference/child-site-communication.md)
- [Third-Party API Integration Patterns](reference/api-integration-patterns.md)

## Additional Resources

- [MainWP Dashboard API Documentation](../source-code/dashboard/)
- [MainWP Child API Documentation](../source-code/child/)
- [MainWP Dashboard Hooks](../mainwp-hooks/dashboard/)
- [MainWP Child Hooks](../mainwp-hooks/child/)
- [MainWP Development Extension on GitHub](https://github.com/mainwp/mainwp-development-extension)
- [MainWP API Client PHP on GitHub](https://github.com/mainwp/mainwp-api-client-php)

## How to Use These Guides

Each guide is structured to provide information at different levels of detail:

- **Quick Start** sections provide essential information for experienced developers
- **Detailed Explanations** help new developers understand concepts thoroughly
- **Code Examples** demonstrate practical implementation with copy-paste snippets
- **Reference Links** connect to API documentation and source code
- **Troubleshooting Tips** help you overcome common challenges

We've designed these guides with part-time developers in mind. If you're creating a MainWP add-on as a side project, you'll find:

- Clear, concise guides that respect your time constraints
- Separate pathways for Extension and Integration development
- Ready-to-use code snippets that you can adapt for your needs
- Practical implementation guidance focused on results
- Common pitfalls and their solutions to avoid getting stuck

Use the navigation to find the specific information you need, or follow the guides sequentially for a comprehensive learning path.

View file

@ -0,0 +1,31 @@
# Third-Party API Integration Patterns

*This guide is a placeholder and will be expanded in the future.*

This guide will provide a reference for common patterns and approaches when integrating third-party APIs with MainWP, including:

- Common API integration architectures
- Authentication patterns (API keys, OAuth flows, JWT)
- Data synchronization patterns
- Webhook handling
- Polling vs. push notifications
- Error handling strategies
- Caching strategies
- Rate limiting management
- Pagination handling
- Batch processing

Each pattern will include:
- Description and purpose
- Implementation examples
- Advantages and disadvantages
- Best practices
- Common pitfalls

Check back soon for the complete guide.

## Related Resources

- [Creating a Basic Integration](../how-to/create-basic-integration.md)
- [Working with Third-Party APIs](../how-to/third-party-apis.md)
- [API Integration Best Practices](../best-practices/api-integration.md)

View file

@ -0,0 +1,19 @@
# Common Hooks Reference

*This guide is a placeholder and will be expanded in the future.*

This guide will provide a reference for the most commonly used MainWP hooks (actions and filters), organized by functionality. It will include:

- Hook name and type (action or filter)
- Description and purpose
- Parameters
- Example usage
- Related hooks

Check back soon for the complete guide.

## Related Resources

- [MainWP Dashboard Hooks](../../mainwp-hooks/dashboard/)
- [MainWP Child Hooks](../../mainwp-hooks/child/)
- [Using MainWP Actions & Filters](../how-to/actions-filters.md)

View file

@ -141,28 +141,28 @@
<section>
<h2>Developer Resources</h2>
<div class="documentation-grid">
<div class="doc-card coming-soon">
<div class="doc-card">
<h3>Developer Guides</h3>
<p>Comprehensive guides for MainWP extension development.</p>
<a href="guides/index.md" class="button">View Guides</a>
</div>
<div class="doc-card">
<h3>Getting Started</h3>
<p>Guides for developers new to MainWP extension development.</p>
<a href="#" class="button">Coming Soon</a>
<p>Learn how to set up your development environment and create your first extension.</p>
<a href="guides/how-to/setup-environment.md" class="button">Get Started</a>
</div>
<div class="doc-card coming-soon">
<h3>Code Examples</h3>
<p>Practical code examples for common MainWP development tasks.</p>
<a href="#" class="button">Coming Soon</a>
</div>
<div class="doc-card coming-soon">
<h3>Best Practices</h3>
<p>Recommended approaches and patterns for MainWP development.</p>
<a href="#" class="button">Coming Soon</a>
</div>
<div class="doc-card coming-soon">
<div class="doc-card">
<h3>Extension Development</h3>
<p>Comprehensive guide to building MainWP extensions.</p>
<a href="#" class="button">Coming Soon</a>
<p>Detailed guides for creating and customizing MainWP extensions.</p>
<a href="guides/how-to/create-basic-extension.md" class="button">Learn More</a>
</div>
<div class="doc-card">
<h3>Actions & Filters</h3>
<p>Learn how to use MainWP hooks to integrate your extensions.</p>
<a href="guides/how-to/actions-filters.md" class="button">View Guide</a>
</div>
</div>
</section>

View file

@ -0,0 +1,477 @@
# Backups & Restoration Actions

Hooks for backup creation, management, and restoration processes.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_reports_backwpup_backup`](#mainwp_reports_backwpup_backup) - Create BackWPup MainWP Client Reports log.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_reports_backupwordpress_backup`](#mainwp_reports_backupwordpress_backup) - Add BackUpWordPress data to the reports database table.
- [`mainwp_reports_wptimecapsule_backup`](#mainwp_reports_wptimecapsule_backup) - Add WP Time Capsule data to the reports database table.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Backupbuddy Client Reports log.
- [`mainwp_reports_backupbuddy_backup`](#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_reports_backupbuddy_backup`](#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_backup`](#mainwp_backup) - Save backup stream.
- [`{$event}`](#event) - Backup now.
- [`itsec_has_external_backup`](#itsec_has_external_backup) - Check if backup exists.
- [`itsec_scheduled_external_backup`](#itsec_scheduled_external_backup) - Check if there is a shedualed backup.
- [`is_any_staging_process_going_on`](#is_any_staging_process_going_on) - Get backup process progress.
- [`get_bbu_note_view`](#get_bbu_note_view) - Get backup process progress.
- [`staging_status_wptc`](#staging_status_wptc) - Get backup process progress.
- [`is_restore_to_staging_wptc`](#is_restore_to_staging_wptc) - Start the restore process.
- [`get_restore_to_staging_request_wptc`](#get_restore_to_staging_request_wptc) - Start the restore process.
- [`check_requirements_auto_backup_wptc`](#check_requirements_auto_backup_wptc) - Save the WP Time Capsule settings - backups section.
- [`updraft_backupnow_options`](#updraft_backupnow_options) - *Arguments*
- [`updraftplus_accept_archivename`](#updraftplus_accept_archivename) - Restore all downloaded backups from history.
- [`updraftplus_importforeign_backupable_plus_db`](#updraftplus_importforeign_backupable_plus_db) - Restore all downloaded backups from history.
- [`updraftplus_https_to_http_additional_warning`](#updraftplus_https_to_http_additional_warning) - *Arguments*
- [`updraftplus_http_to_https_additional_warning`](#updraftplus_http_to_https_additional_warning) - *Arguments*
- [`updraftplus_migrator_addon_link`](#updraftplus_migrator_addon_link) - *Arguments*
- [`updraftplus_com_link`](#updraftplus_com_link) - *Arguments*
- [`updraftplus_accept_archivename`](#updraftplus_accept_archivename) - Build existing backups table.
- [`updraftplus_showbackup_date`](#updraftplus_showbackup_date) - Date label.
- [`updraftplus_msg_unfinishedbackup`](#updraftplus_msg_unfinishedbackup) - *Arguments*
- [`updraftplus_dirlist_sanitize_text_field()`](#updraftplus_dirlist_sanitize_text_field()) - Check disk space used.
- [`updraftplus_print_active_job_continue`](#updraftplus_print_active_job_continue) - *Arguments*
- [`wpvivid_get_mainwp_sync_data`](#wpvivid_get_mainwp_sync_data) - Sync other data from $data[] and merge with $information[]

## Hook Details

### `mainwp_reports_backwpup_backup`

*Create BackWPup MainWP Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backup_type` | |
`$backup_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 320](class/class-mainwp-child-back-wp-up.php#L320-L409)



### `mainwp_child_reports_log`

*Add support for the reporting system.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'backupwordpress'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-wordpress.php](class/class-mainwp-child-back-up-wordpress.php), [line 303](class/class-mainwp-child-back-up-wordpress.php#L303-L313)



### `mainwp_reports_backupwordpress_backup`

*Add BackUpWordPress data to the reports database table.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$destination` | |
`$message` | |
`'finished'` | |
`$backup_type` | |
`$date` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-wordpress.php](class/class-mainwp-child-back-up-wordpress.php), [line 319](class/class-mainwp-child-back-up-wordpress.php#L319-L358)



### `mainwp_reports_wptimecapsule_backup`

*Add WP Time Capsule data to the reports database table.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backup_type` | |
`$backup_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1014](class/class-mainwp-child-timecapsule.php#L1014-L1068)



### `mainwp_child_reports_log`

*Backupbuddy Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'backupbuddy'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-buddy.php](class/class-mainwp-child-back-up-buddy.php), [line 163](class/class-mainwp-child-back-up-buddy.php#L163-L170)



### `mainwp_reports_backupbuddy_backup`

*Create BackupBuddy Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backupType` | |
`$finish_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-buddy.php](class/class-mainwp-child-back-up-buddy.php), [line 176](class/class-mainwp-child-back-up-buddy.php#L176-L267)



### `mainwp_reports_backupbuddy_backup`

*Create BackupBuddy Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backupType` | |
`$finish_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-buddy.php](class/class-mainwp-child-back-up-buddy.php), [line 176](class/class-mainwp-child-back-up-buddy.php#L176-L291)



### `mainwp_backup`

*Save backup stream.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$destination` | |
`$message` | |
`$size` | |
`$status` | |
`$type` | |

Source: [../sources/mainwp-child/class/class-mainwp-client-report.php](class/class-mainwp-client-report.php), [line 195](class/class-mainwp-client-report.php#L195-L208)



### `{$event}`

*Backup now.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`apply_filters($options, array())` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1101](class/class-mainwp-child-updraft-plus-backups.php#L1101-L1136)



### `itsec_has_external_backup`

*Check if backup exists.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$has_backup` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-ithemes-security.php](class/class-mainwp-child-ithemes-security.php), [line 680](class/class-mainwp-child-ithemes-security.php#L680-L688)



### `itsec_scheduled_external_backup`

*Check if there is a shedualed backup.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$sceduled_backup` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-ithemes-security.php](class/class-mainwp-child-ithemes-security.php), [line 691](class/class-mainwp-child-ithemes-security.php#L691-L699)



### `is_any_staging_process_going_on`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L530)



### `get_bbu_note_view`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L549)



### `staging_status_wptc`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L550)



### `is_restore_to_staging_wptc`

*Start the restore process.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 615](class/class-mainwp-child-timecapsule.php#L615-L622)



### `get_restore_to_staging_request_wptc`

*Start the restore process.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 615](class/class-mainwp-child-timecapsule.php#L615-L623)



### `check_requirements_auto_backup_wptc`

*Save the WP Time Capsule settings - backups section.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1674](class/class-mainwp-child-timecapsule.php#L1674-L1699)



### `updraft_backupnow_options`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$options` | |
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1136](class/class-mainwp-child-updraft-plus-backups.php#L1136-L1136)



### `updraftplus_accept_archivename`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L1980)



### `updraftplus_importforeign_backupable_plus_db`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($backupable_plus_db, array($foreign_known[$backups[$timestamp]['meta_foreign']], &$mess, &$warn, &$err))` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L1996)



### `updraftplus_https_to_http_additional_warning`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('This restoration will work if you still have an SSL certificate (i.e. can use https) to access the site. Otherwise, you will want to use %s to search/replace the site address so that the site can be visited without https.', 'updraftplus'), '<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('the migrator add-on', 'updraftplus') . '</a>')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2634](class/class-mainwp-child-updraft-plus-backups.php#L2634-L2634)



### `updraftplus_http_to_https_additional_warning`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('As long as your web hosting allows http (i.e. non-SSL access) or will forward requests to https (which is almost always the case), this is no problem. If that is not yet set up, then you should set it up, or use %s so that the non-https links are automatically replaced.', 'updraftplus'), apply_filters('<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('the migrator add-on', 'updraftplus') . '</a>'))` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2636](class/class-mainwp-child-updraft-plus-backups.php#L2636-L2636)



### `updraftplus_migrator_addon_link`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('the migrator add-on', 'updraftplus') . '</a>'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2636](class/class-mainwp-child-updraft-plus-backups.php#L2636-L2636)



### `updraftplus_com_link`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'https://updraftplus.com/faqs/tell-me-more-about-the-search-and-replace-site-location-in-the-database-option/'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2648](class/class-mainwp-child-updraft-plus-backups.php#L2648-L2648)



### `updraftplus_accept_archivename`

*Build existing backups table.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3006](class/class-mainwp-child-updraft-plus-backups.php#L3006-L3043)



### `updraftplus_showbackup_date`

*Date label.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$pretty_date` | `string` | Pretty date.
`$backup` | `string` | Type of backup.
`$jobdata` | `array` | Job data.
`(int) $key` | |
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3192](class/class-mainwp-child-updraft-plus-backups.php#L3192-L3204)



### `updraftplus_msg_unfinishedbackup`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<br><span title="' . esc_attr(esc_html__('If you are seeing more backups than you expect, then it is probably because the deletion of old backup sets does not happen until a fresh backup completes.', 'updraftplus')) . '">' . esc_html__('(Not finished)', 'updraftplus') . '</span>'` | |
`$jobdata` | |
`$nonce` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3206](class/class-mainwp-child-updraft-plus-backups.php#L3206-L3206)



### `updraftplus_dirlist_sanitize_text_field()`

*Check disk space used.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$basedir` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3499](class/class-mainwp-child-updraft-plus-backups.php#L3499-L3521)



### `updraftplus_print_active_job_continue`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |
`$is_oneshot` | |
`$next_resumption` | |
`$jobdata` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3736](class/class-mainwp-child-updraft-plus-backups.php#L3736-L3736)



### `wpvivid_get_mainwp_sync_data`

*Sync other data from $data[] and merge with $information[]*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$information` | `array` | Stores the returned information.

Source: [../sources/mainwp-child/class/class-mainwp-child-wpvivid-backuprestore.php](class/class-mainwp-child-wpvivid-backuprestore.php), [line 91](class/class-mainwp-child-wpvivid-backuprestore.php#L91-L107)



View file

@ -0,0 +1,114 @@
# Connection & Authentication Actions

Hooks for establishing and managing connections between Dashboard and Child sites.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`wp_logout`](#wp_logout) - Method parse_login_required()
- [`wp_logout`](#wp_logout) - Method parse_login_required()
- [`wp_logout`](#wp_logout) - Method login()
- [`wp_login`](#wp_login) - Method login()
- [`mainwp_child_authed_download_params`](#mainwp_child_authed_download_params) - Method where_authed_redirect()
- [`https_local_ssl_verify`](#https_local_ssl_verify) - *Arguments*
- [`mainwp_create_post_custom_author`](#mainwp_create_post_custom_author) - Update post data.

## Hook Details

### `wp_logout`

*Method parse_login_required()*

Check if the login process is required.


Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 652](class/class-mainwp-connect.php#L652-L680)



### `wp_logout`

*Method parse_login_required()*

Check if the login process is required.


Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 652](class/class-mainwp-connect.php#L652-L710)



### `wp_logout`

*Method login()*

The login process handler.


Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 1021](class/class-mainwp-connect.php#L1021-L1058)



### `wp_login`

*Method login()*

The login process handler.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$user->user_login` | |

Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 1021](class/class-mainwp-connect.php#L1021-L1066)



### `mainwp_child_authed_download_params`

*Method where_authed_redirect()*

Safe redirect to wanted location.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$auth_dl` | |

Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 821](class/class-mainwp-connect.php#L821-L847)



### `https_local_ssl_verify`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-server-information-base.php](class/class-mainwp-child-server-information-base.php), [line 702](class/class-mainwp-child-server-information-base.php#L702-L702)



### `mainwp_create_post_custom_author`

*Update post data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$new_post_id` | `string` | New post ID.

Source: [../sources/mainwp-child/class/class-mainwp-child-posts.php](class/class-mainwp-child-posts.php), [line 968](class/class-mainwp-child-posts.php#L968-L1012)



View file

@ -0,0 +1,174 @@
# Content Handling Actions

Hooks for managing content on Child sites.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`wphb_clear_page_cache`](#wphb_clear_page_cache) - Purge WP Hummingbird cache.
- [`run_gpi`](#run_gpi) - Method do_check_pages()
- [`mainwp_child_after_newpost`](#mainwp_child_after_newpost) - Build New Post.
- [`comment_email`](#comment_email) - Get recent comments.
- [`mainwp_child_extra_execution`](#mainwp_child_extra_execution) - Filter 'mainwp_child_extra_execution'
- [`wpvivid_handle_mainwp_action`](#wpvivid_handle_mainwp_action) - Post MainWP data.
- [`mainwp-child-init-subpages`](#mainwp-child-init-subpages) - Initiate MainWP Child Plugin pages.
- [`mainwp_child_init_subpages`](#mainwp_child_init_subpages) - Initiate MainWP Child Plugin pages.
- [`error_log_mainwp_logs`](#error_log_mainwp_logs) - Render the error log content.
- [`error_log_mainwp_lines`](#error_log_mainwp_lines) - Render the error log content.

## Hook Details

### `wphb_clear_page_cache`

*Purge WP Hummingbird cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 741](class/class-mainwp-child-cache-purge.php#L741-L756)



### `run_gpi`

*Method do_check_pages()*

Check or force re-check pages page speed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$forceRecheck` | `bool` | If true, force recheck process, if false, just regular check.

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 429](class/class-mainwp-child-pagespeed.php#L429-L445)



### `mainwp_child_after_newpost`

*Build New Post.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$result` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-posts.php](class/class-mainwp-child-posts.php), [line 373](class/class-mainwp-child-posts.php#L373-L405)



### `comment_email`

*Get recent comments.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$comment->comment_author_email` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-comments.php](class/class-mainwp-child-comments.php), [line 200](class/class-mainwp-child-comments.php#L200-L229)



### `mainwp_child_extra_execution`

*Filter 'mainwp_child_extra_execution'*

Additional functions to execute through the filter.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$information` | `array` | An array containing the synchronization information.
`$post` | `mixed` | Contains the POST request.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-callable.php](class/class-mainwp-child-callable.php), [line 745](class/class-mainwp-child-callable.php#L745-L755)



### `wpvivid_handle_mainwp_action`

*Post MainWP data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$ret` | |
`$data` | `string` | Data to post.

Source: [../sources/mainwp-child/class/class-mainwp-child-wpvivid-backuprestore.php](class/class-mainwp-child-wpvivid-backuprestore.php), [line 225](class/class-mainwp-child-wpvivid-backuprestore.php#L225-L239)



### `mainwp-child-init-subpages`

*Initiate MainWP Child Plugin pages.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(array())` | |
`'4.0.7.1'` | |
`'mainwp_child_init_subpages'` | |

Source: [../sources/mainwp-child/class/class-mainwp-pages.php](class/class-mainwp-pages.php), [line 230](class/class-mainwp-pages.php#L230-L246)



### `mainwp_child_init_subpages`

*Initiate MainWP Child Plugin pages.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$all_subpages` | |

Source: [../sources/mainwp-child/class/class-mainwp-pages.php](class/class-mainwp-pages.php), [line 230](class/class-mainwp-pages.php#L230-L247)



### `error_log_mainwp_logs`

*Render the error log content.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($error_log)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-server-information.php](class/class-mainwp-child-server-information.php), [line 1089](class/class-mainwp-child-server-information.php#L1089-L1107)



### `error_log_mainwp_lines`

*Render the error log content.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-server-information.php](class/class-mainwp-child-server-information.php), [line 1089](class/class-mainwp-child-server-information.php#L1089-L1108)



View file

@ -0,0 +1,155 @@
# MainWP Child Actions

This section provides documentation for all action hooks available in the MainWP Child plugin.

## Categories

- [Connection & Authentication](connection-authentication/index.md) (7 hooks)
- [Updates & Maintenance](updates-maintenance/index.md) (38 hooks)
- [Content Handling](content-handling/index.md) (10 hooks)
- [User Operations](user-operations/index.md) (9 hooks)
- [Backups & Restoration](backups-restoration/index.md) (30 hooks)
- [Security & Monitoring](security-monitoring/index.md) (16 hooks)
- [System & Settings](system-settings/index.md) (5 hooks)
- [Miscellaneous](misc/index.md) (23 hooks)

## All Actions (Alphabetical)

- [`active_plugins`](updates-maintenance/index.md#active_plugins) - *Arguments*
- [`active_plugins`](updates-maintenance/index.md#active_plugins) - *Arguments*
- [`admin_enqueue_scripts`](security-monitoring/index.md#admin_enqueue_scripts) - Method is_asset_in_admin()
- [`check_passwords`](security-monitoring/index.md#check_passwords) - Edit existing user.
- [`check_requirements_auto_backup_wptc`](backups-restoration/index.md#check_requirements_auto_backup_wptc) - Save the WP Time Capsule settings - backups section.
- [`comment_email`](content-handling/index.md#comment_email) - Get recent comments.
- [`deprecated_hook_run`](system-settings/index.md#deprecated_hook_run) - Support old WP version 4.0.
- [`error_log_mainwp_lines`](content-handling/index.md#error_log_mainwp_lines) - Render the error log content.
- [`error_log_mainwp_logs`](content-handling/index.md#error_log_mainwp_logs) - Render the error log content.
- [`get_backup_before_update_setting_wptc`](updates-maintenance/index.md#get_backup_before_update_setting_wptc) - Get backup process progress.
- [`get_bbu_note_view`](backups-restoration/index.md#get_bbu_note_view) - Get backup process progress.
- [`get_restore_to_staging_request_wptc`](backups-restoration/index.md#get_restore_to_staging_request_wptc) - Start the restore process.
- [`gpi_check_status`](security-monitoring/index.md#gpi_check_status) - Method save_settings()
- [`gpi_check_status`](security-monitoring/index.md#gpi_check_status) - Method do_check_pages()
- [`gpi_check_status`](security-monitoring/index.md#gpi_check_status) - Method get_sync_data()
- [`https_local_ssl_verify`](connection-authentication/index.md#https_local_ssl_verify) - *Arguments*
- [`illegal_user_logins`](user-operations/index.md#illegal_user_logins) - Edit existing user.
- [`is_any_staging_process_going_on`](backups-restoration/index.md#is_any_staging_process_going_on) - Get backup process progress.
- [`is_restore_to_staging_wptc`](backups-restoration/index.md#is_restore_to_staging_wptc) - Start the restore process.
- [`itsec_has_external_backup`](backups-restoration/index.md#itsec_has_external_backup) - Check if backup exists.
- [`itsec_scheduled_external_backup`](backups-restoration/index.md#itsec_scheduled_external_backup) - Check if there is a shedualed backup.
- [`mainwp-child-get-total-size`](updates-maintenance/index.md#mainwp-child-get-total-size) - Get total size of Child Site installation.
- [`mainwp-child-init-subpages`](content-handling/index.md#mainwp-child-init-subpages) - Initiate MainWP Child Plugin pages.
- [`mainwp-site-sync-others-data`](misc/index.md#mainwp-site-sync-others-data) - Get other stats data.
- [`mainwp_backup`](backups-restoration/index.md#mainwp_backup) - Save backup stream.
- [`mainwp_before_post_update`](updates-maintenance/index.md#mainwp_before_post_update) - Hook: `mainwp_before_post_update`
- [`mainwp_branding_role_cap_enable_contact_form`](user-operations/index.md#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`mainwp_branding_role_cap_enable_contact_form`](user-operations/index.md#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`mainwp_child_actions_save_data`](user-operations/index.md#mainwp_child_actions_save_data) - Log handler.
- [`mainwp_child_actions_saved_number_of_days`](security-monitoring/index.md#mainwp_child_actions_saved_number_of_days) - Method to check actions data.
- [`mainwp_child_after_newpost`](content-handling/index.md#mainwp_child_after_newpost) - Build New Post.
- [`mainwp_child_after_update`](updates-maintenance/index.md#mainwp_child_after_update) - Method to_update_plugins()
- [`mainwp_child_after_update`](updates-maintenance/index.md#mainwp_child_after_update) - Method to_upgrade_themes()
- [`mainwp_child_authed_download_params`](connection-authentication/index.md#mainwp_child_authed_download_params) - Method where_authed_redirect()
- [`mainwp_child_before_send_close_message`](misc/index.md#mainwp_child_before_send_close_message) - Action: process before send close message.
- [`mainwp_child_before_send_feedback_message`](misc/index.md#mainwp_child_before_send_feedback_message) - Action: process send feedback message.
- [`mainwp_child_before_update`](updates-maintenance/index.md#mainwp_child_before_update) - Method to_update_plugins()
- [`mainwp_child_before_update`](updates-maintenance/index.md#mainwp_child_before_update) - Method to_upgrade_themes()
- [`mainwp_child_before_update_plugin_theme`](updates-maintenance/index.md#mainwp_child_before_update_plugin_theme) - Action before update plugin, theme.
- [`mainwp_child_before_update_wp`](updates-maintenance/index.md#mainwp_child_before_update_wp) - Action before update WP.
- [`mainwp_child_branding_init_options`](system-settings/index.md#mainwp_child_branding_init_options) - Filter 'mainwp_child_branding_init_options'
- [`mainwp_child_contact_support_mail_headers`](misc/index.md#mainwp_child_contact_support_mail_headers) - Send support email.
- [`mainwp_child_db_updater_sync_data`](updates-maintenance/index.md#mainwp_child_db_updater_sync_data) - Get sync data.
- [`mainwp_child_deactivation`](updates-maintenance/index.md#mainwp_child_deactivation) - Method deactivation()
- [`mainwp_child_extra_execution`](content-handling/index.md#mainwp_child_extra_execution) - Filter 'mainwp_child_extra_execution'
- [`mainwp_child_forced_get_total_size`](updates-maintenance/index.md#mainwp_child_forced_get_total_size) - Get total size of Child Site installation.
- [`mainwp_child_get_total_size`](updates-maintenance/index.md#mainwp_child_get_total_size) - Get total size of Child Site installation.
- [`mainwp_child_hide_update_notice`](updates-maintenance/index.md#mainwp_child_hide_update_notice) - After admin bar render.
- [`mainwp_child_hide_update_notice`](updates-maintenance/index.md#mainwp_child_hide_update_notice) - Admin footer text.
- [`mainwp_child_init_subpages`](content-handling/index.md#mainwp_child_init_subpages) - Initiate MainWP Child Plugin pages.
- [`mainwp_child_install_plugin_theme`](updates-maintenance/index.md#mainwp_child_install_plugin_theme) - Method after_installed()
- [`mainwp_child_install_plugin_theme`](updates-maintenance/index.md#mainwp_child_install_plugin_theme) - Method after_installed()
- [`mainwp_child_installPluginTheme`](updates-maintenance/index.md#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_installPluginTheme`](updates-maintenance/index.md#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_mu_plugin_enabled`](updates-maintenance/index.md#mainwp_child_mu_plugin_enabled) - Method deactivation()
- [`mainwp_child_mu_plugin_enabled`](updates-maintenance/index.md#mainwp_child_mu_plugin_enabled) - Method delete_connection_data()
- [`mainwp_child_plugin_action`](updates-maintenance/index.md#mainwp_child_plugin_action) - Method delete_plugins()
- [`mainwp_child_plugin_health_check_max_plugins_to_batch`](updates-maintenance/index.md#mainwp_child_plugin_health_check_max_plugins_to_batch) - *Arguments*
- [`mainwp_child_plugin_row_meta`](updates-maintenance/index.md#mainwp_child_plugin_row_meta) - MainWP Child Plugin meta data.
- [`mainwp_child_reports_log`](system-settings/index.md#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_child_reports_log`](system-settings/index.md#mainwp_child_reports_log) - Method do_site_stats()
- [`mainwp_child_reports_log`](misc/index.md#mainwp_child_reports_log) - Record BackWPup MainWP Child Reports log.
- [`mainwp_child_reports_log`](backups-restoration/index.md#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_child_reports_log`](backups-restoration/index.md#mainwp_child_reports_log) - Backupbuddy Client Reports log.
- [`mainwp_child_site_stats`](misc/index.md#mainwp_child_site_stats) - Get Child Site Stats.
- [`mainwp_child_theme_action`](updates-maintenance/index.md#mainwp_child_theme_action) - Method theme_action()
- [`mainwp_child_theme_health_check_max_themes_to_batch`](updates-maintenance/index.md#mainwp_child_theme_health_check_max_themes_to_batch) - *Arguments*
- [`mainwp_child_unique_id`](misc/index.md#mainwp_child_unique_id) - Method get_site_unique_id()
- [`mainwp_child_woocom_get_data`](misc/index.md#mainwp_child_woocom_get_data) - Get Woocommerce reports old.
- [`mainwp_child_woocom_report_data`](misc/index.md#mainwp_child_woocom_report_data) - Woocommerce report data.
- [`mainwp_child_woocom_sync_data`](misc/index.md#mainwp_child_woocom_sync_data) - Sync Woocommerce data.
- [`mainwp_create_post_custom_author`](connection-authentication/index.md#mainwp_create_post_custom_author) - Update post data.
- [`mainwp_reports_backupbuddy_backup`](backups-restoration/index.md#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_reports_backupbuddy_backup`](backups-restoration/index.md#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_reports_backupwordpress_backup`](backups-restoration/index.md#mainwp_reports_backupwordpress_backup) - Add BackUpWordPress data to the reports database table.
- [`mainwp_reports_backwpup_backup`](backups-restoration/index.md#mainwp_reports_backwpup_backup) - Create BackWPup MainWP Client Reports log.
- [`mainwp_reports_maintenance`](updates-maintenance/index.md#mainwp_reports_maintenance) - Method maintenance_db()
- [`mainwp_reports_sucuri_scan`](security-monitoring/index.md#mainwp_reports_sucuri_scan) - Save sucuri stream.
- [`mainwp_reports_wordfence_scan`](security-monitoring/index.md#mainwp_reports_wordfence_scan) - Method do_reports_log()
- [`mainwp_reports_wptimecapsule_backup`](backups-restoration/index.md#mainwp_reports_wptimecapsule_backup) - Add WP Time Capsule data to the reports database table.
- [`mainwp_site_sync_others_data`](misc/index.md#mainwp_site_sync_others_data) - Get other stats data.
- [`mwp_premium_perform_update`](updates-maintenance/index.md#mwp_premium_perform_update) - Method upgrade_plugin()
- [`mwp_premium_perform_update`](updates-maintenance/index.md#mwp_premium_perform_update) - Method upgrade_theme()
- [`mwp_premium_update_check`](updates-maintenance/index.md#mwp_premium_update_check) - Check for premium updates.
- [`mwp_premium_update_notification`](updates-maintenance/index.md#mwp_premium_update_notification) - Check for premium updates.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Filter whether the user who generated the nonce is logged out.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Create security nounce without session.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Verify nonce without session.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Method create_nonce_without_session()
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Method verify_nonce_without_session()
- [`phpmailer_init`](security-monitoring/index.md#phpmailer_init) - Check destination email.
- [`plugins_api`](updates-maintenance/index.md#plugins_api) - Method to_update_plugins()
- [`rt_nginx_helper_purge_all`](misc/index.md#rt_nginx_helper_purge_all) - Purge Nginx Helper cache.
- [`run_gpi`](content-handling/index.md#run_gpi) - Method do_check_pages()
- [`sanitize_file_name`](misc/index.md#sanitize_file_name) - Filters a sanitized filename string.
- [`sanitize_file_name_chars`](misc/index.md#sanitize_file_name_chars) - Filters the list of characters to remove from a filename.
- [`save_settings_revision_limit_wptc`](system-settings/index.md#save_settings_revision_limit_wptc) - Save the WP Time Capsule settings - backups section.
- [`staging_status_wptc`](backups-restoration/index.md#staging_status_wptc) - Get backup process progress.
- [`swis_clear_complete_cache`](updates-maintenance/index.md#swis_clear_complete_cache) - Purge Swis Performance plugin cache.
- [`update_white_labling_settings_wptc`](updates-maintenance/index.md#update_white_labling_settings_wptc) - Process the sigin response info.
- [`updraft_backupnow_options`](backups-restoration/index.md#updraft_backupnow_options) - *Arguments*
- [`updraftplus_accept_archivename`](backups-restoration/index.md#updraftplus_accept_archivename) - Restore all downloaded backups from history.
- [`updraftplus_accept_archivename`](backups-restoration/index.md#updraftplus_accept_archivename) - Build existing backups table.
- [`updraftplus_checkzip_end_{$type}`](security-monitoring/index.md#updraftplus_checkzip_end_type) - Restore all downloaded backups from history.
- [`updraftplus_checkzip_{$type}`](security-monitoring/index.md#updraftplus_checkzip_type) - Restore all downloaded backups from history.
- [`updraftplus_com_link`](backups-restoration/index.md#updraftplus_com_link) - *Arguments*
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse database file.
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse database file.
- [`updraftplus_dbscan_urlchange_www_append_warning`](security-monitoring/index.md#updraftplus_dbscan_urlchange_www_append_warning) - *Arguments*
- [`updraftplus_dirlist_sanitize_text_field()`](backups-restoration/index.md#updraftplus_dirlist_sanitize_text_field()) - Check disk space used.
- [`updraftplus_http_to_https_additional_warning`](backups-restoration/index.md#updraftplus_http_to_https_additional_warning) - *Arguments*
- [`updraftplus_https_to_http_additional_warning`](backups-restoration/index.md#updraftplus_https_to_http_additional_warning) - *Arguments*
- [`updraftplus_importforeign_backupable_plus_db`](backups-restoration/index.md#updraftplus_importforeign_backupable_plus_db) - Restore all downloaded backups from history.
- [`updraftplus_migrator_addon_link`](backups-restoration/index.md#updraftplus_migrator_addon_link) - *Arguments*
- [`updraftplus_msg_unfinishedbackup`](backups-restoration/index.md#updraftplus_msg_unfinishedbackup) - *Arguments*
- [`updraftplus_print_active_job_continue`](backups-restoration/index.md#updraftplus_print_active_job_continue) - *Arguments*
- [`updraftplus_showbackup_date`](backups-restoration/index.md#updraftplus_showbackup_date) - Date label.
- [`user_profile_update_errors`](updates-maintenance/index.md#user_profile_update_errors) - Edit existing user.
- [`woocommerce_dashboard_status_widget_sales_query`](misc/index.md#woocommerce_dashboard_status_widget_sales_query) - *Arguments*
- [`woocommerce_hide_{$name}_notice`](updates-maintenance/index.md#woocommerce_hide_name_notice) - Hide a single notice.
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`wp_login`](connection-authentication/index.md#wp_login) - Method login()
- [`wp_logout`](connection-authentication/index.md#wp_logout) - Method parse_login_required()
- [`wp_logout`](connection-authentication/index.md#wp_logout) - Method parse_login_required()
- [`wp_logout`](connection-authentication/index.md#wp_logout) - Method login()
- [`wpfc_clear_all_cache`](misc/index.md#wpfc_clear_all_cache) - Purge WP Fastest Cache.
- [`wphb_clear_page_cache`](content-handling/index.md#wphb_clear_page_cache) - Purge WP Hummingbird cache.
- [`wpvivid_get_mainwp_sync_data`](backups-restoration/index.md#wpvivid_get_mainwp_sync_data) - Sync other data from $data[] and merge with $information[]
- [`wpvivid_handle_mainwp_action`](content-handling/index.md#wpvivid_handle_mainwp_action) - Post MainWP data.
- [`{$event}`](backups-restoration/index.md#event) - Backup now.
- [`{$hook_name}`](misc/index.md#hook_name) - Support old WP version 4.0.

View file

@ -0,0 +1,372 @@
# Miscellaneous Actions

Miscellaneous hooks that don't fit into other categories.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Record BackWPup MainWP Child Reports log.
- [`mainwp_child_site_stats`](#mainwp_child_site_stats) - Get Child Site Stats.
- [`mainwp_child_before_send_feedback_message`](#mainwp_child_before_send_feedback_message) - Action: process send feedback message.
- [`mainwp_child_before_send_close_message`](#mainwp_child_before_send_close_message) - Action: process before send close message.
- [`rt_nginx_helper_purge_all`](#rt_nginx_helper_purge_all) - Purge Nginx Helper cache.
- [`wpfc_clear_all_cache`](#wpfc_clear_all_cache) - Purge WP Fastest Cache.
- [`{$hook_name}`](#hook_name) - Support old WP version 4.0.
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`mainwp_child_woocom_sync_data`](#mainwp_child_woocom_sync_data) - Sync Woocommerce data.
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`mainwp_child_woocom_report_data`](#mainwp_child_woocom_report_data) - Woocommerce report data.
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_dashboard_status_widget_sales_query`](#woocommerce_dashboard_status_widget_sales_query) - *Arguments*
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`mainwp_child_woocom_get_data`](#mainwp_child_woocom_get_data) - Get Woocommerce reports old.
- [`sanitize_file_name_chars`](#sanitize_file_name_chars) - Filters the list of characters to remove from a filename.
- [`sanitize_file_name`](#sanitize_file_name) - Filters a sanitized filename string.
- [`mainwp-site-sync-others-data`](#mainwp-site-sync-others-data) - Get other stats data.
- [`mainwp_site_sync_others_data`](#mainwp_site_sync_others_data) - Get other stats data.
- [`mainwp_child_unique_id`](#mainwp_child_unique_id) - Method get_site_unique_id()
- [`mainwp_child_contact_support_mail_headers`](#mainwp_child_contact_support_mail_headers) - Send support email.

## Hook Details

### `mainwp_child_reports_log`

*Record BackWPup MainWP Child Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'backwpup'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 307](class/class-mainwp-child-back-wp-up.php#L307-L314)



### `mainwp_child_site_stats`

*Get Child Site Stats.*


Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 141](class/class-mainwp-child-stats.php#L141-L358)



### `mainwp_child_before_send_feedback_message`

*Action: process send feedback message.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$value` | |
`$action` | |

**Changelog**

Version | Description
------- | -----------
`5.1` |

Source: [../sources/mainwp-child/class/class-mainwp-helper.php](class/class-mainwp-helper.php), [line 72](class/class-mainwp-helper.php#L72-L77)



### `mainwp_child_before_send_close_message`

*Action: process before send close message.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$value` | |
`$action` | |

**Changelog**

Version | Description
------- | -----------
`4.4.0.3` |

Source: [../sources/mainwp-child/class/class-mainwp-helper.php](class/class-mainwp-helper.php), [line 94](class/class-mainwp-helper.php#L94-L99)



### `rt_nginx_helper_purge_all`

*Purge Nginx Helper cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 716](class/class-mainwp-child-cache-purge.php#L716-L729)



### `wpfc_clear_all_cache`

*Purge WP Fastest Cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 818](class/class-mainwp-child-cache-purge.php#L818-L831)



### `{$hook_name}`

*Support old WP version 4.0.*

Fires functions attached to a deprecated filter hook.

When a filter hook is deprecated, the apply_filters() call is replaced with
apply_filters_deprecated(), which triggers a deprecation notice and then fires
the original filter hook.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | `array` | Array of additional function arguments to be passed to apply_filters().

Source: [../sources/mainwp-child/includes/functions.php](includes/functions.php), [line 169](includes/functions.php#L169-L189)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 145](class/class-mainwp-child-woocommerce-status.php#L145-L145)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 168](class/class-mainwp-child-woocommerce-status.php#L168-L168)



### `mainwp_child_woocom_sync_data`

*Sync Woocommerce data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 113](class/class-mainwp-child-woocommerce-status.php#L113-L213)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 258](class/class-mainwp-child-woocommerce-status.php#L258-L258)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 277](class/class-mainwp-child-woocommerce-status.php#L277-L277)



### `mainwp_child_woocom_report_data`

*Woocommerce report data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 220](class/class-mainwp-child-woocommerce-status.php#L220-L319)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 522](class/class-mainwp-child-woocommerce-status.php#L522-L522)



### `woocommerce_dashboard_status_widget_sales_query`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$query` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 527](class/class-mainwp-child-woocommerce-status.php#L527-L527)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 536](class/class-mainwp-child-woocommerce-status.php#L536-L536)



### `mainwp_child_woocom_get_data`

*Get Woocommerce reports old.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 490](class/class-mainwp-child-woocommerce-status.php#L490-L585)



### `sanitize_file_name_chars`

*Filters the list of characters to remove from a filename.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$special_chars` | `string[]` | Array of characters to remove.
`$filename_raw` | `string` | The original filename to be sanitized.

**Changelog**

Version | Description
------- | -----------
`2.8.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-misc.php](class/class-mainwp-child-misc.php), [line 557](class/class-mainwp-child-misc.php#L557-L565)



### `sanitize_file_name`

*Filters a sanitized filename string.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$filename` | `string` | Sanitized filename.
`$filename_raw` | `string` | The filename prior to sanitization.

**Changelog**

Version | Description
------- | -----------
`2.8.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-misc.php](class/class-mainwp-child-misc.php), [line 572](class/class-mainwp-child-misc.php#L572-L580)



### `mainwp-site-sync-others-data`

*Get other stats data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($information, $othersData)` | |
`'4.0.7.1'` | |
`'mainwp_site_sync_others_data'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 466](class/class-mainwp-child-stats.php#L466-L482)



### `mainwp_site_sync_others_data`

*Get other stats data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$information` | `array` | Child Site Stats array.
`$othersData` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 466](class/class-mainwp-child-stats.php#L466-L483)



### `mainwp_child_unique_id`

*Method get_site_unique_id()*

Get site unique id.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uniqueId` | |

Source: [../sources/mainwp-child/class/class-mainwp-helper.php](class/class-mainwp-helper.php), [line 744](class/class-mainwp-helper.php#L744-L757)



### `mainwp_child_contact_support_mail_headers`

*Send support email.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$headers` | |
`$email` | |
`$from` | |

Source: [../sources/mainwp-child/class/class-mainwp-utility.php](class/class-mainwp-utility.php), [line 740](class/class-mainwp-utility.php#L740-L774)



View file

@ -0,0 +1,274 @@
# Security & Monitoring Actions

Hooks related to security checks, uptime monitoring, and site health.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`phpmailer_init`](#phpmailer_init) - Check destination email.
- [`mainwp_reports_sucuri_scan`](#mainwp_reports_sucuri_scan) - Save sucuri stream.
- [`mainwp_reports_wordfence_scan`](#mainwp_reports_wordfence_scan) - Method do_reports_log()
- [`updraftplus_checkzip_{$type}`](#updraftplus_checkzip_type) - Restore all downloaded backups from history.
- [`updraftplus_checkzip_end_{$type}`](#updraftplus_checkzip_end_type) - Restore all downloaded backups from history.
- [`check_passwords`](#check_passwords) - Edit existing user.
- [`admin_enqueue_scripts`](#admin_enqueue_scripts) - Method is_asset_in_admin()
- [`mainwp_child_actions_saved_number_of_days`](#mainwp_child_actions_saved_number_of_days) - Method to check actions data.
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange_www_append_warning`](#updraftplus_dbscan_urlchange_www_append_warning) - *Arguments*
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse database file.
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse database file.
- [`gpi_check_status`](#gpi_check_status) - Method save_settings()
- [`gpi_check_status`](#gpi_check_status) - Method do_check_pages()
- [`gpi_check_status`](#gpi_check_status) - Method get_sync_data()

## Hook Details

### `phpmailer_init`

*Check destination email.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(&$phpmailer)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 1311](class/class-mainwp-child-back-wp-up.php#L1311-L1363)



### `mainwp_reports_sucuri_scan`

*Save sucuri stream.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$result` | |
`$scan_status` | |
`$scan_data` | |
`$scan_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-client-report.php](class/class-mainwp-client-report.php), [line 179](class/class-mainwp-client-report.php#L179-L191)



### `mainwp_reports_wordfence_scan`

*Method do_reports_log()*

Add Wordfence data to the reports reports database table.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$ctime` | |
`$details` | |
`$result` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wordfence.php](class/class-mainwp-child-wordfence.php), [line 309](class/class-mainwp-child-wordfence.php#L309-L371)



### `updraftplus_checkzip_{$type}`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($updraft_dir . '/' . $file, &$mess, &$warn, &$err)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L2036)



### `updraftplus_checkzip_end_{$type}`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(&$mess, &$warn, &$err)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L2040)



### `check_passwords`

*Edit existing user.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($user->user_login, &$pass1, &$pass2)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-users.php](class/class-mainwp-child-users.php), [line 303](class/class-mainwp-child-users.php#L303-L395)



### `admin_enqueue_scripts`

*Method is_asset_in_admin()*

Check if the CSS/JS file is loaded in admin or not.


Source: [../sources/mainwp-child/class/class-mainwp-child-html-regression.php](class/class-mainwp-child-html-regression.php), [line 224](class/class-mainwp-child-html-regression.php#L224-L238)



### `mainwp_child_actions_saved_number_of_days`

*Method to check actions data.*

Clear old the action info.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$days_number` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-actions.php](class/class-mainwp-child-actions.php), [line 251](class/class-mainwp-child-actions.php#L251-L264)



### `updraftplus_dbscan_urlchange`

*Analyse old database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('Warning: %s', 'updraftplus'), '<a href="http://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>')` | |
`$old_siteurl` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2216](class/class-mainwp-child-updraft-plus-backups.php#L2216-L2367)



### `updraftplus_dbscan_urlchange`

*Analyse old database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('Warning: %s', 'updraftplus'), '<a href="http://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>')` | |
`$old_home` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2216](class/class-mainwp-child-updraft-plus-backups.php#L2216-L2377)



### `updraftplus_dbscan_urlchange_www_append_warning`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2639](class/class-mainwp-child-updraft-plus-backups.php#L2639-L2639)



### `updraftplus_dbscan_urlchange`

*Analyse database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>'` | |
`$old_siteurl` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2472](class/class-mainwp-child-updraft-plus-backups.php#L2472-L2645)



### `updraftplus_dbscan_urlchange`

*Analyse database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>'` | |
`$old_home` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2472](class/class-mainwp-child-updraft-plus-backups.php#L2472-L2664)



### `gpi_check_status`

*Method save_settings()*

Save the plugin settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 252](class/class-mainwp-child-pagespeed.php#L252-L265)



### `gpi_check_status`

*Method do_check_pages()*

Check or force re-check pages page speed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 429](class/class-mainwp-child-pagespeed.php#L429-L441)



### `gpi_check_status`

*Method get_sync_data()*

Get the Google Pagespeed Insights plugin data and store it in the sync request.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 452](class/class-mainwp-child-pagespeed.php#L452-L471)



View file

@ -0,0 +1,109 @@
# System & Settings Actions

Hooks related to general settings and system configuration.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`deprecated_hook_run`](#deprecated_hook_run) - Support old WP version 4.0.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Method do_site_stats()
- [`save_settings_revision_limit_wptc`](#save_settings_revision_limit_wptc) - Save the WP Time Capsule settings - backups section.
- [`mainwp_child_branding_init_options`](#mainwp_child_branding_init_options) - Filter 'mainwp_child_branding_init_options'

## Hook Details

### `deprecated_hook_run`

*Support old WP version 4.0.*

Fires functions attached to a deprecated filter hook.

When a filter hook is deprecated, the apply_filters() call is replaced with
apply_filters_deprecated(), which triggers a deprecation notice and then fires
the original filter hook.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$hook_name` | `string` | The name of the filter hook.
`$replacement` | `string` | Optional. The hook that should have been used. Default empty.
`$version` | `string` | The version of WordPress that deprecated the hook.
`$message` | `string` | Optional. A message regarding the change. Default empty.

Source: [../sources/mainwp-child/includes/functions.php](includes/functions.php), [line 169](includes/functions.php#L169-L188)



### `mainwp_child_reports_log`

*Add support for the reporting system.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'wptimecapsule'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 998](class/class-mainwp-child-timecapsule.php#L998-L1008)



### `mainwp_child_reports_log`

*Method do_site_stats()*

Add support for the reporting system.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'wordfence'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wordfence.php](class/class-mainwp-child-wordfence.php), [line 300](class/class-mainwp-child-wordfence.php#L300-L306)



### `save_settings_revision_limit_wptc`

*Save the WP Time Capsule settings - backups section.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data['revision_limit']` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1674](class/class-mainwp-child-timecapsule.php#L1674-L1702)



### `mainwp_child_branding_init_options`

*Filter 'mainwp_child_branding_init_options'*

Set custom branding setting through the filter.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$opts` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding.php](class/class-mainwp-child-branding.php), [line 106](class/class-mainwp-child-branding.php#L106-L113)



View file

@ -0,0 +1,629 @@
# Updates & Maintenance Actions

Hooks for managing updates to plugins, themes, and WordPress core.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`update_white_labling_settings_wptc`](#update_white_labling_settings_wptc) - Process the sigin response info.
- [`mainwp_child_plugin_action`](#mainwp_child_plugin_action) - Method delete_plugins()
- [`mainwp_child_theme_action`](#mainwp_child_theme_action) - Method theme_action()
- [`mainwp_child_installPluginTheme`](#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_install_plugin_theme`](#mainwp_child_install_plugin_theme) - Method after_installed()
- [`mainwp_child_installPluginTheme`](#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_install_plugin_theme`](#mainwp_child_install_plugin_theme) - Method after_installed()
- [`woocommerce_hide_{$name}_notice`](#woocommerce_hide_name_notice) - Hide a single notice.
- [`user_profile_update_errors`](#user_profile_update_errors) - Edit existing user.
- [`mainwp_reports_maintenance`](#mainwp_reports_maintenance) - Method maintenance_db()
- [`mainwp_child_before_update_plugin_theme`](#mainwp_child_before_update_plugin_theme) - Action before update plugin, theme.
- [`mainwp_child_before_update`](#mainwp_child_before_update) - Method to_update_plugins()
- [`mainwp_child_after_update`](#mainwp_child_after_update) - Method to_update_plugins()
- [`mainwp_child_before_update`](#mainwp_child_before_update) - Method to_upgrade_themes()
- [`mainwp_child_after_update`](#mainwp_child_after_update) - Method to_upgrade_themes()
- [`mainwp_child_before_update_wp`](#mainwp_child_before_update_wp) - Action before update WP.
- [`swis_clear_complete_cache`](#swis_clear_complete_cache) - Purge Swis Performance plugin cache.
- [`mainwp_child_deactivation`](#mainwp_child_deactivation) - Method deactivation()
- [`mainwp_before_post_update`](#mainwp_before_post_update) - Hook: `mainwp_before_post_update`
- [`mainwp_child_plugin_health_check_max_plugins_to_batch`](#mainwp_child_plugin_health_check_max_plugins_to_batch) - *Arguments*
- [`active_plugins`](#active_plugins) - *Arguments*
- [`active_plugins`](#active_plugins) - *Arguments*
- [`get_backup_before_update_setting_wptc`](#get_backup_before_update_setting_wptc) - Get backup process progress.
- [`mainwp_child_theme_health_check_max_themes_to_batch`](#mainwp_child_theme_health_check_max_themes_to_batch) - *Arguments*
- [`mainwp_child_hide_update_notice`](#mainwp_child_hide_update_notice) - After admin bar render.
- [`mainwp_child_hide_update_notice`](#mainwp_child_hide_update_notice) - Admin footer text.
- [`mwp_premium_update_check`](#mwp_premium_update_check) - Check for premium updates.
- [`mwp_premium_update_notification`](#mwp_premium_update_notification) - Check for premium updates.
- [`mainwp-child-get-total-size`](#mainwp-child-get-total-size) - Get total size of Child Site installation.
- [`mainwp_child_get_total_size`](#mainwp_child_get_total_size) - Get total size of Child Site installation.
- [`mainwp_child_forced_get_total_size`](#mainwp_child_forced_get_total_size) - Get total size of Child Site installation.
- [`mwp_premium_perform_update`](#mwp_premium_perform_update) - Method upgrade_plugin()
- [`plugins_api`](#plugins_api) - Method to_update_plugins()
- [`mwp_premium_perform_update`](#mwp_premium_perform_update) - Method upgrade_theme()
- [`mainwp_child_plugin_row_meta`](#mainwp_child_plugin_row_meta) - MainWP Child Plugin meta data.
- [`mainwp_child_mu_plugin_enabled`](#mainwp_child_mu_plugin_enabled) - Method deactivation()
- [`mainwp_child_mu_plugin_enabled`](#mainwp_child_mu_plugin_enabled) - Method delete_connection_data()
- [`mainwp_child_db_updater_sync_data`](#mainwp_child_db_updater_sync_data) - Get sync data.

## Hook Details

### `update_white_labling_settings_wptc`

*Process the sigin response info.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$cust_req_info` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1233](class/class-mainwp-child-timecapsule.php#L1233-L1257)



### `mainwp_child_plugin_action`

*Method delete_plugins()*

Delete a plugin from the Child Site.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 158](class/class-mainwp-child-install.php#L158-L219)



### `mainwp_child_theme_action`

*Method theme_action()*

Theme Activate, Deactivate & Delete actions.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 230](class/class-mainwp-child-install.php#L230-L324)



### `mainwp_child_installPluginTheme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($args)` | |
`'4.0.7.1'` | |
`'mainwp_child_install_plugin_theme'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L531)



### `mainwp_child_install_plugin_theme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L532)



### `mainwp_child_installPluginTheme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($args)` | |
`'4.0.7.1'` | |
`'mainwp_child_install_plugin_theme'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L555)



### `mainwp_child_install_plugin_theme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L556)



### `woocommerce_hide_{$name}_notice`

*Hide a single notice.*


Source: [../sources/mainwp-child/class/class-mainwp-child-db-updater-wc.php](class/class-mainwp-child-db-updater-wc.php), [line 222](class/class-mainwp-child-db-updater-wc.php#L222-L230)



### `user_profile_update_errors`

*Edit existing user.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(&$errors, $update, &$user)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-users.php](class/class-mainwp-child-users.php), [line 303](class/class-mainwp-child-users.php#L303-L434)



### `mainwp_reports_maintenance`

*Method maintenance_db()*

Child site database maintenance.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$log_time` | |
`$details` | |
`$result` | |
`$max_revisions` | `int` | Maximum revisions to keep.

Source: [../sources/mainwp-child/class/class-mainwp-child-maintenance.php](class/class-mainwp-child-maintenance.php), [line 92](class/class-mainwp-child-maintenance.php#L92-L198)



### `mainwp_child_before_update_plugin_theme`

*Action before update plugin, theme.*


**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 115](class/class-mainwp-child-updates.php#L115-L120)



### `mainwp_child_before_update`

*Method to_update_plugins()*

Complete the plugins update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'plugin'` | |
`$plugins` | `array` | An array containing plugins to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 356](class/class-mainwp-child-updates.php#L356-L374)



### `mainwp_child_after_update`

*Method to_update_plugins()*

Complete the plugins update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'plugin'` | |
`$result` | |
`$plugins` | `array` | An array containing plugins to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 356](class/class-mainwp-child-updates.php#L356-L379)



### `mainwp_child_before_update`

*Method to_upgrade_themes()*

Complete the themes update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'theme'` | |
`$themes` | `array` | An array containing themes to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 547](class/class-mainwp-child-updates.php#L547-L583)



### `mainwp_child_after_update`

*Method to_upgrade_themes()*

Complete the themes update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'theme'` | |
`$result` | |
`$themes` | `array` | An array containing themes to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 547](class/class-mainwp-child-updates.php#L547-L589)



### `mainwp_child_before_update_wp`

*Action before update WP.*


**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 1171](class/class-mainwp-child-updates.php#L1171-L1176)



### `swis_clear_complete_cache`

*Purge Swis Performance plugin cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 369](class/class-mainwp-child-cache-purge.php#L369-L389)



### `mainwp_child_deactivation`

*Method deactivation()*

Deactivate the MainWP Child plugin.


Source: [../sources/mainwp-child/class/class-mainwp-child.php](class/class-mainwp-child.php), [line 460](class/class-mainwp-child.php#L460-L477)



### `mainwp_before_post_update`

*Hook: `mainwp_before_post_update`*

Runs before creating or updating a post via MainWP dashboard.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$new_post` | `array` | <20> Post data array.
`$post_custom` | `array` | <20> Post custom meta data.
`$post_category` | `string` | <20> Post categories.
`$post_tags` | `string` | <20> Post tags.
`$others` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-posts.php](class/class-mainwp-child-posts.php), [line 777](class/class-mainwp-child-posts.php#L777-L787)

## Filters



### `mainwp_child_plugin_health_check_max_plugins_to_batch`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-plugins-check.php](class/class-mainwp-child-plugins-check.php), [line 286](class/class-mainwp-child-plugins-check.php#L286-L286)



### `active_plugins`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`get_option('active_plugins')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wp-seopress.php](class/class-mainwp-child-wp-seopress.php), [line 59](class/class-mainwp-child-wp-seopress.php#L59-L59)



### `active_plugins`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`get_option('active_plugins')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wp-seopress.php](class/class-mainwp-child-wp-seopress.php), [line 77](class/class-mainwp-child-wp-seopress.php#L77-L77)



### `get_backup_before_update_setting_wptc`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L548)



### `mainwp_child_theme_health_check_max_themes_to_batch`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-themes-check.php](class/class-mainwp-child-themes-check.php), [line 253](class/class-mainwp-child-themes-check.php#L253-L253)



### `mainwp_child_hide_update_notice`

*After admin bar render.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding-render.php](class/class-mainwp-child-branding-render.php), [line 207](class/class-mainwp-child-branding-render.php#L207-L211)



### `mainwp_child_hide_update_notice`

*Admin footer text.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding-render.php](class/class-mainwp-child-branding-render.php), [line 261](class/class-mainwp-child-branding-render.php#L261-L265)



### `mwp_premium_update_check`

*Check for premium updates.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 685](class/class-mainwp-child-stats.php#L685-L697)



### `mwp_premium_update_notification`

*Check for premium updates.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 685](class/class-mainwp-child-stats.php#L685-L708)



### `mainwp-child-get-total-size`

*Get total size of Child Site installation.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(true)` | |
`'4.0.7.1'` | |
`'mainwp_child_get_total_size'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 945](class/class-mainwp-child-stats.php#L945-L955)



### `mainwp_child_get_total_size`

*Get total size of Child Site installation.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$get_file_size` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 945](class/class-mainwp-child-stats.php#L945-L956)



### `mainwp_child_forced_get_total_size`

*Get total size of Child Site installation.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 945](class/class-mainwp-child-stats.php#L945-L957)



### `mwp_premium_perform_update`

*Method upgrade_plugin()*

Initiate the plugin update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 188](class/class-mainwp-child-updates.php#L188-L271)



### `plugins_api`

*Method to_update_plugins()*

Complete the plugins update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`'plugin_information'` | |
`array('slug' => $plugin)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 356](class/class-mainwp-child-updates.php#L356-L393)



### `mwp_premium_perform_update`

*Method upgrade_theme()*

Execute themes updates.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 464](class/class-mainwp-child-updates.php#L464-L521)



### `mainwp_child_plugin_row_meta`

*MainWP Child Plugin meta data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$plugin_meta` | `array` | Plugin meta.
`$plugin_file` | `string` | Plugin file.
`$mainWPChild->plugin_slug` | |

Source: [../sources/mainwp-child/class/class-mainwp-pages.php](class/class-mainwp-pages.php), [line 295](class/class-mainwp-pages.php#L295-L315)



### `mainwp_child_mu_plugin_enabled`

*Method deactivation()*

Deactivate the MainWP Child plugin.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child.php](class/class-mainwp-child.php), [line 460](class/class-mainwp-child.php#L460-L471)



### `mainwp_child_mu_plugin_enabled`

*Method delete_connection_data()*

Delete connection data.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child.php](class/class-mainwp-child.php), [line 481](class/class-mainwp-child.php#L481-L491)



### `mainwp_child_db_updater_sync_data`

*Get sync data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-db-updater.php](class/class-mainwp-child-db-updater.php), [line 100](class/class-mainwp-child-db-updater.php#L100-L104)


<p align="center"><a href="https://github.com/pronamic/wp-documentor"><img src="https://cdn.jsdelivr.net/gh/pronamic/wp-documentor@main/logos/pronamic-wp-documentor.svgo-min.svg" alt="Pronamic WordPress Documentor" width="32" height="32"></a><br><em>Generated by <a href="https://github.com/pronamic/wp-documentor">Pronamic WordPress Documentor</a> <code>1.2.0</code></em><p>



View file

@ -0,0 +1,186 @@
# User Operations Actions

Hooks related to user management on Child sites.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`nonce_user_logged_out`](#nonce_user_logged_out) - Filter whether the user who generated the nonce is logged out.
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Create security nounce without session.
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Verify nonce without session.
- [`mainwp_child_actions_save_data`](#mainwp_child_actions_save_data) - Log handler.
- [`mainwp_branding_role_cap_enable_contact_form`](#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`mainwp_branding_role_cap_enable_contact_form`](#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`illegal_user_logins`](#illegal_user_logins) - Edit existing user.
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Method create_nonce_without_session()
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Method verify_nonce_without_session()

## Hook Details

### `nonce_user_logged_out`

*Filter whether the user who generated the nonce is logged out.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | `int` | ID of the nonce-owning user.
`$action` | `string` | The nonce action.

**Changelog**

Version | Description
------- | -----------
`3.5.0` |

Source: [../sources/mainwp-child/includes/functions.php](includes/functions.php), [line 34](includes/functions.php#L34-L42)



### `nonce_user_logged_out`

*Create security nounce without session.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `int` | Action performing.

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 1074](class/class-mainwp-child-back-wp-up.php#L1074-L1085)



### `nonce_user_logged_out`

*Verify nonce without session.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `int` | Action to perform.

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 1093](class/class-mainwp-child-back-wp-up.php#L1093-L1106)



### `mainwp_child_actions_save_data`

*Log handler.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |
`$context` | `string` | Context of the event.
`$action` | `string` | Action of the event.
`$args` | `array` | sprintf (and extra) arguments to use.
`$message` | `string` | sprintf-ready error message string.
`$user_id` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-actions.php](class/class-mainwp-child-actions.php), [line 721](class/class-mainwp-child-actions.php#L721-L761)



### `mainwp_branding_role_cap_enable_contact_form`

*Filter 'mainwp_branding_role_cap_enable_contact_form'*

Manage the support form visibility. Set false to hide the support form page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding.php](class/class-mainwp-child-branding.php), [line 560](class/class-mainwp-child-branding.php#L560-L567)



### `mainwp_branding_role_cap_enable_contact_form`

*Filter 'mainwp_branding_role_cap_enable_contact_form'*

Manage the support form visibility. Set false to hide the support form page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding.php](class/class-mainwp-child-branding.php), [line 1163](class/class-mainwp-child-branding.php#L1163-L1170)



### `illegal_user_logins`

*Edit existing user.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-users.php](class/class-mainwp-child-users.php), [line 303](class/class-mainwp-child-users.php#L303-L418)



### `nonce_user_logged_out`

*Method create_nonce_without_session()*

Create nonce without session.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `mixed` | Action to perform.

Source: [../sources/mainwp-child/class/class-mainwp-utility.php](class/class-mainwp-utility.php), [line 812](class/class-mainwp-utility.php#L812-L825)



### `nonce_user_logged_out`

*Method verify_nonce_without_session()*

Verify nonce without session.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `mixed` | Action to perform.

Source: [../sources/mainwp-child/class/class-mainwp-utility.php](class/class-mainwp-utility.php), [line 834](class/class-mainwp-utility.php#L834-L849)



View file

@ -0,0 +1,477 @@
# Backups & Restoration Filters

Hooks for backup creation, management, and restoration processes.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_reports_backwpup_backup`](#mainwp_reports_backwpup_backup) - Create BackWPup MainWP Client Reports log.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_reports_backupwordpress_backup`](#mainwp_reports_backupwordpress_backup) - Add BackUpWordPress data to the reports database table.
- [`mainwp_reports_wptimecapsule_backup`](#mainwp_reports_wptimecapsule_backup) - Add WP Time Capsule data to the reports database table.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Backupbuddy Client Reports log.
- [`mainwp_reports_backupbuddy_backup`](#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_reports_backupbuddy_backup`](#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_backup`](#mainwp_backup) - Save backup stream.
- [`{$event}`](#event) - Backup now.
- [`itsec_has_external_backup`](#itsec_has_external_backup) - Check if backup exists.
- [`itsec_scheduled_external_backup`](#itsec_scheduled_external_backup) - Check if there is a shedualed backup.
- [`is_any_staging_process_going_on`](#is_any_staging_process_going_on) - Get backup process progress.
- [`get_bbu_note_view`](#get_bbu_note_view) - Get backup process progress.
- [`staging_status_wptc`](#staging_status_wptc) - Get backup process progress.
- [`is_restore_to_staging_wptc`](#is_restore_to_staging_wptc) - Start the restore process.
- [`get_restore_to_staging_request_wptc`](#get_restore_to_staging_request_wptc) - Start the restore process.
- [`check_requirements_auto_backup_wptc`](#check_requirements_auto_backup_wptc) - Save the WP Time Capsule settings - backups section.
- [`updraft_backupnow_options`](#updraft_backupnow_options) - *Arguments*
- [`updraftplus_accept_archivename`](#updraftplus_accept_archivename) - Restore all downloaded backups from history.
- [`updraftplus_importforeign_backupable_plus_db`](#updraftplus_importforeign_backupable_plus_db) - Restore all downloaded backups from history.
- [`updraftplus_https_to_http_additional_warning`](#updraftplus_https_to_http_additional_warning) - *Arguments*
- [`updraftplus_http_to_https_additional_warning`](#updraftplus_http_to_https_additional_warning) - *Arguments*
- [`updraftplus_migrator_addon_link`](#updraftplus_migrator_addon_link) - *Arguments*
- [`updraftplus_com_link`](#updraftplus_com_link) - *Arguments*
- [`updraftplus_accept_archivename`](#updraftplus_accept_archivename) - Build existing backups table.
- [`updraftplus_showbackup_date`](#updraftplus_showbackup_date) - Date label.
- [`updraftplus_msg_unfinishedbackup`](#updraftplus_msg_unfinishedbackup) - *Arguments*
- [`updraftplus_dirlist_sanitize_text_field()`](#updraftplus_dirlist_sanitize_text_field()) - Check disk space used.
- [`updraftplus_print_active_job_continue`](#updraftplus_print_active_job_continue) - *Arguments*
- [`wpvivid_get_mainwp_sync_data`](#wpvivid_get_mainwp_sync_data) - Sync other data from $data[] and merge with $information[]

## Hook Details

### `mainwp_reports_backwpup_backup`

*Create BackWPup MainWP Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backup_type` | |
`$backup_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 320](class/class-mainwp-child-back-wp-up.php#L320-L409)



### `mainwp_child_reports_log`

*Add support for the reporting system.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'backupwordpress'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-wordpress.php](class/class-mainwp-child-back-up-wordpress.php), [line 303](class/class-mainwp-child-back-up-wordpress.php#L303-L313)



### `mainwp_reports_backupwordpress_backup`

*Add BackUpWordPress data to the reports database table.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$destination` | |
`$message` | |
`'finished'` | |
`$backup_type` | |
`$date` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-wordpress.php](class/class-mainwp-child-back-up-wordpress.php), [line 319](class/class-mainwp-child-back-up-wordpress.php#L319-L358)



### `mainwp_reports_wptimecapsule_backup`

*Add WP Time Capsule data to the reports database table.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backup_type` | |
`$backup_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1014](class/class-mainwp-child-timecapsule.php#L1014-L1068)



### `mainwp_child_reports_log`

*Backupbuddy Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'backupbuddy'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-buddy.php](class/class-mainwp-child-back-up-buddy.php), [line 163](class/class-mainwp-child-back-up-buddy.php#L163-L170)



### `mainwp_reports_backupbuddy_backup`

*Create BackupBuddy Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backupType` | |
`$finish_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-buddy.php](class/class-mainwp-child-back-up-buddy.php), [line 176](class/class-mainwp-child-back-up-buddy.php#L176-L267)



### `mainwp_reports_backupbuddy_backup`

*Create BackupBuddy Client Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$backupType` | |
`$finish_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-up-buddy.php](class/class-mainwp-child-back-up-buddy.php), [line 176](class/class-mainwp-child-back-up-buddy.php#L176-L291)



### `mainwp_backup`

*Save backup stream.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$destination` | |
`$message` | |
`$size` | |
`$status` | |
`$type` | |

Source: [../sources/mainwp-child/class/class-mainwp-client-report.php](class/class-mainwp-client-report.php), [line 195](class/class-mainwp-client-report.php#L195-L208)



### `{$event}`

*Backup now.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`apply_filters($options, array())` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1101](class/class-mainwp-child-updraft-plus-backups.php#L1101-L1136)



### `itsec_has_external_backup`

*Check if backup exists.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$has_backup` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-ithemes-security.php](class/class-mainwp-child-ithemes-security.php), [line 680](class/class-mainwp-child-ithemes-security.php#L680-L688)



### `itsec_scheduled_external_backup`

*Check if there is a shedualed backup.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$sceduled_backup` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-ithemes-security.php](class/class-mainwp-child-ithemes-security.php), [line 691](class/class-mainwp-child-ithemes-security.php#L691-L699)



### `is_any_staging_process_going_on`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L530)



### `get_bbu_note_view`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L549)



### `staging_status_wptc`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L550)



### `is_restore_to_staging_wptc`

*Start the restore process.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 615](class/class-mainwp-child-timecapsule.php#L615-L622)



### `get_restore_to_staging_request_wptc`

*Start the restore process.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 615](class/class-mainwp-child-timecapsule.php#L615-L623)



### `check_requirements_auto_backup_wptc`

*Save the WP Time Capsule settings - backups section.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1674](class/class-mainwp-child-timecapsule.php#L1674-L1699)



### `updraft_backupnow_options`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$options` | |
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1136](class/class-mainwp-child-updraft-plus-backups.php#L1136-L1136)



### `updraftplus_accept_archivename`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L1980)



### `updraftplus_importforeign_backupable_plus_db`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($backupable_plus_db, array($foreign_known[$backups[$timestamp]['meta_foreign']], &$mess, &$warn, &$err))` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L1996)



### `updraftplus_https_to_http_additional_warning`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('This restoration will work if you still have an SSL certificate (i.e. can use https) to access the site. Otherwise, you will want to use %s to search/replace the site address so that the site can be visited without https.', 'updraftplus'), '<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('the migrator add-on', 'updraftplus') . '</a>')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2634](class/class-mainwp-child-updraft-plus-backups.php#L2634-L2634)



### `updraftplus_http_to_https_additional_warning`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('As long as your web hosting allows http (i.e. non-SSL access) or will forward requests to https (which is almost always the case), this is no problem. If that is not yet set up, then you should set it up, or use %s so that the non-https links are automatically replaced.', 'updraftplus'), apply_filters('<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('the migrator add-on', 'updraftplus') . '</a>'))` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2636](class/class-mainwp-child-updraft-plus-backups.php#L2636-L2636)



### `updraftplus_migrator_addon_link`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('the migrator add-on', 'updraftplus') . '</a>'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2636](class/class-mainwp-child-updraft-plus-backups.php#L2636-L2636)



### `updraftplus_com_link`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'https://updraftplus.com/faqs/tell-me-more-about-the-search-and-replace-site-location-in-the-database-option/'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2648](class/class-mainwp-child-updraft-plus-backups.php#L2648-L2648)



### `updraftplus_accept_archivename`

*Build existing backups table.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3006](class/class-mainwp-child-updraft-plus-backups.php#L3006-L3043)



### `updraftplus_showbackup_date`

*Date label.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$pretty_date` | `string` | Pretty date.
`$backup` | `string` | Type of backup.
`$jobdata` | `array` | Job data.
`(int) $key` | |
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3192](class/class-mainwp-child-updraft-plus-backups.php#L3192-L3204)



### `updraftplus_msg_unfinishedbackup`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<br><span title="' . esc_attr(esc_html__('If you are seeing more backups than you expect, then it is probably because the deletion of old backup sets does not happen until a fresh backup completes.', 'updraftplus')) . '">' . esc_html__('(Not finished)', 'updraftplus') . '</span>'` | |
`$jobdata` | |
`$nonce` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3206](class/class-mainwp-child-updraft-plus-backups.php#L3206-L3206)



### `updraftplus_dirlist_sanitize_text_field()`

*Check disk space used.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$basedir` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3499](class/class-mainwp-child-updraft-plus-backups.php#L3499-L3521)



### `updraftplus_print_active_job_continue`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |
`$is_oneshot` | |
`$next_resumption` | |
`$jobdata` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 3736](class/class-mainwp-child-updraft-plus-backups.php#L3736-L3736)



### `wpvivid_get_mainwp_sync_data`

*Sync other data from $data[] and merge with $information[]*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$information` | `array` | Stores the returned information.

Source: [../sources/mainwp-child/class/class-mainwp-child-wpvivid-backuprestore.php](class/class-mainwp-child-wpvivid-backuprestore.php), [line 91](class/class-mainwp-child-wpvivid-backuprestore.php#L91-L107)



View file

@ -0,0 +1,114 @@
# Connection & Authentication Filters

Hooks for establishing and managing connections between Dashboard and Child sites.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`wp_logout`](#wp_logout) - Method parse_login_required()
- [`wp_logout`](#wp_logout) - Method parse_login_required()
- [`wp_logout`](#wp_logout) - Method login()
- [`wp_login`](#wp_login) - Method login()
- [`mainwp_child_authed_download_params`](#mainwp_child_authed_download_params) - Method where_authed_redirect()
- [`https_local_ssl_verify`](#https_local_ssl_verify) - *Arguments*
- [`mainwp_create_post_custom_author`](#mainwp_create_post_custom_author) - Update post data.

## Hook Details

### `wp_logout`

*Method parse_login_required()*

Check if the login process is required.


Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 652](class/class-mainwp-connect.php#L652-L680)



### `wp_logout`

*Method parse_login_required()*

Check if the login process is required.


Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 652](class/class-mainwp-connect.php#L652-L710)



### `wp_logout`

*Method login()*

The login process handler.


Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 1021](class/class-mainwp-connect.php#L1021-L1058)



### `wp_login`

*Method login()*

The login process handler.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$user->user_login` | |

Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 1021](class/class-mainwp-connect.php#L1021-L1066)



### `mainwp_child_authed_download_params`

*Method where_authed_redirect()*

Safe redirect to wanted location.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$auth_dl` | |

Source: [../sources/mainwp-child/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 821](class/class-mainwp-connect.php#L821-L847)



### `https_local_ssl_verify`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-server-information-base.php](class/class-mainwp-child-server-information-base.php), [line 702](class/class-mainwp-child-server-information-base.php#L702-L702)



### `mainwp_create_post_custom_author`

*Update post data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$new_post_id` | `string` | New post ID.

Source: [../sources/mainwp-child/class/class-mainwp-child-posts.php](class/class-mainwp-child-posts.php), [line 968](class/class-mainwp-child-posts.php#L968-L1012)



View file

@ -0,0 +1,174 @@
# Content Handling Filters

Hooks for managing content on Child sites.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`wphb_clear_page_cache`](#wphb_clear_page_cache) - Purge WP Hummingbird cache.
- [`run_gpi`](#run_gpi) - Method do_check_pages()
- [`mainwp_child_after_newpost`](#mainwp_child_after_newpost) - Build New Post.
- [`comment_email`](#comment_email) - Get recent comments.
- [`mainwp_child_extra_execution`](#mainwp_child_extra_execution) - Filter 'mainwp_child_extra_execution'
- [`wpvivid_handle_mainwp_action`](#wpvivid_handle_mainwp_action) - Post MainWP data.
- [`mainwp-child-init-subpages`](#mainwp-child-init-subpages) - Initiate MainWP Child Plugin pages.
- [`mainwp_child_init_subpages`](#mainwp_child_init_subpages) - Initiate MainWP Child Plugin pages.
- [`error_log_mainwp_logs`](#error_log_mainwp_logs) - Render the error log content.
- [`error_log_mainwp_lines`](#error_log_mainwp_lines) - Render the error log content.

## Hook Details

### `wphb_clear_page_cache`

*Purge WP Hummingbird cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 741](class/class-mainwp-child-cache-purge.php#L741-L756)



### `run_gpi`

*Method do_check_pages()*

Check or force re-check pages page speed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$forceRecheck` | `bool` | If true, force recheck process, if false, just regular check.

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 429](class/class-mainwp-child-pagespeed.php#L429-L445)



### `mainwp_child_after_newpost`

*Build New Post.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$result` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-posts.php](class/class-mainwp-child-posts.php), [line 373](class/class-mainwp-child-posts.php#L373-L405)



### `comment_email`

*Get recent comments.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$comment->comment_author_email` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-comments.php](class/class-mainwp-child-comments.php), [line 200](class/class-mainwp-child-comments.php#L200-L229)



### `mainwp_child_extra_execution`

*Filter 'mainwp_child_extra_execution'*

Additional functions to execute through the filter.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$information` | `array` | An array containing the synchronization information.
`$post` | `mixed` | Contains the POST request.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-callable.php](class/class-mainwp-child-callable.php), [line 745](class/class-mainwp-child-callable.php#L745-L755)



### `wpvivid_handle_mainwp_action`

*Post MainWP data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$ret` | |
`$data` | `string` | Data to post.

Source: [../sources/mainwp-child/class/class-mainwp-child-wpvivid-backuprestore.php](class/class-mainwp-child-wpvivid-backuprestore.php), [line 225](class/class-mainwp-child-wpvivid-backuprestore.php#L225-L239)



### `mainwp-child-init-subpages`

*Initiate MainWP Child Plugin pages.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(array())` | |
`'4.0.7.1'` | |
`'mainwp_child_init_subpages'` | |

Source: [../sources/mainwp-child/class/class-mainwp-pages.php](class/class-mainwp-pages.php), [line 230](class/class-mainwp-pages.php#L230-L246)



### `mainwp_child_init_subpages`

*Initiate MainWP Child Plugin pages.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$all_subpages` | |

Source: [../sources/mainwp-child/class/class-mainwp-pages.php](class/class-mainwp-pages.php), [line 230](class/class-mainwp-pages.php#L230-L247)



### `error_log_mainwp_logs`

*Render the error log content.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($error_log)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-server-information.php](class/class-mainwp-child-server-information.php), [line 1089](class/class-mainwp-child-server-information.php#L1089-L1107)



### `error_log_mainwp_lines`

*Render the error log content.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-server-information.php](class/class-mainwp-child-server-information.php), [line 1089](class/class-mainwp-child-server-information.php#L1089-L1108)



View file

@ -0,0 +1,155 @@
# MainWP Child Filters

This section provides documentation for all filter hooks available in the MainWP Child plugin.

## Categories

- [Connection & Authentication](connection-authentication/index.md) (7 hooks)
- [Updates & Maintenance](updates-maintenance/index.md) (38 hooks)
- [Content Handling](content-handling/index.md) (10 hooks)
- [User Operations](user-operations/index.md) (9 hooks)
- [Backups & Restoration](backups-restoration/index.md) (30 hooks)
- [Security & Monitoring](security-monitoring/index.md) (16 hooks)
- [System & Settings](system-settings/index.md) (5 hooks)
- [Miscellaneous](misc/index.md) (23 hooks)

## All Filters (Alphabetical)

- [`active_plugins`](updates-maintenance/index.md#active_plugins) - *Arguments*
- [`active_plugins`](updates-maintenance/index.md#active_plugins) - *Arguments*
- [`admin_enqueue_scripts`](security-monitoring/index.md#admin_enqueue_scripts) - Method is_asset_in_admin()
- [`check_passwords`](security-monitoring/index.md#check_passwords) - Edit existing user.
- [`check_requirements_auto_backup_wptc`](backups-restoration/index.md#check_requirements_auto_backup_wptc) - Save the WP Time Capsule settings - backups section.
- [`comment_email`](content-handling/index.md#comment_email) - Get recent comments.
- [`deprecated_hook_run`](system-settings/index.md#deprecated_hook_run) - Support old WP version 4.0.
- [`error_log_mainwp_lines`](content-handling/index.md#error_log_mainwp_lines) - Render the error log content.
- [`error_log_mainwp_logs`](content-handling/index.md#error_log_mainwp_logs) - Render the error log content.
- [`get_backup_before_update_setting_wptc`](updates-maintenance/index.md#get_backup_before_update_setting_wptc) - Get backup process progress.
- [`get_bbu_note_view`](backups-restoration/index.md#get_bbu_note_view) - Get backup process progress.
- [`get_restore_to_staging_request_wptc`](backups-restoration/index.md#get_restore_to_staging_request_wptc) - Start the restore process.
- [`gpi_check_status`](security-monitoring/index.md#gpi_check_status) - Method save_settings()
- [`gpi_check_status`](security-monitoring/index.md#gpi_check_status) - Method do_check_pages()
- [`gpi_check_status`](security-monitoring/index.md#gpi_check_status) - Method get_sync_data()
- [`https_local_ssl_verify`](connection-authentication/index.md#https_local_ssl_verify) - *Arguments*
- [`illegal_user_logins`](user-operations/index.md#illegal_user_logins) - Edit existing user.
- [`is_any_staging_process_going_on`](backups-restoration/index.md#is_any_staging_process_going_on) - Get backup process progress.
- [`is_restore_to_staging_wptc`](backups-restoration/index.md#is_restore_to_staging_wptc) - Start the restore process.
- [`itsec_has_external_backup`](backups-restoration/index.md#itsec_has_external_backup) - Check if backup exists.
- [`itsec_scheduled_external_backup`](backups-restoration/index.md#itsec_scheduled_external_backup) - Check if there is a shedualed backup.
- [`mainwp-child-get-total-size`](updates-maintenance/index.md#mainwp-child-get-total-size) - Get total size of Child Site installation.
- [`mainwp-child-init-subpages`](content-handling/index.md#mainwp-child-init-subpages) - Initiate MainWP Child Plugin pages.
- [`mainwp-site-sync-others-data`](misc/index.md#mainwp-site-sync-others-data) - Get other stats data.
- [`mainwp_backup`](backups-restoration/index.md#mainwp_backup) - Save backup stream.
- [`mainwp_before_post_update`](updates-maintenance/index.md#mainwp_before_post_update) - Hook: `mainwp_before_post_update`
- [`mainwp_branding_role_cap_enable_contact_form`](user-operations/index.md#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`mainwp_branding_role_cap_enable_contact_form`](user-operations/index.md#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`mainwp_child_actions_save_data`](user-operations/index.md#mainwp_child_actions_save_data) - Log handler.
- [`mainwp_child_actions_saved_number_of_days`](security-monitoring/index.md#mainwp_child_actions_saved_number_of_days) - Method to check actions data.
- [`mainwp_child_after_newpost`](content-handling/index.md#mainwp_child_after_newpost) - Build New Post.
- [`mainwp_child_after_update`](updates-maintenance/index.md#mainwp_child_after_update) - Method to_update_plugins()
- [`mainwp_child_after_update`](updates-maintenance/index.md#mainwp_child_after_update) - Method to_upgrade_themes()
- [`mainwp_child_authed_download_params`](connection-authentication/index.md#mainwp_child_authed_download_params) - Method where_authed_redirect()
- [`mainwp_child_before_send_close_message`](misc/index.md#mainwp_child_before_send_close_message) - Action: process before send close message.
- [`mainwp_child_before_send_feedback_message`](misc/index.md#mainwp_child_before_send_feedback_message) - Action: process send feedback message.
- [`mainwp_child_before_update`](updates-maintenance/index.md#mainwp_child_before_update) - Method to_update_plugins()
- [`mainwp_child_before_update`](updates-maintenance/index.md#mainwp_child_before_update) - Method to_upgrade_themes()
- [`mainwp_child_before_update_plugin_theme`](updates-maintenance/index.md#mainwp_child_before_update_plugin_theme) - Action before update plugin, theme.
- [`mainwp_child_before_update_wp`](updates-maintenance/index.md#mainwp_child_before_update_wp) - Action before update WP.
- [`mainwp_child_branding_init_options`](system-settings/index.md#mainwp_child_branding_init_options) - Filter 'mainwp_child_branding_init_options'
- [`mainwp_child_contact_support_mail_headers`](misc/index.md#mainwp_child_contact_support_mail_headers) - Send support email.
- [`mainwp_child_db_updater_sync_data`](updates-maintenance/index.md#mainwp_child_db_updater_sync_data) - Get sync data.
- [`mainwp_child_deactivation`](updates-maintenance/index.md#mainwp_child_deactivation) - Method deactivation()
- [`mainwp_child_extra_execution`](content-handling/index.md#mainwp_child_extra_execution) - Filter 'mainwp_child_extra_execution'
- [`mainwp_child_forced_get_total_size`](updates-maintenance/index.md#mainwp_child_forced_get_total_size) - Get total size of Child Site installation.
- [`mainwp_child_get_total_size`](updates-maintenance/index.md#mainwp_child_get_total_size) - Get total size of Child Site installation.
- [`mainwp_child_hide_update_notice`](updates-maintenance/index.md#mainwp_child_hide_update_notice) - After admin bar render.
- [`mainwp_child_hide_update_notice`](updates-maintenance/index.md#mainwp_child_hide_update_notice) - Admin footer text.
- [`mainwp_child_init_subpages`](content-handling/index.md#mainwp_child_init_subpages) - Initiate MainWP Child Plugin pages.
- [`mainwp_child_install_plugin_theme`](updates-maintenance/index.md#mainwp_child_install_plugin_theme) - Method after_installed()
- [`mainwp_child_install_plugin_theme`](updates-maintenance/index.md#mainwp_child_install_plugin_theme) - Method after_installed()
- [`mainwp_child_installPluginTheme`](updates-maintenance/index.md#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_installPluginTheme`](updates-maintenance/index.md#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_mu_plugin_enabled`](updates-maintenance/index.md#mainwp_child_mu_plugin_enabled) - Method deactivation()
- [`mainwp_child_mu_plugin_enabled`](updates-maintenance/index.md#mainwp_child_mu_plugin_enabled) - Method delete_connection_data()
- [`mainwp_child_plugin_action`](updates-maintenance/index.md#mainwp_child_plugin_action) - Method delete_plugins()
- [`mainwp_child_plugin_health_check_max_plugins_to_batch`](updates-maintenance/index.md#mainwp_child_plugin_health_check_max_plugins_to_batch) - *Arguments*
- [`mainwp_child_plugin_row_meta`](updates-maintenance/index.md#mainwp_child_plugin_row_meta) - MainWP Child Plugin meta data.
- [`mainwp_child_reports_log`](system-settings/index.md#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_child_reports_log`](system-settings/index.md#mainwp_child_reports_log) - Method do_site_stats()
- [`mainwp_child_reports_log`](misc/index.md#mainwp_child_reports_log) - Record BackWPup MainWP Child Reports log.
- [`mainwp_child_reports_log`](backups-restoration/index.md#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_child_reports_log`](backups-restoration/index.md#mainwp_child_reports_log) - Backupbuddy Client Reports log.
- [`mainwp_child_site_stats`](misc/index.md#mainwp_child_site_stats) - Get Child Site Stats.
- [`mainwp_child_theme_action`](updates-maintenance/index.md#mainwp_child_theme_action) - Method theme_action()
- [`mainwp_child_theme_health_check_max_themes_to_batch`](updates-maintenance/index.md#mainwp_child_theme_health_check_max_themes_to_batch) - *Arguments*
- [`mainwp_child_unique_id`](misc/index.md#mainwp_child_unique_id) - Method get_site_unique_id()
- [`mainwp_child_woocom_get_data`](misc/index.md#mainwp_child_woocom_get_data) - Get Woocommerce reports old.
- [`mainwp_child_woocom_report_data`](misc/index.md#mainwp_child_woocom_report_data) - Woocommerce report data.
- [`mainwp_child_woocom_sync_data`](misc/index.md#mainwp_child_woocom_sync_data) - Sync Woocommerce data.
- [`mainwp_create_post_custom_author`](connection-authentication/index.md#mainwp_create_post_custom_author) - Update post data.
- [`mainwp_reports_backupbuddy_backup`](backups-restoration/index.md#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_reports_backupbuddy_backup`](backups-restoration/index.md#mainwp_reports_backupbuddy_backup) - Create BackupBuddy Client Reports log.
- [`mainwp_reports_backupwordpress_backup`](backups-restoration/index.md#mainwp_reports_backupwordpress_backup) - Add BackUpWordPress data to the reports database table.
- [`mainwp_reports_backwpup_backup`](backups-restoration/index.md#mainwp_reports_backwpup_backup) - Create BackWPup MainWP Client Reports log.
- [`mainwp_reports_maintenance`](updates-maintenance/index.md#mainwp_reports_maintenance) - Method maintenance_db()
- [`mainwp_reports_sucuri_scan`](security-monitoring/index.md#mainwp_reports_sucuri_scan) - Save sucuri stream.
- [`mainwp_reports_wordfence_scan`](security-monitoring/index.md#mainwp_reports_wordfence_scan) - Method do_reports_log()
- [`mainwp_reports_wptimecapsule_backup`](backups-restoration/index.md#mainwp_reports_wptimecapsule_backup) - Add WP Time Capsule data to the reports database table.
- [`mainwp_site_sync_others_data`](misc/index.md#mainwp_site_sync_others_data) - Get other stats data.
- [`mwp_premium_perform_update`](updates-maintenance/index.md#mwp_premium_perform_update) - Method upgrade_plugin()
- [`mwp_premium_perform_update`](updates-maintenance/index.md#mwp_premium_perform_update) - Method upgrade_theme()
- [`mwp_premium_update_check`](updates-maintenance/index.md#mwp_premium_update_check) - Check for premium updates.
- [`mwp_premium_update_notification`](updates-maintenance/index.md#mwp_premium_update_notification) - Check for premium updates.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Filter whether the user who generated the nonce is logged out.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Create security nounce without session.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Verify nonce without session.
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Method create_nonce_without_session()
- [`nonce_user_logged_out`](user-operations/index.md#nonce_user_logged_out) - Method verify_nonce_without_session()
- [`phpmailer_init`](security-monitoring/index.md#phpmailer_init) - Check destination email.
- [`plugins_api`](updates-maintenance/index.md#plugins_api) - Method to_update_plugins()
- [`rt_nginx_helper_purge_all`](misc/index.md#rt_nginx_helper_purge_all) - Purge Nginx Helper cache.
- [`run_gpi`](content-handling/index.md#run_gpi) - Method do_check_pages()
- [`sanitize_file_name`](misc/index.md#sanitize_file_name) - Filters a sanitized filename string.
- [`sanitize_file_name_chars`](misc/index.md#sanitize_file_name_chars) - Filters the list of characters to remove from a filename.
- [`save_settings_revision_limit_wptc`](system-settings/index.md#save_settings_revision_limit_wptc) - Save the WP Time Capsule settings - backups section.
- [`staging_status_wptc`](backups-restoration/index.md#staging_status_wptc) - Get backup process progress.
- [`swis_clear_complete_cache`](updates-maintenance/index.md#swis_clear_complete_cache) - Purge Swis Performance plugin cache.
- [`update_white_labling_settings_wptc`](updates-maintenance/index.md#update_white_labling_settings_wptc) - Process the sigin response info.
- [`updraft_backupnow_options`](backups-restoration/index.md#updraft_backupnow_options) - *Arguments*
- [`updraftplus_accept_archivename`](backups-restoration/index.md#updraftplus_accept_archivename) - Restore all downloaded backups from history.
- [`updraftplus_accept_archivename`](backups-restoration/index.md#updraftplus_accept_archivename) - Build existing backups table.
- [`updraftplus_checkzip_end_{$type}`](security-monitoring/index.md#updraftplus_checkzip_end_type) - Restore all downloaded backups from history.
- [`updraftplus_checkzip_{$type}`](security-monitoring/index.md#updraftplus_checkzip_type) - Restore all downloaded backups from history.
- [`updraftplus_com_link`](backups-restoration/index.md#updraftplus_com_link) - *Arguments*
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse database file.
- [`updraftplus_dbscan_urlchange`](security-monitoring/index.md#updraftplus_dbscan_urlchange) - Analyse database file.
- [`updraftplus_dbscan_urlchange_www_append_warning`](security-monitoring/index.md#updraftplus_dbscan_urlchange_www_append_warning) - *Arguments*
- [`updraftplus_dirlist_sanitize_text_field()`](backups-restoration/index.md#updraftplus_dirlist_sanitize_text_field()) - Check disk space used.
- [`updraftplus_http_to_https_additional_warning`](backups-restoration/index.md#updraftplus_http_to_https_additional_warning) - *Arguments*
- [`updraftplus_https_to_http_additional_warning`](backups-restoration/index.md#updraftplus_https_to_http_additional_warning) - *Arguments*
- [`updraftplus_importforeign_backupable_plus_db`](backups-restoration/index.md#updraftplus_importforeign_backupable_plus_db) - Restore all downloaded backups from history.
- [`updraftplus_migrator_addon_link`](backups-restoration/index.md#updraftplus_migrator_addon_link) - *Arguments*
- [`updraftplus_msg_unfinishedbackup`](backups-restoration/index.md#updraftplus_msg_unfinishedbackup) - *Arguments*
- [`updraftplus_print_active_job_continue`](backups-restoration/index.md#updraftplus_print_active_job_continue) - *Arguments*
- [`updraftplus_showbackup_date`](backups-restoration/index.md#updraftplus_showbackup_date) - Date label.
- [`user_profile_update_errors`](updates-maintenance/index.md#user_profile_update_errors) - Edit existing user.
- [`woocommerce_dashboard_status_widget_sales_query`](misc/index.md#woocommerce_dashboard_status_widget_sales_query) - *Arguments*
- [`woocommerce_hide_{$name}_notice`](updates-maintenance/index.md#woocommerce_hide_name_notice) - Hide a single notice.
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](misc/index.md#woocommerce_reports_order_statuses) - *Arguments*
- [`wp_login`](connection-authentication/index.md#wp_login) - Method login()
- [`wp_logout`](connection-authentication/index.md#wp_logout) - Method parse_login_required()
- [`wp_logout`](connection-authentication/index.md#wp_logout) - Method parse_login_required()
- [`wp_logout`](connection-authentication/index.md#wp_logout) - Method login()
- [`wpfc_clear_all_cache`](misc/index.md#wpfc_clear_all_cache) - Purge WP Fastest Cache.
- [`wphb_clear_page_cache`](content-handling/index.md#wphb_clear_page_cache) - Purge WP Hummingbird cache.
- [`wpvivid_get_mainwp_sync_data`](backups-restoration/index.md#wpvivid_get_mainwp_sync_data) - Sync other data from $data[] and merge with $information[]
- [`wpvivid_handle_mainwp_action`](content-handling/index.md#wpvivid_handle_mainwp_action) - Post MainWP data.
- [`{$event}`](backups-restoration/index.md#event) - Backup now.
- [`{$hook_name}`](misc/index.md#hook_name) - Support old WP version 4.0.

View file

@ -0,0 +1,372 @@
# Miscellaneous Filters

Miscellaneous hooks that don't fit into other categories.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Record BackWPup MainWP Child Reports log.
- [`mainwp_child_site_stats`](#mainwp_child_site_stats) - Get Child Site Stats.
- [`mainwp_child_before_send_feedback_message`](#mainwp_child_before_send_feedback_message) - Action: process send feedback message.
- [`mainwp_child_before_send_close_message`](#mainwp_child_before_send_close_message) - Action: process before send close message.
- [`rt_nginx_helper_purge_all`](#rt_nginx_helper_purge_all) - Purge Nginx Helper cache.
- [`wpfc_clear_all_cache`](#wpfc_clear_all_cache) - Purge WP Fastest Cache.
- [`{$hook_name}`](#hook_name) - Support old WP version 4.0.
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`mainwp_child_woocom_sync_data`](#mainwp_child_woocom_sync_data) - Sync Woocommerce data.
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`mainwp_child_woocom_report_data`](#mainwp_child_woocom_report_data) - Woocommerce report data.
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`woocommerce_dashboard_status_widget_sales_query`](#woocommerce_dashboard_status_widget_sales_query) - *Arguments*
- [`woocommerce_reports_order_statuses`](#woocommerce_reports_order_statuses) - *Arguments*
- [`mainwp_child_woocom_get_data`](#mainwp_child_woocom_get_data) - Get Woocommerce reports old.
- [`sanitize_file_name_chars`](#sanitize_file_name_chars) - Filters the list of characters to remove from a filename.
- [`sanitize_file_name`](#sanitize_file_name) - Filters a sanitized filename string.
- [`mainwp-site-sync-others-data`](#mainwp-site-sync-others-data) - Get other stats data.
- [`mainwp_site_sync_others_data`](#mainwp_site_sync_others_data) - Get other stats data.
- [`mainwp_child_unique_id`](#mainwp_child_unique_id) - Method get_site_unique_id()
- [`mainwp_child_contact_support_mail_headers`](#mainwp_child_contact_support_mail_headers) - Send support email.

## Hook Details

### `mainwp_child_reports_log`

*Record BackWPup MainWP Child Reports log.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'backwpup'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 307](class/class-mainwp-child-back-wp-up.php#L307-L314)



### `mainwp_child_site_stats`

*Get Child Site Stats.*


Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 141](class/class-mainwp-child-stats.php#L141-L358)



### `mainwp_child_before_send_feedback_message`

*Action: process send feedback message.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$value` | |
`$action` | |

**Changelog**

Version | Description
------- | -----------
`5.1` |

Source: [../sources/mainwp-child/class/class-mainwp-helper.php](class/class-mainwp-helper.php), [line 72](class/class-mainwp-helper.php#L72-L77)



### `mainwp_child_before_send_close_message`

*Action: process before send close message.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$value` | |
`$action` | |

**Changelog**

Version | Description
------- | -----------
`4.4.0.3` |

Source: [../sources/mainwp-child/class/class-mainwp-helper.php](class/class-mainwp-helper.php), [line 94](class/class-mainwp-helper.php#L94-L99)



### `rt_nginx_helper_purge_all`

*Purge Nginx Helper cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 716](class/class-mainwp-child-cache-purge.php#L716-L729)



### `wpfc_clear_all_cache`

*Purge WP Fastest Cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 818](class/class-mainwp-child-cache-purge.php#L818-L831)



### `{$hook_name}`

*Support old WP version 4.0.*

Fires functions attached to a deprecated filter hook.

When a filter hook is deprecated, the apply_filters() call is replaced with
apply_filters_deprecated(), which triggers a deprecation notice and then fires
the original filter hook.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | `array` | Array of additional function arguments to be passed to apply_filters().

Source: [../sources/mainwp-child/includes/functions.php](includes/functions.php), [line 169](includes/functions.php#L169-L189)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 145](class/class-mainwp-child-woocommerce-status.php#L145-L145)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 168](class/class-mainwp-child-woocommerce-status.php#L168-L168)



### `mainwp_child_woocom_sync_data`

*Sync Woocommerce data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 113](class/class-mainwp-child-woocommerce-status.php#L113-L213)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 258](class/class-mainwp-child-woocommerce-status.php#L258-L258)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 277](class/class-mainwp-child-woocommerce-status.php#L277-L277)



### `mainwp_child_woocom_report_data`

*Woocommerce report data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 220](class/class-mainwp-child-woocommerce-status.php#L220-L319)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 522](class/class-mainwp-child-woocommerce-status.php#L522-L522)



### `woocommerce_dashboard_status_widget_sales_query`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$query` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 527](class/class-mainwp-child-woocommerce-status.php#L527-L527)



### `woocommerce_reports_order_statuses`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('completed', 'processing', 'on-hold')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 536](class/class-mainwp-child-woocommerce-status.php#L536-L536)



### `mainwp_child_woocom_get_data`

*Get Woocommerce reports old.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-woocommerce-status.php](class/class-mainwp-child-woocommerce-status.php), [line 490](class/class-mainwp-child-woocommerce-status.php#L490-L585)



### `sanitize_file_name_chars`

*Filters the list of characters to remove from a filename.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$special_chars` | `string[]` | Array of characters to remove.
`$filename_raw` | `string` | The original filename to be sanitized.

**Changelog**

Version | Description
------- | -----------
`2.8.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-misc.php](class/class-mainwp-child-misc.php), [line 557](class/class-mainwp-child-misc.php#L557-L565)



### `sanitize_file_name`

*Filters a sanitized filename string.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$filename` | `string` | Sanitized filename.
`$filename_raw` | `string` | The filename prior to sanitization.

**Changelog**

Version | Description
------- | -----------
`2.8.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-misc.php](class/class-mainwp-child-misc.php), [line 572](class/class-mainwp-child-misc.php#L572-L580)



### `mainwp-site-sync-others-data`

*Get other stats data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($information, $othersData)` | |
`'4.0.7.1'` | |
`'mainwp_site_sync_others_data'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 466](class/class-mainwp-child-stats.php#L466-L482)



### `mainwp_site_sync_others_data`

*Get other stats data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$information` | `array` | Child Site Stats array.
`$othersData` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 466](class/class-mainwp-child-stats.php#L466-L483)



### `mainwp_child_unique_id`

*Method get_site_unique_id()*

Get site unique id.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uniqueId` | |

Source: [../sources/mainwp-child/class/class-mainwp-helper.php](class/class-mainwp-helper.php), [line 744](class/class-mainwp-helper.php#L744-L757)



### `mainwp_child_contact_support_mail_headers`

*Send support email.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$headers` | |
`$email` | |
`$from` | |

Source: [../sources/mainwp-child/class/class-mainwp-utility.php](class/class-mainwp-utility.php), [line 740](class/class-mainwp-utility.php#L740-L774)



View file

@ -0,0 +1,274 @@
# Security & Monitoring Filters

Hooks related to security checks, uptime monitoring, and site health.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`phpmailer_init`](#phpmailer_init) - Check destination email.
- [`mainwp_reports_sucuri_scan`](#mainwp_reports_sucuri_scan) - Save sucuri stream.
- [`mainwp_reports_wordfence_scan`](#mainwp_reports_wordfence_scan) - Method do_reports_log()
- [`updraftplus_checkzip_{$type}`](#updraftplus_checkzip_type) - Restore all downloaded backups from history.
- [`updraftplus_checkzip_end_{$type}`](#updraftplus_checkzip_end_type) - Restore all downloaded backups from history.
- [`check_passwords`](#check_passwords) - Edit existing user.
- [`admin_enqueue_scripts`](#admin_enqueue_scripts) - Method is_asset_in_admin()
- [`mainwp_child_actions_saved_number_of_days`](#mainwp_child_actions_saved_number_of_days) - Method to check actions data.
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse old database file.
- [`updraftplus_dbscan_urlchange_www_append_warning`](#updraftplus_dbscan_urlchange_www_append_warning) - *Arguments*
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse database file.
- [`updraftplus_dbscan_urlchange`](#updraftplus_dbscan_urlchange) - Analyse database file.
- [`gpi_check_status`](#gpi_check_status) - Method save_settings()
- [`gpi_check_status`](#gpi_check_status) - Method do_check_pages()
- [`gpi_check_status`](#gpi_check_status) - Method get_sync_data()

## Hook Details

### `phpmailer_init`

*Check destination email.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(&$phpmailer)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 1311](class/class-mainwp-child-back-wp-up.php#L1311-L1363)



### `mainwp_reports_sucuri_scan`

*Save sucuri stream.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$result` | |
`$scan_status` | |
`$scan_data` | |
`$scan_time` | |

Source: [../sources/mainwp-child/class/class-mainwp-client-report.php](class/class-mainwp-client-report.php), [line 179](class/class-mainwp-client-report.php#L179-L191)



### `mainwp_reports_wordfence_scan`

*Method do_reports_log()*

Add Wordfence data to the reports reports database table.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$ctime` | |
`$details` | |
`$result` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wordfence.php](class/class-mainwp-child-wordfence.php), [line 309](class/class-mainwp-child-wordfence.php#L309-L371)



### `updraftplus_checkzip_{$type}`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($updraft_dir . '/' . $file, &$mess, &$warn, &$err)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L2036)



### `updraftplus_checkzip_end_{$type}`

*Restore all downloaded backups from history.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(&$mess, &$warn, &$err)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 1898](class/class-mainwp-child-updraft-plus-backups.php#L1898-L2040)



### `check_passwords`

*Edit existing user.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($user->user_login, &$pass1, &$pass2)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-users.php](class/class-mainwp-child-users.php), [line 303](class/class-mainwp-child-users.php#L303-L395)



### `admin_enqueue_scripts`

*Method is_asset_in_admin()*

Check if the CSS/JS file is loaded in admin or not.


Source: [../sources/mainwp-child/class/class-mainwp-child-html-regression.php](class/class-mainwp-child-html-regression.php), [line 224](class/class-mainwp-child-html-regression.php#L224-L238)



### `mainwp_child_actions_saved_number_of_days`

*Method to check actions data.*

Clear old the action info.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$days_number` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-actions.php](class/class-mainwp-child-actions.php), [line 251](class/class-mainwp-child-actions.php#L251-L264)



### `updraftplus_dbscan_urlchange`

*Analyse old database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('Warning: %s', 'updraftplus'), '<a href="http://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>')` | |
`$old_siteurl` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2216](class/class-mainwp-child-updraft-plus-backups.php#L2216-L2367)



### `updraftplus_dbscan_urlchange`

*Analyse old database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`sprintf(esc_html__('Warning: %s', 'updraftplus'), '<a href="http://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>')` | |
`$old_home` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2216](class/class-mainwp-child-updraft-plus-backups.php#L2216-L2377)



### `updraftplus_dbscan_urlchange_www_append_warning`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2639](class/class-mainwp-child-updraft-plus-backups.php#L2639-L2639)



### `updraftplus_dbscan_urlchange`

*Analyse database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>'` | |
`$old_siteurl` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2472](class/class-mainwp-child-updraft-plus-backups.php#L2472-L2645)



### `updraftplus_dbscan_urlchange`

*Analyse database file.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'<a href="https://updraftplus.com/shop/migrator/">' . esc_html__('This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus') . '</a>'` | |
`$old_home` | |
`$res` | `string` | UpdraftPlus response.

Source: [../sources/mainwp-child/class/class-mainwp-child-updraft-plus-backups.php](class/class-mainwp-child-updraft-plus-backups.php), [line 2472](class/class-mainwp-child-updraft-plus-backups.php#L2472-L2664)



### `gpi_check_status`

*Method save_settings()*

Save the plugin settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 252](class/class-mainwp-child-pagespeed.php#L252-L265)



### `gpi_check_status`

*Method do_check_pages()*

Check or force re-check pages page speed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 429](class/class-mainwp-child-pagespeed.php#L429-L441)



### `gpi_check_status`

*Method get_sync_data()*

Get the Google Pagespeed Insights plugin data and store it in the sync request.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-pagespeed.php](class/class-mainwp-child-pagespeed.php), [line 452](class/class-mainwp-child-pagespeed.php#L452-L471)



View file

@ -0,0 +1,109 @@
# System & Settings Filters

Hooks related to general settings and system configuration.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`deprecated_hook_run`](#deprecated_hook_run) - Support old WP version 4.0.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Add support for the reporting system.
- [`mainwp_child_reports_log`](#mainwp_child_reports_log) - Method do_site_stats()
- [`save_settings_revision_limit_wptc`](#save_settings_revision_limit_wptc) - Save the WP Time Capsule settings - backups section.
- [`mainwp_child_branding_init_options`](#mainwp_child_branding_init_options) - Filter 'mainwp_child_branding_init_options'

## Hook Details

### `deprecated_hook_run`

*Support old WP version 4.0.*

Fires functions attached to a deprecated filter hook.

When a filter hook is deprecated, the apply_filters() call is replaced with
apply_filters_deprecated(), which triggers a deprecation notice and then fires
the original filter hook.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$hook_name` | `string` | The name of the filter hook.
`$replacement` | `string` | Optional. The hook that should have been used. Default empty.
`$version` | `string` | The version of WordPress that deprecated the hook.
`$message` | `string` | Optional. A message regarding the change. Default empty.

Source: [../sources/mainwp-child/includes/functions.php](includes/functions.php), [line 169](includes/functions.php#L169-L188)



### `mainwp_child_reports_log`

*Add support for the reporting system.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'wptimecapsule'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 998](class/class-mainwp-child-timecapsule.php#L998-L1008)



### `mainwp_child_reports_log`

*Method do_site_stats()*

Add support for the reporting system.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'wordfence'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wordfence.php](class/class-mainwp-child-wordfence.php), [line 300](class/class-mainwp-child-wordfence.php#L300-L306)



### `save_settings_revision_limit_wptc`

*Save the WP Time Capsule settings - backups section.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data['revision_limit']` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1674](class/class-mainwp-child-timecapsule.php#L1674-L1702)



### `mainwp_child_branding_init_options`

*Filter 'mainwp_child_branding_init_options'*

Set custom branding setting through the filter.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$opts` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding.php](class/class-mainwp-child-branding.php), [line 106](class/class-mainwp-child-branding.php#L106-L113)



View file

@ -0,0 +1,629 @@
# Updates & Maintenance Filters

Hooks for managing updates to plugins, themes, and WordPress core.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`update_white_labling_settings_wptc`](#update_white_labling_settings_wptc) - Process the sigin response info.
- [`mainwp_child_plugin_action`](#mainwp_child_plugin_action) - Method delete_plugins()
- [`mainwp_child_theme_action`](#mainwp_child_theme_action) - Method theme_action()
- [`mainwp_child_installPluginTheme`](#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_install_plugin_theme`](#mainwp_child_install_plugin_theme) - Method after_installed()
- [`mainwp_child_installPluginTheme`](#mainwp_child_installPluginTheme) - Method after_installed()
- [`mainwp_child_install_plugin_theme`](#mainwp_child_install_plugin_theme) - Method after_installed()
- [`woocommerce_hide_{$name}_notice`](#woocommerce_hide_name_notice) - Hide a single notice.
- [`user_profile_update_errors`](#user_profile_update_errors) - Edit existing user.
- [`mainwp_reports_maintenance`](#mainwp_reports_maintenance) - Method maintenance_db()
- [`mainwp_child_before_update_plugin_theme`](#mainwp_child_before_update_plugin_theme) - Action before update plugin, theme.
- [`mainwp_child_before_update`](#mainwp_child_before_update) - Method to_update_plugins()
- [`mainwp_child_after_update`](#mainwp_child_after_update) - Method to_update_plugins()
- [`mainwp_child_before_update`](#mainwp_child_before_update) - Method to_upgrade_themes()
- [`mainwp_child_after_update`](#mainwp_child_after_update) - Method to_upgrade_themes()
- [`mainwp_child_before_update_wp`](#mainwp_child_before_update_wp) - Action before update WP.
- [`swis_clear_complete_cache`](#swis_clear_complete_cache) - Purge Swis Performance plugin cache.
- [`mainwp_child_deactivation`](#mainwp_child_deactivation) - Method deactivation()
- [`mainwp_before_post_update`](#mainwp_before_post_update) - Hook: `mainwp_before_post_update`
- [`mainwp_child_plugin_health_check_max_plugins_to_batch`](#mainwp_child_plugin_health_check_max_plugins_to_batch) - *Arguments*
- [`active_plugins`](#active_plugins) - *Arguments*
- [`active_plugins`](#active_plugins) - *Arguments*
- [`get_backup_before_update_setting_wptc`](#get_backup_before_update_setting_wptc) - Get backup process progress.
- [`mainwp_child_theme_health_check_max_themes_to_batch`](#mainwp_child_theme_health_check_max_themes_to_batch) - *Arguments*
- [`mainwp_child_hide_update_notice`](#mainwp_child_hide_update_notice) - After admin bar render.
- [`mainwp_child_hide_update_notice`](#mainwp_child_hide_update_notice) - Admin footer text.
- [`mwp_premium_update_check`](#mwp_premium_update_check) - Check for premium updates.
- [`mwp_premium_update_notification`](#mwp_premium_update_notification) - Check for premium updates.
- [`mainwp-child-get-total-size`](#mainwp-child-get-total-size) - Get total size of Child Site installation.
- [`mainwp_child_get_total_size`](#mainwp_child_get_total_size) - Get total size of Child Site installation.
- [`mainwp_child_forced_get_total_size`](#mainwp_child_forced_get_total_size) - Get total size of Child Site installation.
- [`mwp_premium_perform_update`](#mwp_premium_perform_update) - Method upgrade_plugin()
- [`plugins_api`](#plugins_api) - Method to_update_plugins()
- [`mwp_premium_perform_update`](#mwp_premium_perform_update) - Method upgrade_theme()
- [`mainwp_child_plugin_row_meta`](#mainwp_child_plugin_row_meta) - MainWP Child Plugin meta data.
- [`mainwp_child_mu_plugin_enabled`](#mainwp_child_mu_plugin_enabled) - Method deactivation()
- [`mainwp_child_mu_plugin_enabled`](#mainwp_child_mu_plugin_enabled) - Method delete_connection_data()
- [`mainwp_child_db_updater_sync_data`](#mainwp_child_db_updater_sync_data) - Get sync data.

## Hook Details

### `update_white_labling_settings_wptc`

*Process the sigin response info.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$cust_req_info` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 1233](class/class-mainwp-child-timecapsule.php#L1233-L1257)



### `mainwp_child_plugin_action`

*Method delete_plugins()*

Delete a plugin from the Child Site.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 158](class/class-mainwp-child-install.php#L158-L219)



### `mainwp_child_theme_action`

*Method theme_action()*

Theme Activate, Deactivate & Delete actions.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 230](class/class-mainwp-child-install.php#L230-L324)



### `mainwp_child_installPluginTheme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($args)` | |
`'4.0.7.1'` | |
`'mainwp_child_install_plugin_theme'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L531)



### `mainwp_child_install_plugin_theme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L532)



### `mainwp_child_installPluginTheme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($args)` | |
`'4.0.7.1'` | |
`'mainwp_child_install_plugin_theme'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L555)



### `mainwp_child_install_plugin_theme`

*Method after_installed()*

After plugin or theme has been installed.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-install.php](class/class-mainwp-child-install.php), [line 486](class/class-mainwp-child-install.php#L486-L556)



### `woocommerce_hide_{$name}_notice`

*Hide a single notice.*


Source: [../sources/mainwp-child/class/class-mainwp-child-db-updater-wc.php](class/class-mainwp-child-db-updater-wc.php), [line 222](class/class-mainwp-child-db-updater-wc.php#L222-L230)



### `user_profile_update_errors`

*Edit existing user.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(&$errors, $update, &$user)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-users.php](class/class-mainwp-child-users.php), [line 303](class/class-mainwp-child-users.php#L303-L434)



### `mainwp_reports_maintenance`

*Method maintenance_db()*

Child site database maintenance.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$message` | |
`$log_time` | |
`$details` | |
`$result` | |
`$max_revisions` | `int` | Maximum revisions to keep.

Source: [../sources/mainwp-child/class/class-mainwp-child-maintenance.php](class/class-mainwp-child-maintenance.php), [line 92](class/class-mainwp-child-maintenance.php#L92-L198)



### `mainwp_child_before_update_plugin_theme`

*Action before update plugin, theme.*


**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 115](class/class-mainwp-child-updates.php#L115-L120)



### `mainwp_child_before_update`

*Method to_update_plugins()*

Complete the plugins update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'plugin'` | |
`$plugins` | `array` | An array containing plugins to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 356](class/class-mainwp-child-updates.php#L356-L374)



### `mainwp_child_after_update`

*Method to_update_plugins()*

Complete the plugins update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'plugin'` | |
`$result` | |
`$plugins` | `array` | An array containing plugins to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 356](class/class-mainwp-child-updates.php#L356-L379)



### `mainwp_child_before_update`

*Method to_upgrade_themes()*

Complete the themes update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'theme'` | |
`$themes` | `array` | An array containing themes to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 547](class/class-mainwp-child-updates.php#L547-L583)



### `mainwp_child_after_update`

*Method to_upgrade_themes()*

Complete the themes update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'theme'` | |
`$result` | |
`$themes` | `array` | An array containing themes to be updated.

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 547](class/class-mainwp-child-updates.php#L547-L589)



### `mainwp_child_before_update_wp`

*Action before update WP.*


**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 1171](class/class-mainwp-child-updates.php#L1171-L1176)



### `swis_clear_complete_cache`

*Purge Swis Performance plugin cache.*


Source: [../sources/mainwp-child/class/class-mainwp-child-cache-purge.php](class/class-mainwp-child-cache-purge.php), [line 369](class/class-mainwp-child-cache-purge.php#L369-L389)



### `mainwp_child_deactivation`

*Method deactivation()*

Deactivate the MainWP Child plugin.


Source: [../sources/mainwp-child/class/class-mainwp-child.php](class/class-mainwp-child.php), [line 460](class/class-mainwp-child.php#L460-L477)



### `mainwp_before_post_update`

*Hook: `mainwp_before_post_update`*

Runs before creating or updating a post via MainWP dashboard.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$new_post` | `array` | <20> Post data array.
`$post_custom` | `array` | <20> Post custom meta data.
`$post_category` | `string` | <20> Post categories.
`$post_tags` | `string` | <20> Post tags.
`$others` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-posts.php](class/class-mainwp-child-posts.php), [line 777](class/class-mainwp-child-posts.php#L777-L787)

## Filters



### `mainwp_child_plugin_health_check_max_plugins_to_batch`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-plugins-check.php](class/class-mainwp-child-plugins-check.php), [line 286](class/class-mainwp-child-plugins-check.php#L286-L286)



### `active_plugins`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`get_option('active_plugins')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wp-seopress.php](class/class-mainwp-child-wp-seopress.php), [line 59](class/class-mainwp-child-wp-seopress.php#L59-L59)



### `active_plugins`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`get_option('active_plugins')` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-wp-seopress.php](class/class-mainwp-child-wp-seopress.php), [line 77](class/class-mainwp-child-wp-seopress.php#L77-L77)



### `get_backup_before_update_setting_wptc`

*Get backup process progress.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`''` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-timecapsule.php](class/class-mainwp-child-timecapsule.php), [line 497](class/class-mainwp-child-timecapsule.php#L497-L548)



### `mainwp_child_theme_health_check_max_themes_to_batch`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-themes-check.php](class/class-mainwp-child-themes-check.php), [line 253](class/class-mainwp-child-themes-check.php#L253-L253)



### `mainwp_child_hide_update_notice`

*After admin bar render.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding-render.php](class/class-mainwp-child-branding-render.php), [line 207](class/class-mainwp-child-branding-render.php#L207-L211)



### `mainwp_child_hide_update_notice`

*Admin footer text.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding-render.php](class/class-mainwp-child-branding-render.php), [line 261](class/class-mainwp-child-branding-render.php#L261-L265)



### `mwp_premium_update_check`

*Check for premium updates.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 685](class/class-mainwp-child-stats.php#L685-L697)



### `mwp_premium_update_notification`

*Check for premium updates.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 685](class/class-mainwp-child-stats.php#L685-L708)



### `mainwp-child-get-total-size`

*Get total size of Child Site installation.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array(true)` | |
`'4.0.7.1'` | |
`'mainwp_child_get_total_size'` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 945](class/class-mainwp-child-stats.php#L945-L955)



### `mainwp_child_get_total_size`

*Get total size of Child Site installation.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$get_file_size` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 945](class/class-mainwp-child-stats.php#L945-L956)



### `mainwp_child_forced_get_total_size`

*Get total size of Child Site installation.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-stats.php](class/class-mainwp-child-stats.php), [line 945](class/class-mainwp-child-stats.php#L945-L957)



### `mwp_premium_perform_update`

*Method upgrade_plugin()*

Initiate the plugin update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 188](class/class-mainwp-child-updates.php#L188-L271)



### `plugins_api`

*Method to_update_plugins()*

Complete the plugins update process.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`'plugin_information'` | |
`array('slug' => $plugin)` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 356](class/class-mainwp-child-updates.php#L356-L393)



### `mwp_premium_perform_update`

*Method upgrade_theme()*

Execute themes updates.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-updates.php](class/class-mainwp-child-updates.php), [line 464](class/class-mainwp-child-updates.php#L464-L521)



### `mainwp_child_plugin_row_meta`

*MainWP Child Plugin meta data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$plugin_meta` | `array` | Plugin meta.
`$plugin_file` | `string` | Plugin file.
`$mainWPChild->plugin_slug` | |

Source: [../sources/mainwp-child/class/class-mainwp-pages.php](class/class-mainwp-pages.php), [line 295](class/class-mainwp-pages.php#L295-L315)



### `mainwp_child_mu_plugin_enabled`

*Method deactivation()*

Deactivate the MainWP Child plugin.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child.php](class/class-mainwp-child.php), [line 460](class/class-mainwp-child.php#L460-L471)



### `mainwp_child_mu_plugin_enabled`

*Method delete_connection_data()*

Delete connection data.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-child/class/class-mainwp-child.php](class/class-mainwp-child.php), [line 481](class/class-mainwp-child.php#L481-L491)



### `mainwp_child_db_updater_sync_data`

*Get sync data.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-db-updater.php](class/class-mainwp-child-db-updater.php), [line 100](class/class-mainwp-child-db-updater.php#L100-L104)


<p align="center"><a href="https://github.com/pronamic/wp-documentor"><img src="https://cdn.jsdelivr.net/gh/pronamic/wp-documentor@main/logos/pronamic-wp-documentor.svgo-min.svg" alt="Pronamic WordPress Documentor" width="32" height="32"></a><br><em>Generated by <a href="https://github.com/pronamic/wp-documentor">Pronamic WordPress Documentor</a> <code>1.2.0</code></em><p>



View file

@ -0,0 +1,186 @@
# User Operations Filters

Hooks related to user management on Child sites.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Child Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`nonce_user_logged_out`](#nonce_user_logged_out) - Filter whether the user who generated the nonce is logged out.
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Create security nounce without session.
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Verify nonce without session.
- [`mainwp_child_actions_save_data`](#mainwp_child_actions_save_data) - Log handler.
- [`mainwp_branding_role_cap_enable_contact_form`](#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`mainwp_branding_role_cap_enable_contact_form`](#mainwp_branding_role_cap_enable_contact_form) - Filter 'mainwp_branding_role_cap_enable_contact_form'
- [`illegal_user_logins`](#illegal_user_logins) - Edit existing user.
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Method create_nonce_without_session()
- [`nonce_user_logged_out`](#nonce_user_logged_out) - Method verify_nonce_without_session()

## Hook Details

### `nonce_user_logged_out`

*Filter whether the user who generated the nonce is logged out.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | `int` | ID of the nonce-owning user.
`$action` | `string` | The nonce action.

**Changelog**

Version | Description
------- | -----------
`3.5.0` |

Source: [../sources/mainwp-child/includes/functions.php](includes/functions.php), [line 34](includes/functions.php#L34-L42)



### `nonce_user_logged_out`

*Create security nounce without session.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `int` | Action performing.

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 1074](class/class-mainwp-child-back-wp-up.php#L1074-L1085)



### `nonce_user_logged_out`

*Verify nonce without session.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `int` | Action to perform.

Source: [../sources/mainwp-child/class/class-mainwp-child-back-wp-up.php](class/class-mainwp-child-back-wp-up.php), [line 1093](class/class-mainwp-child-back-wp-up.php#L1093-L1106)



### `mainwp_child_actions_save_data`

*Log handler.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |
`$context` | `string` | Context of the event.
`$action` | `string` | Action of the event.
`$args` | `array` | sprintf (and extra) arguments to use.
`$message` | `string` | sprintf-ready error message string.
`$user_id` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-actions.php](class/class-mainwp-child-actions.php), [line 721](class/class-mainwp-child-actions.php#L721-L761)



### `mainwp_branding_role_cap_enable_contact_form`

*Filter 'mainwp_branding_role_cap_enable_contact_form'*

Manage the support form visibility. Set false to hide the support form page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding.php](class/class-mainwp-child-branding.php), [line 560](class/class-mainwp-child-branding.php#L560-L567)



### `mainwp_branding_role_cap_enable_contact_form`

*Filter 'mainwp_branding_role_cap_enable_contact_form'*

Manage the support form visibility. Set false to hide the support form page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-child/class/class-mainwp-child-branding.php](class/class-mainwp-child-branding.php), [line 1163](class/class-mainwp-child-branding.php#L1163-L1170)



### `illegal_user_logins`

*Edit existing user.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-child/class/class-mainwp-child-users.php](class/class-mainwp-child-users.php), [line 303](class/class-mainwp-child-users.php#L303-L418)



### `nonce_user_logged_out`

*Method create_nonce_without_session()*

Create nonce without session.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `mixed` | Action to perform.

Source: [../sources/mainwp-child/class/class-mainwp-utility.php](class/class-mainwp-utility.php), [line 812](class/class-mainwp-utility.php#L812-L825)



### `nonce_user_logged_out`

*Method verify_nonce_without_session()*

Verify nonce without session.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$uid` | |
`$action` | `mixed` | Action to perform.

Source: [../sources/mainwp-child/class/class-mainwp-utility.php](class/class-mainwp-utility.php), [line 834](class/class-mainwp-utility.php#L834-L849)



View file

@ -4,63 +4,30 @@ This section provides documentation for all hooks (actions and filters) availabl

## Actions

[Child Actions](actions.md) allow you to add custom functionality at specific points in the MainWP Child execution. Actions are triggered at specific points during the execution of MainWP Child, and you can use them to add your own functionality.
[Child Actions](actions/index.md) allow you to add custom functionality at specific points in the MainWP Child execution.

Common use cases for Child actions include:
- Adding custom functionality to the Child site
- Performing additional tasks when the Child site is connected to a Dashboard
- Extending the Child plugin with custom features
- Integrating with other plugins or services on the Child site
### Action Categories

- [Connection & Authentication](actions/connection-authentication/index.md) (7 hooks) - Hooks for establishing and managing connections between Dashboard and Child sites.
- [Updates & Maintenance](actions/updates-maintenance/index.md) (38 hooks) - Hooks for managing updates to plugins, themes, and WordPress core.
- [Content Handling](actions/content-handling/index.md) (10 hooks) - Hooks for managing content on Child sites.
- [User Operations](actions/user-operations/index.md) (9 hooks) - Hooks related to user management on Child sites.
- [Backups & Restoration](actions/backups-restoration/index.md) (30 hooks) - Hooks for backup creation, management, and restoration processes.
- [Security & Monitoring](actions/security-monitoring/index.md) (16 hooks) - Hooks related to security checks, uptime monitoring, and site health.
- [System & Settings](actions/system-settings/index.md) (5 hooks) - Hooks related to general settings and system configuration.
- [Miscellaneous](actions/misc/index.md) (23 hooks) - Miscellaneous hooks that don't fit into other categories.

## Filters

[Child Filters](filters.md) allow you to modify data or output at specific points in the MainWP Child execution. Filters are used to modify data before it is used or sent back to the Dashboard.
[Child Filters](filters/index.md) allow you to modify data or output at specific points in the MainWP Child execution.

Common use cases for Child filters include:
- Modifying the data sent to the Dashboard
- Changing how requests from the Dashboard are processed
- Customizing the behavior of Child features
- Adding or removing functionality from the Child plugin
### Filter Categories

## Examples

### Using Child Actions

```php
// Add custom functionality after the Child plugin is loaded
add_action('mainwp_child_loaded', 'my_custom_child_functionality');

function my_custom_child_functionality() {
// Your custom code here
// This will run after the MainWP Child plugin is fully loaded
}
```

### Using Child Filters

```php
// Modify the site info sent to the Dashboard
add_filter('mainwp_child_site_info', 'my_custom_site_info');

function my_custom_site_info($site_info) {
// Add custom information to the site info
$site_info['custom_data'] = 'Custom value';
return $site_info;
}
```

## Security Considerations

When working with MainWP Child hooks, it's important to consider security implications:

1. **Authentication**: Always ensure that requests are properly authenticated before performing sensitive operations.
2. **Data Validation**: Validate and sanitize all data, especially data received from external sources.
3. **Capability Checks**: Use WordPress capability checks to ensure users have appropriate permissions.
4. **Nonce Verification**: Use nonces to protect against CSRF attacks.

## Related Resources

- [MainWP Developer Documentation](https://mainwp.dev/)
- [MainWP Child GitHub Repository](https://github.com/mainwp/mainwp-child)
- [WordPress Plugin Developer Handbook](https://developer.wordpress.org/plugins/)
- [Connection & Authentication](filters/connection-authentication/index.md) (7 hooks) - Hooks for establishing and managing connections between Dashboard and Child sites.
- [Updates & Maintenance](filters/updates-maintenance/index.md) (38 hooks) - Hooks for managing updates to plugins, themes, and WordPress core.
- [Content Handling](filters/content-handling/index.md) (10 hooks) - Hooks for managing content on Child sites.
- [User Operations](filters/user-operations/index.md) (9 hooks) - Hooks related to user management on Child sites.
- [Backups & Restoration](filters/backups-restoration/index.md) (30 hooks) - Hooks for backup creation, management, and restoration processes.
- [Security & Monitoring](filters/security-monitoring/index.md) (16 hooks) - Hooks related to security checks, uptime monitoring, and site health.
- [System & Settings](filters/system-settings/index.md) (5 hooks) - Hooks related to general settings and system configuration.
- [Miscellaneous](filters/misc/index.md) (23 hooks) - Miscellaneous hooks that don't fit into other categories.

View file

@ -0,0 +1,770 @@
# API & Remote Communication Actions

Hooks for API endpoints and remote communication with child sites.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`cloudways_api_form_top`](#cloudways_api_form_top) - Action: cloudways_api_form_top
- [`cloudways_api_form_bottom`](#cloudways_api_form_bottom) - Action: cloudways_api_form_bottom
- [`gridpane_api_form_top`](#gridpane_api_form_top) - Action: gridpane_api_form_top
- [`gridpane_api_form_bottom`](#gridpane_api_form_bottom) - Action: gridpane_api_form_bottom
- [`vultr_api_form_top`](#vultr_api_form_top) - Action: vultr_api_form_top
- [`vultr_api_form_bottom`](#vultr_api_form_bottom) - Action: vultr_api_form_bottom
- [`linode_api_form_top`](#linode_api_form_top) - Action: linode_api_form_top
- [`linode_api_form_bottom`](#linode_api_form_bottom) - Action: linode_api_form_bottom
- [`digitalocean_api_form_top`](#digitalocean_api_form_top) - Action: digitalocean_api_form_top
- [`digitalocean_api_form_bottom`](#digitalocean_api_form_bottom) - Action: digitalocean_api_form_bottom
- [`cpanel_api_form`](#cpanel_api_form) - Action: cpanel_api_form
- [`cpanel_api_form_bottom`](#cpanel_api_form_bottom) - Action: cpanel_api_form_bottom
- [`plesk_api_form_top`](#plesk_api_form_top) - Action: plesk_api_form_top
- [`plesk_api_form_bottom`](#plesk_api_form_bottom) - Action: plesk_api_form_bottom
- [`kinsta_api_form_top`](#kinsta_api_form_top) - Action: kinsta_api_form_top
- [`kinsta_api_form_bottom`](#kinsta_api_form_bottom) - Action: kinsta_api_form_bottom
- [`rest_api_form_top`](#rest_api_form_top) - Action: rest_api_form_top
- [`rest_api_form_bottom`](#rest_api_form_bottom) - Action: rest_api_form_bottom
- [`mainwp_rest_api_help_item`](#mainwp_rest_api_help_item) - Action: mainwp_rest_api_help_item
- [`mainwp_is_rest_api_request`](#mainwp_is_rest_api_request) - Whether this is a REST API request.
- [`mainwp_rest_is_request_to_rest_api`](#mainwp_rest_is_request_to_rest_api) - Check if is request to our REST API.
- [`mainwp_rest_api_v2_enabled`](#mainwp_rest_api_v2_enabled) - Hook into WordPress ready to init the REST API as needed.
- [`mainwp_rest_api_get_rest_namespaces`](#mainwp_rest_api_get_rest_namespaces) - Get API namespaces - new namespaces should be registered here.
- [`mainwp_rest_api_disabled`](#mainwp_rest_api_disabled) - Method is_rest_api_enabled()
- [`mainwp_rest_batch_items_limit`](#mainwp_rest_batch_items_limit) - Check batch limit.
- [`mainwp_rest_{$type}_object_query`](#mainwp_rest_type_object_query) - Filter the query arguments for a request.
- [`mainwp_rest_collection_params`](#mainwp_rest_collection_params) - Filter collection parameters for the controller.
- [`mainwp_rest_batch_items_limit`](#mainwp_rest_batch_items_limit) - Check batch limit.
- [`mainwp_rest_prepare_site`](#mainwp_rest_prepare_site) - Filterobject returned from the REST API.
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Fetch uptime urls.
- [`mainwp_remote_destination_info`](#mainwp_remote_destination_info) - Method mainwp_backup_upload_checkstatus()
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Method try visit.
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Method fetch_urls_authed()
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Method fetch_url_site()
- [`mainwp_rest_api_enabled`](#mainwp_rest_api_enabled) - Method init_rest_api()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_all_costs_callback()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_client_costs_callback()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_site_costs_callback()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_costs_callback()
- [`mainwp_rest_cost_collection_params`](#mainwp_rest_cost_collection_params) - Filter collection parameters.
- [`mainwp_rest_prepare_cost`](#mainwp_rest_prepare_cost) - Filter product reviews object returned from the REST API.
- [`https_local_ssl_verify`](#https_local_ssl_verify) - *Arguments*

## Hook Details

### `cloudways_api_form_top`

*Action: cloudways_api_form_top*

Fires at the top of CloudWays API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 274](modules/api-backups/classes/class-api-backups-settings.php#L274-L281)



### `cloudways_api_form_bottom`

*Action: cloudways_api_form_bottom*

Fires at the bottom of CloudWays API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 317](modules/api-backups/classes/class-api-backups-settings.php#L317-L324)



### `gridpane_api_form_top`

*Action: gridpane_api_form_top*

Fires at the top of GridPane API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 350](modules/api-backups/classes/class-api-backups-settings.php#L350-L357)



### `gridpane_api_form_bottom`

*Action: gridpane_api_form_bottom*

Fires at the bottom of GridPane API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 383](modules/api-backups/classes/class-api-backups-settings.php#L383-L390)



### `vultr_api_form_top`

*Action: vultr_api_form_top*

Fires at the top of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 417](modules/api-backups/classes/class-api-backups-settings.php#L417-L424)



### `vultr_api_form_bottom`

*Action: vultr_api_form_bottom*

Fires at the bottom of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 450](modules/api-backups/classes/class-api-backups-settings.php#L450-L457)



### `linode_api_form_top`

*Action: linode_api_form_top*

Fires at the top of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 483](modules/api-backups/classes/class-api-backups-settings.php#L483-L490)



### `linode_api_form_bottom`

*Action: linode_api_form_bottom*

Fires at the bottom of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 518](modules/api-backups/classes/class-api-backups-settings.php#L518-L525)



### `digitalocean_api_form_top`

*Action: digitalocean_api_form_top*

Fires at the top of DigitalOcean API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 551](modules/api-backups/classes/class-api-backups-settings.php#L551-L558)



### `digitalocean_api_form_bottom`

*Action: digitalocean_api_form_bottom*

Fires at the bottom of DigitalOcean API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 586](modules/api-backups/classes/class-api-backups-settings.php#L586-L593)



### `cpanel_api_form`

*Action: cpanel_api_form*

Fires at the top of cPanel API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 618](modules/api-backups/classes/class-api-backups-settings.php#L618-L625)



### `cpanel_api_form_bottom`

*Action: cpanel_api_form_bottom*

Fires at the bottom of cPanel API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 685](modules/api-backups/classes/class-api-backups-settings.php#L685-L692)



### `plesk_api_form_top`

*Action: plesk_api_form_top*

Fires at the top of Plesk API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 718](modules/api-backups/classes/class-api-backups-settings.php#L718-L725)



### `plesk_api_form_bottom`

*Action: plesk_api_form_bottom*

Fires at the bottom of Plesk API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 762](modules/api-backups/classes/class-api-backups-settings.php#L762-L769)



### `kinsta_api_form_top`

*Action: kinsta_api_form_top*

Fires at the top of Kinsta API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 795](modules/api-backups/classes/class-api-backups-settings.php#L795-L802)



### `kinsta_api_form_bottom`

*Action: kinsta_api_form_bottom*

Fires at the bottom of Kinsta API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 851](modules/api-backups/classes/class-api-backups-settings.php#L851-L858)



### `rest_api_form_top`

*Action: rest_api_form_top*

Fires at the top of REST API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-rest-api-page.php](pages/page-mainwp-rest-api-page.php), [line 850](pages/page-mainwp-rest-api-page.php#L850-L857)



### `rest_api_form_bottom`

*Action: rest_api_form_bottom*

Fires at the bottom of REST API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-rest-api-page.php](pages/page-mainwp-rest-api-page.php), [line 936](pages/page-mainwp-rest-api-page.php#L936-L943)



### `mainwp_rest_api_help_item`

*Action: mainwp_rest_api_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the REST API page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-rest-api-page.php](pages/page-mainwp-rest-api-page.php), [line 1260](pages/page-mainwp-rest-api-page.php#L1260-L1271)



### `mainwp_is_rest_api_request`

*Whether this is a REST API request.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$is_rest_api_request` | |

**Changelog**

Version | Description
------- | -----------
`5.1.1` |

Source: [../sources/mainwp-dashboard/includes/class-mainwp-setup.php](includes/class-mainwp-setup.php), [line 81](includes/class-mainwp-setup.php#L81-L86)



### `mainwp_rest_is_request_to_rest_api`

*Check if is request to our REST API.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$mainwp_api || $extension_api` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/class-mainwp-rest-authentication.php](includes/rest-api/class-mainwp-rest-authentication.php), [line 89](includes/rest-api/class-mainwp-rest-authentication.php#L89-L108)



### `mainwp_rest_api_v2_enabled`

*Hook into WordPress ready to init the REST API as needed.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/class-mainwp-rest-server.php](includes/rest-api/class-mainwp-rest-server.php), [line 47](includes/rest-api/class-mainwp-rest-server.php#L47-L51)



### `mainwp_rest_api_get_rest_namespaces`

*Get API namespaces - new namespaces should be registered here.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('mainwp/v2' => $this->get_v2_controllers())` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/class-mainwp-rest-server.php](includes/rest-api/class-mainwp-rest-server.php), [line 89](includes/rest-api/class-mainwp-rest-server.php#L89-L100)



### `mainwp_rest_api_disabled`

*Method is_rest_api_enabled()*

Check if Enabled the REST API.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version1/class-mainwp-rest-api-v1.php](includes/rest-api/controller/version1/class-mainwp-rest-api-v1.php), [line 92](includes/rest-api/controller/version1/class-mainwp-rest-api-v1.php#L92-L99)



### `mainwp_rest_batch_items_limit`

*Check batch limit.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`100` | |
`$this->get_normalized_rest_base()` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-controller.php), [line 189](includes/rest-api/controller/version2/class-mainwp-rest-controller.php#L189-L196)



### `mainwp_rest_{$type}_object_query`

*Filter the query arguments for a request.*

Enables adding extra arguments or setting defaults for a post
collection request.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | `array` | Key value array of query var to query value.
`$request` | `\WP_REST_Request` | The request used.

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-controller.php), [line 406](includes/rest-api/controller/version2/class-mainwp-rest-controller.php#L406-L415)



### `mainwp_rest_collection_params`

*Filter collection parameters for the controller.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | |
`$this` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-controller.php), [line 1384](includes/rest-api/controller/version2/class-mainwp-rest-controller.php#L1384-L1390)



### `mainwp_rest_batch_items_limit`

*Check batch limit.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`100` | |
`$this->get_normalized_rest_base()` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-global-batch-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-global-batch-controller.php), [line 471](includes/rest-api/controller/version2/class-mainwp-rest-global-batch-controller.php#L471-L478)



### `mainwp_rest_prepare_site`

*Filterobject returned from the REST API.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | `array` | The object.
`$item` | `mixed` | The object used to create response.
`$request` | `\WP_REST_Request` | Request object.

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-sites-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-sites-controller.php), [line 2346](includes/rest-api/controller/version2/class-mainwp-rest-sites-controller.php#L2346-L2353)



### `mainwp_curl_http_version`

*Fetch uptime urls.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website->id` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 350](class/class-mainwp-uptime-monitoring-connect.php#L350-L497)



### `mainwp_remote_destination_info`

*Method mainwp_backup_upload_checkstatus()*

Check upload status

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |
`isset($_POST['remote_destination']) ? sanitize_text_field(wp_unslash($_POST['remote_destination'])) : ''` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-post-backup-handler.php](class/class-mainwp-post-backup-handler.php), [line 376](class/class-mainwp-post-backup-handler.php#L376-L391)



### `mainwp_curl_http_version`

*Method try visit.*

Try connecting to Child Site via cURL.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`false` | |
`$url` | `string` | Child Site URL.

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 32](class/class-mainwp-connect.php#L32-L101)



### `mainwp_curl_http_version`

*Method fetch_urls_authed()*

Fetches data from child sites if authenticated.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website->id` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 688](class/class-mainwp-connect.php#L688-L894)



### `mainwp_curl_http_version`

*Method fetch_url_site()*

M Fetch URL.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website ? $website->id : false` | |
`$url` | `string` | URL to fetch from.

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 1351](class/class-mainwp-connect.php#L1351-L1486)



### `mainwp_rest_api_enabled`

*Method init_rest_api()*

Adds an action to create the rest API endpoints if activated in the plugin settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 56](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L56-L62)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_all_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-all-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 167](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L167-L180)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_client_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-client-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 195](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L195-L208)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_site_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-site-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 245](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L245-L258)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 285](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L285-L298)



### `mainwp_rest_cost_collection_params`

*Filter collection parameters.*

This filter registers the collection parameter, but does not map the
collection parameter to an internal WP_Comment_Query parameter. Use the
`wc_rest_review_query` filter to set WP_Comment_Query parameters.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | `array` | JSON Schema-formatted collection parameters.

**Changelog**

Version | Description
------- | -----------
`5.2` |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php), [line 753](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php#L753-L763)



### `mainwp_rest_prepare_cost`

*Filter product reviews object returned from the REST API.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | `array` | The object.
`$review` | |
`$request` | `\WP_REST_Request` | Request object.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php), [line 947](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php#L947-L953)



### `https_local_ssl_verify`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information-handler.php](pages/page-mainwp-server-information-handler.php), [line 704](pages/page-mainwp-server-information-handler.php#L704-L704)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,853 @@
# Client Reports Actions

Hooks for report generation, customization, and delivery.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_clientstable_prepared_items`](#mainwp_clientstable_prepared_items) - Prepair the items to be listed.
- [`mainwp_client_deleted`](#mainwp_client_deleted) - Delete client
- [`mainwp_before_select_clients_list`](#mainwp_before_select_clients_list) - Action: mainwp_before_select_clients_list
- [`mainwp_after_select_clients_list`](#mainwp_after_select_clients_list) - Action: mainwp_after_select_clients_list
- [`mainwp_client_suspend`](#mainwp_client_suspend) - Fires immediately after update client suspend/unsuspend.
- [`mainwp_manageclients_tabletop`](#mainwp_manageclients_tabletop) - Method render_second_top_header()
- [`mainwp_client_suspend`](#mainwp_client_suspend) - Fires immediately after update client suspend/unsuspend.
- [`mainwp_clients_overview_screen_options_top`](#mainwp_clients_overview_screen_options_top) - Action: mainwp_clients_overview_screen_options_top
- [`mainwp_clients_overview_screen_options_bottom`](#mainwp_clients_overview_screen_options_bottom) - Action: mainwp_clients_overview_screen_options_bottom
- [`mainwp_clients_overview_help_item`](#mainwp_clients_overview_help_item) - Action: mainwp_clients_overview_help_item
- [`mainwp_clients_overview_note_widget_top`](#mainwp_clients_overview_note_widget_top) - Actoin: mainwp_clients_overview_note_widget_top
- [`mainwp_clients_overview_note_widget_bottom`](#mainwp_clients_overview_note_widget_bottom) - Action: mainwp_clients_overview_note_widget_bottom
- [`mainwp_clients_overview_contact_widget_top`](#mainwp_clients_overview_contact_widget_top) - Actoin: mainwp_clients_overview_contact_widget_top
- [`mainwp_clients_overview_contact_widget_bottom`](#mainwp_clients_overview_contact_widget_bottom) - Action: mainwp_clients_overview_contact_widget_bottom
- [`mainwp_clients_overview_overview_widget_top`](#mainwp_clients_overview_overview_widget_top) - Actoin: mainwp_clients_overview_overview_widget_top
- [`mainwp_clients_overview_overview_widget_bottom`](#mainwp_clients_overview_overview_widget_bottom) - Action: mainwp_clients_overview_overview_widget_bottom
- [`mainwp_clients_overview_info_widget_top`](#mainwp_clients_overview_info_widget_top) - Actoin: mainwp_clients_overview_info_widget_top
- [`mainwp_clients_overview_info_table_top`](#mainwp_clients_overview_info_table_top) - Action: mainwp_clients_overview_info_table_top
- [`mainwp_clients_overview_info_table_bottom`](#mainwp_clients_overview_info_table_bottom) - Action: mainwp_clients_overview_info_table_bottom
- [`mainwp_clients_overview_info_widget_bottom`](#mainwp_clients_overview_info_widget_bottom) - Action: mainwp_clients_overview_info_widget_bottom
- [`mainwp_clients_widget_top`](#mainwp_clients_widget_top) - Actoin: mainwp_clients_widget_top
- [`mainwp_clients_widget_bottom`](#mainwp_clients_widget_bottom) - Action: mainwp_clients_widget_bottom
- [`mainwp_clients_info_widget_top`](#mainwp_clients_info_widget_top) - Actoin: mainwp_clients_info_widget_top
- [`mainwp_clients_info_table_top`](#mainwp_clients_info_table_top) - Action: mainwp_clients_info_table_top
- [`mainwp_clients_info_table_bottom`](#mainwp_clients_info_table_bottom) - Action: mainwp_clients_info_table_bottom
- [`mainwp_clients_info_widget_bottom`](#mainwp_clients_info_widget_bottom) - Action: mainwp_clients_info_widget_bottom
- [`mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`](#mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context) - Get client by tag id.
- [`mainwp_clients_sitestable_item`](#mainwp_clients_sitestable_item) - Filter: mainwp_clients_sitestable_item
- [`mainwp_clients_sitestable_getcolumns`](#mainwp_clients_sitestable_getcolumns) - Filter: mainwp_clients_sitestable_getcolumns
- [`mainwp_manageclients_bulk_actions`](#mainwp_manageclients_bulk_actions) - Filter: mainwp_manageclients_bulk_actions
- [`mainwp_clients_table_features`](#mainwp_clients_table_features) - Filter: mainwp_clients_table_features
- [`mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`](#mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context) - Get clients by item.
- [`mainwp_clients_getmetaboxes`](#mainwp_clients_getmetaboxes) - Method add_meta_boxes()
- [`mainwp_clients_overview_enabled_widgets`](#mainwp_clients_overview_enabled_widgets) - Unset unwanted Widgets
- [`mainwp_clients_widgets_screen_options`](#mainwp_clients_widgets_screen_options) - Filter: mainwp_clients_widgets_screen_options
- [`mainwp_clients_overview_note_widget_title`](#mainwp_clients_overview_note_widget_title) - *Arguments*
- [`mainwp_clients_overview_contact_widget_title`](#mainwp_clients_overview_contact_widget_title) - *Arguments*
- [`mainwp_clients_overview_contact_widget_sutbitle`](#mainwp_clients_overview_contact_widget_sutbitle) - *Arguments*
- [`mainwp_clients_overview_info_widget_title`](#mainwp_clients_overview_info_widget_title) - *Arguments*
- [`mainwp_clients_widget_title`](#mainwp_clients_widget_title) - *Arguments*
- [`mainwp_clients_info_widget_title`](#mainwp_clients_info_widget_title) - *Arguments*

## Hook Details

### `mainwp_clientstable_prepared_items`

*Prepair the items to be listed.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | |
`$clients_ids` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 290](class/class-mainwp-client-list-table.php#L290-L330)



### `mainwp_client_deleted`

*Delete client*

Fires after delete a client.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$current` | `object` | client deleted.

**Changelog**

Version | Description
------- | -----------
`4.5.1.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-db-client.php](class/class-mainwp-db-client.php), [line 1010](class/class-mainwp-db-client.php#L1010-L1019)



### `mainwp_before_select_clients_list`

*Action: mainwp_before_select_clients_list*

Fires before the Select Clients list.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing Clients info.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-ui-select-sites.php](class/class-mainwp-ui-select-sites.php), [line 355](class/class-mainwp-ui-select-sites.php#L355-L364)



### `mainwp_after_select_clients_list`

*Action: mainwp_after_select_clients_list*

Fires after the Select Clients list.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing Clients info.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-ui-select-sites.php](class/class-mainwp-ui-select-sites.php), [line 405](class/class-mainwp-ui-select-sites.php#L405-L414)



### `mainwp_client_suspend`

*Fires immediately after update client suspend/unsuspend.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client` | `object` | client data.
`$suspended` | `bool` | true\|false.

**Changelog**

Version | Description
------- | -----------
`4.5.1.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-post-handler.php](class/class-mainwp-post-handler.php), [line 1111](class/class-mainwp-post-handler.php#L1111-L1119)



### `mainwp_manageclients_tabletop`

*Method render_second_top_header()*

Render second top header.


Source: [../sources/mainwp-dashboard/pages/page-mainwp-client.php](pages/page-mainwp-client.php), [line 565](pages/page-mainwp-client.php#L565-L576)



### `mainwp_client_suspend`

*Fires immediately after update client suspend/unsuspend.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$inserted` | |
`$new_suspended` | `bool` | true\|false.

**Changelog**

Version | Description
------- | -----------
`4.5.1.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client.php](pages/page-mainwp-client.php), [line 1353](pages/page-mainwp-client.php#L1353-L1361)



### `mainwp_clients_overview_screen_options_top`

*Action: mainwp_clients_overview_screen_options_top*

Fires at the top of the Sceen Options modal on the Overview page.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 366](pages/page-mainwp-client-overview.php#L366-L373)



### `mainwp_clients_overview_screen_options_bottom`

*Action: mainwp_clients_overview_screen_options_bottom*

Fires at the bottom of the Sceen Options modal on the Overview page.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 380](pages/page-mainwp-client-overview.php#L380-L387)



### `mainwp_clients_overview_help_item`

*Action: mainwp_clients_overview_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the Clients page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 521](pages/page-mainwp-client-overview.php#L521-L532)



### `mainwp_clients_overview_note_widget_top`

*Actoin: mainwp_clients_overview_note_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-note.php](widgets/widget-mainwp-client-overview-note.php), [line 78](widgets/widget-mainwp-client-overview-note.php#L78-L87)



### `mainwp_clients_overview_note_widget_bottom`

*Action: mainwp_clients_overview_note_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-note.php](widgets/widget-mainwp-client-overview-note.php), [line 100](widgets/widget-mainwp-client-overview-note.php#L100-L109)



### `mainwp_clients_overview_contact_widget_top`

*Actoin: mainwp_clients_overview_contact_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$contact_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 82](widgets/widget-mainwp-client-overview-contacts.php#L82-L91)



### `mainwp_clients_overview_contact_widget_bottom`

*Action: mainwp_clients_overview_contact_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$contact_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 142](widgets/widget-mainwp-client-overview-contacts.php#L142-L151)



### `mainwp_clients_overview_overview_widget_top`

*Actoin: mainwp_clients_overview_overview_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-info.php](widgets/widget-mainwp-client-overview-info.php), [line 82](widgets/widget-mainwp-client-overview-info.php#L82-L91)



### `mainwp_clients_overview_overview_widget_bottom`

*Action: mainwp_clients_overview_overview_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-info.php](widgets/widget-mainwp-client-overview-info.php), [line 159](widgets/widget-mainwp-client-overview-info.php#L159-L168)



### `mainwp_clients_overview_info_widget_top`

*Actoin: mainwp_clients_overview_info_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 71](widgets/widget-mainwp-client-overview-custom-info.php#L71-L80)



### `mainwp_clients_overview_info_table_top`

*Action: mainwp_clients_overview_info_table_top*

Fires at the top of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 89](widgets/widget-mainwp-client-overview-custom-info.php#L89-L98)



### `mainwp_clients_overview_info_table_bottom`

*Action: mainwp_clients_overview_info_table_bottom*

Fires at the bottom of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 128](widgets/widget-mainwp-client-overview-custom-info.php#L128-L137)



### `mainwp_clients_overview_info_widget_bottom`

*Action: mainwp_clients_overview_info_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 147](widgets/widget-mainwp-client-overview-custom-info.php#L147-L156)



### `mainwp_clients_widget_top`

*Actoin: mainwp_clients_widget_top*

Fires at the top of the Clients widget on the overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing the clients info.

**Changelog**

Version | Description
------- | -----------
`4.4` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-clients.php](widgets/widget-mainwp-clients.php), [line 62](widgets/widget-mainwp-clients.php#L62-L71)



### `mainwp_clients_widget_bottom`

*Action: mainwp_clients_widget_bottom*

Fires at the bottom of the Clients widget on the overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.4` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-clients.php](widgets/widget-mainwp-clients.php), [line 161](widgets/widget-mainwp-clients.php#L161-L170)



### `mainwp_clients_info_widget_top`

*Actoin: mainwp_clients_info_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 84](widgets/widget-mainwp-client-info.php#L84-L93)



### `mainwp_clients_info_table_top`

*Action: mainwp_clients_info_table_top*

Fires at the top of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 107](widgets/widget-mainwp-client-info.php#L107-L116)



### `mainwp_clients_info_table_bottom`

*Action: mainwp_clients_info_table_bottom*

Fires at the bottom of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 168](widgets/widget-mainwp-client-info.php#L168-L177)



### `mainwp_clients_info_widget_bottom`

*Action: mainwp_clients_info_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 183](widgets/widget-mainwp-client-info.php#L183-L192)



### `mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`

*Get client by tag id.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-tags-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-tags-controller.php), [line 404](includes/rest-api/controller/version2/class-mainwp-rest-tags-controller.php#L404-L423)



### `mainwp_clients_sitestable_item`

*Filter: mainwp_clients_sitestable_item*

Filters the Clients table column items. Allows user to create new column item.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$item` | `array` | Array containing child site data.
`$item` | `array` | Array containing child site data.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 60](class/class-mainwp-client-list-table.php#L60-L69)



### `mainwp_clients_sitestable_getcolumns`

*Filter: mainwp_clients_sitestable_getcolumns*

Filters the Clients table columns. Allows user to create a new column.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$columns` | `array` | Array containing table columns.
`$columns` | `array` | Array containing table columns.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 156](class/class-mainwp-client-list-table.php#L156-L165)



### `mainwp_manageclients_bulk_actions`

*Filter: mainwp_manageclients_bulk_actions*

Filters bulk actions on the Clients page. Allows user to hook in new actions or remove default ones.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$actions` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 206](class/class-mainwp-client-list-table.php#L206-L213)



### `mainwp_clients_table_features`

*Filter: mainwp_clients_table_features*

Filter the Clients table features.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$table_features` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 409](class/class-mainwp-client-list-table.php#L409-L416)



### `mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`

*Get clients by item.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php), [line 566](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php#L566-L624)



### `mainwp_clients_getmetaboxes`

*Method add_meta_boxes()*

Add MainWP Overview Page Widgets.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$extMetaBoxs` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 143](pages/page-mainwp-client-overview.php#L143-L169)



### `mainwp_clients_overview_enabled_widgets`

*Unset unwanted Widgets*

Contains the list of enabled widgets and allows user to unset unwanted widgets.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$values` | `array` | Array containing enabled widgets.
`null` | |

**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 191](pages/page-mainwp-client-overview.php#L191-L201)



### `mainwp_clients_widgets_screen_options`

*Filter: mainwp_clients_widgets_screen_options*

Filters available widgets on the Overview page allowing users to unsent unwanted widgets.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$custom_opts` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 438](pages/page-mainwp-client-overview.php#L438-L445)



### `mainwp_clients_overview_note_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Notes', 'mainwp')` | |
`$client_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-note.php](widgets/widget-mainwp-client-overview-note.php), [line 71](widgets/widget-mainwp-client-overview-note.php#L71-L71)



### `mainwp_clients_overview_contact_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`__('Client Contact', 'mainwp')` | |
`$contact_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 73](widgets/widget-mainwp-client-overview-contacts.php#L73-L73)



### `mainwp_clients_overview_contact_widget_sutbitle`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`__('Contact Information', 'mainwp')` | |
`$contact_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 76](widgets/widget-mainwp-client-overview-contacts.php#L76-L76)



### `mainwp_clients_overview_info_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Additional Client Info', 'mainwp')` | |
`$client_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 64](widgets/widget-mainwp-client-overview-custom-info.php#L64-L64)



### `mainwp_clients_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Clients', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-clients.php](widgets/widget-mainwp-clients.php), [line 55](widgets/widget-mainwp-clients.php#L55-L55)



### `mainwp_clients_info_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Client Info', 'mainwp')` | |
`$website` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 78](widgets/widget-mainwp-client-info.php#L78-L78)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,119 @@
# Extensions & Integration Actions

Hooks related to extensions and third-party integrations.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_extension_card_top`](#mainwp_extension_card_top) - Action: mainwp_extension_card_top
- [`mainwp_extension_card_bottom`](#mainwp_extension_card_bottom) - Action: mainwp_extension_card_bottom
- [`mainwp_extensions_help_item`](#mainwp_extensions_help_item) - Action: mainwp_extensions_help_item
- [`mainwp-getextensions`](#mainwp-getextensions) - Method init_menu()
- [`mainwp_getextensions`](#mainwp_getextensions) - Method init_menu()

## Hook Details

### `mainwp_extension_card_top`

*Action: mainwp_extension_card_top*

Fires at the Extension card top

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$extension` | `array` | Array containing the Extension information.

**Changelog**

Version | Description
------- | -----------
`4.1.4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-extensions-view.php](class/class-mainwp-extensions-view.php), [line 442](class/class-mainwp-extensions-view.php#L442-L451)



### `mainwp_extension_card_bottom`

*Action: mainwp_extension_card_bottom*

Fires at the Extension card bottom

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$extension` | `array` | Array containing the Extension information.

**Changelog**

Version | Description
------- | -----------
`4.1.4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-extensions-view.php](class/class-mainwp-extensions-view.php), [line 530](class/class-mainwp-extensions-view.php#L530-L539)



### `mainwp_extensions_help_item`

*Action: mainwp_extensions_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the Extensions page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`5.2` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-extensions.php](pages/page-mainwp-extensions.php), [line 799](pages/page-mainwp-extensions.php#L799-L810)



### `mainwp-getextensions`

*Method init_menu()*

Instantiate Extensions Menu.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($init_extensions)` | |
`'4.0.7.2'` | |
`'mainwp_getextensions'` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-extensions.php](pages/page-mainwp-extensions.php), [line 58](pages/page-mainwp-extensions.php#L58-L86)



### `mainwp_getextensions`

*Method init_menu()*

Instantiate Extensions Menu.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$init_extensions` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-extensions.php](pages/page-mainwp-extensions.php), [line 58](pages/page-mainwp-extensions.php#L58-L87)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,891 @@
# Security & Monitoring Actions

Hooks related to security checks, uptime monitoring, and site health.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_uptime_monitoring_after_check_uptime`](#mainwp_uptime_monitoring_after_check_uptime) - Method handle response fetch uptime.
- [`mainwp_monitoring_sitestable_prepared_items`](#mainwp_monitoring_sitestable_prepared_items) - Action: mainwp_monitoring_sitestable_prepared_items
- [`mainwp-securityissues-sites`](#mainwp-securityissues-sites) - Method render_scan_site()
- [`mainwp_securityissues_sites`](#mainwp_securityissues_sites) - Action: mainwp_securityissues_sites
- [`mainwp-sucuriscan-sites`](#mainwp-sucuriscan-sites) - Method render_scan_site()
- [`mainwp_sucuriscan_sites`](#mainwp_sucuriscan_sites) - Action: mainwp_sucuriscan_sites
- [`mainwp_licenses_deactivated_alert_email_header`](#mainwp_licenses_deactivated_alert_email_header) - Site Health Monitoring Email Header
- [`mainwp_licenses_deactivated_alert_email_footer`](#mainwp_licenses_deactivated_alert_email_footer) - Site Health Monitoring Email Footer
- [`mainwp_http_check_email_header`](#mainwp_http_check_email_header) - HTTP Check Email Header
- [`mainwp_http_check_email_footer`](#mainwp_http_check_email_footer) - HTTP Check Email Footer
- [`mainwp_uptime_monitoring_email_header`](#mainwp_uptime_monitoring_email_header) - Uptime Monitoring Email Header
- [`mainwp_uptime_monitoring_email_footer`](#mainwp_uptime_monitoring_email_footer) - Uptime Monitoring Email Footer
- [`mainwp_secure_request`](#mainwp_secure_request) - Method security_nonce().
- [`mainwp_secure_request`](#mainwp_secure_request) - Method admin_init()
- [`mainwp_before_system_requirements_check`](#mainwp_before_system_requirements_check) - Action: mainwp_before_system_requirements_check
- [`mainwp_after_system_requirements_check`](#mainwp_after_system_requirements_check) - Action: mainwp_after_system_requirements_check
- [`mainwp_security_issues_widget_top`](#mainwp_security_issues_widget_top) - Action: mainwp_security_issues_widget_top
- [`mainwp_security_issues_widget_top`](#mainwp_security_issues_widget_top) - Action: mainwp_security_issues_widget_top
- [`mainwp_security_issues_list_item_column`](#mainwp_security_issues_list_item_column) - Action: mainwp_security_issues_list_item_column
- [`mainwp_security_issues_widget_bottom`](#mainwp_security_issues_widget_bottom) - Action: mainwp_security_issues_widget_bottom
- [`mainwp_security_nonces`](#mainwp_security_nonces) - Method admin_init()
- [`mainwp_create_security_nonces`](#mainwp_create_security_nonces) - Create the security nonces.
- [`mainwp_logger_keep_days`](#mainwp_logger_keep_days) - Method check_log_daily()
- [`mainwp_fetch_uptime_disable_check_multi_exec`](#mainwp_fetch_uptime_disable_check_multi_exec) - Apply disable check multi exec.
- [`mainwp_fetch_uptime_chunk_size_urls`](#mainwp_fetch_uptime_chunk_size_urls) - Check uptime monitors.
- [`mainwp_fetch_uptime_chunk_size_urls`](#mainwp_fetch_uptime_chunk_size_urls) - Fetch uptime urls.
- [`mainwp_uptime_monitoring_check_importance`](#mainwp_uptime_monitoring_check_importance) - Method handle response fetch uptime.
- [`mainwp_uptime_monitoring_uptime_data`](#mainwp_uptime_monitoring_uptime_data) - Method handle response fetch uptime.
- [`mainwp_uptime_monitoring_check_url`](#mainwp_uptime_monitoring_check_url) - Get apply monitor url.
- [`mainwp_uptime_monitoring_get_monitors_to_check_params`](#mainwp_uptime_monitoring_get_monitors_to_check_params) - Get sites monitors to check.
- [`mainwp_security_issues_stats`](#mainwp_security_issues_stats) - This filter is documented in ../pages/page-mainwp-security-issues.php
- [`mainwp_monitoring_sitestable_item`](#mainwp_monitoring_sitestable_item) - Filter: mainwp_monitoring_sitestable_item
- [`mainwp_monitoring_sitestable_getcolumns`](#mainwp_monitoring_sitestable_getcolumns) - Filter: mainwp_monitoring_sitestable_getcolumns
- [`mainwp_monitoring_sitestable_prepare_extra_view`](#mainwp_monitoring_sitestable_prepare_extra_view) - Prepair the items to be listed.
- [`mainwp_monitoring_table_features`](#mainwp_monitoring_table_features) - Filter: mainwp_monitoring_table_features
- [`mainwp_stats_scan_dir`](#mainwp_stats_scan_dir) - Method get_post_data_authed()
- [`mainwp_uptime_monitoring_allowed_methods`](#mainwp_uptime_monitoring_allowed_methods) - Method get_allowed_methods
- [`mainwp_uptime_monitoring_interval_values`](#mainwp_uptime_monitoring_interval_values) - Method get_interval_values
- [`mainwp_uptime_monitoring_timeout_values`](#mainwp_uptime_monitoring_timeout_values) - Method get_timeout_values
- [`mainwp_automatic_disable_uptime_monitoring_check`](#mainwp_automatic_disable_uptime_monitoring_check) - Method cron_uptime_check
- [`mainwp_uptime_monitoring_send_notification_limit`](#mainwp_uptime_monitoring_send_notification_limit) - Run schedule uptime notification.
- [`mainwp_module_log_check_connector_is_excluded`](#mainwp_module_log_check_connector_is_excluded) - Allows excluded connectors to be overridden and registered.
- [`mainwp_module_cost_tracker_manager_check_status`](#mainwp_module_cost_tracker_manager_check_status) - *Arguments*
- [`mainwp_security_issues_stats`](#mainwp_security_issues_stats) - Filters security issues
- [`mainwp_unset_security_scripts_stylesheets`](#mainwp_unset_security_scripts_stylesheets) - Method Fix Security Issues
- [`mainwp_uptime_monitoring_response_time_widget_title`](#mainwp_uptime_monitoring_response_time_widget_title) - *Arguments*
- [`mainwp_security_issues_widget_title`](#mainwp_security_issues_widget_title) - *Arguments*
- [`mainwp_security_issues_list_item_title_url`](#mainwp_security_issues_list_item_title_url) - *Arguments*
- [`mainwp_security_issues_list_item_title`](#mainwp_security_issues_list_item_title) - *Arguments*
- [`mainwp_uptime_monitoring_status_widget_title`](#mainwp_uptime_monitoring_status_widget_title) - *Arguments*

## Hook Details

### `mainwp_uptime_monitoring_after_check_uptime`

*Method handle response fetch uptime.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$heartbeat` | |
`$monitor` | `mixed` | monitor.
`$previous_heartbeat` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 713](class/class-mainwp-uptime-monitoring-connect.php#L713-L885)



### `mainwp_monitoring_sitestable_prepared_items`

*Action: mainwp_monitoring_sitestable_prepared_items*

Fires before the Monitoring Sites table itemes are prepared.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$websites` | `object` | Object containing child sites data.
`$site_ids` | `array` | Array containing IDs of all child sites.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 626](class/class-mainwp-monitoring-sites-list-table.php#L626-L636)



### `mainwp-securityissues-sites`

*Method render_scan_site()*

Render Site Hardening sub page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($website)` | |
`'4.0.7.2'` | |
`'mainwp_securityissues_sites'` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 733](class/class-mainwp-manage-sites-view.php#L733-L773)



### `mainwp_securityissues_sites`

*Action: mainwp_securityissues_sites*

Fires on a child site Hardening page at top.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing child site info.

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 775](class/class-mainwp-manage-sites-view.php#L775-L786)



### `mainwp-sucuriscan-sites`

*Method render_scan_site()*

Render Site Hardening sub page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($website)` | |
`'4.0.7.2'` | |
`'mainwp_sucuriscan_sites'` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 733](class/class-mainwp-manage-sites-view.php#L733-L793)



### `mainwp_sucuriscan_sites`

*Action: mainwp_sucuriscan_sites*

Fires on a child site Hardening page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing child site info.

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 795](class/class-mainwp-manage-sites-view.php#L795-L806)



### `mainwp_licenses_deactivated_alert_email_header`

*Site Health Monitoring Email Header*

Fires at the top of the site health monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-licenses-deactivated-alert-email.php](templates/emails/mainwp-licenses-deactivated-alert-email.php), [line 31](templates/emails/mainwp-licenses-deactivated-alert-email.php#L31-L38)



### `mainwp_licenses_deactivated_alert_email_footer`

*Site Health Monitoring Email Footer*

Fires at the bottom of the site health monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-licenses-deactivated-alert-email.php](templates/emails/mainwp-licenses-deactivated-alert-email.php), [line 97](templates/emails/mainwp-licenses-deactivated-alert-email.php#L97-L104)



### `mainwp_http_check_email_header`

*HTTP Check Email Header*

Fires at the top of the HTTP check (after update checks) email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-after-update-http-check-email.php](templates/emails/mainwp-after-update-http-check-email.php), [line 29](templates/emails/mainwp-after-update-http-check-email.php#L29-L36)



### `mainwp_http_check_email_footer`

*HTTP Check Email Footer*

Fires at the bottom of the HTTP check (after update checks) email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-after-update-http-check-email.php](templates/emails/mainwp-after-update-http-check-email.php), [line 94](templates/emails/mainwp-after-update-http-check-email.php#L94-L101)



### `mainwp_uptime_monitoring_email_header`

*Uptime Monitoring Email Header*

Fires at the top of the uptime monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-uptime-monitoring-email.php](templates/emails/mainwp-uptime-monitoring-email.php), [line 32](templates/emails/mainwp-uptime-monitoring-email.php#L32-L39)



### `mainwp_uptime_monitoring_email_footer`

*Uptime Monitoring Email Footer*

Fires at the bottom of the uptime monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-uptime-monitoring-email.php](templates/emails/mainwp-uptime-monitoring-email.php), [line 144](templates/emails/mainwp-uptime-monitoring-email.php#L144-L151)



### `mainwp_secure_request`

*Method security_nonce().*

Handle security nonce.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$action` | `string` | security action.

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-helper.php](modules/api-backups/classes/class-api-backups-helper.php), [line 134](modules/api-backups/classes/class-api-backups-helper.php#L134-L143)



### `mainwp_secure_request`

*Method admin_init()*

Handles the uploading of a file.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'qq_nonce'` | |
`'qq_nonce'` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-install-bulk.php](pages/page-mainwp-install-bulk.php), [line 42](pages/page-mainwp-install-bulk.php#L42-L52)



### `mainwp_before_system_requirements_check`

*Action: mainwp_before_system_requirements_check*

Fires on the bottom of the System Requirements page, in Quick Setup Wizard.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 911](pages/page-mainwp-server-information.php#L911-L918)



### `mainwp_after_system_requirements_check`

*Action: mainwp_after_system_requirements_check*

Fires on the bottom of the System Requirements page, in Quick Setup Wizard.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 973](pages/page-mainwp-server-information.php#L973-L980)



### `mainwp_security_issues_widget_top`

*Action: mainwp_security_issues_widget_top*

Fires at the bottom of the Security Issues widget.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 166](widgets/widget-mainwp-security-issues-widget.php#L166-L173)



### `mainwp_security_issues_widget_top`

*Action: mainwp_security_issues_widget_top*

Fires at the bottom of the Security Issues widget.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 178](widgets/widget-mainwp-security-issues-widget.php#L178-L185)



### `mainwp_security_issues_list_item_column`

*Action: mainwp_security_issues_list_item_column*

Fires before the last (actions) colum in the security issues list.

Preferred HTML structure:

<div class="column middle aligned">
Your content here!
</div>

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 248](widgets/widget-mainwp-security-issues-widget.php#L248-L263)



### `mainwp_security_issues_widget_bottom`

*Action: mainwp_security_issues_widget_bottom*

Fires at the bottom of the Security Issues widget.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 271](widgets/widget-mainwp-security-issues-widget.php#L271-L278)



### `mainwp_security_nonces`

*Method admin_init()*

Do nothing if current user is not an Admin else display the page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-system.php](class/class-mainwp-system.php), [line 766](class/class-mainwp-system.php#L766-L864)



### `mainwp_create_security_nonces`

*Create the security nonces.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`static::$security_names` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-post-base-handler.php](class/class-mainwp-post-base-handler.php), [line 140](class/class-mainwp-post-base-handler.php#L140-L150)



### `mainwp_logger_keep_days`

*Method check_log_daily()*

Daily checks to clear the log file.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`7` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-logger.php](class/class-mainwp-logger.php), [line 749](class/class-mainwp-logger.php#L749-L763)



### `mainwp_fetch_uptime_disable_check_multi_exec`

*Apply disable check multi exec.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

**Changelog**

Version | Description
------- | -----------
`5.3` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 61](class/class-mainwp-uptime-monitoring-connect.php#L61-L66)



### `mainwp_fetch_uptime_chunk_size_urls`

*Check uptime monitors.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 88](class/class-mainwp-uptime-monitoring-connect.php#L88-L97)



### `mainwp_fetch_uptime_chunk_size_urls`

*Fetch uptime urls.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 350](class/class-mainwp-uptime-monitoring-connect.php#L350-L375)



### `mainwp_uptime_monitoring_check_importance`

*Method handle response fetch uptime.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$importance` | |
`$heartbeat` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 713](class/class-mainwp-uptime-monitoring-connect.php#L713-L845)



### `mainwp_uptime_monitoring_uptime_data`

*Method handle response fetch uptime.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$heartbeat` | |
`$monitor` | `mixed` | monitor.
`$previous_heartbeat` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 713](class/class-mainwp-uptime-monitoring-connect.php#L713-L849)



### `mainwp_uptime_monitoring_check_url`

*Get apply monitor url.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$url` | |
`$monitor` | `mixed` | monitor.

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 1008](class/class-mainwp-uptime-monitoring-connect.php#L1008-L1038)



### `mainwp_uptime_monitoring_get_monitors_to_check_params`

*Get sites monitors to check.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | `array` | params.

Source: [../sources/mainwp-dashboard/class/class-mainwp-db-uptime-monitoring.php](class/class-mainwp-db-uptime-monitoring.php), [line 418](class/class-mainwp-db-uptime-monitoring.php#L418-L427)



### `mainwp_security_issues_stats`

*This filter is documented in ../pages/page-mainwp-security-issues.php*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$securityStats` | |
`$pWebsite` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-sync.php](class/class-mainwp-sync.php), [line 366](class/class-mainwp-sync.php#L366-L367)



### `mainwp_monitoring_sitestable_item`

*Filter: mainwp_monitoring_sitestable_item*

Filters the Monitoring Sites table column items. Allows user to create new column item.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$item` | `array` | Array containing child site data.
`$item` | `array` | Array containing child site data.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 99](class/class-mainwp-monitoring-sites-list-table.php#L99-L108)



### `mainwp_monitoring_sitestable_getcolumns`

*Filter: mainwp_monitoring_sitestable_getcolumns*

Filters the Monitoring Sites table columns. Allows user to create a new column.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$columns` | `array` | Array containing table columns.
`$columns` | `array` | Array containing table columns.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 185](class/class-mainwp-monitoring-sites-list-table.php#L185-L194)



### `mainwp_monitoring_sitestable_prepare_extra_view`

*Prepair the items to be listed.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('favi_icon', 'health_site_status')` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 409](class/class-mainwp-monitoring-sites-list-table.php#L409-L616)



### `mainwp_monitoring_table_features`

*Filter: mainwp_monitoring_table_features*

Filter the Monitoring table features.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$table_features` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 722](class/class-mainwp-monitoring-sites-list-table.php#L722-L729)



### `mainwp_stats_scan_dir`

*Method get_post_data_authed()*

Get authorized $_POST data & build query.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website` | `mixed` | Array of Child Site Info.

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 361](class/class-mainwp-connect.php#L361-L427)



### `mainwp_uptime_monitoring_allowed_methods`

*Method get_allowed_methods*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('useglobal' => esc_html__('Use global settings', 'mainwp'), 'head' => 'HEAD', 'get' => 'GET', 'post' => 'POST', 'push' => 'PUSH', 'patch' => 'PATCH', 'delete' => 'DELETE')` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-edit.php](class/class-mainwp-uptime-monitoring-edit.php), [line 708](class/class-mainwp-uptime-monitoring-edit.php#L708-L727)



### `mainwp_uptime_monitoring_interval_values`

*Method get_interval_values*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$values` | |
`$flip_values` | `mixed` | flip values.

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-edit.php](class/class-mainwp-uptime-monitoring-edit.php), [line 737](class/class-mainwp-uptime-monitoring-edit.php#L737-L766)



### `mainwp_uptime_monitoring_timeout_values`

*Method get_timeout_values*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$values` | |
`$flip_values` | `mixed` | flip values.

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-edit.php](class/class-mainwp-uptime-monitoring-edit.php), [line 770](class/class-mainwp-uptime-monitoring-edit.php#L770-L808)



### `mainwp_automatic_disable_uptime_monitoring_check`

*Method cron_uptime_check*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-schedule.php](class/class-mainwp-uptime-monitoring-schedule.php), [line 67](class/class-mainwp-uptime-monitoring-schedule.php#L67-L74)



### `mainwp_uptime_monitoring_send_notification_limit`

*Run schedule uptime notification.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`3` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-schedule.php](class/class-mainwp-uptime-monitoring-schedule.php), [line 173](class/class-mainwp-uptime-monitoring-schedule.php#L173-L214)



### `mainwp_module_log_check_connector_is_excluded`

*Allows excluded connectors to be overridden and registered.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$is_excluded` | `bool` | True if excluded, otherwise false.
`$connector_name` | |
`$excluded_connectors` | `array` | An array of all excluded connector slugs.

Source: [../sources/mainwp-dashboard/modules/logs/classes/class-log-connectors.php](modules/logs/classes/class-log-connectors.php), [line 148](modules/logs/classes/class-log-connectors.php#L148-L155)



### `mainwp_module_cost_tracker_manager_check_status`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/pages/page-cost-tracker-settings.php](modules/cost-tracker/pages/page-cost-tracker-settings.php), [line 348](modules/cost-tracker/pages/page-cost-tracker-settings.php#L348-L348)



### `mainwp_security_issues_stats`

*Filters security issues*

Filters the default security checks and enables user to disable certain checks.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$information` | `object` | Object containing data from che chid site related to security issues.<br>Available options: 'db_reporting', 'php_reporting'.
`$website` | `object` | Object containing child site data.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-security-issues.php](pages/page-mainwp-security-issues.php), [line 293](pages/page-mainwp-security-issues.php#L293-L305)



### `mainwp_unset_security_scripts_stylesheets`

*Method Fix Security Issues*

Fix the selected security issue.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-security-issues.php](pages/page-mainwp-security-issues.php), [line 312](pages/page-mainwp-security-issues.php#L312-L366)



### `mainwp_uptime_monitoring_response_time_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Uptime Monitoring', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-uptime-monitoring-site-widget.php](widgets/widget-mainwp-uptime-monitoring-site-widget.php), [line 190](widgets/widget-mainwp-uptime-monitoring-site-widget.php#L190-L190)



### `mainwp_security_issues_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Site Hardening', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 98](widgets/widget-mainwp-security-issues-widget.php#L98-L98)



### `mainwp_security_issues_list_item_title_url`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'admin.php?page=managesites&dashboard=' . $website->id` | |
`$website` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 225](widgets/widget-mainwp-security-issues-widget.php#L225-L225)



### `mainwp_security_issues_list_item_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website->name` | |
`$website` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 236](widgets/widget-mainwp-security-issues-widget.php#L236-L236)



### `mainwp_uptime_monitoring_status_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Uptime Monitoring', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-uptime-monitoring-status.php](widgets/widget-mainwp-uptime-monitoring-status.php), [line 51](widgets/widget-mainwp-uptime-monitoring-status.php#L51-L51)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,481 @@
# System & Settings Actions

Hooks related to general settings and system configuration.

## Navigation

- [Back to All Actions](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_system_init`](#mainwp_system_init) - MainWP_System constructor.
- [`mainwp_log_system_query`](#mainwp_log_system_query) - Method log_system_query
- [`mainwp_before_save_email_settings`](#mainwp_before_save_email_settings) - Action: mainwp_before_save_email_settings
- [`mainwp_after_save_email_settings`](#mainwp_after_save_email_settings) - Action: mainwp_after_save_email_settings
- [`mainwp_settings_email_settings`](#mainwp_settings_email_settings) - Action: mainwp_settings_email_settings
- [`mainwp_module_cost_tracker_settings_bottom`](#mainwp_module_cost_tracker_settings_bottom) - Render settings content.
- [`mainwp_before_save_general_settings`](#mainwp_before_save_general_settings) - Action: mainwp_before_save_general_settings
- [`mainwp_after_save_general_settings`](#mainwp_after_save_general_settings) - Action: mainwp_after_save_general_settings
- [`mainwp_settings_form_top`](#mainwp_settings_form_top) - Action: mainwp_settings_form_top
- [`mainwp_settings_form_bottom`](#mainwp_settings_form_bottom) - Action: mainwp_settings_form_bottom
- [`mainwp_before_save_advanced_settings`](#mainwp_before_save_advanced_settings) - Action: mainwp_before_save_advanced_settings
- [`mainwp_after_save_advanced_settings`](#mainwp_after_save_advanced_settings) - Action: mainwp_after_save_advanced_settings
- [`mainwp_advanced_settings_form_top`](#mainwp_advanced_settings_form_top) - Action: mainwp_advanced_settings_form_top
- [`mainwp_advanced_settings_form_bottom`](#mainwp_advanced_settings_form_bottom) - Action: mainwp_advanced_settings_form_bottom
- [`mainwp_settings_help_item`](#mainwp_settings_help_item) - Action: mainwp_settings_help_item
- [`mainwp_before_save_email_settings`](#mainwp_before_save_email_settings) - Action: mainwp_before_save_email_settings
- [`mainwp_after_save_email_settings`](#mainwp_after_save_email_settings) - Action: mainwp_after_save_email_settings
- [`mainwp_before_wp_config_section`](#mainwp_before_wp_config_section) - Action: mainwp_before_wp_config_section
- [`mainwp_after_wp_config_section`](#mainwp_after_wp_config_section) - Action: mainwp_after_wp_config_section
- [`mainwp_init_load_all_options`](#mainwp_init_load_all_options) - Method load_all_options()
- [`mainwp_module_cost_tracker_before_save_settings`](#mainwp_module_cost_tracker_before_save_settings) - Settigns Post
- [`mainwp_default_settings_indicator`](#mainwp_default_settings_indicator) - Method render_not_default_indicator().
- [`mainwp_default_settings_indicator`](#mainwp_default_settings_indicator) - Method render_not_default_email_settings_indicator().
- [`mainwp_clear_and_lock_options`](#mainwp_clear_and_lock_options) - Clean and Lock extension options

## Hook Details

### `mainwp_system_init`

*MainWP_System constructor.*

Runs any time class is called.


Source: [../sources/mainwp-dashboard/class/class-mainwp-system.php](class/class-mainwp-system.php), [line 82](class/class-mainwp-system.php#L82-L135)



### `mainwp_log_system_query`

*Method log_system_query*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | `array` | params.
`$sql` | `string` | query.

Source: [../sources/mainwp-dashboard/class/class-mainwp-db.php](class/class-mainwp-db.php), [line 3242](class/class-mainwp-db.php#L3242-L3252)



### `mainwp_before_save_email_settings`

*Action: mainwp_before_save_email_settings*

Fires before save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$type` | |
`$update_settings` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-notification-settings.php](class/class-mainwp-notification-settings.php), [line 76](class/class-mainwp-notification-settings.php#L76-L83)



### `mainwp_after_save_email_settings`

*Action: mainwp_after_save_email_settings*

Fires after save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$emails_settings` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-notification-settings.php](class/class-mainwp-notification-settings.php), [line 87](class/class-mainwp-notification-settings.php#L87-L94)



### `mainwp_settings_email_settings`

*Action: mainwp_settings_email_settings*

Fires after the default email settings.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-notification-settings.php](class/class-mainwp-notification-settings.php), [line 175](class/class-mainwp-notification-settings.php#L175-L182)



### `mainwp_module_cost_tracker_settings_bottom`

*Render settings content.*

Renders the extension settings page.


Source: [../sources/mainwp-dashboard/modules/cost-tracker/pages/page-cost-tracker-settings.php](modules/cost-tracker/pages/page-cost-tracker-settings.php), [line 88](modules/cost-tracker/pages/page-cost-tracker-settings.php#L88-L343)



### `mainwp_before_save_general_settings`

*Action: mainwp_before_save_general_settings*

Fires before general settings save.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 454](pages/page-mainwp-settings.php#L454-L461)



### `mainwp_after_save_general_settings`

*Action: mainwp_after_save_general_settings*

Fires after save general settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 585](pages/page-mainwp-settings.php#L585-L592)



### `mainwp_settings_form_top`

*Action: mainwp_settings_form_top*

Fires at the top of settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 631](pages/page-mainwp-settings.php#L631-L638)



### `mainwp_settings_form_bottom`

*Action: mainwp_settings_form_bottom*

Fires at the bottom of settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 906](pages/page-mainwp-settings.php#L906-L913)



### `mainwp_before_save_advanced_settings`

*Action: mainwp_before_save_advanced_settings*

Fires before save advanced settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1319](pages/page-mainwp-settings.php#L1319-L1326)



### `mainwp_after_save_advanced_settings`

*Action: mainwp_after_save_advanced_settings*

Fires after advanced settings save.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1373](pages/page-mainwp-settings.php#L1373-L1380)



### `mainwp_advanced_settings_form_top`

*Action: mainwp_advanced_settings_form_top*

Fires at the top of advanced settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1401](pages/page-mainwp-settings.php#L1401-L1408)



### `mainwp_advanced_settings_form_bottom`

*Action: mainwp_advanced_settings_form_bottom*

Fires at the bottom of advanced settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1680](pages/page-mainwp-settings.php#L1680-L1687)



### `mainwp_settings_help_item`

*Action: mainwp_settings_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the Settings page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`5.2` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 2393](pages/page-mainwp-settings.php#L2393-L2404)



### `mainwp_before_save_email_settings`

*Action: mainwp_before_save_email_settings*

Fires before save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$type` | |
`$update_settings` | |
`$website` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-manage-sites.php](pages/page-mainwp-manage-sites.php), [line 1898](pages/page-mainwp-manage-sites.php#L1898-L1905)



### `mainwp_after_save_email_settings`

*Action: mainwp_after_save_email_settings*

Fires after save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$settings_emails` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-manage-sites.php](pages/page-mainwp-manage-sites.php), [line 1911](pages/page-mainwp-manage-sites.php#L1911-L1918)



### `mainwp_before_wp_config_section`

*Action: mainwp_before_wp_config_section*

Fires before the WP Config section.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 1601](pages/page-mainwp-server-information.php#L1601-L1608)



### `mainwp_after_wp_config_section`

*Action: mainwp_after_wp_config_section*

Fires after the WP Config section.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 1639](pages/page-mainwp-server-information.php#L1639-L1646)



### `mainwp_init_load_all_options`

*Method load_all_options()*

Load all wp_options data.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$options` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-system.php](class/class-mainwp-system.php), [line 297](class/class-mainwp-system.php#L297-L380)



### `mainwp_module_cost_tracker_before_save_settings`

*Settigns Post*

Handles the save settings post request.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$all_opts` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/classes/class-cost-tracker-admin.php](modules/cost-tracker/classes/class-cost-tracker-admin.php), [line 552](modules/cost-tracker/classes/class-cost-tracker-admin.php#L552-L590)



### `mainwp_default_settings_indicator`

*Method render_not_default_indicator().*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$indi` | |
`$field` | `string` | setting field to check.
`$indi_value` | |
`$current_value` | `mixed` | setting current value.
`$render_indi` | `bool` | to render indication.
`$default_val` | `mixed` | default value directly.

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings-indicator.php](pages/page-mainwp-settings-indicator.php), [line 72](pages/page-mainwp-settings-indicator.php#L72-L92)



### `mainwp_default_settings_indicator`

*Method render_not_default_email_settings_indicator().*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$indi` | |
`$field` | `string` | setting field to check.
`$def` | |
`$current_value` | `mixed` | setting current value.
`$render_indi` | `bool` | to render indication.
`$type` | `string` | setting type to get default value.

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings-indicator.php](pages/page-mainwp-settings-indicator.php), [line 99](pages/page-mainwp-settings-indicator.php#L99-L115)



### `mainwp_clear_and_lock_options`

*Clean and Lock extension options*

Adds additional options related to Clean and Lock options in order to avoid conflicts when HTTP Basic auth is set.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-install-bulk.php](pages/page-mainwp-install-bulk.php), [line 379](pages/page-mainwp-install-bulk.php#L379-L386)



File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,770 @@
# API & Remote Communication Filters

Hooks for API endpoints and remote communication with child sites.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`cloudways_api_form_top`](#cloudways_api_form_top) - Action: cloudways_api_form_top
- [`cloudways_api_form_bottom`](#cloudways_api_form_bottom) - Action: cloudways_api_form_bottom
- [`gridpane_api_form_top`](#gridpane_api_form_top) - Action: gridpane_api_form_top
- [`gridpane_api_form_bottom`](#gridpane_api_form_bottom) - Action: gridpane_api_form_bottom
- [`vultr_api_form_top`](#vultr_api_form_top) - Action: vultr_api_form_top
- [`vultr_api_form_bottom`](#vultr_api_form_bottom) - Action: vultr_api_form_bottom
- [`linode_api_form_top`](#linode_api_form_top) - Action: linode_api_form_top
- [`linode_api_form_bottom`](#linode_api_form_bottom) - Action: linode_api_form_bottom
- [`digitalocean_api_form_top`](#digitalocean_api_form_top) - Action: digitalocean_api_form_top
- [`digitalocean_api_form_bottom`](#digitalocean_api_form_bottom) - Action: digitalocean_api_form_bottom
- [`cpanel_api_form`](#cpanel_api_form) - Action: cpanel_api_form
- [`cpanel_api_form_bottom`](#cpanel_api_form_bottom) - Action: cpanel_api_form_bottom
- [`plesk_api_form_top`](#plesk_api_form_top) - Action: plesk_api_form_top
- [`plesk_api_form_bottom`](#plesk_api_form_bottom) - Action: plesk_api_form_bottom
- [`kinsta_api_form_top`](#kinsta_api_form_top) - Action: kinsta_api_form_top
- [`kinsta_api_form_bottom`](#kinsta_api_form_bottom) - Action: kinsta_api_form_bottom
- [`rest_api_form_top`](#rest_api_form_top) - Action: rest_api_form_top
- [`rest_api_form_bottom`](#rest_api_form_bottom) - Action: rest_api_form_bottom
- [`mainwp_rest_api_help_item`](#mainwp_rest_api_help_item) - Action: mainwp_rest_api_help_item
- [`mainwp_is_rest_api_request`](#mainwp_is_rest_api_request) - Whether this is a REST API request.
- [`mainwp_rest_is_request_to_rest_api`](#mainwp_rest_is_request_to_rest_api) - Check if is request to our REST API.
- [`mainwp_rest_api_v2_enabled`](#mainwp_rest_api_v2_enabled) - Hook into WordPress ready to init the REST API as needed.
- [`mainwp_rest_api_get_rest_namespaces`](#mainwp_rest_api_get_rest_namespaces) - Get API namespaces - new namespaces should be registered here.
- [`mainwp_rest_api_disabled`](#mainwp_rest_api_disabled) - Method is_rest_api_enabled()
- [`mainwp_rest_batch_items_limit`](#mainwp_rest_batch_items_limit) - Check batch limit.
- [`mainwp_rest_{$type}_object_query`](#mainwp_rest_type_object_query) - Filter the query arguments for a request.
- [`mainwp_rest_collection_params`](#mainwp_rest_collection_params) - Filter collection parameters for the controller.
- [`mainwp_rest_batch_items_limit`](#mainwp_rest_batch_items_limit) - Check batch limit.
- [`mainwp_rest_prepare_site`](#mainwp_rest_prepare_site) - Filterobject returned from the REST API.
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Fetch uptime urls.
- [`mainwp_remote_destination_info`](#mainwp_remote_destination_info) - Method mainwp_backup_upload_checkstatus()
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Method try visit.
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Method fetch_urls_authed()
- [`mainwp_curl_http_version`](#mainwp_curl_http_version) - Method fetch_url_site()
- [`mainwp_rest_api_enabled`](#mainwp_rest_api_enabled) - Method init_rest_api()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_all_costs_callback()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_client_costs_callback()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_site_costs_callback()
- [`mainwp_rest_api_validate`](#mainwp_rest_api_validate) - Method cost_tracker_rest_api_get_costs_callback()
- [`mainwp_rest_cost_collection_params`](#mainwp_rest_cost_collection_params) - Filter collection parameters.
- [`mainwp_rest_prepare_cost`](#mainwp_rest_prepare_cost) - Filter product reviews object returned from the REST API.
- [`https_local_ssl_verify`](#https_local_ssl_verify) - *Arguments*

## Hook Details

### `cloudways_api_form_top`

*Action: cloudways_api_form_top*

Fires at the top of CloudWays API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 274](modules/api-backups/classes/class-api-backups-settings.php#L274-L281)



### `cloudways_api_form_bottom`

*Action: cloudways_api_form_bottom*

Fires at the bottom of CloudWays API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 317](modules/api-backups/classes/class-api-backups-settings.php#L317-L324)



### `gridpane_api_form_top`

*Action: gridpane_api_form_top*

Fires at the top of GridPane API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 350](modules/api-backups/classes/class-api-backups-settings.php#L350-L357)



### `gridpane_api_form_bottom`

*Action: gridpane_api_form_bottom*

Fires at the bottom of GridPane API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 383](modules/api-backups/classes/class-api-backups-settings.php#L383-L390)



### `vultr_api_form_top`

*Action: vultr_api_form_top*

Fires at the top of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 417](modules/api-backups/classes/class-api-backups-settings.php#L417-L424)



### `vultr_api_form_bottom`

*Action: vultr_api_form_bottom*

Fires at the bottom of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 450](modules/api-backups/classes/class-api-backups-settings.php#L450-L457)



### `linode_api_form_top`

*Action: linode_api_form_top*

Fires at the top of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 483](modules/api-backups/classes/class-api-backups-settings.php#L483-L490)



### `linode_api_form_bottom`

*Action: linode_api_form_bottom*

Fires at the bottom of Vultr API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 518](modules/api-backups/classes/class-api-backups-settings.php#L518-L525)



### `digitalocean_api_form_top`

*Action: digitalocean_api_form_top*

Fires at the top of DigitalOcean API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 551](modules/api-backups/classes/class-api-backups-settings.php#L551-L558)



### `digitalocean_api_form_bottom`

*Action: digitalocean_api_form_bottom*

Fires at the bottom of DigitalOcean API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 586](modules/api-backups/classes/class-api-backups-settings.php#L586-L593)



### `cpanel_api_form`

*Action: cpanel_api_form*

Fires at the top of cPanel API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 618](modules/api-backups/classes/class-api-backups-settings.php#L618-L625)



### `cpanel_api_form_bottom`

*Action: cpanel_api_form_bottom*

Fires at the bottom of cPanel API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 685](modules/api-backups/classes/class-api-backups-settings.php#L685-L692)



### `plesk_api_form_top`

*Action: plesk_api_form_top*

Fires at the top of Plesk API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 718](modules/api-backups/classes/class-api-backups-settings.php#L718-L725)



### `plesk_api_form_bottom`

*Action: plesk_api_form_bottom*

Fires at the bottom of Plesk API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 762](modules/api-backups/classes/class-api-backups-settings.php#L762-L769)



### `kinsta_api_form_top`

*Action: kinsta_api_form_top*

Fires at the top of Kinsta API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 795](modules/api-backups/classes/class-api-backups-settings.php#L795-L802)



### `kinsta_api_form_bottom`

*Action: kinsta_api_form_bottom*

Fires at the bottom of Kinsta API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-settings.php](modules/api-backups/classes/class-api-backups-settings.php), [line 851](modules/api-backups/classes/class-api-backups-settings.php#L851-L858)



### `rest_api_form_top`

*Action: rest_api_form_top*

Fires at the top of REST API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-rest-api-page.php](pages/page-mainwp-rest-api-page.php), [line 850](pages/page-mainwp-rest-api-page.php#L850-L857)



### `rest_api_form_bottom`

*Action: rest_api_form_bottom*

Fires at the bottom of REST API form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-rest-api-page.php](pages/page-mainwp-rest-api-page.php), [line 936](pages/page-mainwp-rest-api-page.php#L936-L943)



### `mainwp_rest_api_help_item`

*Action: mainwp_rest_api_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the REST API page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-rest-api-page.php](pages/page-mainwp-rest-api-page.php), [line 1260](pages/page-mainwp-rest-api-page.php#L1260-L1271)



### `mainwp_is_rest_api_request`

*Whether this is a REST API request.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$is_rest_api_request` | |

**Changelog**

Version | Description
------- | -----------
`5.1.1` |

Source: [../sources/mainwp-dashboard/includes/class-mainwp-setup.php](includes/class-mainwp-setup.php), [line 81](includes/class-mainwp-setup.php#L81-L86)



### `mainwp_rest_is_request_to_rest_api`

*Check if is request to our REST API.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$mainwp_api || $extension_api` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/class-mainwp-rest-authentication.php](includes/rest-api/class-mainwp-rest-authentication.php), [line 89](includes/rest-api/class-mainwp-rest-authentication.php#L89-L108)



### `mainwp_rest_api_v2_enabled`

*Hook into WordPress ready to init the REST API as needed.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/class-mainwp-rest-server.php](includes/rest-api/class-mainwp-rest-server.php), [line 47](includes/rest-api/class-mainwp-rest-server.php#L47-L51)



### `mainwp_rest_api_get_rest_namespaces`

*Get API namespaces - new namespaces should be registered here.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('mainwp/v2' => $this->get_v2_controllers())` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/class-mainwp-rest-server.php](includes/rest-api/class-mainwp-rest-server.php), [line 89](includes/rest-api/class-mainwp-rest-server.php#L89-L100)



### `mainwp_rest_api_disabled`

*Method is_rest_api_enabled()*

Check if Enabled the REST API.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version1/class-mainwp-rest-api-v1.php](includes/rest-api/controller/version1/class-mainwp-rest-api-v1.php), [line 92](includes/rest-api/controller/version1/class-mainwp-rest-api-v1.php#L92-L99)



### `mainwp_rest_batch_items_limit`

*Check batch limit.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`100` | |
`$this->get_normalized_rest_base()` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-controller.php), [line 189](includes/rest-api/controller/version2/class-mainwp-rest-controller.php#L189-L196)



### `mainwp_rest_{$type}_object_query`

*Filter the query arguments for a request.*

Enables adding extra arguments or setting defaults for a post
collection request.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$args` | `array` | Key value array of query var to query value.
`$request` | `\WP_REST_Request` | The request used.

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-controller.php), [line 406](includes/rest-api/controller/version2/class-mainwp-rest-controller.php#L406-L415)



### `mainwp_rest_collection_params`

*Filter collection parameters for the controller.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | |
`$this` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-controller.php), [line 1384](includes/rest-api/controller/version2/class-mainwp-rest-controller.php#L1384-L1390)



### `mainwp_rest_batch_items_limit`

*Check batch limit.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`100` | |
`$this->get_normalized_rest_base()` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-global-batch-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-global-batch-controller.php), [line 471](includes/rest-api/controller/version2/class-mainwp-rest-global-batch-controller.php#L471-L478)



### `mainwp_rest_prepare_site`

*Filterobject returned from the REST API.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | `array` | The object.
`$item` | `mixed` | The object used to create response.
`$request` | `\WP_REST_Request` | Request object.

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-sites-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-sites-controller.php), [line 2346](includes/rest-api/controller/version2/class-mainwp-rest-sites-controller.php#L2346-L2353)



### `mainwp_curl_http_version`

*Fetch uptime urls.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website->id` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 350](class/class-mainwp-uptime-monitoring-connect.php#L350-L497)



### `mainwp_remote_destination_info`

*Method mainwp_backup_upload_checkstatus()*

Check upload status

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |
`isset($_POST['remote_destination']) ? sanitize_text_field(wp_unslash($_POST['remote_destination'])) : ''` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-post-backup-handler.php](class/class-mainwp-post-backup-handler.php), [line 376](class/class-mainwp-post-backup-handler.php#L376-L391)



### `mainwp_curl_http_version`

*Method try visit.*

Try connecting to Child Site via cURL.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`false` | |
`$url` | `string` | Child Site URL.

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 32](class/class-mainwp-connect.php#L32-L101)



### `mainwp_curl_http_version`

*Method fetch_urls_authed()*

Fetches data from child sites if authenticated.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website->id` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 688](class/class-mainwp-connect.php#L688-L894)



### `mainwp_curl_http_version`

*Method fetch_url_site()*

M Fetch URL.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website ? $website->id : false` | |
`$url` | `string` | URL to fetch from.

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 1351](class/class-mainwp-connect.php#L1351-L1486)



### `mainwp_rest_api_enabled`

*Method init_rest_api()*

Adds an action to create the rest API endpoints if activated in the plugin settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 56](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L56-L62)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_all_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-all-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 167](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L167-L180)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_client_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-client-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 195](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L195-L208)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_site_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-site-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 245](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L245-L258)



### `mainwp_rest_api_validate`

*Method cost_tracker_rest_api_get_costs_callback()*

Callback function for managing the response to API requests made for the endpoint: cost-tracker
Can be accessed via a request like: https://yourdomain.com/wp-json/mainwp/v1/cost-tracker/get-costs
API Method: GET

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$request` | `array` | The request made in the API call which includes all parameters.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php), [line 285](modules/cost-tracker/rest-api/version1/class-cost-tracker-rest-api-v1.php#L285-L298)



### `mainwp_rest_cost_collection_params`

*Filter collection parameters.*

This filter registers the collection parameter, but does not map the
collection parameter to an internal WP_Comment_Query parameter. Use the
`wc_rest_review_query` filter to set WP_Comment_Query parameters.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | `array` | JSON Schema-formatted collection parameters.

**Changelog**

Version | Description
------- | -----------
`5.2` |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php), [line 753](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php#L753-L763)



### `mainwp_rest_prepare_cost`

*Filter product reviews object returned from the REST API.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | `array` | The object.
`$review` | |
`$request` | `\WP_REST_Request` | Request object.

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php), [line 947](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php#L947-L953)



### `https_local_ssl_verify`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information-handler.php](pages/page-mainwp-server-information-handler.php), [line 704](pages/page-mainwp-server-information-handler.php#L704-L704)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,853 @@
# Client Reports Filters

Hooks for report generation, customization, and delivery.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_clientstable_prepared_items`](#mainwp_clientstable_prepared_items) - Prepair the items to be listed.
- [`mainwp_client_deleted`](#mainwp_client_deleted) - Delete client
- [`mainwp_before_select_clients_list`](#mainwp_before_select_clients_list) - Action: mainwp_before_select_clients_list
- [`mainwp_after_select_clients_list`](#mainwp_after_select_clients_list) - Action: mainwp_after_select_clients_list
- [`mainwp_client_suspend`](#mainwp_client_suspend) - Fires immediately after update client suspend/unsuspend.
- [`mainwp_manageclients_tabletop`](#mainwp_manageclients_tabletop) - Method render_second_top_header()
- [`mainwp_client_suspend`](#mainwp_client_suspend) - Fires immediately after update client suspend/unsuspend.
- [`mainwp_clients_overview_screen_options_top`](#mainwp_clients_overview_screen_options_top) - Action: mainwp_clients_overview_screen_options_top
- [`mainwp_clients_overview_screen_options_bottom`](#mainwp_clients_overview_screen_options_bottom) - Action: mainwp_clients_overview_screen_options_bottom
- [`mainwp_clients_overview_help_item`](#mainwp_clients_overview_help_item) - Action: mainwp_clients_overview_help_item
- [`mainwp_clients_overview_note_widget_top`](#mainwp_clients_overview_note_widget_top) - Actoin: mainwp_clients_overview_note_widget_top
- [`mainwp_clients_overview_note_widget_bottom`](#mainwp_clients_overview_note_widget_bottom) - Action: mainwp_clients_overview_note_widget_bottom
- [`mainwp_clients_overview_contact_widget_top`](#mainwp_clients_overview_contact_widget_top) - Actoin: mainwp_clients_overview_contact_widget_top
- [`mainwp_clients_overview_contact_widget_bottom`](#mainwp_clients_overview_contact_widget_bottom) - Action: mainwp_clients_overview_contact_widget_bottom
- [`mainwp_clients_overview_overview_widget_top`](#mainwp_clients_overview_overview_widget_top) - Actoin: mainwp_clients_overview_overview_widget_top
- [`mainwp_clients_overview_overview_widget_bottom`](#mainwp_clients_overview_overview_widget_bottom) - Action: mainwp_clients_overview_overview_widget_bottom
- [`mainwp_clients_overview_info_widget_top`](#mainwp_clients_overview_info_widget_top) - Actoin: mainwp_clients_overview_info_widget_top
- [`mainwp_clients_overview_info_table_top`](#mainwp_clients_overview_info_table_top) - Action: mainwp_clients_overview_info_table_top
- [`mainwp_clients_overview_info_table_bottom`](#mainwp_clients_overview_info_table_bottom) - Action: mainwp_clients_overview_info_table_bottom
- [`mainwp_clients_overview_info_widget_bottom`](#mainwp_clients_overview_info_widget_bottom) - Action: mainwp_clients_overview_info_widget_bottom
- [`mainwp_clients_widget_top`](#mainwp_clients_widget_top) - Actoin: mainwp_clients_widget_top
- [`mainwp_clients_widget_bottom`](#mainwp_clients_widget_bottom) - Action: mainwp_clients_widget_bottom
- [`mainwp_clients_info_widget_top`](#mainwp_clients_info_widget_top) - Actoin: mainwp_clients_info_widget_top
- [`mainwp_clients_info_table_top`](#mainwp_clients_info_table_top) - Action: mainwp_clients_info_table_top
- [`mainwp_clients_info_table_bottom`](#mainwp_clients_info_table_bottom) - Action: mainwp_clients_info_table_bottom
- [`mainwp_clients_info_widget_bottom`](#mainwp_clients_info_widget_bottom) - Action: mainwp_clients_info_widget_bottom
- [`mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`](#mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context) - Get client by tag id.
- [`mainwp_clients_sitestable_item`](#mainwp_clients_sitestable_item) - Filter: mainwp_clients_sitestable_item
- [`mainwp_clients_sitestable_getcolumns`](#mainwp_clients_sitestable_getcolumns) - Filter: mainwp_clients_sitestable_getcolumns
- [`mainwp_manageclients_bulk_actions`](#mainwp_manageclients_bulk_actions) - Filter: mainwp_manageclients_bulk_actions
- [`mainwp_clients_table_features`](#mainwp_clients_table_features) - Filter: mainwp_clients_table_features
- [`mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`](#mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context) - Get clients by item.
- [`mainwp_clients_getmetaboxes`](#mainwp_clients_getmetaboxes) - Method add_meta_boxes()
- [`mainwp_clients_overview_enabled_widgets`](#mainwp_clients_overview_enabled_widgets) - Unset unwanted Widgets
- [`mainwp_clients_widgets_screen_options`](#mainwp_clients_widgets_screen_options) - Filter: mainwp_clients_widgets_screen_options
- [`mainwp_clients_overview_note_widget_title`](#mainwp_clients_overview_note_widget_title) - *Arguments*
- [`mainwp_clients_overview_contact_widget_title`](#mainwp_clients_overview_contact_widget_title) - *Arguments*
- [`mainwp_clients_overview_contact_widget_sutbitle`](#mainwp_clients_overview_contact_widget_sutbitle) - *Arguments*
- [`mainwp_clients_overview_info_widget_title`](#mainwp_clients_overview_info_widget_title) - *Arguments*
- [`mainwp_clients_widget_title`](#mainwp_clients_widget_title) - *Arguments*
- [`mainwp_clients_info_widget_title`](#mainwp_clients_info_widget_title) - *Arguments*

## Hook Details

### `mainwp_clientstable_prepared_items`

*Prepair the items to be listed.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | |
`$clients_ids` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 290](class/class-mainwp-client-list-table.php#L290-L330)



### `mainwp_client_deleted`

*Delete client*

Fires after delete a client.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$current` | `object` | client deleted.

**Changelog**

Version | Description
------- | -----------
`4.5.1.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-db-client.php](class/class-mainwp-db-client.php), [line 1010](class/class-mainwp-db-client.php#L1010-L1019)



### `mainwp_before_select_clients_list`

*Action: mainwp_before_select_clients_list*

Fires before the Select Clients list.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing Clients info.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-ui-select-sites.php](class/class-mainwp-ui-select-sites.php), [line 355](class/class-mainwp-ui-select-sites.php#L355-L364)



### `mainwp_after_select_clients_list`

*Action: mainwp_after_select_clients_list*

Fires after the Select Clients list.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing Clients info.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-ui-select-sites.php](class/class-mainwp-ui-select-sites.php), [line 405](class/class-mainwp-ui-select-sites.php#L405-L414)



### `mainwp_client_suspend`

*Fires immediately after update client suspend/unsuspend.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client` | `object` | client data.
`$suspended` | `bool` | true\|false.

**Changelog**

Version | Description
------- | -----------
`4.5.1.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-post-handler.php](class/class-mainwp-post-handler.php), [line 1111](class/class-mainwp-post-handler.php#L1111-L1119)



### `mainwp_manageclients_tabletop`

*Method render_second_top_header()*

Render second top header.


Source: [../sources/mainwp-dashboard/pages/page-mainwp-client.php](pages/page-mainwp-client.php), [line 565](pages/page-mainwp-client.php#L565-L576)



### `mainwp_client_suspend`

*Fires immediately after update client suspend/unsuspend.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$inserted` | |
`$new_suspended` | `bool` | true\|false.

**Changelog**

Version | Description
------- | -----------
`4.5.1.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client.php](pages/page-mainwp-client.php), [line 1353](pages/page-mainwp-client.php#L1353-L1361)



### `mainwp_clients_overview_screen_options_top`

*Action: mainwp_clients_overview_screen_options_top*

Fires at the top of the Sceen Options modal on the Overview page.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 366](pages/page-mainwp-client-overview.php#L366-L373)



### `mainwp_clients_overview_screen_options_bottom`

*Action: mainwp_clients_overview_screen_options_bottom*

Fires at the bottom of the Sceen Options modal on the Overview page.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 380](pages/page-mainwp-client-overview.php#L380-L387)



### `mainwp_clients_overview_help_item`

*Action: mainwp_clients_overview_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the Clients page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 521](pages/page-mainwp-client-overview.php#L521-L532)



### `mainwp_clients_overview_note_widget_top`

*Actoin: mainwp_clients_overview_note_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-note.php](widgets/widget-mainwp-client-overview-note.php), [line 78](widgets/widget-mainwp-client-overview-note.php#L78-L87)



### `mainwp_clients_overview_note_widget_bottom`

*Action: mainwp_clients_overview_note_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-note.php](widgets/widget-mainwp-client-overview-note.php), [line 100](widgets/widget-mainwp-client-overview-note.php#L100-L109)



### `mainwp_clients_overview_contact_widget_top`

*Actoin: mainwp_clients_overview_contact_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$contact_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 82](widgets/widget-mainwp-client-overview-contacts.php#L82-L91)



### `mainwp_clients_overview_contact_widget_bottom`

*Action: mainwp_clients_overview_contact_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$contact_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 142](widgets/widget-mainwp-client-overview-contacts.php#L142-L151)



### `mainwp_clients_overview_overview_widget_top`

*Actoin: mainwp_clients_overview_overview_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-info.php](widgets/widget-mainwp-client-overview-info.php), [line 82](widgets/widget-mainwp-client-overview-info.php#L82-L91)



### `mainwp_clients_overview_overview_widget_bottom`

*Action: mainwp_clients_overview_overview_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-info.php](widgets/widget-mainwp-client-overview-info.php), [line 159](widgets/widget-mainwp-client-overview-info.php#L159-L168)



### `mainwp_clients_overview_info_widget_top`

*Actoin: mainwp_clients_overview_info_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 71](widgets/widget-mainwp-client-overview-custom-info.php#L71-L80)



### `mainwp_clients_overview_info_table_top`

*Action: mainwp_clients_overview_info_table_top*

Fires at the top of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 89](widgets/widget-mainwp-client-overview-custom-info.php#L89-L98)



### `mainwp_clients_overview_info_table_bottom`

*Action: mainwp_clients_overview_info_table_bottom*

Fires at the bottom of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 128](widgets/widget-mainwp-client-overview-custom-info.php#L128-L137)



### `mainwp_clients_overview_info_widget_bottom`

*Action: mainwp_clients_overview_info_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client_info` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 147](widgets/widget-mainwp-client-overview-custom-info.php#L147-L156)



### `mainwp_clients_widget_top`

*Actoin: mainwp_clients_widget_top*

Fires at the top of the Clients widget on the overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing the clients info.

**Changelog**

Version | Description
------- | -----------
`4.4` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-clients.php](widgets/widget-mainwp-clients.php), [line 62](widgets/widget-mainwp-clients.php#L62-L71)



### `mainwp_clients_widget_bottom`

*Action: mainwp_clients_widget_bottom*

Fires at the bottom of the Clients widget on the overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$clients` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.4` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-clients.php](widgets/widget-mainwp-clients.php), [line 161](widgets/widget-mainwp-clients.php#L161-L170)



### `mainwp_clients_info_widget_top`

*Actoin: mainwp_clients_info_widget_top*

Fires at the top of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 84](widgets/widget-mainwp-client-info.php#L84-L93)



### `mainwp_clients_info_table_top`

*Action: mainwp_clients_info_table_top*

Fires at the top of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 107](widgets/widget-mainwp-client-info.php#L107-L116)



### `mainwp_clients_info_table_bottom`

*Action: mainwp_clients_info_table_bottom*

Fires at the bottom of the Site Info table in Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 168](widgets/widget-mainwp-client-info.php#L168-L177)



### `mainwp_clients_info_widget_bottom`

*Action: mainwp_clients_info_widget_bottom*

Fires at the bottom of the Site Info widget on the Individual site overview page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 183](widgets/widget-mainwp-client-info.php#L183-L192)



### `mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`

*Get client by tag id.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client` | |

Source: [../sources/mainwp-dashboard/includes/rest-api/controller/version2/class-mainwp-rest-tags-controller.php](includes/rest-api/controller/version2/class-mainwp-rest-tags-controller.php), [line 404](includes/rest-api/controller/version2/class-mainwp-rest-tags-controller.php#L404-L423)



### `mainwp_clients_sitestable_item`

*Filter: mainwp_clients_sitestable_item*

Filters the Clients table column items. Allows user to create new column item.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$item` | `array` | Array containing child site data.
`$item` | `array` | Array containing child site data.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 60](class/class-mainwp-client-list-table.php#L60-L69)



### `mainwp_clients_sitestable_getcolumns`

*Filter: mainwp_clients_sitestable_getcolumns*

Filters the Clients table columns. Allows user to create a new column.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$columns` | `array` | Array containing table columns.
`$columns` | `array` | Array containing table columns.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 156](class/class-mainwp-client-list-table.php#L156-L165)



### `mainwp_manageclients_bulk_actions`

*Filter: mainwp_manageclients_bulk_actions*

Filters bulk actions on the Clients page. Allows user to hook in new actions or remove default ones.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$actions` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 206](class/class-mainwp-client-list-table.php#L206-L213)



### `mainwp_clients_table_features`

*Filter: mainwp_clients_table_features*

Filter the Clients table features.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$table_features` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-client-list-table.php](class/class-mainwp-client-list-table.php), [line 409](class/class-mainwp-client-list-table.php#L409-L416)



### `mainwp_rest_routes_clients_controller_filter_allowed_fields_by_context`

*Get clients by item.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$client` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php), [line 566](modules/cost-tracker/rest-api/version2/class-mainwp-rest-costs-controller.php#L566-L624)



### `mainwp_clients_getmetaboxes`

*Method add_meta_boxes()*

Add MainWP Overview Page Widgets.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$extMetaBoxs` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 143](pages/page-mainwp-client-overview.php#L143-L169)



### `mainwp_clients_overview_enabled_widgets`

*Unset unwanted Widgets*

Contains the list of enabled widgets and allows user to unset unwanted widgets.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$values` | `array` | Array containing enabled widgets.
`null` | |

**Changelog**

Version | Description
------- | -----------
`4.3` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 191](pages/page-mainwp-client-overview.php#L191-L201)



### `mainwp_clients_widgets_screen_options`

*Filter: mainwp_clients_widgets_screen_options*

Filters available widgets on the Overview page allowing users to unsent unwanted widgets.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$custom_opts` | |

**Changelog**

Version | Description
------- | -----------
`4.0` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-client-overview.php](pages/page-mainwp-client-overview.php), [line 438](pages/page-mainwp-client-overview.php#L438-L445)



### `mainwp_clients_overview_note_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Notes', 'mainwp')` | |
`$client_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-note.php](widgets/widget-mainwp-client-overview-note.php), [line 71](widgets/widget-mainwp-client-overview-note.php#L71-L71)



### `mainwp_clients_overview_contact_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`__('Client Contact', 'mainwp')` | |
`$contact_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 73](widgets/widget-mainwp-client-overview-contacts.php#L73-L73)



### `mainwp_clients_overview_contact_widget_sutbitle`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`__('Contact Information', 'mainwp')` | |
`$contact_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-contacts.php](widgets/widget-mainwp-client-overview-contacts.php), [line 76](widgets/widget-mainwp-client-overview-contacts.php#L76-L76)



### `mainwp_clients_overview_info_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Additional Client Info', 'mainwp')` | |
`$client_info` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-overview-custom-info.php](widgets/widget-mainwp-client-overview-custom-info.php), [line 64](widgets/widget-mainwp-client-overview-custom-info.php#L64-L64)



### `mainwp_clients_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Clients', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-clients.php](widgets/widget-mainwp-clients.php), [line 55](widgets/widget-mainwp-clients.php#L55-L55)



### `mainwp_clients_info_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Client Info', 'mainwp')` | |
`$website` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-client-info.php](widgets/widget-mainwp-client-info.php), [line 78](widgets/widget-mainwp-client-info.php#L78-L78)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,119 @@
# Extensions & Integration Filters

Hooks related to extensions and third-party integrations.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_extension_card_top`](#mainwp_extension_card_top) - Action: mainwp_extension_card_top
- [`mainwp_extension_card_bottom`](#mainwp_extension_card_bottom) - Action: mainwp_extension_card_bottom
- [`mainwp_extensions_help_item`](#mainwp_extensions_help_item) - Action: mainwp_extensions_help_item
- [`mainwp-getextensions`](#mainwp-getextensions) - Method init_menu()
- [`mainwp_getextensions`](#mainwp_getextensions) - Method init_menu()

## Hook Details

### `mainwp_extension_card_top`

*Action: mainwp_extension_card_top*

Fires at the Extension card top

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$extension` | `array` | Array containing the Extension information.

**Changelog**

Version | Description
------- | -----------
`4.1.4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-extensions-view.php](class/class-mainwp-extensions-view.php), [line 442](class/class-mainwp-extensions-view.php#L442-L451)



### `mainwp_extension_card_bottom`

*Action: mainwp_extension_card_bottom*

Fires at the Extension card bottom

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$extension` | `array` | Array containing the Extension information.

**Changelog**

Version | Description
------- | -----------
`4.1.4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-extensions-view.php](class/class-mainwp-extensions-view.php), [line 530](class/class-mainwp-extensions-view.php#L530-L539)



### `mainwp_extensions_help_item`

*Action: mainwp_extensions_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the Extensions page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`5.2` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-extensions.php](pages/page-mainwp-extensions.php), [line 799](pages/page-mainwp-extensions.php#L799-L810)



### `mainwp-getextensions`

*Method init_menu()*

Instantiate Extensions Menu.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($init_extensions)` | |
`'4.0.7.2'` | |
`'mainwp_getextensions'` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-extensions.php](pages/page-mainwp-extensions.php), [line 58](pages/page-mainwp-extensions.php#L58-L86)



### `mainwp_getextensions`

*Method init_menu()*

Instantiate Extensions Menu.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$init_extensions` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-extensions.php](pages/page-mainwp-extensions.php), [line 58](pages/page-mainwp-extensions.php#L58-L87)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,891 @@
# Security & Monitoring Filters

Hooks related to security checks, uptime monitoring, and site health.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_uptime_monitoring_after_check_uptime`](#mainwp_uptime_monitoring_after_check_uptime) - Method handle response fetch uptime.
- [`mainwp_monitoring_sitestable_prepared_items`](#mainwp_monitoring_sitestable_prepared_items) - Action: mainwp_monitoring_sitestable_prepared_items
- [`mainwp-securityissues-sites`](#mainwp-securityissues-sites) - Method render_scan_site()
- [`mainwp_securityissues_sites`](#mainwp_securityissues_sites) - Action: mainwp_securityissues_sites
- [`mainwp-sucuriscan-sites`](#mainwp-sucuriscan-sites) - Method render_scan_site()
- [`mainwp_sucuriscan_sites`](#mainwp_sucuriscan_sites) - Action: mainwp_sucuriscan_sites
- [`mainwp_licenses_deactivated_alert_email_header`](#mainwp_licenses_deactivated_alert_email_header) - Site Health Monitoring Email Header
- [`mainwp_licenses_deactivated_alert_email_footer`](#mainwp_licenses_deactivated_alert_email_footer) - Site Health Monitoring Email Footer
- [`mainwp_http_check_email_header`](#mainwp_http_check_email_header) - HTTP Check Email Header
- [`mainwp_http_check_email_footer`](#mainwp_http_check_email_footer) - HTTP Check Email Footer
- [`mainwp_uptime_monitoring_email_header`](#mainwp_uptime_monitoring_email_header) - Uptime Monitoring Email Header
- [`mainwp_uptime_monitoring_email_footer`](#mainwp_uptime_monitoring_email_footer) - Uptime Monitoring Email Footer
- [`mainwp_secure_request`](#mainwp_secure_request) - Method security_nonce().
- [`mainwp_secure_request`](#mainwp_secure_request) - Method admin_init()
- [`mainwp_before_system_requirements_check`](#mainwp_before_system_requirements_check) - Action: mainwp_before_system_requirements_check
- [`mainwp_after_system_requirements_check`](#mainwp_after_system_requirements_check) - Action: mainwp_after_system_requirements_check
- [`mainwp_security_issues_widget_top`](#mainwp_security_issues_widget_top) - Action: mainwp_security_issues_widget_top
- [`mainwp_security_issues_widget_top`](#mainwp_security_issues_widget_top) - Action: mainwp_security_issues_widget_top
- [`mainwp_security_issues_list_item_column`](#mainwp_security_issues_list_item_column) - Action: mainwp_security_issues_list_item_column
- [`mainwp_security_issues_widget_bottom`](#mainwp_security_issues_widget_bottom) - Action: mainwp_security_issues_widget_bottom
- [`mainwp_security_nonces`](#mainwp_security_nonces) - Method admin_init()
- [`mainwp_create_security_nonces`](#mainwp_create_security_nonces) - Create the security nonces.
- [`mainwp_logger_keep_days`](#mainwp_logger_keep_days) - Method check_log_daily()
- [`mainwp_fetch_uptime_disable_check_multi_exec`](#mainwp_fetch_uptime_disable_check_multi_exec) - Apply disable check multi exec.
- [`mainwp_fetch_uptime_chunk_size_urls`](#mainwp_fetch_uptime_chunk_size_urls) - Check uptime monitors.
- [`mainwp_fetch_uptime_chunk_size_urls`](#mainwp_fetch_uptime_chunk_size_urls) - Fetch uptime urls.
- [`mainwp_uptime_monitoring_check_importance`](#mainwp_uptime_monitoring_check_importance) - Method handle response fetch uptime.
- [`mainwp_uptime_monitoring_uptime_data`](#mainwp_uptime_monitoring_uptime_data) - Method handle response fetch uptime.
- [`mainwp_uptime_monitoring_check_url`](#mainwp_uptime_monitoring_check_url) - Get apply monitor url.
- [`mainwp_uptime_monitoring_get_monitors_to_check_params`](#mainwp_uptime_monitoring_get_monitors_to_check_params) - Get sites monitors to check.
- [`mainwp_security_issues_stats`](#mainwp_security_issues_stats) - This filter is documented in ../pages/page-mainwp-security-issues.php
- [`mainwp_monitoring_sitestable_item`](#mainwp_monitoring_sitestable_item) - Filter: mainwp_monitoring_sitestable_item
- [`mainwp_monitoring_sitestable_getcolumns`](#mainwp_monitoring_sitestable_getcolumns) - Filter: mainwp_monitoring_sitestable_getcolumns
- [`mainwp_monitoring_sitestable_prepare_extra_view`](#mainwp_monitoring_sitestable_prepare_extra_view) - Prepair the items to be listed.
- [`mainwp_monitoring_table_features`](#mainwp_monitoring_table_features) - Filter: mainwp_monitoring_table_features
- [`mainwp_stats_scan_dir`](#mainwp_stats_scan_dir) - Method get_post_data_authed()
- [`mainwp_uptime_monitoring_allowed_methods`](#mainwp_uptime_monitoring_allowed_methods) - Method get_allowed_methods
- [`mainwp_uptime_monitoring_interval_values`](#mainwp_uptime_monitoring_interval_values) - Method get_interval_values
- [`mainwp_uptime_monitoring_timeout_values`](#mainwp_uptime_monitoring_timeout_values) - Method get_timeout_values
- [`mainwp_automatic_disable_uptime_monitoring_check`](#mainwp_automatic_disable_uptime_monitoring_check) - Method cron_uptime_check
- [`mainwp_uptime_monitoring_send_notification_limit`](#mainwp_uptime_monitoring_send_notification_limit) - Run schedule uptime notification.
- [`mainwp_module_log_check_connector_is_excluded`](#mainwp_module_log_check_connector_is_excluded) - Allows excluded connectors to be overridden and registered.
- [`mainwp_module_cost_tracker_manager_check_status`](#mainwp_module_cost_tracker_manager_check_status) - *Arguments*
- [`mainwp_security_issues_stats`](#mainwp_security_issues_stats) - Filters security issues
- [`mainwp_unset_security_scripts_stylesheets`](#mainwp_unset_security_scripts_stylesheets) - Method Fix Security Issues
- [`mainwp_uptime_monitoring_response_time_widget_title`](#mainwp_uptime_monitoring_response_time_widget_title) - *Arguments*
- [`mainwp_security_issues_widget_title`](#mainwp_security_issues_widget_title) - *Arguments*
- [`mainwp_security_issues_list_item_title_url`](#mainwp_security_issues_list_item_title_url) - *Arguments*
- [`mainwp_security_issues_list_item_title`](#mainwp_security_issues_list_item_title) - *Arguments*
- [`mainwp_uptime_monitoring_status_widget_title`](#mainwp_uptime_monitoring_status_widget_title) - *Arguments*

## Hook Details

### `mainwp_uptime_monitoring_after_check_uptime`

*Method handle response fetch uptime.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$heartbeat` | |
`$monitor` | `mixed` | monitor.
`$previous_heartbeat` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 713](class/class-mainwp-uptime-monitoring-connect.php#L713-L885)



### `mainwp_monitoring_sitestable_prepared_items`

*Action: mainwp_monitoring_sitestable_prepared_items*

Fires before the Monitoring Sites table itemes are prepared.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$websites` | `object` | Object containing child sites data.
`$site_ids` | `array` | Array containing IDs of all child sites.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 626](class/class-mainwp-monitoring-sites-list-table.php#L626-L636)



### `mainwp-securityissues-sites`

*Method render_scan_site()*

Render Site Hardening sub page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($website)` | |
`'4.0.7.2'` | |
`'mainwp_securityissues_sites'` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 733](class/class-mainwp-manage-sites-view.php#L733-L773)



### `mainwp_securityissues_sites`

*Action: mainwp_securityissues_sites*

Fires on a child site Hardening page at top.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing child site info.

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 775](class/class-mainwp-manage-sites-view.php#L775-L786)



### `mainwp-sucuriscan-sites`

*Method render_scan_site()*

Render Site Hardening sub page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array($website)` | |
`'4.0.7.2'` | |
`'mainwp_sucuriscan_sites'` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 733](class/class-mainwp-manage-sites-view.php#L733-L793)



### `mainwp_sucuriscan_sites`

*Action: mainwp_sucuriscan_sites*

Fires on a child site Hardening page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing child site info.

Source: [../sources/mainwp-dashboard/class/class-mainwp-manage-sites-view.php](class/class-mainwp-manage-sites-view.php), [line 795](class/class-mainwp-manage-sites-view.php#L795-L806)



### `mainwp_licenses_deactivated_alert_email_header`

*Site Health Monitoring Email Header*

Fires at the top of the site health monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-licenses-deactivated-alert-email.php](templates/emails/mainwp-licenses-deactivated-alert-email.php), [line 31](templates/emails/mainwp-licenses-deactivated-alert-email.php#L31-L38)



### `mainwp_licenses_deactivated_alert_email_footer`

*Site Health Monitoring Email Footer*

Fires at the bottom of the site health monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-licenses-deactivated-alert-email.php](templates/emails/mainwp-licenses-deactivated-alert-email.php), [line 97](templates/emails/mainwp-licenses-deactivated-alert-email.php#L97-L104)



### `mainwp_http_check_email_header`

*HTTP Check Email Header*

Fires at the top of the HTTP check (after update checks) email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-after-update-http-check-email.php](templates/emails/mainwp-after-update-http-check-email.php), [line 29](templates/emails/mainwp-after-update-http-check-email.php#L29-L36)



### `mainwp_http_check_email_footer`

*HTTP Check Email Footer*

Fires at the bottom of the HTTP check (after update checks) email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-after-update-http-check-email.php](templates/emails/mainwp-after-update-http-check-email.php), [line 94](templates/emails/mainwp-after-update-http-check-email.php#L94-L101)



### `mainwp_uptime_monitoring_email_header`

*Uptime Monitoring Email Header*

Fires at the top of the uptime monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-uptime-monitoring-email.php](templates/emails/mainwp-uptime-monitoring-email.php), [line 32](templates/emails/mainwp-uptime-monitoring-email.php#L32-L39)



### `mainwp_uptime_monitoring_email_footer`

*Uptime Monitoring Email Footer*

Fires at the bottom of the uptime monitoring email template.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/templates/emails/mainwp-uptime-monitoring-email.php](templates/emails/mainwp-uptime-monitoring-email.php), [line 144](templates/emails/mainwp-uptime-monitoring-email.php#L144-L151)



### `mainwp_secure_request`

*Method security_nonce().*

Handle security nonce.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$action` | `string` | security action.

Source: [../sources/mainwp-dashboard/modules/api-backups/classes/class-api-backups-helper.php](modules/api-backups/classes/class-api-backups-helper.php), [line 134](modules/api-backups/classes/class-api-backups-helper.php#L134-L143)



### `mainwp_secure_request`

*Method admin_init()*

Handles the uploading of a file.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'qq_nonce'` | |
`'qq_nonce'` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-install-bulk.php](pages/page-mainwp-install-bulk.php), [line 42](pages/page-mainwp-install-bulk.php#L42-L52)



### `mainwp_before_system_requirements_check`

*Action: mainwp_before_system_requirements_check*

Fires on the bottom of the System Requirements page, in Quick Setup Wizard.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 911](pages/page-mainwp-server-information.php#L911-L918)



### `mainwp_after_system_requirements_check`

*Action: mainwp_after_system_requirements_check*

Fires on the bottom of the System Requirements page, in Quick Setup Wizard.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 973](pages/page-mainwp-server-information.php#L973-L980)



### `mainwp_security_issues_widget_top`

*Action: mainwp_security_issues_widget_top*

Fires at the bottom of the Security Issues widget.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 166](widgets/widget-mainwp-security-issues-widget.php#L166-L173)



### `mainwp_security_issues_widget_top`

*Action: mainwp_security_issues_widget_top*

Fires at the bottom of the Security Issues widget.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 178](widgets/widget-mainwp-security-issues-widget.php#L178-L185)



### `mainwp_security_issues_list_item_column`

*Action: mainwp_security_issues_list_item_column*

Fires before the last (actions) colum in the security issues list.

Preferred HTML structure:

<div class="column middle aligned">
Your content here!
</div>

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website` | `object` | Object containing the child site info.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 248](widgets/widget-mainwp-security-issues-widget.php#L248-L263)



### `mainwp_security_issues_widget_bottom`

*Action: mainwp_security_issues_widget_bottom*

Fires at the bottom of the Security Issues widget.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 271](widgets/widget-mainwp-security-issues-widget.php#L271-L278)



### `mainwp_security_nonces`

*Method admin_init()*

Do nothing if current user is not an Admin else display the page.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-system.php](class/class-mainwp-system.php), [line 766](class/class-mainwp-system.php#L766-L864)



### `mainwp_create_security_nonces`

*Create the security nonces.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`static::$security_names` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-post-base-handler.php](class/class-mainwp-post-base-handler.php), [line 140](class/class-mainwp-post-base-handler.php#L140-L150)



### `mainwp_logger_keep_days`

*Method check_log_daily()*

Daily checks to clear the log file.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`7` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-logger.php](class/class-mainwp-logger.php), [line 749](class/class-mainwp-logger.php#L749-L763)



### `mainwp_fetch_uptime_disable_check_multi_exec`

*Apply disable check multi exec.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

**Changelog**

Version | Description
------- | -----------
`5.3` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 61](class/class-mainwp-uptime-monitoring-connect.php#L61-L66)



### `mainwp_fetch_uptime_chunk_size_urls`

*Check uptime monitors.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 88](class/class-mainwp-uptime-monitoring-connect.php#L88-L97)



### `mainwp_fetch_uptime_chunk_size_urls`

*Fetch uptime urls.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`10` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 350](class/class-mainwp-uptime-monitoring-connect.php#L350-L375)



### `mainwp_uptime_monitoring_check_importance`

*Method handle response fetch uptime.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$importance` | |
`$heartbeat` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 713](class/class-mainwp-uptime-monitoring-connect.php#L713-L845)



### `mainwp_uptime_monitoring_uptime_data`

*Method handle response fetch uptime.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$heartbeat` | |
`$monitor` | `mixed` | monitor.
`$previous_heartbeat` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 713](class/class-mainwp-uptime-monitoring-connect.php#L713-L849)



### `mainwp_uptime_monitoring_check_url`

*Get apply monitor url.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$url` | |
`$monitor` | `mixed` | monitor.

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-connect.php](class/class-mainwp-uptime-monitoring-connect.php), [line 1008](class/class-mainwp-uptime-monitoring-connect.php#L1008-L1038)



### `mainwp_uptime_monitoring_get_monitors_to_check_params`

*Get sites monitors to check.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | `array` | params.

Source: [../sources/mainwp-dashboard/class/class-mainwp-db-uptime-monitoring.php](class/class-mainwp-db-uptime-monitoring.php), [line 418](class/class-mainwp-db-uptime-monitoring.php#L418-L427)



### `mainwp_security_issues_stats`

*This filter is documented in ../pages/page-mainwp-security-issues.php*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$securityStats` | |
`$pWebsite` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-sync.php](class/class-mainwp-sync.php), [line 366](class/class-mainwp-sync.php#L366-L367)



### `mainwp_monitoring_sitestable_item`

*Filter: mainwp_monitoring_sitestable_item*

Filters the Monitoring Sites table column items. Allows user to create new column item.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$item` | `array` | Array containing child site data.
`$item` | `array` | Array containing child site data.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 99](class/class-mainwp-monitoring-sites-list-table.php#L99-L108)



### `mainwp_monitoring_sitestable_getcolumns`

*Filter: mainwp_monitoring_sitestable_getcolumns*

Filters the Monitoring Sites table columns. Allows user to create a new column.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$columns` | `array` | Array containing table columns.
`$columns` | `array` | Array containing table columns.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 185](class/class-mainwp-monitoring-sites-list-table.php#L185-L194)



### `mainwp_monitoring_sitestable_prepare_extra_view`

*Prepair the items to be listed.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('favi_icon', 'health_site_status')` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 409](class/class-mainwp-monitoring-sites-list-table.php#L409-L616)



### `mainwp_monitoring_table_features`

*Filter: mainwp_monitoring_table_features*

Filter the Monitoring table features.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$table_features` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-monitoring-sites-list-table.php](class/class-mainwp-monitoring-sites-list-table.php), [line 722](class/class-mainwp-monitoring-sites-list-table.php#L722-L729)



### `mainwp_stats_scan_dir`

*Method get_post_data_authed()*

Get authorized $_POST data & build query.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$website` | `mixed` | Array of Child Site Info.

Source: [../sources/mainwp-dashboard/class/class-mainwp-connect.php](class/class-mainwp-connect.php), [line 361](class/class-mainwp-connect.php#L361-L427)



### `mainwp_uptime_monitoring_allowed_methods`

*Method get_allowed_methods*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array('useglobal' => esc_html__('Use global settings', 'mainwp'), 'head' => 'HEAD', 'get' => 'GET', 'post' => 'POST', 'push' => 'PUSH', 'patch' => 'PATCH', 'delete' => 'DELETE')` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-edit.php](class/class-mainwp-uptime-monitoring-edit.php), [line 708](class/class-mainwp-uptime-monitoring-edit.php#L708-L727)



### `mainwp_uptime_monitoring_interval_values`

*Method get_interval_values*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$values` | |
`$flip_values` | `mixed` | flip values.

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-edit.php](class/class-mainwp-uptime-monitoring-edit.php), [line 737](class/class-mainwp-uptime-monitoring-edit.php#L737-L766)



### `mainwp_uptime_monitoring_timeout_values`

*Method get_timeout_values*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$values` | |
`$flip_values` | `mixed` | flip values.

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-edit.php](class/class-mainwp-uptime-monitoring-edit.php), [line 770](class/class-mainwp-uptime-monitoring-edit.php#L770-L808)



### `mainwp_automatic_disable_uptime_monitoring_check`

*Method cron_uptime_check*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-schedule.php](class/class-mainwp-uptime-monitoring-schedule.php), [line 67](class/class-mainwp-uptime-monitoring-schedule.php#L67-L74)



### `mainwp_uptime_monitoring_send_notification_limit`

*Run schedule uptime notification.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`3` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-uptime-monitoring-schedule.php](class/class-mainwp-uptime-monitoring-schedule.php), [line 173](class/class-mainwp-uptime-monitoring-schedule.php#L173-L214)



### `mainwp_module_log_check_connector_is_excluded`

*Allows excluded connectors to be overridden and registered.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$is_excluded` | `bool` | True if excluded, otherwise false.
`$connector_name` | |
`$excluded_connectors` | `array` | An array of all excluded connector slugs.

Source: [../sources/mainwp-dashboard/modules/logs/classes/class-log-connectors.php](modules/logs/classes/class-log-connectors.php), [line 148](modules/logs/classes/class-log-connectors.php#L148-L155)



### `mainwp_module_cost_tracker_manager_check_status`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/pages/page-cost-tracker-settings.php](modules/cost-tracker/pages/page-cost-tracker-settings.php), [line 348](modules/cost-tracker/pages/page-cost-tracker-settings.php#L348-L348)



### `mainwp_security_issues_stats`

*Filters security issues*

Filters the default security checks and enables user to disable certain checks.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`false` | |
`$information` | `object` | Object containing data from che chid site related to security issues.<br>Available options: 'db_reporting', 'php_reporting'.
`$website` | `object` | Object containing child site data.

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-security-issues.php](pages/page-mainwp-security-issues.php), [line 293](pages/page-mainwp-security-issues.php#L293-L305)



### `mainwp_unset_security_scripts_stylesheets`

*Method Fix Security Issues*

Fix the selected security issue.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`true` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-security-issues.php](pages/page-mainwp-security-issues.php), [line 312](pages/page-mainwp-security-issues.php#L312-L366)



### `mainwp_uptime_monitoring_response_time_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Uptime Monitoring', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-uptime-monitoring-site-widget.php](widgets/widget-mainwp-uptime-monitoring-site-widget.php), [line 190](widgets/widget-mainwp-uptime-monitoring-site-widget.php#L190-L190)



### `mainwp_security_issues_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Site Hardening', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 98](widgets/widget-mainwp-security-issues-widget.php#L98-L98)



### `mainwp_security_issues_list_item_title_url`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`'admin.php?page=managesites&dashboard=' . $website->id` | |
`$website` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 225](widgets/widget-mainwp-security-issues-widget.php#L225-L225)



### `mainwp_security_issues_list_item_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$website->name` | |
`$website` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-security-issues-widget.php](widgets/widget-mainwp-security-issues-widget.php), [line 236](widgets/widget-mainwp-security-issues-widget.php#L236-L236)



### `mainwp_uptime_monitoring_status_widget_title`

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`esc_html__('Uptime Monitoring', 'mainwp')` | |

Source: [../sources/mainwp-dashboard/widgets/widget-mainwp-uptime-monitoring-status.php](widgets/widget-mainwp-uptime-monitoring-status.php), [line 51](widgets/widget-mainwp-uptime-monitoring-status.php#L51-L51)



File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,481 @@
# System & Settings Filters

Hooks related to general settings and system configuration.

## Navigation

- [Back to All Filters](../index.md)
- [Back to Dashboard Hooks](../../index.md)
- [Back to Main Hooks Documentation](../../../index.md)

## Hooks in this Category

- [`mainwp_system_init`](#mainwp_system_init) - MainWP_System constructor.
- [`mainwp_log_system_query`](#mainwp_log_system_query) - Method log_system_query
- [`mainwp_before_save_email_settings`](#mainwp_before_save_email_settings) - Action: mainwp_before_save_email_settings
- [`mainwp_after_save_email_settings`](#mainwp_after_save_email_settings) - Action: mainwp_after_save_email_settings
- [`mainwp_settings_email_settings`](#mainwp_settings_email_settings) - Action: mainwp_settings_email_settings
- [`mainwp_module_cost_tracker_settings_bottom`](#mainwp_module_cost_tracker_settings_bottom) - Render settings content.
- [`mainwp_before_save_general_settings`](#mainwp_before_save_general_settings) - Action: mainwp_before_save_general_settings
- [`mainwp_after_save_general_settings`](#mainwp_after_save_general_settings) - Action: mainwp_after_save_general_settings
- [`mainwp_settings_form_top`](#mainwp_settings_form_top) - Action: mainwp_settings_form_top
- [`mainwp_settings_form_bottom`](#mainwp_settings_form_bottom) - Action: mainwp_settings_form_bottom
- [`mainwp_before_save_advanced_settings`](#mainwp_before_save_advanced_settings) - Action: mainwp_before_save_advanced_settings
- [`mainwp_after_save_advanced_settings`](#mainwp_after_save_advanced_settings) - Action: mainwp_after_save_advanced_settings
- [`mainwp_advanced_settings_form_top`](#mainwp_advanced_settings_form_top) - Action: mainwp_advanced_settings_form_top
- [`mainwp_advanced_settings_form_bottom`](#mainwp_advanced_settings_form_bottom) - Action: mainwp_advanced_settings_form_bottom
- [`mainwp_settings_help_item`](#mainwp_settings_help_item) - Action: mainwp_settings_help_item
- [`mainwp_before_save_email_settings`](#mainwp_before_save_email_settings) - Action: mainwp_before_save_email_settings
- [`mainwp_after_save_email_settings`](#mainwp_after_save_email_settings) - Action: mainwp_after_save_email_settings
- [`mainwp_before_wp_config_section`](#mainwp_before_wp_config_section) - Action: mainwp_before_wp_config_section
- [`mainwp_after_wp_config_section`](#mainwp_after_wp_config_section) - Action: mainwp_after_wp_config_section
- [`mainwp_init_load_all_options`](#mainwp_init_load_all_options) - Method load_all_options()
- [`mainwp_module_cost_tracker_before_save_settings`](#mainwp_module_cost_tracker_before_save_settings) - Settigns Post
- [`mainwp_default_settings_indicator`](#mainwp_default_settings_indicator) - Method render_not_default_indicator().
- [`mainwp_default_settings_indicator`](#mainwp_default_settings_indicator) - Method render_not_default_email_settings_indicator().
- [`mainwp_clear_and_lock_options`](#mainwp_clear_and_lock_options) - Clean and Lock extension options

## Hook Details

### `mainwp_system_init`

*MainWP_System constructor.*

Runs any time class is called.


Source: [../sources/mainwp-dashboard/class/class-mainwp-system.php](class/class-mainwp-system.php), [line 82](class/class-mainwp-system.php#L82-L135)



### `mainwp_log_system_query`

*Method log_system_query*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$params` | `array` | params.
`$sql` | `string` | query.

Source: [../sources/mainwp-dashboard/class/class-mainwp-db.php](class/class-mainwp-db.php), [line 3242](class/class-mainwp-db.php#L3242-L3252)



### `mainwp_before_save_email_settings`

*Action: mainwp_before_save_email_settings*

Fires before save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$type` | |
`$update_settings` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-notification-settings.php](class/class-mainwp-notification-settings.php), [line 76](class/class-mainwp-notification-settings.php#L76-L83)



### `mainwp_after_save_email_settings`

*Action: mainwp_after_save_email_settings*

Fires after save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$emails_settings` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-notification-settings.php](class/class-mainwp-notification-settings.php), [line 87](class/class-mainwp-notification-settings.php#L87-L94)



### `mainwp_settings_email_settings`

*Action: mainwp_settings_email_settings*

Fires after the default email settings.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/class/class-mainwp-notification-settings.php](class/class-mainwp-notification-settings.php), [line 175](class/class-mainwp-notification-settings.php#L175-L182)



### `mainwp_module_cost_tracker_settings_bottom`

*Render settings content.*

Renders the extension settings page.


Source: [../sources/mainwp-dashboard/modules/cost-tracker/pages/page-cost-tracker-settings.php](modules/cost-tracker/pages/page-cost-tracker-settings.php), [line 88](modules/cost-tracker/pages/page-cost-tracker-settings.php#L88-L343)



### `mainwp_before_save_general_settings`

*Action: mainwp_before_save_general_settings*

Fires before general settings save.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 454](pages/page-mainwp-settings.php#L454-L461)



### `mainwp_after_save_general_settings`

*Action: mainwp_after_save_general_settings*

Fires after save general settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 585](pages/page-mainwp-settings.php#L585-L592)



### `mainwp_settings_form_top`

*Action: mainwp_settings_form_top*

Fires at the top of settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 631](pages/page-mainwp-settings.php#L631-L638)



### `mainwp_settings_form_bottom`

*Action: mainwp_settings_form_bottom*

Fires at the bottom of settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 906](pages/page-mainwp-settings.php#L906-L913)



### `mainwp_before_save_advanced_settings`

*Action: mainwp_before_save_advanced_settings*

Fires before save advanced settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1319](pages/page-mainwp-settings.php#L1319-L1326)



### `mainwp_after_save_advanced_settings`

*Action: mainwp_after_save_advanced_settings*

Fires after advanced settings save.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$_POST` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1373](pages/page-mainwp-settings.php#L1373-L1380)



### `mainwp_advanced_settings_form_top`

*Action: mainwp_advanced_settings_form_top*

Fires at the top of advanced settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1401](pages/page-mainwp-settings.php#L1401-L1408)



### `mainwp_advanced_settings_form_bottom`

*Action: mainwp_advanced_settings_form_bottom*

Fires at the bottom of advanced settings form.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 1680](pages/page-mainwp-settings.php#L1680-L1687)



### `mainwp_settings_help_item`

*Action: mainwp_settings_help_item*

Fires at the bottom of the help articles list in the Help sidebar on the Settings page.

Suggested HTML markup:

<div class="item"><a href="Your custom URL">Your custom text</a></div>


**Changelog**

Version | Description
------- | -----------
`5.2` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings.php](pages/page-mainwp-settings.php), [line 2393](pages/page-mainwp-settings.php#L2393-L2404)



### `mainwp_before_save_email_settings`

*Action: mainwp_before_save_email_settings*

Fires before save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$type` | |
`$update_settings` | |
`$website` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-manage-sites.php](pages/page-mainwp-manage-sites.php), [line 1898](pages/page-mainwp-manage-sites.php#L1898-L1905)



### `mainwp_after_save_email_settings`

*Action: mainwp_after_save_email_settings*

Fires after save email settings.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$settings_emails` | |

**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-manage-sites.php](pages/page-mainwp-manage-sites.php), [line 1911](pages/page-mainwp-manage-sites.php#L1911-L1918)



### `mainwp_before_wp_config_section`

*Action: mainwp_before_wp_config_section*

Fires before the WP Config section.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 1601](pages/page-mainwp-server-information.php#L1601-L1608)



### `mainwp_after_wp_config_section`

*Action: mainwp_after_wp_config_section*

Fires after the WP Config section.


**Changelog**

Version | Description
------- | -----------
`4.1` |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-server-information.php](pages/page-mainwp-server-information.php), [line 1639](pages/page-mainwp-server-information.php#L1639-L1646)



### `mainwp_init_load_all_options`

*Method load_all_options()*

Load all wp_options data.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$options` | |

Source: [../sources/mainwp-dashboard/class/class-mainwp-system.php](class/class-mainwp-system.php), [line 297](class/class-mainwp-system.php#L297-L380)



### `mainwp_module_cost_tracker_before_save_settings`

*Settigns Post*

Handles the save settings post request.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$all_opts` | |

Source: [../sources/mainwp-dashboard/modules/cost-tracker/classes/class-cost-tracker-admin.php](modules/cost-tracker/classes/class-cost-tracker-admin.php), [line 552](modules/cost-tracker/classes/class-cost-tracker-admin.php#L552-L590)



### `mainwp_default_settings_indicator`

*Method render_not_default_indicator().*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$indi` | |
`$field` | `string` | setting field to check.
`$indi_value` | |
`$current_value` | `mixed` | setting current value.
`$render_indi` | `bool` | to render indication.
`$default_val` | `mixed` | default value directly.

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings-indicator.php](pages/page-mainwp-settings-indicator.php), [line 72](pages/page-mainwp-settings-indicator.php#L72-L92)



### `mainwp_default_settings_indicator`

*Method render_not_default_email_settings_indicator().*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$indi` | |
`$field` | `string` | setting field to check.
`$def` | |
`$current_value` | `mixed` | setting current value.
`$render_indi` | `bool` | to render indication.
`$type` | `string` | setting type to get default value.

Source: [../sources/mainwp-dashboard/pages/page-mainwp-settings-indicator.php](pages/page-mainwp-settings-indicator.php), [line 99](pages/page-mainwp-settings-indicator.php#L99-L115)



### `mainwp_clear_and_lock_options`

*Clean and Lock extension options*

Adds additional options related to Clean and Lock options in order to avoid conflicts when HTTP Basic auth is set.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`array()` | |

Source: [../sources/mainwp-dashboard/pages/page-mainwp-install-bulk.php](pages/page-mainwp-install-bulk.php), [line 379](pages/page-mainwp-install-bulk.php#L379-L386)



File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4,58 +4,36 @@ This section provides documentation for all hooks (actions and filters) availabl

## Actions

[Dashboard Actions](actions.md) allow you to add custom functionality at specific points in the MainWP Dashboard execution. Actions are triggered at specific points during the execution of MainWP Dashboard, and you can use them to add your own functionality.
[Dashboard Actions](actions/index.md) allow you to add custom functionality at specific points in the MainWP Dashboard execution.

Common use cases for Dashboard actions include:
- Adding custom UI elements to the Dashboard
- Performing additional tasks when sites are added, updated, or removed
- Extending the Dashboard with custom features
- Integrating with other plugins or services
### Action Categories

- [Site Management](actions/site-management/index.md) (194 hooks) - Hooks related to adding, editing, removing, and managing sites and site groups.
- [Updates & Maintenance](actions/updates-maintenance/index.md) (301 hooks) - Hooks for managing updates to plugins, themes, and WordPress core.
- [Content Management](actions/content-management/index.md) (213 hooks) - Hooks for managing posts, pages, comments, and other content.
- [User Management](actions/user-management/index.md) (61 hooks) - Hooks related to user management, roles, and capabilities.
- [Backups & Restoration](actions/backups-restoration/index.md) (65 hooks) - Hooks for backup creation, management, and restoration processes.
- [Security & Monitoring](actions/security-monitoring/index.md) (50 hooks) - Hooks related to security checks, uptime monitoring, and site health.
- [Client Reports](actions/client-reports/index.md) (41 hooks) - Hooks for report generation, customization, and delivery.
- [UI & Display](actions/ui-display/index.md) (190 hooks) - Hooks for modifying the Dashboard UI, widgets, menus, and display elements.
- [Extensions & Integration](actions/extensions-integration/index.md) (5 hooks) - Hooks related to extensions and third-party integrations.
- [API & Remote Communication](actions/api-remote/index.md) (42 hooks) - Hooks for API endpoints and remote communication with child sites.
- [System & Settings](actions/system-settings/index.md) (24 hooks) - Hooks related to general settings and system configuration.

## Filters

[Dashboard Filters](filters.md) allow you to modify data or output at specific points in the MainWP Dashboard execution. Filters are used to modify data before it is used or displayed by MainWP Dashboard.
[Dashboard Filters](filters/index.md) allow you to modify data or output at specific points in the MainWP Dashboard execution.

Common use cases for Dashboard filters include:
- Modifying the output of Dashboard components
- Changing how data is processed or displayed
- Adding or removing items from lists or menus
- Customizing the behavior of Dashboard features
### Filter Categories

## Examples

### Using Dashboard Actions

```php
// Add a custom section to the Dashboard
add_action('mainwp_after_header', 'my_custom_dashboard_section');

function my_custom_dashboard_section() {
?>
<div class="ui segment">
<h2 class="ui header">Custom Dashboard Section</h2>
<p>This is a custom section added to the MainWP Dashboard.</p>
</div>
<?php
}
```

### Using Dashboard Filters

```php
// Modify the sites table columns
add_filter('mainwp_sitestable_getcolumns', 'my_custom_sites_table_columns');

function my_custom_sites_table_columns($columns) {
// Add a custom column
$columns['custom_column'] = 'Custom Column';
return $columns;
}
```

## Related Resources

- [MainWP Developer Documentation](https://mainwp.dev/)
- [MainWP Dashboard GitHub Repository](https://github.com/mainwp/mainwp)
- [WordPress Plugin Developer Handbook](https://developer.wordpress.org/plugins/)
- [Site Management](filters/site-management/index.md) (194 hooks) - Hooks related to adding, editing, removing, and managing sites and site groups.
- [Updates & Maintenance](filters/updates-maintenance/index.md) (301 hooks) - Hooks for managing updates to plugins, themes, and WordPress core.
- [Content Management](filters/content-management/index.md) (213 hooks) - Hooks for managing posts, pages, comments, and other content.
- [User Management](filters/user-management/index.md) (61 hooks) - Hooks related to user management, roles, and capabilities.
- [Backups & Restoration](filters/backups-restoration/index.md) (65 hooks) - Hooks for backup creation, management, and restoration processes.
- [Security & Monitoring](filters/security-monitoring/index.md) (50 hooks) - Hooks related to security checks, uptime monitoring, and site health.
- [Client Reports](filters/client-reports/index.md) (41 hooks) - Hooks for report generation, customization, and delivery.
- [UI & Display](filters/ui-display/index.md) (190 hooks) - Hooks for modifying the Dashboard UI, widgets, menus, and display elements.
- [Extensions & Integration](filters/extensions-integration/index.md) (5 hooks) - Hooks related to extensions and third-party integrations.
- [API & Remote Communication](filters/api-remote/index.md) (42 hooks) - Hooks for API endpoints and remote communication with child sites.
- [System & Settings](filters/system-settings/index.md) (24 hooks) - Hooks related to general settings and system configuration.

View file

@ -6,15 +6,15 @@ This section provides comprehensive documentation for all hooks (actions and fil

The [MainWP Dashboard](dashboard/index.md) plugin provides hooks that allow you to extend and customize the MainWP Dashboard functionality.

- [Actions](dashboard/actions.md) - Dashboard actions allow you to add custom functionality at specific points in the MainWP Dashboard execution.
- [Filters](dashboard/filters.md) - Dashboard filters allow you to modify data or output at specific points in the MainWP Dashboard execution.
- [Actions](dashboard/actions/index.md) - Dashboard actions allow you to add custom functionality at specific points in the MainWP Dashboard execution.
- [Filters](dashboard/filters/index.md) - Dashboard filters allow you to modify data or output at specific points in the MainWP Dashboard execution.

## Child Hooks

The [MainWP Child](child/index.md) plugin provides hooks that allow you to extend and customize the MainWP Child functionality.

- [Actions](child/actions.md) - Child actions allow you to add custom functionality at specific points in the MainWP Child execution.
- [Filters](child/filters.md) - Child filters allow you to modify data or output at specific points in the MainWP Child execution.
- [Actions](child/actions/index.md) - Child actions allow you to add custom functionality at specific points in the MainWP Child execution.
- [Filters](child/filters/index.md) - Child filters allow you to modify data or output at specific points in the MainWP Child execution.

## Using Hooks


View file

@ -2,15 +2,17 @@

## Current Work Focus

1. **Documentation Generation Testing**: Testing the documentation generation process with the MainWP Dashboard and Child repositories.
1. **Developer Guides Implementation**: Creating comprehensive Markdown-based developer guides for third-party developers building MainWP add-ons (both extensions and integrations).

2. **Configuration Refinement**: Refining phpDocumentor configuration files to address issues and optimize output.
2. **Documentation Integration**: Ensuring seamless integration between API reference documentation, hooks documentation, and the new developer guides.

3. **Custom Content Development**: Enhancing the custom home page and navigation for the documentation.
3. **Custom Content Development**: Enhancing the custom home page and navigation to include the new developer guides.

4. **GitHub Actions Workflow Design**: Planning the automated workflows that will monitor source repositories and trigger documentation updates.
4. **Source Code Verification**: Cross-referencing documentation with source code to ensure accuracy and currency.

5. **Error Handling Implementation**: Developing robust error handling and logging for the documentation generation process.
5. **Documentation Structure Design**: Implementing a layered documentation approach that serves both new and experienced developers.

6. **Terminology Update**: Implementing the new terminology distinction between "add-ons" (umbrella term), "extensions" (standalone add-ons), and "integrations" (add-ons that work with third-party plugins or APIs).

## Recent Changes

@ -32,36 +34,112 @@

9. **Functional Categorization**: Organized hooks into developer-friendly functional categories like Site Management, Updates & Maintenance, Content Management, etc.

10. **Hooks Documentation Source Links**: Modified the hooks documentation generation script to transform local file paths to GitHub repository URLs, making the documentation more useful for developers.

11. **Directory Structure Fix**: Corrected an issue with the hooks documentation directory structure to ensure proper organization and accessibility.

12. **Terminology Update Implementation**: Updated documentation to use new terminology distinguishing between add-ons (umbrella term), extensions (standalone add-ons), and integrations (third-party add-ons).

13. **Developer Guides Creation**: Created comprehensive guides for both extension and integration development, including:
- guides/how-to/create-basic-extension.md: Guide for creating standalone add-ons
- guides/how-to/create-basic-integration.md: Guide for creating third-party add-ons
- guides/how-to/third-party-apis.md: Placeholder for working with third-party APIs
- guides/best-practices/api-integration.md: Placeholder for API integration best practices
- guides/reference/api-integration-patterns.md: Placeholder for API integration patterns

14. **Decision Tree Implementation**: Added a mermaid flowchart to guides/index.md to help developers determine whether to build an Extension or Integration.

15. **Part-Time Developer Focus**: Optimized documentation for developers creating MainWP add-ons as a side project with clear pathways, code snippets, and troubleshooting help.

16. **Link Structure Improvements**: Updated all internal links to use relative paths instead of absolute paths for better portability.

## Next Steps

1. **Set Up GitHub Pages**: Configure GitHub Pages for hosting the generated documentation.
1. **Complete Developer Guides Implementation**:
- Expand placeholder guides with detailed content:
* Working with Third-Party APIs
* API Integration Best Practices
* Third-Party API Integration Patterns
- Create additional guides for specific integration scenarios:
* WooCommerce Integration Guide
* Google Analytics Integration Guide
* Social Media API Integration Guide
- Add more code snippets and templates for common integration patterns

2. **Enhance Error Handling**: Improve error handling and logging for the automated process.
2. **Update Existing Documentation**:
- Review and update any remaining instances of old terminology
- Ensure consistent terminology usage across all documentation
- Add more examples and use cases for both extensions and integrations

3. **Test GitHub Actions Workflows**: Test the GitHub Actions workflows to ensure they work correctly.
3. **Enhance Integration-Specific Content**:
- Create detailed guides for authentication methods (API keys, OAuth, JWT)
- Add troubleshooting guides for common API issues
- Develop best practices for API rate limiting and caching
- Create security guidelines for handling API credentials

4. **Develop Additional Documentation Sections**: Plan and implement REST API documentation sections.
4. **Implement Hook Firing Order Documentation**:
- Document the general sequence of when major MainWP hooks fire
- Provide guidance on choosing appropriate priorities
- Identify hook dependency chains
- Document common pitfalls related to hook timing

5. **Optimize Documentation Generation**: Address warnings and errors in the documentation generation process, such as the PlantUML diagram generation and file name length issues.
6. **Update Main Navigation**:
- Modify index.html to include prominent links to developer guides
- Ensure consistent navigation between all documentation types

6. **Create Implementation and Maintenance Documentation**: Provide step-by-step instructions for implementation and maintenance of the documentation system.
7. **Set Up GitHub Pages**: Configure GitHub Pages for hosting the generated documentation.

7. **Explore Custom Templates**: Investigate custom phpDocumentor templates for better integration with the MainWP brand.
8. **Enhance Error Handling**: Improve error handling and logging for the automated process.

8. **Refine Hooks Categorization**: Review and refine the automatic categorization of hooks to ensure they are properly organized.
9. **Test GitHub Actions Workflows**: Test the GitHub Actions workflows to ensure they work correctly.

10. **Verify GitHub Links**: Ensure all GitHub repository links in the hooks documentation are working correctly and pointing to the right files and line numbers.

11. **Evaluate Documentation Format Options**: Assess the benefits of adding Markdown-based API documentation alongside the existing RST format, potentially using a dual documentation approach with separate directories.

## Active Decisions and Considerations

1. **Path Configuration**: Resolved issues with phpDocumentor's internal path configuration by modifying the reflection.yaml file to correctly locate dependencies.
1. **Terminology Update**: Adopted new terminology to distinguish between different types of MainWP add-ons:
- **Add-on(s)**: Umbrella term for all add-ons
- **Extension**: An add-on that works WITHOUT a third-party plugin or API
- **Integration**: An add-on that works WITH a third-party plugin or API

2. **Documentation Completeness**: The quality of generated documentation depends on the completeness of PHPDoc comments in the source code. Some areas may need manual enhancement.
2. **Layered Documentation Strategy**: Implementing a progressive disclosure approach with:
- Quick Start sections for experienced developers
- Detailed explanations for new developers
- Well-organized reference material for all developers

3. **Error Handling Strategy**: Need to decide on the best approach for handling and reporting errors in the documentation generation process.
3. **Content Design Principles**:
- Scannable content with clear headings and structure
- Progressive complexity from basic to advanced topics
- Practical, real-world code examples with copy-paste snippets
- Visual signposting to distinguish content types
- Contextual cross-references for non-linear exploration

4. **Update Frequency**: Determining how often the documentation should be regenerated - on every commit, daily, or on specific events.
4. **Part-Time Developer Focus**: Optimizing documentation for developers who are creating MainWP add-ons as a side project:
- Quick start guides that respect time constraints
- Clear pathways for both Extension and Integration development
- Ready-to-use code snippets that can be adapted
- Focused, practical implementation guidance
- Troubleshooting help for common issues

5. **Performance Optimization**: The documentation generation process takes about 20-30 seconds for each repository. This is acceptable for local development but may need optimization for automated workflows.
3. **Source Code Verification**: Ensuring documentation accuracy by cross-referencing with:
- Current mainwp/mainwp and mainwp/mainwp-child repositories
- Generated PHPDocumentor output
- Hooks implementation in source code

6. **Diagram Generation**: The class diagram generation is failing due to missing PlantUML binary. Need to decide whether to install PlantUML or disable diagram generation.
4. **Documentation Completeness**: The quality of generated documentation depends on the completeness of PHPDoc comments in the source code. Some areas may need manual enhancement.

7. **File Name Length Issues**: Some files in the Child repository have very long names that cause warnings. May need to implement a solution to handle these cases.
5. **Error Handling Strategy**: Need to decide on the best approach for handling and reporting errors in the documentation generation process.

6. **Update Frequency**: Determining how often the documentation should be regenerated - on every commit, daily, or on specific events.

7. **Performance Optimization**: The documentation generation process takes about 20-30 seconds for each repository. This is acceptable for local development but may need optimization for automated workflows.

8. **Diagram Generation**: The class diagram generation is failing due to missing PlantUML binary. Need to decide whether to install PlantUML or disable diagram generation.

9. **File Name Length Issues**: Some files in the Child repository have very long names that cause warnings. May need to implement a solution to handle these cases.

10. **Documentation Format Strategy**: Evaluated options between RST (current) and Markdown (available since phpDocumentor v3.6.0). Decided that RST provides superior structural information for API documentation, while Markdown would be better for narrative documentation. Implementing a dual approach with separate directories rather than a hybrid cross-linked system.

11. **Developer Guides Reference Strategy**: Implementing an optimal reference strategy for developer guides that links to API docs for formal definitions, GitHub for implementation examples, and other guides for conceptual relationships.

View file

@ -14,6 +14,10 @@ The MainWP.dev documentation project solves several key problems:

5. **Maintenance Burden**: Automates the documentation generation process, reducing manual maintenance effort.

6. **Hook Discovery**: Makes it easier for developers to discover and use the appropriate hooks for their extensions by organizing them into functional categories.

7. **Integration Complexity**: Simplifies the process of integrating with MainWP by providing clear documentation on available hooks and their usage.

## How it Should Work

The documentation system should work through the following process:
@ -22,11 +26,15 @@ The documentation system should work through the following process:

2. **Automated Generation**: When changes are detected, phpDocumentor automatically generates updated documentation.

3. **Organized Deployment**: Generated documentation is deployed to specific subdirectories on GitHub Pages.
3. **Hooks Extraction**: Pronamic WP Documentor extracts hooks (actions and filters) from the source code.

4. **Custom Content**: The main directory remains available for custom content, including a homepage and additional developer resources.
4. **Hooks Categorization**: A Python script categorizes hooks into functional categories for better organization.

5. **Error Handling**: Robust error handling and logging ensure the process runs smoothly and issues are easily identified.
5. **Organized Deployment**: Generated documentation is deployed to specific subdirectories on GitHub Pages.

6. **Custom Content**: The main directory remains available for custom content, including a homepage and additional developer resources.

7. **Error Handling**: Robust error handling and logging ensure the process runs smoothly and issues are easily identified.

## User Experience Goals

@ -43,3 +51,11 @@ The documentation system should work through the following process:
6. **Searchability**: Implement effective search functionality to quickly locate specific information.

7. **Cross-Referencing**: Link related documentation sections to provide context and additional information.

8. **Functional Organization**: Organize hooks documentation by functionality rather than alphabetically, making it easier for developers to find relevant hooks for specific tasks.

9. **Categorized Hooks**: Group hooks into logical categories that align with how developers think about the system's functionality.

10. **Consistent Documentation Format**: Maintain a consistent format for hooks documentation, including descriptions, parameters, and usage examples.

11. **Source Code Access**: Provide direct links to the source code implementation of hooks in the GitHub repository, allowing developers to easily examine the context and implementation details.

View file

@ -29,6 +29,7 @@
- Using Pronamic WP Documentor to extract hooks from source code
- Custom Python script for categorizing hooks by functionality
- Developer-friendly organization with navigation and cross-references
- GitHub repository links for source code references

11. **GitHub Actions Automation**: Workflows for automating the documentation generation and deployment process have been created:
- Weekly scheduled runs
@ -38,35 +39,144 @@

## What's Left to Build

1. **GitHub Pages Setup**:
1. **Terminology Update Implementation**:
- Update all documentation to use the new terminology:
* Add-on(s): Umbrella term for all add-ons
* Extension: An add-on that works WITHOUT a third-party plugin or API
* Integration: An add-on that works WITH a third-party plugin or API
- Create a decision tree to help developers choose between building an Extension or Integration

2. **Developer Guides Implementation**:
- Create directory structure for guides
- Implement Getting Started guides:
* Setting Up a Development Environment
* Creating a Basic Extension (standalone add-on)
* Creating a Basic Integration (third-party add-on)
* Understanding the MainWP Development Extension
* Add-on Development Lifecycle
- Develop Core Development Topic guides:
* Building Admin Interfaces
* Data Storage and Retrieval
* Using MainWP Actions & Filters
* Debugging Add-ons
* Packaging and Distribution
* Working with Third-Party APIs (for Integrations)
- Create Best Practices guides:
* Writing Clean & Maintainable Code
* Security Considerations
* Performance Optimization
* Documentation Standards
* API Integration Best Practices
- Implement Reference guides:
* Common Hooks Reference
* Add-on API Reference
* MainWP Dashboard Integration Points
* Child Site Communication
* Third-Party API Integration Patterns
- Update main navigation to include guides

2. **GitHub Pages Setup**:
- Configure GitHub Pages for the repository
- Set up appropriate subdirectory structure
- Implement custom domain if required

2. **Error Handling and Logging**:
3. **Error Handling and Logging**:
- Implement robust error handling in workflows
- Set up logging for documentation generation process
- Create notification system for errors

3. **Additional Documentation Types**:
4. **Additional Documentation Types**:
- REST API documentation
- Developer guides and tutorials
- Evaluate Markdown-based API documentation options

4. **Documentation Enhancements**:
5. **Documentation Enhancements**:
- Address warnings and errors in the documentation generation process
- Implement PlantUML for class diagrams
- Optimize performance for large codebases

5. **Implementation and Maintenance Documentation**:
6. **Implementation and Maintenance Documentation**:
- Create step-by-step instructions for implementation
- Document maintenance procedures
- Provide troubleshooting guides

## Current Status

The project has progressed significantly from the planning phase to a functional implementation with automation. The documentation generation process is working for both MainWP Dashboard and Child repositories, hooks documentation has been implemented with categorization, and GitHub Actions workflows have been created for automation. The custom home page provides navigation to all documentation sections. The next phase involves setting up GitHub Pages for hosting and enhancing the documentation with additional sections.
The project has progressed significantly from the planning phase to a functional implementation with automation. The documentation generation process is working for both MainWP Dashboard and Child repositories, hooks documentation has been implemented with categorization and GitHub source links, and GitHub Actions workflows have been created for automation. The custom home page provides navigation to all documentation sections.

Progress: ~75% complete
The current focus is on implementing comprehensive developer guides with a layered documentation approach that serves both new and experienced developers. These guides will complement the existing API reference documentation and hooks documentation, providing a complete documentation ecosystem for MainWP add-on developers (both extensions and integrations).

### Terminology Update Implementation

We've updated our terminology to distinguish between different types of MainWP add-ons:
- **Add-on(s)**: Umbrella term for all add-ons
- **Extension**: An add-on that works WITHOUT a third-party plugin or API
- **Integration**: An add-on that works WITH a third-party plugin or API

This terminology change has been implemented throughout the documentation to provide clear guidance for developers. The following changes have been made:

1. **Memory Bank Updates**:
- Updated activeContext.md to include the new terminology and approach
- Updated progress.md to reflect the new terminology and implementation tasks

2. **New Guides Created**:
- guides/how-to/create-basic-integration.md: A comprehensive guide for creating integrations
- guides/how-to/third-party-apis.md: A placeholder guide for working with third-party APIs
- guides/best-practices/api-integration.md: A placeholder guide for API integration best practices
- guides/reference/api-integration-patterns.md: A placeholder guide for common API integration patterns

3. **Updated Existing Guides**:
- guides/index.md: Completely revised to explain the distinction between extensions and integrations
- guides/concepts/extension-lifecycle.md: Renamed to "Add-on Development Lifecycle" and updated to include specific considerations for both extensions and integrations

4. **Decision Tree Implementation**:
- Added a mermaid flowchart to guides/index.md to help developers determine whether to build an Extension or Integration

5. **Part-Time Developer Focus**:
- Optimized documentation for developers creating MainWP add-ons as a side project
- Added clear, concise "Quick Start" sections
- Created separate pathways for Extension and Integration development
- Included ready-to-use code snippets that can be adapted
- Added practical implementation guidance focused on results
- Included common pitfalls and their solutions

6. **Link Structure Improvements**:
- Updated all internal links to use relative paths instead of absolute paths
- This improves portability and ensures links work correctly in different contexts

Progress: ~80% complete

## Documentation Format Strategy

After evaluating documentation format options for phpDocumentor:

1. **Current Approach**: Using ReStructuredText (RST) for API documentation output, which provides excellent support for class relationships, inheritance diagrams, and technical precision.

2. **Evaluated Options**:
- Switching entirely to Markdown (available since phpDocumentor v3.6.0)
- Implementing a hybrid cross-linked approach
- Creating separate documentation sets in different formats

3. **Decision**: Maintain RST for API reference documentation while creating separate Markdown-based developer guides with conceptual documentation, how-to guides, and best practices.

4. **Reference Strategy for Developer Guides**:
- Link to API docs (RST) for formal definitions of classes, methods, and properties
- Link to GitHub for implementation examples and source code context
- Cross-link between guides for conceptual relationships

5. **Layered Documentation Strategy**:
- Quick Start sections for experienced developers
- Detailed explanations for new developers
- Well-organized reference material for all developers
- Progressive disclosure approach to serve different experience levels
- Optimized for part-time developers with time constraints

6. **Developer Persona Focus**:
- Documentation optimized for developers creating MainWP add-ons as a side project
- Quick start guides that respect time constraints
- Clear pathways for both Extension and Integration development
- Ready-to-use code snippets that can be adapted
- Focused, practical implementation guidance
- Troubleshooting help for common issues

## Known Issues


View file

@ -2,7 +2,7 @@

## Project Goals

To generate comprehensive documentation for the MainWP ecosystem using phpDocumentor 3.7.1 and automate the process with GitHub Actions.
To generate comprehensive documentation for the MainWP ecosystem using phpDocumentor 3.7.1 and automate the process with GitHub Actions. Additionally, to provide well-organized hooks documentation that makes it easier for developers to discover and use the appropriate hooks for their extensions.

## Core Requirements

@ -11,6 +11,8 @@ To generate comprehensive documentation for the MainWP ecosystem using phpDocume
3. Deploy the generated documentation to GitHub Pages.
4. Implement robust error handling and logging.
5. Place generated documentation in designated subdirectories, keeping the main directory available for a custom home page and additional developer resources.
6. Generate comprehensive hooks documentation using Pronamic WP Documentor.
7. Categorize hooks into functional categories for better organization and discoverability.

## Project Scope

@ -20,4 +22,9 @@ To generate comprehensive documentation for the MainWP ecosystem using phpDocume
4. Organize documentation output in appropriate subdirectories.
5. Preserve the main directory for custom index page and additional developer resources.
6. Provide step-by-step instructions for implementation and maintenance.
7. Document error handling and debugging strategies.
7. Document error handling and debugging strategies.
8. Implement hooks documentation generation using Pronamic WP Documentor.
9. Create a Python script for categorizing hooks into functional categories.
10. Develop bash scripts for automating the hooks documentation process.
11. Integrate hooks documentation into the main documentation structure.
12. Transform source code references in hooks documentation into direct links to the GitHub repository.

View file

@ -30,6 +30,8 @@ The MainWP.dev documentation system follows a CI/CD architecture with the follow

6. **GitHub Pages for Hosting**: Selected for its seamless integration with GitHub Actions and zero-cost hosting solution.

7. **Documentation Format Strategy**: Decision to maintain ReStructuredText (RST) for API reference documentation while creating separate Markdown-based developer guides, leveraging the strengths of each format without the complexity of cross-linking.

## Design Patterns in Use

1. **Observer Pattern**: GitHub Actions workflows observe repository changes and trigger documentation updates.
@ -40,6 +42,14 @@ The MainWP.dev documentation system follows a CI/CD architecture with the follow

4. **Strategy Pattern**: Different documentation strategies applied to different components of the MainWP ecosystem.

5. **Categorization Pattern**: Hooks documentation uses a categorization system to organize hooks by functionality, making them more discoverable for developers.

6. **Extraction Pattern**: Pronamic WP Documentor extracts hooks from source code and generates structured documentation.

7. **Complementary Documentation Pattern**: Using different documentation formats (RST and Markdown) for different types of documentation (API reference vs. conceptual guides) to leverage the strengths of each format.

8. **Optimal Reference Strategy**: Developer guides reference API docs for formal definitions, GitHub for implementation examples, and other guides for conceptual relationships, creating a comprehensive documentation ecosystem.

## Component Relationships

1. **Source Repositories → GitHub Actions**: Source code changes trigger GitHub Actions workflows.
@ -53,3 +63,17 @@ The MainWP.dev documentation system follows a CI/CD architecture with the follow
5. **Custom Content → GitHub Pages**: Manually created content is preserved in the main directory.

6. **Error Logs → Monitoring**: Error handling system captures and reports issues in the documentation process.

7. **Source Repositories → Pronamic WP Documentor**: Source code is analyzed to extract hooks documentation.

8. **Pronamic WP Documentor → Hooks Documentation**: Raw hooks documentation is generated from source code.

9. **Hooks Documentation → Categorization Script**: Raw hooks documentation is processed and categorized.

10. **Categorization Script → Organized Documentation**: Hooks are organized into functional categories for better discoverability.

11. **Source Code → GitHub Repository Links**: Source code references in hooks documentation are transformed into direct links to the GitHub repository, allowing developers to easily view the implementation.

12. **API Reference (RST) ↔ Developer Guides (Markdown)**: Complementary documentation types that reference each other to provide a complete picture of the system.

13. **Developer Guides → Multiple Reference Sources**: Developer guides link to API docs, GitHub source code, and other guides to provide comprehensive context.

View file

@ -18,12 +18,20 @@

8. **Git**: Version control system for managing source code and documentation.

9. **Pronamic WP Documentor**: Tool used to extract WordPress hooks (actions and filters) from PHP source code.

10. **Python**: Used for the categorization script that organizes hooks into functional categories.

11. **Bash Scripts**: Used for automation of the documentation generation process.

## Development Setup

1. **Local Environment**:
- PHP 7.4+ installed locally for testing phpDocumentor
- Git for version control
- Text editor or IDE (e.g., VSCode, PHPStorm)
- Python 3.6+ for running the hooks categorization script
- Composer for PHP dependencies

2. **GitHub Repository**:
- Repository for the MainWP.dev documentation project
@ -37,6 +45,11 @@
- Workflow files for automating documentation generation
- Secrets and permissions configured for repository access

5. **Hooks Documentation Setup**:
- Pronamic WP Documentor installed via Composer
- Python script for categorizing hooks
- Bash scripts for automating the hooks documentation process

## Technical Constraints

1. **phpDocumentor Limitations**:
@ -58,6 +71,12 @@
- Dependent on the quality of source code documentation
- May require manual supplementation for poorly documented areas

5. **Hooks Documentation Constraints**:
- Dependent on consistent hook naming conventions in the source code
- Categorization accuracy depends on hook names and descriptions
- Markdown rendering limitations for complex documentation
- GitHub repository links require consistent repository structure and branch naming

## Dependencies

1. **External Services**:
@ -67,11 +86,16 @@
- phpDocumentor 3.7.1
- PHP 7.4+ (for running phpDocumentor)
- Git (for version control)
- Python 3.6+ (for hooks categorization script)
- Composer (for PHP package management)
- Pronamic WP Documentor (for hooks extraction)

3. **Source Code Dependencies**:
- Access to the two MainWP source repositories
- Properly documented source code with PHPDoc comments
- WordPress hooks in the source code (for hooks documentation)

4. **Workflow Dependencies**:
- GitHub Actions runners
- Repository permissions and secrets
- Hooks documentation generation workflow