Rework block init

This commit is contained in:
Justin Foell
2020-02-28 13:39:42 -06:00
parent 2dbbc19511
commit 5f9849214a
5 changed files with 95 additions and 75 deletions
-5
View File
@@ -42,11 +42,6 @@ require_once WPSTRAVA_PLUGIN_DIR . 'src/autoload.php';
function wpstrava_plugin_loaded() {
// Load language files.
load_plugin_textdomain( 'wp-strava', false, WPSTRAVA_PLUGIN_DIR . 'lang/' );
// Include Gutenberg blocks.
if ( function_exists( 'register_block_type' ) ) {
include WPSTRAVA_PLUGIN_DIR . 'src/blocks.php';
}
}
add_action( 'plugins_loaded', 'wpstrava_plugin_loaded' );