Cet article contient trois blocks en chaque langue

dans les trois blocs, trois textes dans chaque langue :

the block is edited in english.

Ce bloc paragraphe est en français.

Dieser Absatzblock ist in deutscher Sprache.

Si la langue secondaire est cochée, Search trouvera cet article ! ( une fonctionnalité unique de la dernière version du plugin xili-language ! ) Après avoir édité cet article complexe, il est facile de créer et d’éditer ceux dans d’autres langues avec le tableau de bord du plugin (meta-box).

This article contains three blocks in each language

in the three block below, three texts in each language :

the block is edited in english.

Ce bloc paragraphe est en français.

Dieser Absatzblock ist in deutscher Sprache.

If secondary language are checked, Search will find this article ! (an unique features of newest version of xili-language plugin ! After editing this complex article, it is easy to create and edit those in other languages with plugin dashboard (meta box).

What new with xili-language 2.23.11 ?

The latest version includes a better management of the metabox of translations in the new Gutenberg universe which considerably upsets the interface and its mode of dialogue with the database.

Of course, we can easily make columns (for example).

But, for the developer, we must reconsider all the interfaces that were added to assist the publisher, the editor.

Can not add a simple “input” with few lines of php:

Strong knowledge of JS (reactive) is needed. In addition, it is first of all a minimum block that must be added.

Example: it was easy to add the check box for the permalink to be adapted according to the modified title of the translated article. In classic mode, it was not far from the update button, put online. Now, this is no longer possible, so it is under the list of translations. Like the other checkboxes in the list, the gutenberg mode, detects a change (check, uncheck, …) and then triggers the process js, json and updates the contents (and links between the various translations).

checkbox is on bottom left…

Why coding with WP Coding Standards ?

When a code source is sometime more than ten years old, it is now time to rewrite it with good practices.

The first step is to use efficient tools. The result speaks for itself with these two snapshots :

php w/o wpcs
php w/o wpcs


Red points on first image indicate formatting errors !

I let you guess the mass of work and checks when there are nearly 30,000 lines in 4 plugins!

Where is wiki xili ?

The xiki wiki is for the moment suspended because its content had become obsolete given the evolution of WP and the xili-language trilogy.

PHP 7.2 : how to replace DEPRECATED create_function to pass a var ?

create_function is now obsolete with PHP 7.2. How to rewrite it with anonymous function to pass a var in add_action() at end of a function calculating this var ? In this case, ‘admin_notices’ action display a message when the theme is activated.


add_action( 'admin_notices', create_function( '', 'echo "' . addcslashes( $msg, '"' ) . '";' ) );


    function() use ( &$msg ) {
       echo $msg;

Note that var used by references ( &$msg ) in function.
See the functions.php to this theme in GitHub ( line 148 ).


FTP on Mac OSX high Sierra (10.3.x)

Regulary, each time my iMac for dev. is updated (now high Sierra 10.3.6), each time the FTP of MacOs server is discontinued (stopped) : impossible to use Fetch and FTP to update wordpress in web local server or mamp instance.
Again, after spending more than multiple hours searching useful posts or forums, here is resumed how to update ftp and activate sftp:

Step #1 : update ftp install via brew

if brew is installed, with homebrew you can accomplish this with the following brew command:
brew install inetutils
be patient, the process takes time and time to time is verbose

Step #2 : test ftp – the connection

if ftp is well installed, use terminal

bash-3.2$ ftp localhost
ftp: connect to address ::1: Connection refused
ftp: Trying …
ftp: connect to address Connection refused
ftp: Trying fe80::1%lo0 …
ftp: connect to address fe80::1%lo0: Connection refused
ftp: no response from host

enter quit to recover here bash terminal

At this step, it was impossible to log with ftp (port 21) protocol and username/password 🙁 !

Step #3 : authentication via ssh (thanks to MAMP support)

• Go Mac OSX System Preferences => Sharing.
• Enable Remote Login.
You will see:
Remote Login: On
To log in to this computer remotely, type “ssh username@xxx.xxx.x.xx”.

Step #4 : set ftp client (here fetch)

In your FTP client, create a new SFTP connection with the settings:
• Server: xxx.xxx.x.xx
• User Name: username
• Password: your user password for the system

Step #5 : configure wp-config to enable automatic core or plugin updating

define(“FTP_HOST”, “xxx.xxx.x.xx:22”);
define(“FTP_USER”, “username”);
define(“FTP_PASS”, “your user password for the system”);
define(“FTP_SSL”, true);
define(“FS_METHOD”, “ssh2” ); // need ssh-sftp-updater-support plugin in localhost wp server if php server don’t have ssh2 extension

This plugin – ssh-sftp-updater-support – available in wp repository is important if php install of apache server don’t have ssh2 extension.

And now all is working with sftp … until the next macOSX update !