WP_Translation_Controller::get_entries
Returns all entries for a given text domain.
Method of the class: WP_Translation_Controller{}
No Hooks.
Returns
Array
Usage
$WP_Translation_Controller = new WP_Translation_Controller(); $WP_Translation_Controller->get_entries( $textdomain ): array;
- $textdomain(string)
- Text domain.
Default:'default'
Changelog
| Since 6.5.0 | Introduced. |
WP_Translation_Controller::get_entries() WP Translation Controller::get entries code WP 6.9.1
public function get_entries( string $textdomain = 'default' ): array {
if ( array() === $this->loaded_translations ) {
return array();
}
$entries = array();
foreach ( $this->get_files( $textdomain ) as $moe ) {
$entries = array_merge( $entries, $moe->entries() );
}
return $entries;
}