Skip to content
Snippets Groups Projects
Select Git revision
  • d6c43c7620e631cedad0d608e92d9766809481e6
  • master default protected
  • devel
  • feature/add-escaping-to-templates
  • feature/add-priority-sorting
  • 3.3.0
  • 3.2.1
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.4.12
  • 2.4.11
  • 2.4.10
  • 2.4.9
  • 2.4.8
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.2
  • 2.3.1
  • 2.3
25 results

form-label.php

Blame
  • I18n.php 580 B
    <?php
    
    namespace WPDesk\Init\Extension\CommonBinding;
    
    use WPDesk\Init\Binding\Hookable;
    use WPDesk\Init\Plugin\Plugin;
    
    class I18n implements Hookable {
    
    	private Plugin $plugin;
    
    	public function __construct( Plugin $plugin ) {
    		$this->plugin = $plugin;
    	}
    
    	public function hooks(): void {
    		if ( did_action( 'plugins_loaded' ) ) {
    			$this->__invoke();
    		} else {
    			add_action( 'plugins_loaded', $this );
    		}
    	}
    
    	public function __invoke(): void {
    		\load_plugin_textdomain(
    			$this->plugin->get_slug(),
    			false,
    			$this->plugin->header()->get( 'DomainPath' )
    		);
    	}
    }