Warning: Undefined variable $thumbnail in /var/www/admin/www/markimarta.ru/wp-content/themes/markimarta2023/single.php on line 44
Warning: Attempt to read property "ID" on null in /var/www/admin/www/markimarta.ru/wp-content/themes/markimarta2023/single.php on line 44
Warning: Undefined variable $thumbnail in /var/www/admin/www/markimarta.ru/wp-content/themes/markimarta2023/single.php on line 45
Warning: Attempt to read property "post_title" on null in /var/www/admin/www/markimarta.ru/wp-content/themes/markimarta2023/single.php on line 45
Ниже код на PowerShell для удаления ContentType. Это код для удаления ContentType на уровне сайта, для коллекции сайтов нужно заменить $spweb.AvailableContentTypes на (Get-SPSite http://spdev).RootWeb.AvailableContentTypes[$ctypeName].
Удалить ContentType из сайта SharePoint
$spsiteUrl = 'http://spdev' $ctypeName = 'Content type name' $curerntCT = (Get-SPSite $spsiteUrl).RootWeb.AvailableContentTypes[$ctypeName] $spweb.ContentTypes.Delete($curerntCT.Id)
Удалить ContentType из коллекции сайтов SharePoint
$spwebUrl = 'http://spdev/testsite/' $ctypeName = 'Content type name' $spweb = Get-SPWeb -Identity $spwebUrl $curerntCT = $spweb.AvailableContentTypes[$ctypeName] $spweb.ContentTypes.Delete($curerntCT.Id)

