Admin

Admin lets you register scripts and styles for the editor.

...
	"admin" : {
		"editor_styles" : {
			"admin_css" : {
				"src" : "./assets/dist/css/editor.min.css"
			}
		},
		"editor_scripts" : {
			"font-awesome" : {
				"src" : "//kit.fontawesome.com/KIT_ID.js",
				"deps" : [],
				"args" : {
				 	"in_footer" : true
				},
				"data" : {
					"crossorigin" : "anonymous"
				}
			}
		}
	}
...

You may notice the data attribute for scripts. This lets you attach custom attributes to the script tag output, avoiding the need to use the script_loader_tag filter.

Last updated