ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/www/site BKP/wp-content/plugins/wpml-string-translation/inc/admin-texts
/
home
mhhtmff
www
site BKP
wp-content
plugins
wpml-string-translation
inc
admin-texts
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
Register.php
1.48 MB
chmod
View
DL
Edit
Rename
Delete
UI.php
1.27 MB
chmod
View
DL
Edit
Rename
Delete
wpml-admin-text-configuration.php
5.32 MB
chmod
View
DL
Edit
Rename
Delete
wpml-admin-text-functionality.class.php
3.9 MB
chmod
View
DL
Edit
Rename
Delete
wpml-admin-text-import.class.php
5.61 MB
chmod
View
DL
Edit
Rename
Delete
wpml-admin-texts.class.php
14.18 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/www/site BKP/wp-content/plugins/wpml-string-translation/inc/admin-texts/Register.php
<?php namespace WPML\Ajax\ST\AdminText; use WPML\Ajax\IHandler; use WPML\Collect\Support\Collection; use WPML\FP\Either; use WPML\FP\Fns; use function WPML\FP\partial; use function WPML\FP\pipe; class Register implements IHandler { /** @var \WPML_Admin_Texts */ private $adminTexts; public function __construct( \WPML_Admin_Texts $adminTexts ) { $this->adminTexts = $adminTexts; } /** * Registers or Unregisters an option for translation depending * on the `state` data. * * @param Collection $data * * @return Either */ public function run( Collection $data ) { $state = $data->get( 'state' ) ? 'on' : ''; $applyState = partial( [ self::class, 'flatToHierarchical' ], $state ); $register = pipe( 'wpml_collect', Fns::map( $applyState ), Fns::reduce( 'array_replace_recursive', [] ), [ $this->adminTexts, 'icl_register_admin_options' ] ); $register( $data->get( 'selected', [] ) ); return Either::right( true ); } /** * string $state -> string [key1][key2][name] -> array [ key1 => [ key2 => [ name => $state ] ] ] * * @param string $state * @param string $option * * @return array */ public static function flatToHierarchical( $state, $option ) { // string $value -> mixed $key -> array [ $key => $value ] $makeArrayWithStringKey = function ( $value, $key ) { return [ (string) $key => $value ]; }; return \WPML_Admin_Texts::getKeysParts( $option ) ->reverse() ->reduce( $makeArrayWithStringKey, $state ); } }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply