Download the PHP package sultann/wp-addtextdomain without Composer
On this page you can find all versions of the php package sultann/wp-addtextdomain. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sultann/wp-addtextdomain
More information about sultann/wp-addtextdomain
Files in sultann/wp-addtextdomain
Package wp-addtextdomain
Short Description A Composer package to automatically replace text domains in WordPress gettext functions
License GPL-2.0-or-later
Informations about the package wp-addtextdomain
WP Add Text Domain
A Composer package that automatically replaces text domains in WordPress gettext functions. It can be used as a Composer plugin that runs automatically after package installation/update, or as a standalone CLI tool.
Features
- Automatically replaces text domains in WordPress gettext functions
- Runs as a Composer plugin or standalone CLI tool
- Configurable through composer.json or command-line arguments
- Supports all WordPress gettext functions
- Excludes vendor and node_modules directories by default
Installation
Via Composer (recommended)
Manual Installation
-
Clone the repository:
- Install dependencies:
Usage
As a Composer Plugin
Add the configuration to your project's composer.json:
As a CLI Tool
Configuration
Add the configuration to your project's composer.json under the extra section:
Configuration Options
textdomain: (Required) The new text domain to use for replacementupdateDomains: (Required) Array of old text domains to be replacedfiles: (Optional) Array of files or directories to scan. If not provided, all PHP files in the root and subdirectories will be scanned
Automatic Exclusions
The following directories are automatically excluded from scanning:
vendor/node_modules/
Supported WordPress Functions
The package processes the following WordPress gettext functions:
__()_e()_x()_n()_nx()_ex()_n_noop()_nx_noop()translate()esc_html__()esc_html_e()esc_html_x()esc_attr__()esc_attr_e()esc_attr_x()
License
GPL-2.0-or-later
All versions of wp-addtextdomain with dependencies
composer-plugin-api Version ^2.0