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

С версии: 3.0.0
Наследование: implements Inpsyde\MultilingualPress\SiteDuplication\AttachmentCopier
Показать файл Открыть проект

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

Метод Описание
__construct ( Inpsyde\MultilingualPress\Common\BasePathAdapter $base_path_adapter, Inpsyde\MultilingualPress\Database\TableStringReplacer $table_string_replacer ) Constructor. Sets up the properties.
copy_attachments ( integer $source_site_id ) : boolean Copies all attachment files of the site with given ID to the current site.

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

Метод Описание
copy_dir ( array $paths, string $source_dir, string $destination_dir ) : void Copies all given files from one site to another.
get_attachment_paths ( ) : string[] Extracts all registered attachment paths from the database.
update_attachment_urls ( string $source_url, string $destination_url ) : void Updates attachment URLs according to the given arguments

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

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

Constructor. Sets up the properties.
С версии: 3.0.0
public __construct ( Inpsyde\MultilingualPress\Common\BasePathAdapter $base_path_adapter, Inpsyde\MultilingualPress\Database\TableStringReplacer $table_string_replacer )
$base_path_adapter Inpsyde\MultilingualPress\Common\BasePathAdapter Base path adapter object.
$table_string_replacer Inpsyde\MultilingualPress\Database\TableStringReplacer Table string replacer object.

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

Copies all attachment files of the site with given ID to the current site.
С версии: 3.0.0
public copy_attachments ( integer $source_site_id ) : boolean
$source_site_id integer Source site ID.
Результат boolean Whether or not any attachment files were copied.