File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Gravity Perks // File Upload Pro // Deregister Vue as a Dependency
4+ * https://gravitywiz.com/documentation/gravity-forms-file-upload-pro/
5+ *
6+ * File Upload Pro utilizes Vue as the backing framework for its JavaScript
7+ * on both the frontend and in the form editor. In the event that File Upload Pro’s
8+ * bundled version of Vue is conflicting with another registered version of Vue,
9+ * it can be deregistered using the following snippet.
10+ */
11+ add_filter ( 'gpfup_scripts ' , function ( $ scripts ) {
12+ foreach ( $ scripts as &$ script ) {
13+ if ( $ script ['handle ' ] !== 'gp-file-upload-pro ' ) {
14+ continue ;
15+ }
16+
17+ $ script ['deps ' ] = array_diff ( $ script ['deps ' ], array ( 'gravityperks-vue-2 ' ) );
18+ }
19+
20+ return $ scripts ;
21+ } );
You can’t perform that action at this time.
0 commit comments