esc_url( admin_url( 'admin-ajax.php' ) ), 'nonce' => wp_create_nonce( 'forumax-wizard-nonce' ), 'fieldRequired' => esc_html__( 'This field is required', 'forumax' ), 'saveFinish' => esc_html__( 'Save & Finish', 'forumax' ), 'continue' => esc_html__( 'Continue', 'forumax' ), 'saving' => esc_html__( 'Saving…', 'forumax' ), 'saveError' => esc_html__( 'Could not save settings. Please try again.', 'forumax' ), ] ); } // Free analytics presentation page assets. if ( forumax_admin_pages( 'analytics' ) && ! defined( 'BBPCPRO_PATH' ) && ! class_exists( '\Forumax_Pro\Admin\Analytics' ) ) { wp_enqueue_style( 'bbpc-admin' ); wp_enqueue_style( 'forumax-analytics-locked', FORUMAX_ADMIN_ASS . 'css/analytics-locked.css', array(), FORUMAX_VERSION ); } // Localize the script with new data $ajax_url = admin_url('admin-ajax.php'); $wpml_current_language = apply_filters('wpml_current_language', null); if (!empty($wpml_current_language)) { $ajax_url = add_query_arg('wpml_lang', $wpml_current_language, $ajax_url); } wp_localize_script( 'jquery', 'forumax_local_object', [ 'ajaxurl' => esc_url($ajax_url), 'create_forum_title' => esc_html__('Enter Forum Title', 'forumax'), 'create_topic_title' => esc_html__('Enter Topic Title', 'forumax'), 'forum_delete_title' => esc_html__('Are you sure to delete?', 'forumax'), 'forum_delete_desc' => esc_html__("This forum will be deleted with all the topics and you won't be able to revert!", 'forumax'), 'topic_delete_desc' => esc_html__("This topic will be deleted and you won't be able to revert!", 'forumax'), 'forumax_assets' => FORUMAX_ASSETS, 'nonce' => wp_create_nonce('bbpc-admin-nonce') ] ); } }