How to override languages files in wp-content/languages/themes with child theme

Since WP 4.6 load_theme_textdomain() (and consequently load_child_theme_textdomain()) will give priority to .mo files downloaded from WP’s online translation platform (translate.wordpress.org). Due to some new code (here, on line 769) these functions will completely ignore your local .mo files if the textdomain is found in the general languages/ directory. You can, however, use the more basic … Read more

Multiple textdomains

You can call load_plugin_textdomain() multiple times in each plugin, but I would not do that. Put the common files into a separate plugin, for example luke-carbis-library. In that plugin create two simple functions for setup and loading extra files: add_action( ‘plugins_loaded’, ‘lcl_init’ ); function lcl_init() { $dir = plugin_dir_path( __FILE__ ); $url = plugins_url( __FILE__ … Read more

How can I translate the name of my Plugin for other languages?

After searching a little bit more, I found that in the generation of the .pot file, the strings of plugin header already appear there. The tool I used to generate .pot file for my plugin was this command of wp-cli: https://developer.wordpress.org/cli/commands/i18n/make-pot/ I don’t know if another tools to make plugin translation do that. The reason … Read more

Warning/Notice about functions.php

‘;)’ => ‘icon_wink.gif’, is in line 2477 in the current version, you should never just change or delete core files, unless you know how to run a private branch of WordPress. Line 2925 is the second trigger_error() in this function: function _deprecated_argument( $function, $version, $message = null ) { do_action( ‘deprecated_argument_run’, $function, $message, $version ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)