Skip to content

Commit

Permalink
PhP8.3 /jQuery3 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Jun 6, 2024
1 parent 95a4e02 commit 02f6d8b
Show file tree
Hide file tree
Showing 7 changed files with 1,112 additions and 7 deletions.
2 changes: 1 addition & 1 deletion includes/admin/class-mp-products-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function parse_category_filter_query( $query ) {
*/
public function enqueue_styles_scripts() {
wp_enqueue_style( 'colorbox', mp_plugin_url( 'includes/admin/ui/colorbox/colorbox.css' ), false, '1.5.10' );
wp_enqueue_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox-min.js' ), false, '1.5.10' );
wp_enqueue_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox.js' ), false, '1.5.10' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/class-mp-shortcode-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ public function enqueue_styles_scripts() {
|| ( isset( $screenpage->post_type ) && ( $screenpage->post_type == "product" || $screenpage->post_type == "incsub_event" || $screenpage->post_type == "post" || $screenpage->post_type == "mp_order" || $screenpage->post_type == "mp_coupon" || $screenpage->post_type == "page") ) ) {

wp_enqueue_style( 'colorbox', mp_plugin_url( 'includes/admin/ui/colorbox/colorbox.css' ), false, MP_VERSION );
wp_enqueue_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox-min.js' ), false, MP_VERSION );
wp_enqueue_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox.js' ), false, MP_VERSION );

wp_enqueue_style( 'mp-select2', mp_plugin_url( 'ui/select2/select2.css' ), false, MP_VERSION );
wp_enqueue_script( 'mp-select2', mp_plugin_url( 'ui/select2/select2.js' ), false, MP_VERSION );
Expand Down
2 changes: 1 addition & 1 deletion includes/common/class-mp-cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ public function enqueue_styles_scripts() {
wp_register_script( 'jquery-validate', mp_plugin_url( 'ui/js/jquery.validate.min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'jquery-validate-methods', mp_plugin_url( 'ui/js/jquery.validate.methods.min.js' ), array( 'jquery-validate' ), MP_VERSION, true );
wp_register_script( 'ajaxq', mp_plugin_url( 'ui/js/ajaxq.min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox-min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox.js' ), array( 'jquery' ), MP_VERSION, true );
wp_enqueue_script( 'mp-cart', mp_plugin_url( 'ui/js/mp-cart.js' ), array(
'ajaxq',
'colorbox',
Expand Down
2 changes: 1 addition & 1 deletion includes/public/class-mp-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function frontend_scripts() {
// JS
wp_register_script( 'hover-intent', mp_plugin_url( 'ui/js/hoverintent.min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'mp-select2', mp_plugin_url( 'ui/select2/select2.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox-min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox.js' ), array( 'jquery' ), MP_VERSION, true );
wp_enqueue_script( 'mp-frontend', mp_plugin_url( 'ui/js/frontend.js' ), array(
'jquery-ui-tooltip',
'colorbox',
Expand Down
4 changes: 2 additions & 2 deletions includes/public/class-mp-short-codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function shortcodes_frontend_styles_scripts() {
// JS.
wp_register_script( 'hover-intent', mp_plugin_url( 'ui/js/hoverintent.min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'mp-select2', mp_plugin_url( 'ui/select2/select2.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox-min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox.js' ), array( 'jquery' ), MP_VERSION, true );
wp_enqueue_script( 'mp-frontend', mp_plugin_url( 'ui/js/frontend.js' ), array( 'jquery-ui-tooltip', 'colorbox', 'hover-intent', 'mp-select2', 'jquery-validate' ), MP_VERSION, true );

$grid_with_js = apply_filters('mp-do_grid_with_js', true);
Expand Down Expand Up @@ -150,7 +150,7 @@ public function shortcodes_frontend_styles_scripts() {
wp_register_script( 'jquery-validate', mp_plugin_url( 'ui/js/jquery.validate.min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'jquery-validate-methods', mp_plugin_url( 'ui/js/jquery.validate.methods.min.js' ), array( 'jquery-validate' ), MP_VERSION, true );
wp_register_script( 'ajaxq', mp_plugin_url( 'ui/js/ajaxq.min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox-min.js' ), array( 'jquery' ), MP_VERSION, true );
wp_register_script( 'colorbox', mp_plugin_url( 'ui/js/jquery.colorbox.js' ), array( 'jquery' ), MP_VERSION, true );
wp_enqueue_script( 'mp-cart', mp_plugin_url( 'ui/js/mp-cart.js' ), array( 'ajaxq', 'colorbox', 'jquery-validate' ), MP_VERSION, true );

// Localize scripts
Expand Down
2 changes: 1 addition & 1 deletion ui/js/jquery.colorbox-min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 02f6d8b

Please sign in to comment.