File manager - Edit - /home/verseaumee/blueversion/wp-content/plugins/give/src/FormMigration/Actions/TransferFormUrl.php
Back
<?php namespace Give\FormMigration\Actions; class TransferFormUrl { protected $sourceId; public function __construct($sourceId) { $this->sourceId = $sourceId; } public static function from($sourceId): self { return new TransferFormUrl($sourceId); } public function to($destinationId): void { $this->__invoke($destinationId); } public function __invoke($destinationId) { $postName = get_post($this->sourceId)->post_name; wp_update_post(['ID' => $this->sourceId, 'post_name' => $postName . '-v2']); wp_update_post(['ID' => $destinationId, 'post_name' => $postName]); } }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings