Files
pr-vision/includes
peptiderepo 56c276405a split: extract PRV_Settings_Controller from settings-page (300-line fix)
class-prv-settings-page.php was 346 lines — the only file over the
300-line cap. Extract the four POST handlers (handle_save,
handle_model_add, handle_model_update, handle_model_remove) into a
new PRV_Settings_Controller class (class-prv-settings-controller.php).

PRV_Settings_Page::register_hooks() instantiates the controller once,
passing a nonce-verification callback (bound to require_admin_nonce()).
All four admin_post_* hooks now delegate to the controller.

All phpcs:disable/enable WordPress.Security.NonceVerification.Missing
wrappers and sanitize_*/wp_unslash() calls traveled with the moved
handlers. PHPCS stays green.

Result:
  class-prv-settings-page.php       193 lines
  class-prv-settings-controller.php 213 lines
  All other production PHP files     ≤300 lines

Also: ARCHITECTURE.md file-tree updated; @see cross-refs added to
both class docblocks; CHANGELOG 0.2.0 CI section updated.

Version: 0.2.0
2026-06-14 07:34:12 +00:00
..