public function apply()
    {
        if ($this->config->hasKey(self::UNREGISTER)) {
            add_action('widgets_init', [$this, 'unregister'], 15);
        }

        if ($this->config->hasKey(self::REGISTER)) {
            add_action('widgets_init', [$this, 'register'], 15);
        }
    }
public function apply()
    {
        if ($this->config->hasKey(self::UNREGISTER)) {
            add_action('widgets_init', [$this, 'unregister'], 15);
        }

        if ($this->config->hasKey(self::REGISTER)) {
            add_action('widgets_init', [$this, 'register'], 15);
        }
    }
public function apply ( ) { if ( $ this -> config -> hasKey ( self :: UNREGISTER ) ) { add_action ( 'widgets_init' , [ $ this , 'unregister' ] , 15 ) ; } if ( $ this -> config -> hasKey ( self :: REGISTER ) ) { add_action ( 'widgets_init' , [ $ this , 'register' ] , 15 ) ; } }
Apply widget registrations and unregistrations.
Apply widget registrations and unregistrations .