Skip to content

Releases: Roots-and-Fruit/rf-site-functionality

2.0.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 09:40

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 the mc-snippets directory keep loading. Ability names now start with rf-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.

Full changelog

1.2.2

Choose a tag to compare

@github-actions github-actions released this 28 Sep 13:50

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

Choose a tag to compare

@github-actions github-actions released this 28 Sep 10:54

1.2.1

Snippets are no longer published from wp-content/mc-snippets.

After you update:

  1. Open https://yoursite.example/wp-content/mc-snippets/safe-mode.key while 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.
  2. 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.
  3. 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. Set MC_FUNCTIONALITY_SNIPPETS_DIR if you want a permanent directory PHP is allowed to use.
  4. Files on disk end in .mcphp. The editor and the abilities still call a snippet example.php.
  5. 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.

1.2.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 09:56

Changes in v1.2.0

  • Add snippet abilities for list, read, and file changes. (639f929)
  • Correct when unconditional snippets actually load. (6bf7db8)