Properties

$me

$me :

Type

$previousIds

$previousIds :

Avoid duplicate call of move action.

Type

$previousFolderId

$previousFolderId :

Avoid duplicate call of move action.

Type

Methods

overrideInit()

overrideInit()

sqlstatement_order()

sqlstatement_order(  $pieces,  $query,  $folder)

Parameters

$pieces
$query
$folder

sortable_ids()

sortable_ids(  $ids)

Parameters

$ids

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 and filters.

scripts_skip()

scripts_skip(boolean  $skip,string  $type,string  $hook_suffix)

Skip RML scripts in String Translations as it leads to conflicts with `antd`.

Parameters

boolean $skip

True for skip and false for load

string $type

The context type

string $hook_suffix

The current admin page

localize()

localize(array  $arr): array

Localize frontend.

Parameters

array $arr

Returns

array

sqlstatement_join()

sqlstatement_join(array<mixed,string>  $joins): array<mixed,string>

Add a JOIN to the WPML count cache table.

Parameters

array<mixed,string> $joins

Returns

array<mixed,string>

sqlstatement_select_fields()

sqlstatement_select_fields(array<mixed,string>  $fields): array<mixed,string>

Load the cnt from the WPML count cache table.

Parameters

array<mixed,string> $fields

Returns

array<mixed,string>

getSingleCountSql()

getSingleCountSql(string  $code,string  $fieldId = 'tn.fid'): string

Get the single SQL for the subquery of count getter.

Parameters

string $code
string $fieldId

Returns

string

updateCountCache()

updateCountCache(array<mixed,integer>  $folders,array<mixed,integer>  $attachments,string  $where)

Update the count cache for WPML regarding the active languages.

Parameters

array<mixed,integer> $folders
array<mixed,integer> $attachments
string $where

resetCountCache()

resetCountCache(integer  $folderId)

Reset the count cache for WPML regarding the active languages.

Parameters

integer $folderId

wpml_update_active_languages()

wpml_update_active_languages()

Fired when wpml language gets activated.

dbDeltaCountCache()

dbDeltaCountCache()

Create a count cache table with dbDelta functionality.

_dbDeltaCountCache()

_dbDeltaCountCache()

Create the icl_count table.

options_register()

options_register()

Register option for PolyLang.

html_options_move()

html_options_move()

Option to move files also when a translation gets moved.

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

wpml_media_create_duplicate_attachment()

wpml_media_create_duplicate_attachment(integer  $post_id,integer  $tr_id)

New translation created => synchronize with original post.

Then reset the count cache for the unorganized folder.

Parameters

integer $post_id
integer $tr_id

wpml_count_attachments()

wpml_count_attachments(integer  $count): integer

Count attachments through WPML tables.

Parameters

integer $count

Returns

integer

isDefaultLanguage()

isDefaultLanguage(): boolean

Check if current active language is default.

Returns

boolean

getDefaultId()

getDefaultId(integer  $attachment): integer

Get the default id for an attachment.

Parameters

integer $attachment

Returns

integer

getActiveLanguages()

getActiveLanguages(): array<mixed,string>

Get active WPML language codes.

Returns

array<mixed,string>

isActive()

isActive()

Check if WPML plugin is active.

__construct()

__construct()

C'tor.