GithubHelp home page GithubHelp logo

edd-hide-download's Introduction

=== EDD Hide Download ===
Contributors: easydigitaldownloads, sumobi, alex.i
Tags: easy digital downloads, digital downloads, e-downloads, edd, hide, e-commerce, ecommerce, hidden, sumobi
Requires at least: 4.0
Tested up to: 5.8
Requires PHP: 5.3
Stable tag: 1.2.10
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Allows a download to be hidden as well as preventing direct access to the download

== Description ==

This plugin requires [Easy Digital Downloads](https://wordpress.org/plugins/easy-digital-downloads/).

It allows you to:

1. Hide a download so it doesn't appear on the custom post type archive page, anywhere where the [downloads] shortcode is being used, or any custom query on a page template
1. Prevent direct access to the download. The browser will redirect the user to the site's homepage.
1. Do a combination of hiding the download and preventing direct access to it

This plugin is extremely useful in the following situations:

1. You've created a product landing page and inserted a buy now button to your product. Since the landing page contains all the required product information, you can hide the product on the rest of your site and even prevent direct access to it.
1. You've added a product (eg support package) that shouldn't sit with your other products you have listed. In this case we can simply hide it from appearing with the other products and insert it where we'd like it to appear using the shortcode.

**Filter example**

Example filter of how you can change the redirect based on the download ID. Copy this function to your child theme's functions.php or custom plugin

    function sumobi_custom_edd_hide_download_redirect( $url ) {
    	// download has ID of 17
		if ( '17' == get_the_ID() ) {
			$url = 'http://easydigitaldownloads.com'; // redirect user to another external URL
		}

		// download has ID of 15
		if( '15' == get_the_ID() ) {
			$url = get_permalink( '8' ); // redirect to another download which has an ID of 8
		}

		// return our new URL
		return $url;
	}
	add_filter( 'edd_hide_download_redirect', 'sumobi_custom_edd_hide_download_redirect' );

Example filter of how you can globally change the redirect. Copy this function to your child theme's functions.php or custom plugin

    function sumobi_custom_edd_hide_download_redirect_url( $url ) {
		$url = get_permalink( '8' ); // redirect to another download, post or page

		return $url;
	}
	add_filter( 'edd_hide_download_redirect', 'sumobi_custom_edd_hide_download_redirect' );

**Extensions for Easy Digital Downloads**

[https://easydigitaldownloads.com/extensions/](https://easydigitaldownloads.com/extensions/?ref=166 "Plugins for Easy Digital Downloads")

== Installation ==

1. Unpack the entire contents of this plugin zip file into your `wp-content/plugins/` folder locally
1. Upload to your site
1. Navigate to `wp-admin/plugins.php` on your site (your WP Admin plugin page)
1. Activate this plugin

OR you can just install it with WordPress by going to Plugins >> Add New >> and type this plugin's name

After activation, a new "Hide Download" section will appear at the bottom of Easy Digital Download's Download Configuration metabox

== Screenshots ==

1. The new options added to the bottom of Easy Digital Download's Download Configuration metabox


== Upgrade Notice ==
= 1.2.10 =
Improve plugin handling for private downloads, access to hidden downloads via REST API.

== Changelog ==

= 1.2.10 =
* Fix: Private downloads now respect the "hide" setting.
* New: Admins can now access hidden downloads via the REST API.
* Dev: Refactor how the plugin is loaded.
* Dev: All class properties are explicitly declared.
* Tweak: Updated plugin author name and URL.

= 1.2.9 =
* New: Added Danish translation.
* Fix: Frontend Submissions Integration: PHP notices when viewing a vendor's store.
* Tweak: Update plugin author name and URI to Sandhills Development, LLC.

= 1.2.8 =
* Fix: Do not hide downloads in API when user with edit_post capability is making API request.

= 1.2.7 =
* Fix: Fatal error if FES was not active.

= 1.2.6 =
* New: Compability with the Front End Submissions extension. When a download is hidden it will remain visible on the vendor's dashboard product page

= 1.2.5 =
* Fix: Plugin became deactivated when EDD was updated

= 1.2.4 =
* Fix: Hidden downloads not being hidden properly on some pages such as the custom post type archive pages

= 1.2.3 =
* Fix: Forums not being shown in bbPress
* Tweak: Moved the plugin's options to EDD's "download settings" metabox

= 1.2.2 =
* Fix: Fatal error when bbPress was not active. Added check for existance of bbPress.

= 1.2.1 =
* Fix: Compatibility with bbPress - props @nphaskins‎

= 1.2 =
* Fix: array merge for post__in - props @StephenCronin
* New: activation check for EDD
* Tweak: Improved localization function

= 1.1.5 =
* New: edd_hide_download_redirect filter for changing the redirection URL for downloads that have "Disable direct access to this download" enabled. Can also change the URL on a per download level
* Fix: "Disable direct access to this download" will now prevent direct access to the download, even when "Hide this download" is off

= 1.1.4 =
* Fix: compatibility issue between EDD Tickets and EDD Hide Download that was causing downloads to not be hidden


= 1.1.3 =
* Fix: Fixed bug where some downloads were not showing

= 1.1.2 =
* Fix: Fixed downloads not showing when using page templates

= 1.1.1 =
* New: Now hides downloads in page templates using custom queries
* Tweak: Modified text in configuration options
* Tweak: Updated .pot file with modified text strings

= 1.1 =
* New: Option for disabling direct access to the download. User will be redirected to homepage. Props alex.i
* Tweak: Updated .pot file with new localized text strings

= 1.0.1 =
* Tweak: Moved to bottom of download configuration metabox and added a title.
* Tweak: Removed unused constants function
* New: edd_hide_download_label filter for changing the checkbox label
* New: edd_hide_download_header filter for changing the title text

= 1.0 =
* Initial release

edd-hide-download's People

Contributors

amdrew avatar ashleyfae avatar brashrebel avatar cklosowski avatar fxbenard avatar pippinsplugins avatar robincornett avatar tobeyadr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.