register(); ( new Admin\Taxonomy() )->register(); Admin\Settings::register_cache(); // Update migrations run after the CPT exists (priority 20), so the // one-time rewrite flush rebuilds rules from the new registration. add_action( 'init', array( Activator::class, 'maybe_migrate' ), 20 ); // Frontend output layer. ( new Frontend\Assets() )->register(); ( new Frontend\Form() )->register(); ( new Shortcode\Shortcode() )->register(); ( new Blocks\Block() )->register(); // Elementor widget (registers only when Elementor is active). ( new Elementor() )->register(); // Invalidate cached queries whenever testimonials change. add_action( 'save_post_' . Admin\CPT::POST_TYPE, array( Frontend\Query::class, 'bust_cache' ) ); add_action( 'deleted_post', array( Frontend\Query::class, 'bust_cache' ) ); // Group edits move testimonials in and out of a cached ID set too. add_action( 'created_' . Admin\Taxonomy::TAXONOMY, array( Frontend\Query::class, 'bust_cache' ) ); add_action( 'edited_' . Admin\Taxonomy::TAXONOMY, array( Frontend\Query::class, 'bust_cache' ) ); add_action( 'delete_' . Admin\Taxonomy::TAXONOMY, array( Frontend\Query::class, 'bust_cache' ) ); // Privacy tools must see submitter data (export + erasure + policy). ( new Privacy() )->register(); // Admin-only modules. if ( is_admin() ) { ( new Admin\MetaBoxes() )->register(); ( new Admin\Columns() )->register(); ( new Admin\Assets() )->register(); ( new Admin\Settings() )->register(); ( new Admin\Tools() )->register(); ( new Admin\Notices() )->register(); ( new Admin\ReviewNotice() )->register(); ( new Admin\ShortcodeHelper() )->register(); ( new Admin\DemoLibrary() )->register(); } } }