home_url(), 'i18n' => [ 'rollback_confirm' => __( 'Are you sure you want to reinstall previous version?', 'elementor' ), 'rollback_to_previous_version' => __( 'Rollback to Previous Version', 'elementor' ), 'yes' => __( 'Yes', 'elementor' ), 'cancel' => __( 'Cancel', 'elementor' ), ], ] ); wp_enqueue_script( 'elementor-admin-app' ); if ( in_array( get_current_screen()->id, [ 'plugins', 'plugins-network' ] ) ) { add_action( 'admin_footer', [ $this, 'print_deactivate_feedback_dialog' ] ); $this->enqueue_feedback_dialog_scripts(); } } /** * Enqueue admin styles. * * Registers all the admin styles and enqueues them. * * Fired by `admin_enqueue_scripts` action. * * @since 1.0.0 * @access public */ public function enqueue_styles() { $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; $direction_suffix = is_rtl() ? '-rtl' : ''; wp_register_style( 'elementor-icons', ELEMENTOR_ASSETS_URL . 'lib/eicons/css/elementor-icons' . $suffix . '.css', [], ELEMENTOR_VERSION ); wp_register_style( 'elementor-admin-app', ELEMENTOR_ASSETS_URL . 'css/admin' . $direction_suffix . $suffix . '.css', [ 'elementor-icons', ], ELEMENTOR_VERSION ); wp_enqueue_style( 'elementor-admin-app' ); // It's for upgrade notice. // TODO: enqueue this just if needed. add_thickbox(); } /** * Print switch mode button. * * Adds a switch button in post edit screen (which has cpt support). To allow * the user to switch from the native WordPress editor to Elementor builder. * * Fired by `edit_form_after_title` action. * * @since 1.0.0 * @access public * * @param \WP_Post $post The current post object. */ public function print_switch_mode_button( $post ) { if ( ! User::is_current_user_can_edit( $post->ID ) ) { return; } wp_nonce_field( basename( __FILE__ ), '_elementor_edit_mode_nonce' ); ?>