Pods::duplicate PHP Метод

duplicate() публичный Метод

Duplicate an item
См. также: PodsAPI::duplicate_pod_item
С версии: 2.0
public duplicate ( integer $id = null ) : integer | boolean
$id integer ID of the pod item to duplicate
Результат integer | boolean ID of the new pod item
    public function duplicate($id = null)
    {
        if (null === $id) {
            $id = $this->id();
        }
        $id = (int) $this->do_hook('duplicate', $id);
        if (empty($id)) {
            return false;
        }
        $params = array('pod' => $this->pod, 'id' => $id);
        return $this->api->duplicate_pod_item($params);
    }