reaktiv-remote-repo
reaktiv-remote-repo copied to clipboard
How to setup?
I need some help here...
I put this in my plugin:
`if( ! defined( 'MYPLUGIN_UPDATE_URL' ) ) { define( 'MYPLUGIN_UPDATE_URL', 'http://my-plugin.com/plugin-download/' ); }
if ( ! defined( 'MYPLUGIN_ITEM' ) ) { define( 'MYPLUGIN_ITEM', 'My plugin name' ); }
if ( ! defined( 'MYPLUGIN_VERS' ) ) { define( 'MYPLUGIN_VERS', '0.0.1' ); }
if ( ! defined( 'MYPLUGIN_UNIQUE' ) ) { define( 'MYPLUGIN_UNIQUE', 'my-super-plugin' ); } if ( ! class_exists( 'MYPLUGIN_Remote_Updater' ) ) { include( 'lib/MYPLUGIN_Remote_Updater.php' ); }
add_action( 'plugins_loaded', 'myplugin_load_updater' ); function myplugin_load_updater() { if ( ! class_exists( 'MYPLUGIN_Remote_Updater' ) ) { include( 'lib/MYPLUGIN_Remote_Updater.php' ); } }
add_action ( 'admin_init', 'myplugin_auto_updater' ); function myplugin_auto_updater() { $updater = new WAH_Remote_Updater( MYPLUGIN_UPDATE_URL, FILE, array( 'unique' => MYPLUGIN_UNIQUE, 'item' => MYPLUGIN_ITEM, 'version' => MYPLUGIN_VERS, ) ); }`
What is the next step?
thanks