Šī spraudnis nav atjaunināts vairāk kā divus gadus. Varbūt, tas vairs netiek uzturēts, nesaņemt atbalstu un tam var būt saderības problēmas ar jaunākām WordPress versijām.

EDD Hide Show Download

Apraksts

With this plugin, you can easily hide or show your Easy Digital Downloads product/download from the frontend display with just a click.

This plugin requires 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.
2. Prevent direct access to the download. The browser will redirect the user to the site’s homepage.
3. Do a combination of hiding the download and preventing direct access to it.

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

<?php code(function thsedd_custom_edd_hide_download_redirect( $url ) {
                // download has ID of 32
                if ( '32' == get_the_ID() ) {
                    $url = 'http://easydigitaldownloads.com'; // redirect user to another external URL
                }

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

                // return our new URL
                return $url;
            }
            add_filter( 'edd_thsedd_download_redirect', 'thsedd_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

<?php code(function thsedd_custom_edd_hide_download_redirect( $url ) {
                $url = get_permalink( '12' ); // redirect to another download, post or page

                return $url;
            }
            add_filter( 'edd_thsedd_download_redirect', 'thsedd_custom_edd_hide_download_redirect' );); ?>

Ekrānuzņēmumi

  • The new options added to the bottom of Easy Digital Download’s Download Configuration metabox.

Uzstādīšana

  1. Download the zip file of this plugin.
  2. Upload to your site through WP admin >> Plugins >> Add New >> Upload Plugin >> then chose the zip file of this plugin.
  3. Click Install Now and Activate this plugin

Or, here the fastest way; you can just install it with WordPress by going to Plugins >> Add New >> and type this plugin’s name

After activation, a new “Hide/Show EDD Download” section will appear at the right of Easy Digital Download’s download setting.

BUJ

How to use this plugin?

It’s pretty simple! After you install and activate this plugin, you’ll see a new “Hide Product EDD Download” section at the right of Easy Digital Download’s download setting (when you edit or add new download/product).

Atsauksmes

Par šo spraudni nav atsauksmju.

Autori un izstrādātāji

“EDD Hide Show Download” ir atvērtā pirmkoda programmatūra. Šo spraudni ir veidojuši šādi cilvēki.

Līdzdalībnieki

Tulkot “EDD Hide Show Download&#8221 savā valodā.

Vai jūs interesē attīstība?

Pārlūkojiet kodu, apmeklējiet SVN krātuvi vai abonējiet attīstības žurnālu, ko izveidojis RSS.

Izmaiņu žurnāls

0.0.1

  • Initial release