| @@ -282,10 +282,10 @@ | ||
| 282 | 282 | * |
| 283 | 283 | * @return void |
| 284 | 284 | */ |
| 285 | 285 | public function enqueue_scripts() { |
| 286 | - wp_enqueue_style( 'polylang_admin', plugins_url( '/css/build/admin' . $this->get_suffix() . '.css', POLYLANG_BASENAME ), array(), POLYLANG_VERSION ); | |
| 287 | - wp_enqueue_style( 'pll-wizard', plugins_url( '/css/build/wizard' . $this->get_suffix() . '.css', POLYLANG_BASENAME ), array( 'dashicons', 'install', 'common', 'forms' ), POLYLANG_VERSION ); | |
| 286 | + wp_enqueue_style( 'polylang_admin', plugins_url( '/css/build/admin' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array(), POLYLANG_VERSION ); | |
| 287 | + wp_enqueue_style( 'pll-wizard', plugins_url( '/css/build/wizard' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common', 'forms' ), POLYLANG_VERSION ); | |
| 288 | 288 | |
| 289 | 289 | $this->styles = array( 'polylang_admin', 'pll-wizard' ); |
| 290 | 290 | } |
| 291 | 291 | |
| @@ -366,9 +366,9 @@ | ||
| 366 | 366 | add_action( 'wp_ajax_pll_deactivate_license', array( $this, 'deactivate_license' ) ); |
| 367 | 367 | |
| 368 | 368 | // Be careful pll_admin script is enqueued here without depedency except jquery because only code useful for deactivate license button is needed. |
| 369 | 369 | // To be really loaded the script need to be passed to the $steps['licenses']['scripts'] array below with the same handle than in wp_enqueue_script(). |
| 370 | - wp_enqueue_script( 'pll_admin', plugins_url( '/js/build/admin' . $this->get_suffix() . '.js', POLYLANG_BASENAME ), array( 'jquery' ), POLYLANG_VERSION, true ); | |
| 370 | + wp_enqueue_script( 'pll_admin', plugins_url( '/js/build/admin' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery' ), POLYLANG_VERSION, true ); | |
| 371 | 371 | wp_localize_script( 'pll_admin', 'pll_admin', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); |
| 372 | 372 | |
| 373 | 373 | if ( $this->is_licenses_step_displayable() ) { |
| 374 | 374 | $steps['licenses'] = array( |
| @@ -467,11 +467,11 @@ | ||
| 467 | 467 | public function add_step_languages( $steps ) { |
| 468 | 468 | wp_deregister_script( 'pll_admin' ); // Deregister after the licenses step enqueue to update jquery-ui-selectmenu dependency. |
| 469 | 469 | // The wp-ajax-response and postbox dependencies is useless in wizard steps espacially postbox which triggers a javascript error otherwise. |
| 470 | 470 | // To be really loaded the script need to be passed to the $steps['languages']['scripts'] array below with the same handle than in wp_enqueue_script(). |
| 471 | - wp_enqueue_script( 'pll_admin', plugins_url( '/js/build/admin' . $this->get_suffix() . '.js', POLYLANG_BASENAME ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); | |
| 471 | + wp_enqueue_script( 'pll_admin', plugins_url( '/js/build/admin' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); | |
| 472 | 472 | wp_localize_script( 'pll_admin', 'pll_admin', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); |
| 473 | - wp_register_script( 'pll-wizard-languages', plugins_url( '/js/build/languages-step' . $this->get_suffix() . '.js', POLYLANG_BASENAME ), array( 'jquery', 'jquery-ui-dialog' ), POLYLANG_VERSION, true ); | |
| 473 | + 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 ); | |
| 474 | 474 | wp_localize_script( |
| 475 | 475 | 'pll-wizard-languages', |
| 476 | 476 | 'pll_wizard_params', |
| 477 | 477 | array( |
| @@ -492,9 +492,9 @@ | ||
| 492 | 492 | 'i18n_remove_language_icon' => esc_html__( 'Remove this language', 'polylang' ), |
| 493 | 493 | ) |
| 494 | 494 | ); |
| 495 | 495 | wp_enqueue_script( 'pll-wizard-languages' ); |
| 496 | - wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/build/selectmenu' . $this->get_suffix() . '.css', POLYLANG_BASENAME ), array( 'dashicons', 'install', 'common', 'wp-jquery-ui-dialog' ), POLYLANG_VERSION ); | |
| 496 | + 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 ); | |
| 497 | 497 | $steps['languages'] = array( |
| 498 | 498 | 'name' => esc_html__( 'Languages', 'polylang' ), |
| 499 | 499 | 'view' => array( $this, 'display_step_languages' ), |
| 500 | 500 | 'handler' => array( $this, 'save_step_languages' ), |
| @@ -658,11 +658,11 @@ | ||
| 658 | 658 | public function add_step_untranslated_contents( $steps ) { |
| 659 | 659 | if ( ! $this->model->get_languages_list() || $this->model->get_objects_with_no_lang( 1 ) ) { |
| 660 | 660 | // Even if pll_admin is already enqueued with the same dependencies by the languages step, it is interesting to keep that it's also useful for the untranslated-contents step. |
| 661 | 661 | // To be really loaded the script need to be passed to the $steps['untranslated-contents']['scripts'] array below with the same handle than in wp_enqueue_script(). |
| 662 | - wp_enqueue_script( 'pll_admin', plugins_url( '/js/build/admin' . $this->get_suffix() . '.js', POLYLANG_BASENAME ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); | |
| 662 | + wp_enqueue_script( 'pll_admin', plugins_url( '/js/build/admin' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); | |
| 663 | 663 | wp_localize_script( 'pll_admin', 'pll_admin', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); |
| 664 | - wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/build/selectmenu' . $this->get_suffix() . '.css', POLYLANG_BASENAME ), array( 'dashicons', 'install', 'common' ), POLYLANG_VERSION ); | |
| 664 | + wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/build/selectmenu' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common' ), POLYLANG_VERSION ); | |
| 665 | 665 | $steps['untranslated-contents'] = array( |
| 666 | 666 | 'name' => esc_html__( 'Content', 'polylang' ), |
| 667 | 667 | 'view' => array( $this, 'display_step_untranslated_contents' ), |
| 668 | 668 | 'handler' => array( $this, 'save_step_untranslated_contents' ), |