{"id":27995,"date":"2014-06-26T21:07:05","date_gmt":"2014-06-26T21:07:05","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/terms-before-download\/"},"modified":"2025-08-13T19:08:14","modified_gmt":"2025-08-13T19:08:14","slug":"terms-before-download","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/terms-before-download\/","author":7274636,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.5","stable_tag":"trunk","tested":"6.8.5","requires":"3.5","requires_php":"","requires_plugins":null,"header_name":"Terms Before Download","header_author":"Helge Klein","header_description":"","assets_banners_color":"","last_updated":"2025-08-13 19:08:14","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/helgeklein.com\/free-tools\/terms-download\/","header_author_uri":"https:\/\/helgeklein.com","rating":4.7,"author_block_rating":0,"active_installs":70,"downloads":4479,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"hiroprot","date":"2014-06-26 21:32:38"},"1.0.3":{"tag":"1.0.3","author":"hiroprot","date":"2021-09-29 23:09:23"},"1.0.4":{"tag":"1.0.4","author":"hiroprot","date":"2021-10-04 18:00:31"},"1.0.5":{"tag":"1.0.5","author":"hiroprot","date":"2025-08-13 19:08:14"}},"upgrade_notice":{"":"<p>Upgrades are in line with WordPress standards.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":"1","5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.3","1.0.4","1.0.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[568,14076,15415,1901],"plugin_category":[57],"plugin_contributors":[90063],"plugin_business_model":[],"class_list":["post-27995","plugin","type-plugin","status-publish","hentry","plugin_tags-download","plugin_tags-eula","plugin_tags-license","plugin_tags-terms","plugin_category-taxonomy","plugin_contributors-hiroprot","plugin_committers-hiroprot"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/terms-before-download.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Terms Before Download adds a shortcode that can be used instead of HTML anchors to link to downloadable files. If such a link is clicked a popup dialog shows terms and conditions (EULA) which must be accepted for the download to start.<\/p>\n\n<p>The terms and conditions are read from a WordPress page. That way there is only a single place to maintain the terms and they can easily be displayed independently of the plugin.<\/p>\n\n<p>The plugin supports Google Analytics to keep track of the number of downloads. Supported GA scripts: ga.js, analytics.js.<\/p>\n\n<p>An example of the plugin in action can be found here: https:\/\/helgeklein.com\/download\/<\/p>\n\nUsage\n\n<p>Add the shortcode <em>tbd_terms<\/em> once (!) to each page or post where terms need to be displayed and configure the ID of the page that contains the terms. Example:<\/p>\n\n<p>[tbd_terms terms_page_id=5670]<\/p>\n\n<p>The page ID is part of the URL when editing a page in the admin UI. <em>Example: https:\/\/domain.com\/wp-admin\/post.php?post=5670&amp;action=edit<\/em><\/p>\n\n<p>Create a link to a downloadable file like this:<\/p>\n\n<p>[tbd_link url=\\\"URL\\\"]link text[\/tbd_link]<\/p>\n\nParameters\n\n<p>The following parameters can be used with the shortcode <em>tbd_terms<\/em>:<\/p>\n\n<ul>\n<li>terms_page_id: ID of the terms page displayed in the dialog [required] <\/li>\n<li>dialog_title: The title of the dialog to be displayed [optional] <\/li>\n<li>class: CSS class of the div enclosing the dialog content [optional]   <\/li>\n<li>padding: Padding between the dialog frame and the inner content [optional] <\/li>\n<li>width: Width of the dialog [optional] <\/li>\n<li>ok_button_text: Text for the OK button [optional]<\/li>\n<\/ul>\n\n<p>The following parameters can be used with the shortcode <em>tbd_link<\/em>:<\/p>\n\n<ul>\n<li>url: The URL to link to [required]<\/li>\n<li>text: Link text [required if text is not enclosed]<\/li>\n<li>gacategory: Google Analytics Category [optional]<\/li>\n<li>gaaction: Google Analytics Action [optional]<\/li>\n<li>galabel: Google Analytics Label [optional]<\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>Install the plugin directly through the WordPress Admin dashboard.<\/p>\n\n<!--section=changelog-->\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Security fix: the content page is now sanitized before display to prevent XSS attacks.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Bugfix: multiple links on the same page always pointed to the first URL on the page. This was introduced in 1.0.3.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>JavaScript: moved the dialog's initialization from document ready to the link click event (thanks Friendventure)<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Added support for analytics.js. The previous version only supported ga.js. The plugin's code auto-detects which of the two Analytics scripts is in use.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added support for nested shortcodes on the terms page<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Shows a popup dialog with terms and conditions (EULA) that must be accepted before a file can be downloaded","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/27995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=27995"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/hiroprot"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=27995"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=27995"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=27995"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=27995"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=27995"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=27995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}