admin_url('admin-ajax.php'))); //Add to cart wp_register_script('abcbiz-add-to-cart', ABCBIZ_Assets . "/js/abcbiz-add-to-cart.js", array('jquery'), 1.0, true); $abcbiz_add_to_cart_nonce = wp_create_nonce('abcbiz_add_to_cart_nonce'); wp_localize_script('abcbiz-add-to-cart', 'acbbiz_add_to_cart', array( 'ajax_url' => admin_url('admin-ajax.php'), 'abcbiz_add_to_cart_nonce' => $abcbiz_add_to_cart_nonce )); } wp_register_script('abcbiz-search-icon', ABCBIZ_Assets . "/js/abcbiz-search-icon.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-wp-menu-js', ABCBIZ_Assets . "/js/abcbiz-wp-menu.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-popup', ABCBIZ_Assets . "/js/abcbiz-popup.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-jquery-appear', ABCBIZ_Assets . "/js/jquery.appear.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-circular-progress', ABCBIZ_Assets . "/js/circular-progress.js", array('jquery'), '1.0', true); wp_register_script('jquery-event-move', ABCBIZ_Assets . "/js/jquery.event.move.js", array('jquery'), '1.0', true); wp_register_script('jquery-twentytwenty', ABCBIZ_Assets . "/js/jquery.twentytwenty.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-back-to-top', ABCBIZ_Assets . "/js/abcbiz-back-to-top.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-skill-bar', ABCBIZ_Assets . "/js/skill-bar.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-counter-up', ABCBIZ_Assets . "/js/abcbiz-counterup.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-wapoints', ABCBIZ_Assets . "/js/waypoints.min.js", array('jquery'), '1.0', true); wp_register_script('abcbiz-circular-skills', ABCBIZ_Assets . "/js/abcbiz-circular-skills.js", array('jquery'), '1.0', true); wp_enqueue_script('abcbiz-elementor-custom', ABCBIZ_Assets . "/js/main.js", array('jquery'), false, true); } } add_action('wp_enqueue_scripts', 'abcbiz_elementor_enqueue'); //add ABCBiz Elementor Category if (!function_exists('abcbiz_elementor_add_widget_categories')) { function abcbiz_elementor_add_widget_categories($elements_manager) { $elements_manager->add_category( 'abcbiz-category', [ 'title' => esc_html__('ABCBiz Multi Elements', 'abcbiz-addons'), 'icon' => 'eicon-kit-plugins', ] ); } } add_action('elementor/elements/categories_registered', 'abcbiz_elementor_add_widget_categories'); //add ABCBiz Elementor WooCommerce Category if (!function_exists('abcbiz_elementor_add_widget_wc_categories')) { function abcbiz_elementor_add_widget_wc_categories($elements_manager) { if (function_exists('is_plugin_active') && is_plugin_active('woocommerce/woocommerce.php')) { $elements_manager->add_category( 'abcbiz-wc-category', [ 'title' => esc_html__('ABCBiz WooCommerce', 'abcbiz-addons'), 'icon' => 'eicon-woocommerce', ] ); } } } add_action('elementor/elements/categories_registered', 'abcbiz_elementor_add_widget_wc_categories'); //Load Editor CSS add_action('elementor/editor/before_enqueue_scripts', function () { wp_enqueue_style('abcbiz-elementor-admin-style', ABCBIZ_Assets . "/css/ele-editor.css"); }); //Get Plugin Info function abcbiz_multi_plugin_info() { // Ensure the function is available if ( ! function_exists( 'get_plugin_data' ) ) { require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); } $plugin_file_path = ABCBIZ_Path . '/abcbiz-addons.php'; if ( file_exists( $plugin_file_path ) ) { $plugin_data = get_plugin_data( $plugin_file_path ); $plugin_info = [ 'Name' => $plugin_data['Name'], 'Version' => $plugin_data['Version'], 'Author' => $plugin_data['Author'], 'PluginURI' => $plugin_data['PluginURI'], 'AuthorURI' => $plugin_data['AuthorURI'], 'Description' => $plugin_data['Description'] ]; } else { $plugin_info = [ 'Name' => esc_html__('Plugin Name Not Found', 'abcbiz-addons'), 'Version' => esc_html__('Plugin Version Not Found', 'abcbiz-addons'), 'Author' => esc_html__('Author Not Found', 'abcbiz-addons'), 'PluginURI' => esc_html__('Plugin URI Not Found', 'abcbiz-addons'), 'AuthorURI' => esc_html__('Author URI Not Found', 'abcbiz-addons'), 'Description' => esc_html__('Description Not Found', 'abcbiz-addons') ]; } return $plugin_info; }