From c4f130a7d5d5eecf44659ddb3b2e1402991848be Mon Sep 17 00:00:00 2001 From: Deepak Gupta Date: Tue, 6 Aug 2024 22:35:42 +0530 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index bbf1545..e073402 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,35 @@ inside the `define_public_hooks` method of your plugin 6. Once that is installed run `npm run build` +### Update your code via Github + +1. run `composer require wpboilerplate/wpb-updater-checker-github` + +2. Now run `composer update` + +3. Now add +``` +/** + * Check if class exists or not + */ +/** + * For Plugin Update via Github + */ +if ( class_exists( 'WPBoilerplate_Updater_Checker_Github' ) ) { + + $package = array( + 'repo' => 'https://github.com/WPBoilerplate/wordpress-plugin-boilerplate', + 'file_path' => WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_FILE, + 'plugin_name_slug' => WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_NAME_SLUG, + 'release_branch' => 'main' + ); + + new WPBoilerplate_Updater_Checker_Github( $package ); +} +``` +inside the `define_admin_hooks` method of your plugin + + # Composer ### Adding dependency for Custom Plugins