Skip to content

Commit bfd0ed5

Browse files
committed
Remove manual textdomain loading
WordPress handles translations automatically for plugins on WordPress.org. Remove pot file, Domain Path header, and load_textdomain method.
1 parent 5882e60 commit bfd0ed5

3 files changed

Lines changed: 0 additions & 67 deletions

File tree

includes/class-nodeinfo.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ class Nodeinfo {
2828
*/
2929
private static $instance;
3030

31-
/**
32-
* Text domain.
33-
*
34-
* @var string
35-
*/
36-
const TEXT_DOMAIN = 'nodeinfo';
37-
3831
/**
3932
* Whether the class has been initialized.
4033
*
@@ -76,24 +69,10 @@ public function init() {
7669
$this->initialized = true;
7770
}
7871

79-
/**
80-
* Load the plugin text domain.
81-
*/
82-
public function load_textdomain() {
83-
\load_plugin_textdomain(
84-
self::TEXT_DOMAIN,
85-
false,
86-
\dirname( \plugin_basename( NODEINFO_PLUGIN_FILE ) ) . '/languages'
87-
);
88-
}
89-
9072
/**
9173
* Register hooks.
9274
*/
9375
public function register_hooks() {
94-
// Load plugin text domain.
95-
\add_action( 'init', array( $this, 'load_textdomain' ) );
96-
9776
// Initialize NodeInfo version integrations.
9877
\add_action( 'init', array( Nodeinfo10::class, 'init' ), 9 );
9978
\add_action( 'init', array( Nodeinfo11::class, 'init' ), 9 );

languages/nodeinfo.pot

Lines changed: 0 additions & 45 deletions
This file was deleted.

nodeinfo.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* License: MIT
1010
* License URI: http://opensource.org/licenses/MIT
1111
* Text Domain: nodeinfo
12-
* Domain Path: /languages
1312
*
1413
* @package Nodeinfo
1514
*/

0 commit comments

Comments
 (0)