reaktiv-remote-repo icon indicating copy to clipboard operation
reaktiv-remote-repo copied to clipboard

How to setup?

Open vol4ikman opened this issue 7 years ago • 8 comments

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

vol4ikman avatar Apr 03 '17 18:04 vol4ikman