diff --git a/Functions/Enqueues.php b/Functions/Enqueues.php index d3599ee..8905813 100644 --- a/Functions/Enqueues.php +++ b/Functions/Enqueues.php @@ -2,8 +2,6 @@ namespace Advanced_Multi_Block; -use Advanced_Multi_Block\Plugin_Paths; - if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -18,11 +16,11 @@ public function __construct() { * Enqueues the block assets for the editor */ public function enqueue_block_assets() { - $asset_file = include Plugin_Paths::plugin_path() . 'build/editor-script.asset.php'; + $asset_file = include PLUGIN_DIR . '/build/editor-script.asset.php'; wp_enqueue_script( 'editor-script-js', - Plugin_Paths::plugin_url() . 'build/editor-script.js', + plugin_dir_url( PLUGIN_FILE ) . 'build/editor-script.js', $asset_file['dependencies'], $asset_file['version'], false @@ -33,14 +31,14 @@ public function enqueue_block_assets() { * Enqueues the block assets for the frontend */ public function enqueue_frontend_assets() { - $asset_file = include Plugin_Paths::plugin_path() . 'build/frontend-script.asset.php'; + $asset_file = include PLUGIN_DIR . '/build/frontend-script.asset.php'; wp_enqueue_script( 'frontend-script-js', - Plugin_Paths::plugin_url() . 'build/frontend-script.js', + plugin_dir_url( PLUGIN_FILE ) . 'build/frontend-script.js', $asset_file['dependencies'], $asset_file['version'], true ); } -} \ No newline at end of file +} diff --git a/Functions/Plugin_Paths.php b/Functions/Plugin_Paths.php deleted file mode 100644 index 7876ffd..0000000 --- a/Functions/Plugin_Paths.php +++ /dev/null @@ -1,16 +0,0 @@ - 'wp-dev-blog/refactor-multi-block-plugin', 'pretty_version' => 'dev-trunk', 'version' => 'dev-trunk', - 'reference' => '500112a2822315caeaf450797e0e8471f83e37ad', + 'reference' => 'cf8757abed4a233f92817bdd2c288cfd6143cd3b', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -58,7 +58,7 @@ 'wp-dev-blog/refactor-multi-block-plugin' => array( 'pretty_version' => 'dev-trunk', 'version' => 'dev-trunk', - 'reference' => '500112a2822315caeaf450797e0e8471f83e37ad', + 'reference' => 'cf8757abed4a233f92817bdd2c288cfd6143cd3b', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),