| | |
| | | array $data, |
| | | array $options = [] |
| | | ):bool { |
| | | $queue = JVB()->queue(); |
| | | $queue = Queue::getInstance(); |
| | | |
| | | $queued = $queue->queueOperation( |
| | | $type, |
| | |
| | | $this->addSavePost(); |
| | | } |
| | | |
| | | add_action('transition_post_status', [$this, 'handlePostStatusTransition'], 10, 3); |
| | | // add_action('transition_post_status', [$this, 'handlePostStatusTransition'], 10, 3); |
| | | |
| | | if ($this->canSync['delete']) { |
| | | add_action('before_delete_post', [$this, 'handleDeletePost'], 10, 1); |
| | |
| | | if ($jpegVersion !== '' && is_int($jpegVersion)) { |
| | | return $jpegVersion; |
| | | } |
| | | $uploader = new UploadManager(); |
| | | $uploader = UploadManager::getInstance(); |
| | | $converted = $uploader->convertImageTo($imgID, 'jpeg', 80, false); |
| | | if ($converted && !is_wp_error($converted)) { |
| | | update_post_meta($imgID, BASE . 'jpeg_version', $converted['attachment_id']); |
| | |
| | | |
| | | /** |
| | | * Used by JVBase\registrar\helpers\AddIntegrationFields.php |
| | | * @param string|null $content_type |
| | | * @return array |
| | | */ |
| | | public function getAdditionalFields(?string $content_type = null):array |