| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Register WP VR's custom elements before Breakdance scans element locations. |
| 9 |
*/ |
| 10 |
add_action( |
| 11 |
'breakdance_loaded', |
| 12 |
function () { |
| 13 |
if ( |
| 14 |
! function_exists( '\Breakdance\ElementStudio\registerSaveLocation' ) |
| 15 |
|| ! function_exists( '\Breakdance\Util\getDirectoryPathRelativeToPluginFolder' ) |
| 16 |
) { |
| 17 |
return; |
| 18 |
} |
| 19 |
|
| 20 |
\Breakdance\ElementStudio\registerSaveLocation( |
| 21 |
\Breakdance\Util\getDirectoryPathRelativeToPluginFolder( __DIR__ ) . '/elements', |
| 22 |
'WpvrElement\\Breakdance', |
| 23 |
'element', |
| 24 |
'WP VR', |
| 25 |
true, |
| 26 |
true |
| 27 |
); |
| 28 |
}, |
| 29 |
5 |
| 30 |
); |
| 31 |
|