wp middleware - wordcamp brisbane 2018 · 2. enable the cloud vision api from your gcp project. 3....

12
WP Middleware By Rheinard Korf

Upload: others

Post on 20-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

WP MiddlewareBy Rheinard Korf

Page 2: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Rheinard Korf

Father of three.

Husband of one.

Coder since twelve.

Educator for ten years.

Moodle developer for two.

Drupal developer for two.

WordPress developer for five.

Prefer to code in Go.

See the world in APIs.

Learner for life.

Page 3: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings
Page 4: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Problem

Outdated SDKsPHP Compatibility

No PHP SDKSlow APIs

CORSReinventing the Wheel each time!!!

Page 5: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

MID

DLE

WA

RE

PRO

XY

Powered by WP REST API

Shape incoming requests

Shape outgoing responses

Trusted backend, no CORS!

Improve performance (Cache!)

(Optionally) Import as CPT

Extend existing APIs

Granular endpoint control

Unified approach to APIs… The WordPress Way

Page 6: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Example

Page 7: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Example - Plugin Deactivated

Page 8: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Example - Activated and API Key entered.

Page 9: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Example - Labels by Google Cloud Vision

Page 10: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Live Demo?

Page 11: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Questions / Feedback

Page 12: WP Middleware - WordCamp Brisbane 2018 · 2. Enable the Cloud Vision API from your GCP project. 3. Follow the instructions to create an API key for your GCP project. General Settings

Middleware Proof of Concepthttps://github.com/rheinardkorf

/wp-middleware

Auto Label reference Implementationhttps://github.com/rheinardkorf

/wp-image-auto-label