WordPress Developer Ukraine, Kyiv
How to Translate a WordPress Theme or Plugin

How to Translate a WordPress Theme or Plugin

How to translate a WordPress theme or plugin WordPress has a built-in localisation system based on GNU gettext. The workflow: wrap translatable strings in translation functions, generate a .pot template, create a .po file for each language, compile it to a binary .mo file, and load the text domain in your theme or plugin.
How to Enqueue a Script After All Other Scripts in WordPress

How to Enqueue a Script After All Other Scripts in WordPress

How to enqueue a script after all other scripts in WordPress By default, WordPress prints scripts in the order they are enqueued, taking dependencies into account. Sometimes a script must run last, after jQuery and everything that other plugins have added to the page. The dependency list, a late hook priority and the wp_footer hook…
PHP Composer in WordPress Development

PHP Composer in WordPress Development

Composer in WordPress plugins and themes Composer is the dependency manager of PHP. WordPress core does not use it, but in your own plugins and themes it saves copying libraries by hand: composer require downloads a library with its dependencies, and one autoloader loads all classes, the libraries’ and your own.
How to Create Your First Gutenberg Custom Block

How to Create Your First Gutenberg Custom Block

Create your first custom block for the WordPress block editor Since WordPress 5.0 the editor is built from blocks, and a plugin or theme can add its own. A block is registered in JavaScript with registerBlockType(): the edit function describes how it looks and works in the editor, the save function returns the HTML that…
PHP 7 Features Every WordPress Developer Should Know

PHP 7 Features Every WordPress Developer Should Know

PHP 7 features worth using in WordPress code PHP 7.0 came out in December 2015 and was roughly twice as fast as PHP 5.6 on WordPress, but it also brought language features that make code shorter and clearer. WordPress itself still runs on PHP 5.2.4 and newer, so core cannot use them, but in your…