1: <?php
2:
3: use Xu\Foundation\Foundation;
4:
5: /**
6: * Load xu class that is used when calling static methods.
7: */
8: require_once __DIR__ . '/class-xu.php';
9:
10: /**
11: * Get a component or return the xu instance.
12: *
13: * @param string $component
14: * @param mixed $arguments
15: *
16: * @return \Xu\Foundation\Foundation
17: */
18: function xu( $component = '', $arguments = [] ) {
19: if ( is_string( $component ) && ! empty( $component ) ) {
20: return Foundation::get_instance()->component( $component, $arguments );
21: }
22:
23: return Foundation::get_instance();
24: }
25: