Skip to content
Snippets Groups Projects

feat: remove compilation command

Open Bartek Jaskulski requested to merge v0.10 into main
2 files
+ 3
8
Compare changes
  • Side-by-side
  • Inline

Files

  • e4b6d594
    Previously stoppable binder was working for all binders, although it
    only supported to signal stop execution with class-based binders. This
    changes the behavior, as having all binders wrapped in stoppable binder
    resulted in execution of all collection binders, without regard for the
    stop signal.
    
    This is convoluted and gets even worse, so this part of the API should
    be rewritten. The side effect of this change is that any callable based
    binder (e.g. database migrations) will not be stopped, no matter what
    happens. This is a serious quirk, and may be better to remove other
    kinds of binders than hookable or rethink the stoppable binder.
    
    Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
@@ -7,8 +7,7 @@ use WPDesk\Init\Plugin\Plugin;
class I18n implements Hookable {
/** @var Plugin */
private $plugin;
private Plugin $plugin;
public function __construct( Plugin $plugin ) {
$this->plugin = $plugin;
@@ -23,10 +22,18 @@ class I18n implements Hookable {
}
public function __invoke(): void {
$relative_path = str_replace(
WP_PLUGIN_DIR . '/',
'',
$this->plugin->get_path(
$this->plugin->header()->get( 'DomainPath' )
)
);
\load_plugin_textdomain(
$this->plugin->get_slug(),
false,
$this->plugin->header()->get( 'DomainPath' )
$relative_path
);
}
}
Loading