__init(); } /** * Fetch an instance of the class. */ public static function getInstance() { if ( false === self::$singleton ) { self::$singleton = new self(); } return self::$singleton; } /** * Class init * * @return void */ protected function __init() { new RestApi(); new SettingsApi(); new ScriptController(); new BlocksController(); new AdminHooks(); } /** * Get the plugin path. * * @return string */ public function plugin_path() { return untrailingslashit( plugin_dir_path( AI_CONTENT_PLUGIN_FILE ) ); } /** * Get assets URI * * @param string $file File. * * @return string */ public function get_assets_uri( $file ) { $file = ltrim( $file, '/' ); return trailingslashit( AI_CONTENT_PLUGIN_URL . '/assets' ) . $file; } } /** * Function for external use. * * @return dowpAIC */ function dowpAIC() { return dowpAIC::getInstance(); } // Init app. dowpAIC(); }