Automator_Load::initialize_core_automator()


Source Source

File: src/class-automator-load.php

	public function initialize_core_automator() {
		do_action( 'automator_before_init' );

		$classes = apply_filters( 'automator_core_files', array() );

		if ( empty( $classes ) ) {
			return;
		}

		$this->load_traits();

		foreach ( $classes as $class_name => $file ) {
			if ( ! file_exists( $file ) ) {
				continue;
			}
			require $file;
			$class                                 = __NAMESPACE__ . '\\' . $class_name;
			self::$core_class_inits[ $class_name ] = new $class();
		}

		do_action( 'automator_after_init' );
	}