WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

PclZip::duplicate() public WP 1.0

Function : duplicate() Description : This method creates an archive by copying the content of an other one. If the archive already exist, it is replaced by the new one without any warning. Parameters : $p_archive : The filename of a valid archive, or a valid PclZip object. Return Values :
1 on success.
0 or a negative value on error (error code).

Это метод класса: PclZip{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$PclZip = new PclZip();
$PclZip->duplicate( $p_archive );

Код PclZip::duplicate: wp-admin/includes/class-pclzip.php WP 5.5.1

<?php
function duplicate($p_archive)
{
  $v_result = 1;

  // ----- Reset the error handler
  $this->privErrorReset();

  // ----- Look if the $p_archive is a PclZip object
  if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
  {

    // ----- Duplicate the archive
    $v_result = $this->privDuplicate($p_archive->zipname);
  }

  // ----- Look if the $p_archive is a string (so a filename)
  else if (is_string($p_archive))
  {

    // ----- Check that $p_archive is a valid zip file
    // TBC : Should also check the archive format
    if (!is_file($p_archive)) {
      // ----- Error log
      PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
      $v_result = PCLZIP_ERR_MISSING_FILE;
    }
    else {
      // ----- Duplicate the archive
      $v_result = $this->privDuplicate($p_archive);
    }
  }

  // ----- Invalid variable
  else
  {
    // ----- Error log
    PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
    $v_result = PCLZIP_ERR_INVALID_PARAMETER;
  }

  // ----- Return
  return $v_result;
}