%s %s
', esc_html( 'BlockArt:' ), wp_kses_post( __( 'Assets are not built. Runnpm install && npm run build
from the wp-content/plugins/blockart directory.', 'blockart' ) ),
esc_html__( 'Dismiss this notice.', 'blockart' )
);
}
);
add_action(
'admin_init',
function() {
deactivate_plugins( plugin_basename( BLOCKART_PLUGIN_FILE ) );
// phpcs:disable WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['activate'] ) ) {
unset( $_GET['activate'] );
}
// phpcs:enable WordPress.Security.NonceVerification.Recommended
}
);
return;
}
// Load the autoloader.
require_once __DIR__ . '/vendor/autoload.php';
if ( ! function_exists( 'blockart' ) ) {
/**
* Returns the main instance of BlockArt to prevent the need to use globals.
*
* @return BlockArt
*/
function blockart() {
return BlockArt::init();
}
}
blockart();