| @@ -294,12 +294,12 @@ | ||
| 294 | 294 | * |
| 295 | 295 | * @return void |
| 296 | 296 | */ |
| 297 | 297 | public function enqueue_scripts() { |
| 298 | - wp_enqueue_style( 'polylang_admin', plugins_url( '/css/build/admin' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array(), POLYLANG_VERSION ); | |
| 299 | - wp_enqueue_style( 'pll-wizard', plugins_url( '/css/build/wizard' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common', 'forms' ), POLYLANG_VERSION ); | |
| 298 | + pll_enqueue_style( 'admin' ); | |
| 299 | + pll_enqueue_style( 'wizard', array( 'dashicons', 'install', 'common', 'forms' ) ); | |
| 300 | 300 | |
| 301 | - $this->styles = array( 'polylang_admin', 'pll-wizard' ); | |
| 301 | + $this->styles = array( 'pll-admin', 'pll-wizard' ); | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | 305 | * Get the suffix to enqueue non minified files in a Debug context |
| @@ -481,9 +481,10 @@ | ||
| 481 | 481 | // The wp-ajax-response and postbox dependencies is useless in wizard steps especially postbox which triggers a javascript error otherwise. |
| 482 | 482 | // To be really loaded the script needs to be passed to the `$steps['languages']['scripts']` array below with the same handle than in `wp_enqueue_script()`. |
| 483 | 483 | wp_enqueue_script( 'pll_settings', plugins_url( '/js/build/settings' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); |
| 484 | 484 | wp_localize_script( 'pll_settings', 'pll_settings', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); |
| 485 | - wp_register_script( 'pll-wizard-languages', plugins_url( '/js/build/languages-step' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-dialog' ), POLYLANG_VERSION, true ); | |
| 485 | + | |
| 486 | + pll_enqueue_script( 'wizard-languages', array( 'jquery', 'jquery-ui-dialog' ), array( 'in_footer' => true ) ); | |
| 486 | 487 | wp_localize_script( |
| 487 | 488 | 'pll-wizard-languages', |
| 488 | 489 | 'pll_wizard_params', |
| 489 | 490 | array( |
| @@ -503,9 +504,9 @@ | ||
| 503 | 504 | 'i18n_dialog_ignore_button' => esc_html__( 'Ignore', 'polylang' ), |
| 504 | 505 | 'i18n_remove_language_icon' => esc_html__( 'Remove this language', 'polylang' ), |
| 505 | 506 | ) |
| 506 | 507 | ); |
| 507 | - wp_enqueue_script( 'pll-wizard-languages' ); | |
| 508 | + | |
| 508 | 509 | wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/build/selectmenu' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common', 'wp-jquery-ui-dialog' ), POLYLANG_VERSION ); |
| 509 | 510 | $steps['languages'] = array( |
| 510 | 511 | 'name' => esc_html__( 'Languages', 'polylang' ), |
| 511 | 512 | 'view' => array( $this, 'display_step_languages' ), |