Skip to content

Commit

Permalink
fix(autoloader): Fix vendor autoload
Browse files Browse the repository at this point in the history
enhance(readme): Add gif of usage
  • Loading branch information
Log1x committed Aug 4, 2020
1 parent fac92e7 commit 2f5d6c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

A real ACF phone number field powered by [libphonenumber](https://github.com/giggsey/libphonenumber-for-php) and [intl-tel-input](https://github.com/jackocnr/intl-tel-input)

![Screenshot](https://i.imgur.com/JlMFJnP.png)
![Screenshot](https://i.imgur.com/ILmsBHr.gif)

## Requirements

Expand All @@ -22,10 +22,6 @@ Install via Composer:
$ composer require log1x/acf-phone-number
```

### Manual

Download the release `.zip` and install into `wp-content/plugins`.

## Usage

Pretty straight forward usage. No default settings on the field since it's smart.
Expand Down
10 changes: 6 additions & 4 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
* Plugin Name: Advanced Custom Fields: Phone Number
* Plugin URI: https://github.com/log1x/acf-phone-number
* Description: A real ACF phone number field.
* Version: 1.0.0
* Version: 1.0.1
* Author: Brandon Nifong
* Author URI: https://github.com/log1x
*/

namespace Log1x\AcfPhoneNumber;

if (! file_exists($composer = __DIR__ . '/vendor/autoload.php')) {
return;
if (file_exists($composer = __DIR__ . '/vendor/autoload.php')) {
require $composer;
}

require $composer;
if (! class_exists('\libphonenumber\PhoneNumberUtil')) {
return;
}

add_filter('after_setup_theme', new class {
/**
Expand Down

0 comments on commit 2f5d6c9

Please sign in to comment.