getSkipHTMLForTag()
getSkipHTMLForTag( $force = false)
Parameters
| $force |
There are plugins like WPML or PolyLang which allows you to create a multilingual WordPress installation. devowl.io plugins needs to be compatible with those plugins so this abstract implementation handles actions like get original ID and get default language.
copyTermToOtherLanguage(string $locale,string $currentLanguage,integer $term_id,string $taxonomy,array<mixed,string> $meta): integer|boolean
Translate given term to other language.
| string | $locale | |
| string | $currentLanguage | |
| integer | $term_id | |
| string | $taxonomy | |
| array<mixed,string> | $meta | The meta keys to copy |
The new created term id
copyPostToOtherLanguage(string $locale,string $currentLanguage,string $post_id,array<mixed,string> $meta,array<mixed,string> $taxonomies): integer|boolean
Translate given post to other language.
| string | $locale | |
| string | $currentLanguage | |
| string | $post_id | |
| array<mixed,string> | $meta | The meta keys to copy |
| array<mixed,string> | $taxonomies | The taxonomies to copy |
The new created post id
duplicatePostMeta(integer $from,integer $to,array<mixed,string> $meta)
Copy already existing meta as it can be inserted with `meta_input` directly.
Additionally listen to term meta addition and copy.
| integer | $from | |
| integer | $to | |
| array<mixed,string> | $meta | Meta keys to copy |
copyPostTaxonomies(integer $from,integer $to,array<mixed,string> $taxonomies,string $locale)
Copy already existing taxonomies as it can be inserted with `tax_input` directly.
Additionally listen to term additions and copy.
| integer | $from | |
| integer | $to | |
| array<mixed,string> | $taxonomies | Taxonomy keys to copy |
| string | $locale | The destination locale |
filterMetaValue(string $type,integer $from,integer $to,string $meta_key,mixed $meta_value,string $locale)
Apply a WordPress filter so a meta value can be modified for copy process to other languages.
| string | $type | E. g. 'post' |
| integer | $from | Object id of source language item |
| integer | $to | Object id of destination language item |
| string | $meta_key | |
| mixed | $meta_value | |
| string | $locale | Destination locale |