PHP code example of webdados / wp-github-updates

1. Go to this page and download the library: Download webdados/wp-github-updates library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webdados / wp-github-updates example snippets




new \Webdados\GitHubUpdates\Updater(
	array(
		'repository'    => 'https://github.com/acme/acme-plugin',
		'file'          => __FILE__,
		'slug'          => 'acme-plugin',
		'name'          => 'The Acme plugin',
		'token_option'  => 'acme_github_token',
		'settings_url'  => 'admin.php?page=acme-settings',
		'settings_name' => 'Acme settings',
	)
);

'token' => function () {
	return defined( 'ACME_GITHUB_TOKEN' ) ? ACME_GITHUB_TOKEN : '';
},

'prereleases' => 'production' !== wp_get_environment_type(),