nce' ), ); wp_localize_script( 'woolentor-widgets-scripts', 'woolentor_addons', $localizeargs ); // For Admin if( is_admin() ){ $datalocalize = array( 'nonce' => wp_create_nonce( 'woolentor_save_opt_nonce' ), 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'message'=>[ 'btntxt' => esc_html__( 'Save Changes', 'woolentor' ), 'loading' => esc_html__( 'Saving...', 'woolentor' ), 'success' => esc_html__( 'Saved All Data', 'woolentor' ), 'yes' => esc_html__( 'Yes', 'woolentor' ), 'cancel' => esc_html__( 'Cancel', 'woolentor' ), 'sure' => esc_html__( 'Are you sure?', 'woolentor' ), 'reseting'=> esc_html__( 'Resetting...', 'woolentor' ), 'reseted' => esc_html__( 'Reset All Settings', 'woolentor' ), ], 'option_data' => [], ); wp_localize_script( 'woolentor-admin-main', 'WOOLENTOR_ADMIN', $datalocalize ); //Localize Scripts For template Library $current_user = wp_get_current_user(); $localize_data = [ 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'woolentor_template_nonce' ), 'adminURL' => admin_url(), 'elementorURL' => admin_url( 'edit.php?post_type=elementor_library' ), 'version' => WOOLENTOR_VERSION, 'pluginURL' => plugin_dir_url( __FILE__ ), 'alldata' => !empty( base::$template_info['templates'] ) ? base::$template_info['templates'] : array(), 'prolink' => 'https://woolentor.com/pricing/', 'prolabel' => esc_html__( 'Pro', 'woolentor' ), 'loadingimg' => WOOLENTOR_ADDONS_PL_URL . 'includes/admin/assets/images/loading.gif', 'message' =>[ 'packagedesc'=> esc_html__( 'in this package', 'woolentor' ), 'allload' => esc_html__( 'All Items have been Loaded', 'woolentor' ), 'notfound' => esc_html__( 'Nothing Found', 'woolentor' ), ], 'buttontxt' =>[ 'tmplibrary' => esc_html__( 'Import to Library', 'woolentor' ), 'tmppage' => esc_html__( 'Import to Page', 'woolentor' ), 'tmpbuilder' => esc_html__( 'Import to Builder', 'woolentor' ), 'import' => esc_html__( 'Import', 'woolentor' ), 'buynow' => esc_html__( 'Buy Now', 'woolentor' ), 'preview' => esc_html__( 'Preview', 'woolentor' ), 'installing' => esc_html__( 'Installing..', 'woolentor' ), 'activating' => esc_html__( 'Activating..', 'woolentor' ), 'active' => esc_html__( 'Active', 'woolentor' ), ], 'user' => [ 'email' => $current_user->user_email, ], ]; wp_localize_script( 'woolentor-templates', 'WLTM', $localize_data ); wp_localize_script( 'woolentor-install-manager', 'WLIM', $localize_data ); } } /** * [enqueue_frontend_scripts Load frontend scripts] * @return [void] */ public function enqueue_frontend_scripts() { $current_theme = wp_get_theme( 'oceanwp' ); // CSS File if ( $current_theme->exists() ){ wp_enqueue_style( 'font-awesome-four' ); }else{ if( wp_style_is( 'font-awesome', 'registered' ) ){ wp_enqueue_style( 'font-awesome' ); }else{ wp_enqueue_style( 'font-awesome-four' ); } } wp_enqueue_style( 'simple-line-icons-wl' ); wp_enqueue_style( 'htflexboxgrid' ); wp_enqueue_style( 'slick' ); wp_enqueue_style( 'woolentor-widgets' ); // If RTL if ( is_rtl() ) { wp_enqueue_style( 'woolentor-widgets-rtl' ); } } } Assets_Management::instance();