wp-cli and plugin development with future and past compatibility (Word Camp Prague)

49
wp-cli a Vývoj pluginů se zpětnou i budoucí kompatibilitou

Transcript of wp-cli and plugin development with future and past compatibility (Word Camp Prague)

wp-cli a

Vývoj pluginů se zpětnou i budoucí kompatibilitou

wp-cli and

Plugin development with future and past compatibility

@andreascreten

madewithlove

Addapp

wp-cli

Some history

wp cache flush

2.5 years

Not really

Disclaimer All code in this presentation in untested pseudo code

• Avoid $wpdb

• Prefix option names

• Sandbox everything

• Use correct filters

• Use the install and de-install hook (clean up your crap)

• Write proper documentation

• Put it on Github

• Caching

Plugin manifesto• Sandboxed plugin environment

• Namespaces

• Predefined documented variables

• Proper hooks usage

• Easy compatibility checks

• wp-cli integration

Automattic\Cache

W3TC\Cache

WPSuperCache\Cache

My\Cache

Ideal world

• Standardised interfaces

• New hook model

SO?

Proper caching

Anyone?

[email protected]

Want to help things to be madewithlove?