Scripts Manager

Include Scripts and Styles in Oxygen websites with Swiss Knife. Crafted for Oxygen Builder with security in mind. Upload scripts and styles are enabled only when you need them.

Is disabled by default as all Swiss Knife features. To Enable Font Manager open the Swiss Knife Features page under Swiss Knife > Features. Activate Enable Scripts Manager feature, Hit Save. After you saved preferences you need to refresh the page to see Scripts Managers Page.

Add Script or Style

Open Swiss Knife > Scripts Manager > + Add New Script

Hit + Add New Script button

screenshot 2021 03 19 at 17.55.50 2
screenshot 2021 03 19 at 18.04.06
Example of Script/Style card with all available settings

Script name

This field is used for two reasons. One is to help you find script in scripts list. Second is to generate enqueue code.

Script Type

Choose option is between JavaScript or CSS.

screenshot 2021 03 19 at 18.31.45

If your file have extension .js select JavaScript and if your file have extension .css use CSS from drop down

screenshot 2021 03 19 at 18.27.17

Script Location

screenshot 2021 03 19 at 18.31.36

Best practice is to register .CSS in header (before body) and .JavaScript in the footer (after body).

Reason behind it is that you want you elements inside body to be styled with CSS as soon as possible. JavaScript you want in footer as you probably want that page is rendered first before user start interacting what page.

Include Type

screenshot 2021 03 19 at 18.42.17

Enqueue

With this option, the script will be included on every page of your website. This is useful if you are including CSS such as framework or main theme JavaScript and there you have a toggle for navigation and you will definitely need that your navigation to work on every page.

Register

When you register a script, it will be ready for the website but it will not be triggered and displayed on the website until you tell your script on the page or the template.

To do that you can copy the trigger code in two locations. You can find the copy option close to the edit button when the card is in the collapsed state. When the card is in the expanded state, you will find “Click to copy” text in a grey block.

screenshot 2021 03 19 at 19.01.10

The copied code can now be pasted inside a code block on the Pages or Template Pages where you want that script to be triggered.

screenshot 2021 03 19 at 19.05.19

Note: you can paste it even in reusable element. If you have the same wp_enqueue_script('script_name'); several times on the page, it will still call that script only once without any errors.

Frontend Only

screenshot 2021 03 19 at 19.07.19

This option is for scripts that you don't need inside Oxygen Builder and only on frond-end. A typical use case is when you don't want animation scripts inside oxygen, but you need your Frameworks CSS to be rendered everywhere.

Upload file

screenshot 2021 03 19 at 19.09.09

In this field, it’s possible to paste scripts and styles that are either self-hosted or from a CDN. Paste CDN script inside input field or use WordPress media uploader by selection arrow up.

uplaod scipt

Allow Scripts and Styles upload

By default, uploading of Scripts and Styles in WordPress is not allowed and you will get an error if you try to do so.

screenshot 2021 03 19 at 19.25.46

You need to go to Swiss Knife features and Allow CSS/JS Uploads. For best practices and security reason use this option only in local setup or enable it only during scripts upload. Disable it after you finished process.

Unlimited websites

Lifetime support

Documentation and support

More features comming soon

One price,
Lifetime updates and support

$

40

Price will rise as we add more features
Payments are secured with Stripe and PayPal

30-Day Money-Back Guarantee

Probably you will never need this with our owesome products but here it is just in case. If you aren't completely satisfied within 30 days of purchase, you're more than welcome to get a full refund!
Contact support
Copyright © 2020 dplugins LLC
All Rights Reserved.
Privacy Policy

Newsletter

Be the first one to know the news!