MainWP snippet extensionis an easy way to add code snippets to your subsites from one centralized location. Features without editing the theme. php file or wp-config!
Code Snippets A small piece of PHP code that can be inserted directly into your subsite. Sometimes they contain complete functionality; other times they modify existing functionality.
This tool is for advanced users only.We recommend it for experienced PHP developers.
Create and execute your PHP code snippets in your site
Using this extension, you can perform tasks like sync plugin settings, change the content of any post, update widgets, or get post counts for the entire web, all from your dashboard.
The MainWP Code Snippet extension allows you to run code in three ways:
1. Have the code snippet perform the function on the subsite.
You will use this option to make actual changes to your subsite. For example, you can use this option if you want to customize the admin footer for different sites in your network.
2. Have the code snippet return information from the subsite.
This option queries the child and returns the information to you. For example, if you want to know the number of published posts for all websites.
3. Let the code snippet edit wp-config. php files on subsites.
One of the most critical files in a WordPress installation is wp-config. .php file.The code snippets in this section allow you to do things like increase WordPress memory, block external requests, disable WP Cron, and more!
The power is in your hands!
This extension gives you a lot of freedom when managing your subsites, here are just some useful things you can do with code snippets:
- Disable themes, plugin editor and plugins, core updates
- Disable CRON job function
- Imposta l'intervallo di salvataggio automatico
- Block external requests
- Increase WordPress memory limit
- Protect WordPress from malicious URL requests
Want to see more? Pop up on wpfunction. Me or WPSnipp and spark your imagination with more things you can do with code snippets
The possibilities are endless; the only limit is your imagination.
We've also included some pre-coded snippets to get you started.
Save and use your favorite clips an unlimited number of times
Wouldn't it be useful if you could save your favorite snippets and run them on multiple sites when needed? Just a few clicks?The MainWP Code Snippets extension enables you to save code snippets and use them again and again when needed.
Extend the functionality of subsites
Use code snippets as mini plugins and reduce the load on your website.
Speed up your WordPress maintenance process
Use code snippets to clear junk, update settings, set redirects, and more.
Save code snippets and rerun them when needed
Save your favorite clips and rerun them when needed.
Launch snippets of code on multiple sites at once
Run functions concurrently on any website you want
Changelog: MainWP Code Snippets Extension
Version 4.0.1 – 9-10-2020 Updated: MainWP Dashboard 4.1 compatibility Version 4.0 – 8-28-2019 Updated: extension UI/UX redesign Updated: support for the MainWP 4.0 Version 1.2 – 7-27-2018 Fixed: incorrect form field label Version 1.1 – 10-6-2017 Fixed: multiple translation issues Fixed: multiple codding standard issues Fixed: multiple grammar issues Added: extension help tab Updated: extension general style Updated: notification messages Updated: CodeMirror library Updated: responsive CSS styles Removed: unused code Removed: unused files Version 1.0 – 2-17-2016 Added: Support for WP-CLI Added: Support for the new API management Updated: Refactored code to meet WordPress coding standards Updated: “Check for updates now” link is not visible if extension is not activated Version 0.0.6 – 4-17-2015 Updated: Quick Start Guide layout Version 0.0.4 Added: Support for the API Manager Version 0.0.3 Fixed PHP Warning Version 0.0.2 “return” command replaced with “echo” Undefined index bug fixed New Feature Added: Snippets can be added to the WP-Config.php file Version 0.0.1 Initial Release
- Create and execute your PHP code snippets in your site
- The power is in your hands!
- Save and use your favorite clips an unlimited number of times
- Extend the functionality of subsites
- Speed up your WordPress maintenance process
- Save code snippets and rerun them when needed
- Launch snippets of code on multiple sites at once
- Changelog: MainWP Code Snippets Extension