Repository navigation
Releases: Roots-and-Fruit/rf-site-functionality
Release list
2.0.0
Released 2026-10-21.
Site Functionality keeps small pieces of PHP as files beside WordPress. A fatal error disables the file that caused it instead of taking the site down.
Changed
- Breaking: The plugin name is Site Functionality and the slug is
rf-site-functionality. Activate this folder as a new plugin. Snippet files already stored in themc-snippetsdirectory keep loading. Ability names now start withrf-site-functionality/. - The plugin screen uses the Roots and Fruit layout. CodeMirror Theme has a live preview, and Safe Mode is a switch that stops every snippet or turns them back on.
- PHP memory, execution time, the snippet directory, and safe mode are reported on Tools → Site Health. A time limit of 0, or a memory limit of -1, is reported as no limit.
1.2.2
1.2.2
The snippet lint check now reads PHP tokens, and the admin Enable button runs it before renaming a file.
After you update, turn a disabled snippet on from the Snippets screen. A file that calls eval, exec, system, shell_exec, passthru, or assert, or that uses include, require, or backticks, stays disabled and shows the error. A space before the parenthesis does not get past the check. Saving a snippet uses the same check.
A call stored in a variable, such as $fn(), is still allowed. So is call_user_func(). This is the obvious-call check, not a sandbox.
1.2.1
1.2.1
Snippets are no longer published from wp-content/mc-snippets.
After you update:
- Open
https://yoursite.example/wp-content/mc-snippets/safe-mode.keywhile logged out. You want a 404. A download means the move did not finish. Load any front-end page once, then try the URL again. - The old safe-mode key is deleted. A new key is written in the private folder. An old safe-mode bookmark will not turn snippets off.
- On a normal host the folder sits next to the WordPress directory and is named
mc-snippets-plus a short hash of the site path. On WordPress Studio, PHP cannot write next to the site, so the folder is in the system temp directory. SetMC_FUNCTIONALITY_SNIPPETS_DIRif you want a permanent directory PHP is allowed to use. - Files on disk end in
.mcphp. The editor and the abilities still call a snippetexample.php. - A fatal error renames only the snippet that was running. A fatal in a theme or plugin file stays where it is.
PHP lint runs on every .php save and on enable, including a file whose header says css or js. The direct-access guard is inserted as the first real statement. Admin notices put the message in as text.