PHP Класс Inpsyde\MultilingualPress\SiteDuplication\SiteDuplicator

С версии: 3.0.0
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Inpsyde\MultilingualPress\Database\TableList $table_list, Inpsyde\MultilingualPress\Database\TableDuplicator $table_duplicator, Inpsyde\MultilingualPress\Database\TableReplacer $table_replacer, ActivePlugins $active_plugins, Inpsyde\MultilingualPress\API\ContentRelations $content_relations, Inpsyde\MultilingualPress\SiteDuplication\AttachmentCopier $attachment_copier ) Constructor. Sets up the properties.
duplicate_site ( integer $new_site_id ) : boolean Duplicates a complete site to the new site just created.

Приватные методы

Метод Описание
duplicate_tables ( integer $source_site_id, string $table_prefix ) : void Duplicates the tables of the given source site to the current site.
get_mapped_domain ( ) : string Returns the primary domain if domain mapping is active.
handle_content_relations ( integer $source_site_id, integer $destination_site_id ) : void Sets up content relations between the source site and the new site.
handle_plugins ( ) : void Adapts all active plugins according to the setting included in the request.
handle_theme ( ) : void Triggers potential setup routines of the used theme.
rename_user_roles_option ( string $table_prefix ) : void Renames the user roles option according to the given table prefix.
set_admin_email ( string $admin_email ) : void Sets the admin email address option to the given value.
set_urls ( string $url, string $domain ) : void Sets the admin email address option to the given value.

Описание методов

__construct() публичный метод

Constructor. Sets up the properties.
С версии: 3.0.0
public __construct ( Inpsyde\MultilingualPress\Database\TableList $table_list, Inpsyde\MultilingualPress\Database\TableDuplicator $table_duplicator, Inpsyde\MultilingualPress\Database\TableReplacer $table_replacer, ActivePlugins $active_plugins, Inpsyde\MultilingualPress\API\ContentRelations $content_relations, Inpsyde\MultilingualPress\SiteDuplication\AttachmentCopier $attachment_copier )
$table_list Inpsyde\MultilingualPress\Database\TableList Table list object.
$table_duplicator Inpsyde\MultilingualPress\Database\TableDuplicator Table duplicator object.
$table_replacer Inpsyde\MultilingualPress\Database\TableReplacer Table replacer object.
$active_plugins ActivePlugins Active plugin access object.
$content_relations Inpsyde\MultilingualPress\API\ContentRelations Content relations APU object.
$attachment_copier Inpsyde\MultilingualPress\SiteDuplication\AttachmentCopier Attachment copier object.

duplicate_site() публичный метод

Duplicates a complete site to the new site just created.
С версии: 3.0.0
public duplicate_site ( integer $new_site_id ) : boolean
$new_site_id integer The ID of the new site.
Результат boolean Whether or not a site was duplicated successfully.