\DevOwl\MultilingualSync

Language specific action and filters to sync them language-wide. The earliest time you can instance this class is `plugins_loaded`.

Summary

Methods
Properties
Constants
__construct()
enable()
disable()
save_post()
created_term()
updated_term_meta()
updated_postmeta()
startCopyProcess()
getPostsConfiguration()
getTaxonomies()
isEnabled()
compInstance()
No public properties found
No constants found
hooks()
No protected properties found
N/A
No private methods found
$enabled
$posts
$taxonomies
$compLanguage
N/A

Properties

$enabled

$enabled :

Type

$posts

$posts :

Type

$taxonomies

$taxonomies :

Type

Methods

__construct()

__construct(array  $posts,array  $taxonomies,\DevOwl\Multilingual\AbstractSyncPlugin  $compLanguage)

C'tor.

Parameters

array $posts
array $taxonomies
\DevOwl\Multilingual\AbstractSyncPlugin $compLanguage

enable()

enable()

Enable the sync mechanism.

disable()

disable()

Disable the sync mechanism.

save_post()

save_post(integer  $postId,\WP_Post  $post,boolean  $update)

A post was saved, create duplicates for other languages, or sync meta and column if update.

Parameters

integer $postId
\WP_Post $post
boolean $update

created_term()

created_term(integer  $term_id,integer  $tt_id,string  $taxonomy)

A term in a taxonomy got created, create duplicates for each language.

Parameters

integer $term_id
integer $tt_id
string $taxonomy

updated_term_meta()

updated_term_meta(integer  $meta_id,integer  $term_id,string  $meta_key,mixed  $meta_value)

Sync a set of copyable metas to other languages for defined taxonomies.

Parameters

integer $meta_id

ID of updated metadata entry.

integer $term_id

Term ID.

string $meta_key

Metadata key.

mixed $meta_value

Metadata value. This will be a PHP-serialized string representation of the value if the value is an array, an object, or itself a PHP-serialized string.

updated_postmeta()

updated_postmeta(integer  $meta_id,integer  $post_id,string  $meta_key,mixed  $meta_value)

Sync a set of copyable metas to other languages for defined post types.

Parameters

integer $meta_id

ID of updated metadata entry.

integer $post_id

Post ID.

string $meta_key

Metadata key.

mixed $meta_value

Metadata value. This will be a PHP-serialized string representation of the value if the value is an array, an object, or itself a PHP-serialized string.

startCopyProcess()

startCopyProcess()

Create an instance of `CopyContent`.

getPostsConfiguration()

getPostsConfiguration()

Get posts configuration passed via C'tor.

getTaxonomies()

getTaxonomies()

Get taxonomies configuration passed via C'tor.

isEnabled()

isEnabled(): boolean

Is the syncing mechanism enabled?

Returns

boolean

compInstance()

compInstance()

Get compatibility language instance.

hooks()

hooks()

Create sync hooks.