Home Plugins latest github release
Latest Github Release logo

Latest Github Release

by laurencebahiirwa on WordPress.org

Automatically add a download link to the latest Github repo release zips with a shortcode [latest_github_release user="github" repo="hub"]

(0)
Latest Github Release - Screenshot 1

Automatically add a download link to the latest Github repo release zips with
a shortcode [latest_github_release user=”github” repo=”hub”]

Usage

Add the shortcode [latest_github_release user="github" repo="hub"] to desired post/page/widget and save to have the code working.

options

One can add some customization to the shortcode such as

  • Name of the button = [latest_github_release name="Desired Name"]

Use latest_github_release_link filter Hook

`

add_filter( ‘latest_github_release_link’, ‘gmlatest_github_release_link’, 10, 3 );

function gmlatest_github_release_link( $html, $atts, $zip_url ) {

// Add another class to the .
$atts['class'] .= ' another-class';

// Add 

around the tag. $html = ( '

' . esc_html( $atts['name'] ) . '

' ); return $html;

}
`

Note:
1. Name attribute defaults to the word “Download”
1. Name is usedin combination with the other attribbutes user & repo.

Contribute/Issues/Feedback

If you have any feedback, just write an issue. Or fork the code and submit a PR on Github.

Active installations0+
Weekly downloads
7-30.00%
Version2.1.0
Last updated6/21/2022
WordPress version4.9
Tested up to6.0.9
PHP version5.6
Tags
Githublatestreleasezip