বৰ্ণনা
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 <a>.
$atts['class'] .= ' another-class';
// Add <h2> around the tag.
$html = (
'<h2><a href="' . esc_attr( $zip_url ) . '"'
. ' class="' . esc_attr( $atts['class'] ) . '">'
. esc_html( $atts['name'] )
. '</a></h2>'
);
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.
স্ক্ৰীনশ্বট
পৰ্য্যালোচনা
এই প্লাগিনৰ বাবে কোনো পৰ্য্যালোচনা নাই।
অৱদানকাৰী আৰু বিকাশকাৰীসকল
“Latest Github Release” হৈছে মুক্ত উৎসৰ ছফ্টৱেৰ। এইসকল লোকে এই প্লাগিনত অৱদান আগবঢ়াইছে।
অৱদানকাৰীসকল“Latest Github Release” 2টা ভাষাত অনুবাদ কৰা হৈছে। অনুবাদকসকলক তেওঁলোকৰ অৱদানৰ বাবে ধন্যবাদ।
আপোনাৰ ভাষাত “Latest Github Release” অনুবাদ কৰক।
বিকাশৰ প্ৰতি আগ্ৰহী?
ক’ড ব্ৰাউজ কৰক, SVN ৰিপজিটৰী চাওক নাইবা RSS-দ্বাৰা বিকাশৰ পঞ্জী ছাবস্ক্ৰাইব কৰক।
সলনি-পঞ্জী
** 2.1.0 **
– Test for WP 6.0
– Fix missing $zip_url in filter.
** 2.0.0 **
– Updates the plugin to use static functions and to have code that is re-usable by other plugins.
** 1.2.0 **
– Fix Caching errors.
– Better docs.
– Coding style/consistency fixes.
** 1.1.0 **
– Code improvements.
** 1.0.0 **
– Initial Release.