mount( self::MOUNT_LOGS ); } /** * Render the Redirects admin page. * * @since 4.0.0 * * @return void */ public function render_redirects(): void { $this->mount( self::MOUNT_REDIRECTS ); } /** * Render the Settings admin page. * * @since 4.0.0 * * @return void */ public function render_settings(): void { $this->mount( self::MOUNT_SETTINGS ); } /** * Render the Addons admin page. * * @since 4.0.0 * * @return void */ public function render_addons(): void { $this->mount( self::MOUNT_ADDONS ); } /** * Emit the React mount-point div. * * Every admin screen rendered by this plugin is just an empty div * the React app attaches to — printing the markup here is cheaper * (and easier to audit) than including a one-line template file. * * @since 4.0.0 * * @param string $mount_id DOM id the React app attaches to. * * @return void */ private function mount( string $mount_id ): void { printf( '
', esc_attr( $mount_id ) ); } }