Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: My Extension
- Plugin URI:
- Description:
- Version: 1.0.0
- Author:
- Author URI:
- License: GPL2
- License URI: https://www.gnu.org/licenses/gpl-2.0.html
- Text Domain: myex-my-extension
- Domain Path: /languages
- My Extension is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- any later version.
- My Extension is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with My Extension. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
- */
- if ( ! function_exists( 'myex_initialize_extension' ) ):
- /**
- * Creates the extension's main class instance.
- *
- * @since 1.0.0
- */
- function myex_initialize_extension() {
- require_once plugin_dir_path( __FILE__ ) . 'includes/MyExtension.php';
- }
- add_action( 'divi_extensions_init', 'myex_initialize_extension' );
- endif;
- /**
- * Enqueues non-minified, hot reloaded javascript bundles.
- *
- * @since 3.1
- */
- protected function _enqueue_debug_bundles() {
- // Frontend Bundle
- $site_url = wp_parse_url( get_site_url() );
- $hot_bundle_url = "http://localhost:3000/static/js/frontend-bundle.js";
- wp_enqueue_script( "{$this->name}-frontend-bundle", $hot_bundle_url, $this->_bundle_dependencies['frontend'], $this->version, true );
- if ( et_core_is_fb_enabled() ) {
- // Builder Bundle
- $hot_bundle_url = "http://localhost:3000/static/js/builder-bundle.js";
- wp_enqueue_script( "{$this->name}-builder-bundle", $hot_bundle_url, $this->_bundle_dependencies['builder'], $this->version, true );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement