{"id":102977,"date":"2019-04-20T10:48:08","date_gmt":"2019-04-20T10:48:08","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/latest-github-release\/"},"modified":"2022-06-21T11:37:06","modified_gmt":"2022-06-21T11:37:06","slug":"latest-github-release","status":"publish","type":"plugin","link":"https:\/\/tah.wordpress.org\/plugins\/latest-github-release\/","author":12022803,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.1.0","stable_tag":"2.1.0","tested":"6.0.11","requires":"4.9","requires_php":"5.6","requires_plugins":"","header_name":"Latest Github Release","header_author":"Laurence Bahiirwa, James Nylen","header_description":"Automatically add a download link to the latest Github repo release zips with a shortcode like [latest_github_release user=\"Github\" repo=\"years-since\"]","assets_banners_color":"ffffff","last_updated":"2022-06-21 11:37:06","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/omukiguy.com\/","header_plugin_uri":"https:\/\/github.com\/bahiirwa\/latest-github-release","header_author_uri":"https:\/\/omukiguy.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1723,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"1.2.0":{"tag":"1.2.0","author":"laurencebahiirwa","date":"2020-01-26 08:32:39"},"2.0.0":{"tag":"2.0.0","author":"laurencebahiirwa","date":"2020-04-22 15:24:18"},"2.1.0":{"tag":"2.1.0","author":"laurencebahiirwa","date":"2022-06-21 11:37:06"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":2745823,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":2745823,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":2745823,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":2745823,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2.0","2.0.0","2.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2745823,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2745823,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2745823,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2745823,"resolution":"4","location":"assets","locale":""}},"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1673,4977,9260,7343],"plugin_category":[],"plugin_contributors":[142620,145229],"plugin_business_model":[],"class_list":["post-102977","plugin","type-plugin","status-publish","hentry","plugin_tags-github","plugin_tags-latest","plugin_tags-release","plugin_tags-zip","plugin_contributors-jnylen0","plugin_contributors-laurencebahiirwa","plugin_committers-laurencebahiirwa"],"banners":{"banner":"https:\/\/ps.w.org\/latest-github-release\/assets\/banner-772x250.jpg?rev=2745823","banner_2x":"https:\/\/ps.w.org\/latest-github-release\/assets\/banner-1544x500.jpg?rev=2745823","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/latest-github-release\/assets\/icon-128x128.jpg?rev=2745823","icon_2x":"https:\/\/ps.w.org\/latest-github-release\/assets\/icon-256x256.jpg?rev=2745823","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/latest-github-release\/assets\/screenshot-1.png?rev=2745823","caption":""},{"src":"https:\/\/ps.w.org\/latest-github-release\/assets\/screenshot-2.png?rev=2745823","caption":""},{"src":"https:\/\/ps.w.org\/latest-github-release\/assets\/screenshot-3.png?rev=2745823","caption":""},{"src":"https:\/\/ps.w.org\/latest-github-release\/assets\/screenshot-4.png?rev=2745823","caption":""}],"raw_content":"<!--section=description-->\n<p>Automatically add a download link to the latest Github repo release zips with\na shortcode [latest_github_release user=\"github\" repo=\"hub\"]<\/p>\n\n<h3>Usage<\/h3>\n\n<p>Add the shortcode <code>[latest_github_release user=\"github\" repo=\"hub\"]<\/code> to desired post\/page\/widget and save to have the code working.<\/p>\n\n<h3>options<\/h3>\n\n<p>One can add some customization to the shortcode such as<\/p>\n\n<ul>\n<li>Name of the button = <code>[latest_github_release name=\"Desired Name\"]<\/code><\/li>\n<\/ul>\n\n<h3>Use latest_github_release_link filter Hook<\/h3>\n\n<pre><code>`\n<\/code><\/pre>\n\n<p>add_filter( 'latest_github_release_link', 'gmlatest_github_release_link', 10, 3 );<\/p>\n\n<p>function gmlatest_github_release_link( $html, $atts, $zip_url ) {<\/p>\n\n<pre><code>\/\/ Add another class to the &lt;a&gt;.\n$atts['class'] .= ' another-class';\n\n\/\/ Add &lt;h2&gt; around the tag.\n$html = (\n    '&lt;h2&gt;&lt;a href=\"' . esc_attr( $zip_url ) . '\"'\n    . ' class=\"' . esc_attr( $atts['class'] ) . '\"&gt;'\n    . esc_html( $atts['name'] )\n    . '&lt;\/a&gt;&lt;\/h2&gt;'\n);\n\nreturn $html;\n<\/code><\/pre>\n\n<p>}\n    `<\/p>\n\n<p><strong>Note:<\/strong> \n1. Name attribute defaults to the word \"Download\"\n1. Name is usedin combination with the other attribbutes user &amp; repo.<\/p>\n\n<h3>Contribute\/Issues\/Feedback<\/h3>\n\n<p>If you have any feedback, just write an issue. Or fork the code and submit a PR <a href=\"https:\/\/github.com\/bahiirwa\/Latest-Github-Release\">on Github<\/a>.<\/p>\n\n<!--section=changelog-->\n<p>** 2.1.0 **\n- Test for WP 6.0\n- Fix missing $zip_url in filter.<\/p>\n\n<p>** 2.0.0 **\n- Updates the plugin to use static functions and to have code that is re-usable by other plugins.<\/p>\n\n<p>** 1.2.0 **\n- Fix Caching errors.\n- Better docs.\n- Coding style\/consistency fixes.<\/p>\n\n<p>** 1.1.0 **\n- Code improvements.<\/p>\n\n<p>** 1.0.0 **\n- Initial Release.<\/p>","raw_excerpt":"Automatically add a download link to the latest Github repo release zips with a shortcode [latest_github_release user=&quot;github&quot; repo=&quot;hub&quot;]","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/102977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=102977"}],"author":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/laurencebahiirwa"}],"wp:attachment":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=102977"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=102977"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=102977"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=102977"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=102977"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=102977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}