\MatthiasWeb\RealMediaLibrary\compPolyLang

This class handles the compatibility for Poly Lang plugin.

Summary

Methods
Properties
Constants
getPluginConstantPrefix()
init()
options_register()
html_options_move()
item_move_finished()
pll_translate_media()
getInstance()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
$me
$active
$previousIds
$previousFolderId
N/A

Properties

$me

$me :

Type

$active

$active :

Type

$previousIds

$previousIds :

Avoid duplicate call of move action.

Type

$previousFolderId

$previousFolderId :

Avoid duplicate call of move action.

Type

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

init()

init()

Initialize actions.

options_register()

options_register()

Register option for PolyLang.

html_options_move()

html_options_move()

Output button to move translation.

item_move_finished()

item_move_finished(integer  $folderId,array<mixed,integer>  $ids,\MatthiasWeb\RealMediaLibrary\api\IFolder  $folder,boolean  $isShortcut)

A file is moved (not copied) and then move also all the translations.

Parameters

integer $folderId
array<mixed,integer> $ids
\MatthiasWeb\RealMediaLibrary\api\IFolder $folder
boolean $isShortcut

pll_translate_media()

pll_translate_media(integer  $post_id,integer  $tr_id,string  $lang_slug)

New translation created => synchronize with original post.

Then reset the count cache for the unorganized folder.

Parameters

integer $post_id
integer $tr_id
string $lang_slug

__construct()

__construct()

C'tor.