\DevOwl\MultilingualCopyContent

Allows to copy content by sync options or by custom callback.

Summary

Methods
Properties
Constants
__construct()
copyAll()
copy()
fromSyncOptions()
fromTaxonomy()
fromPostType()
getSync()
No public properties found
No constants found
compInstance()
No protected properties found
N/A
No private methods found
$sync
N/A

Properties

Methods

copyAll()

copyAll(string  $sourceLanguage,array<mixed,string>  $destinationLanguages)

The content will be copied from your sync options you passed via constructor.

Parameters

string $sourceLanguage
array<mixed,string> $destinationLanguages

copy()

copy(string  $sourceLanguage,array<mixed,string>  $destinationLanguages,callable  $callback)

Copy content to a set of other languages. If you do not pass a callback the content will be copied from your sync options you passed via constructor.

Parameters

string $sourceLanguage
array<mixed,string> $destinationLanguages
callable $callback

Your callback which starts copying in the correct language context

fromSyncOptions()

fromSyncOptions()

Copy the complete content from our sync options. Use this only inside your `copyContentTo` callback!

fromTaxonomy()

fromTaxonomy(string  $taxonomy,array  $syncOptions)

Copy content from a given taxonomy and sync options. Use this only inside your `copyContentTo` callback!

Parameters

string $taxonomy
array $syncOptions

fromPostType()

fromPostType(string  $post_type,array  $syncOptions)

Copy content from a given post type and sync options. Use this only inside your `copyContentTo` callback!

Parameters

string $post_type
array $syncOptions

getSync()

getSync()

Get `Sync` instance.

compInstance()

compInstance()

Get compatibility language instance.