Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Support for installing as composer package #1025

Merged
merged 1 commit into from
Sep 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions facebook-instant-articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ function show_version_incompatible_warning() {
return;
} else {

$autoloader = require __DIR__ . '/vendor/autoload.php';
$autoloader->add( 'Facebook\\', __DIR__ . '/vendor/facebook/facebook-instant-articles-sdk-php/src' );
$autoloader->add( 'Facebook\\', __DIR__ . '/vendor/facebook/facebook-instant-articles-sdk-extensions-in-php/src' );
if ( ! class_exists( 'Facebook\\Facebook' ) && file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
$autoloader = require __DIR__ . '/vendor/autoload.php';
$autoloader->add( 'Facebook\\', __DIR__ . '/vendor/facebook/facebook-instant-articles-sdk-php/src' );
$autoloader->add( 'Facebook\\', __DIR__ . '/vendor/facebook/facebook-instant-articles-sdk-extensions-in-php/src' );
}

defined( 'ABSPATH' ) || die( 'Shame on you' );

Expand Down