@@ -22,7 +22,7 @@ import { useDeleteSite } from 'src/hooks/use-delete-site';
2222import { useGetWpVersion } from 'src/hooks/use-get-wp-version' ;
2323import { useSiteDetails } from 'src/hooks/use-site-details' ;
2424import { getIpcApi } from 'src/lib/get-ipc-api' ;
25- import { getFileAccessDescription , getRuntimeDescription } from 'src/lib/site-runtime-copy' ;
25+ import { FileAccessDescription , RuntimeDescription } from 'src/lib/site-runtime-copy' ;
2626import EditSiteDetails from 'src/modules/site-settings/edit-site-details' ;
2727import { useAppDispatch } from 'src/stores' ;
2828import {
@@ -50,12 +50,6 @@ export function ContentTabSettings( { selectedSite }: ContentTabSettingsProps )
5050 const { __ } = useI18n ( ) ;
5151 const { data : isCertificateTrusted } = useCheckCertificateTrustQuery ( ) ;
5252 const isNativePhpRuntime = getSiteRuntime ( selectedSite ) === SITE_RUNTIME_NATIVE_PHP ;
53- const runtimeDescription = getRuntimeDescription ( __ , getSiteRuntime ( selectedSite ) ) ;
54- const fileAccessDescription = getFileAccessDescription (
55- __ ,
56- getSiteRuntime ( selectedSite ) ,
57- getSiteFileAccess ( selectedSite )
58- ) ;
5953 const username = selectedSite . adminUsername || 'admin' ;
6054 // Empty strings account for legacy sites lacking a stored password.
6155 const storedPassword = decodePassword ( selectedSite . adminPassword ?? '' ) ;
@@ -213,7 +207,10 @@ export function ContentTabSettings( { selectedSite }: ContentTabSettingsProps )
213207 < div className = "inline-flex items-center gap-2" >
214208 { /* translators: value for the PHP runtime setting on the site settings screen */ }
215209 < span > { isNativePhpRuntime ? __ ( 'Native' ) : __ ( 'Sandbox' ) } </ span >
216- < Tooltip text = { runtimeDescription } placement = "top-start" >
210+ < Tooltip
211+ text = { < RuntimeDescription runtime = { getSiteRuntime ( selectedSite ) } /> }
212+ placement = "top-start"
213+ >
217214 < span
218215 role = "img"
219216 aria-label = { __ ( 'About the PHP runtime setting' ) }
@@ -233,7 +230,15 @@ export function ContentTabSettings( { selectedSite }: ContentTabSettingsProps )
233230 ? __ ( 'All files' )
234231 : __ ( 'Site directory' ) }
235232 </ span >
236- < Tooltip text = { fileAccessDescription } placement = "top-start" >
233+ < Tooltip
234+ text = {
235+ < FileAccessDescription
236+ runtime = { getSiteRuntime ( selectedSite ) }
237+ fileAccess = { getSiteFileAccess ( selectedSite ) }
238+ />
239+ }
240+ placement = "top-start"
241+ >
237242 < span
238243 role = "img"
239244 aria-label = { __ ( 'About the file access setting' ) }
0 commit comments