Easy Digital Downloads
  • Package
  • Function
  • Tree

Packages

  • EDD
    • Admin
      • Actions
      • Add-ons
      • Dashboard
      • Discounts
      • Downloads
      • Export
      • Notices
      • Pages
      • Payments
      • Reports
      • Settings
      • System
      • Upgrades
      • Upload
      • Welcome
    • Cart
    • Checkout
    • Classes
      • API
      • Fees
      • HTML
      • Roles
      • Session
    • Emails
    • Functions
      • AJAX
      • Compatibility
      • Errors
      • Formatting
      • Install
      • Login
      • Taxes
      • Templates
    • Gateways
    • Logging
    • Payments
    • Shortcodes
    • Widgets

Functions

  • edd_add_download_filters
  • edd_add_download_meta_box
  • edd_download_columns
  • edd_download_load
  • edd_download_meta_box_save
  • edd_downloads_contextual_help
  • edd_metabox_save_check_blank_rows
  • edd_price_field_quick_edit
  • edd_price_save_quick_edit
  • edd_render_disable_button
  • edd_render_download_columns
  • edd_render_download_limit_row
  • edd_render_download_meta_box
  • edd_render_file_row
  • edd_render_files_field
  • edd_render_price_field
  • edd_render_price_row
  • edd_render_product_notes_field
  • edd_render_product_notes_meta_box
  • edd_render_stats_meta_box
  • edd_sanitize_files_save
  • edd_sanitize_price_save
  • edd_sanitize_variable_prices_save
  • edd_save_bulk_edit
  • edd_sort_downloads
  • edd_sortable_download_columns
 1 <?php
 2 /**
 3  * Contextual Help
 4  *
 5  * @package     EDD
 6  * @subpackage  Admin/Downloads
 7  * @copyright   Copyright (c) 2013, Pippin Williamson
 8  * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 9  * @since       1.2.3
10  */
11 
12 // Exit if accessed directly
13 if ( ! defined( 'ABSPATH' ) ) exit;
14 
15 /**
16  * Adds the Contextual Help for the main Downloads page
17  *
18  * @since 1.2.3
19  * @return void
20  */
21 function edd_downloads_contextual_help() {
22     $screen = get_current_screen();
23 
24     if ( $screen->id != 'download' )
25         return;
26 
27     $screen->set_help_sidebar(
28         '<p><strong>' . sprintf( __( 'For more information:', 'edd' ) . '</strong></p>' .
29         '<p>' . sprintf( __( 'Visit the <a href="%s">documentation</a> on the Easy Digital Downloads website.', 'edd' ), esc_url( 'https://easydigitaldownloads.com/documentation/' ) ) ) . '</p>' .
30         '<p>' . sprintf(
31                     __( '<a href="%s">Post an issue</a> on <a href="%s">GitHub</a>. View <a href="%s">extensions</a> or <a href="%s">themes</a>.', 'edd' ),
32                     esc_url( 'https://github.com/pippinsplugins/Easy-Digital-Downloads/issues' ),
33                     esc_url( 'https://github.com/pippinsplugins/Easy-Digital-Downloads' ),
34                     esc_url( 'https://easydigitaldownloads.com/extensions/' ),
35                     esc_url( 'https://easydigitaldownloads.com/themes/' )
36                 ) . '</p>'
37     );
38 
39     $screen->add_help_tab( array(
40         'id'        => 'edd-download-configuration',
41         'title'     => __( 'Download Configuration', 'edd' ),
42         'content'   =>
43             '<p>' . __( '<strong>Pricing Options</strong> - Either define a single fixed price, or enable variable pricing. By enabling variable pricing, multiple download options and prices can be configured.', 'edd' ) . '</p>' .
44 
45             '<p>' . __( '<strong>File Downloads</strong> - Define download file names and their respsective file URL. Multiple files can be assigned to a single price, or variable prices.', 'edd' ) . '</p>' .
46 
47             '<p>' . __( '<strong>File Download Limit</strong> - Define how many times customers are allowed to download their purchased files. Leave at 0 for unlimited. Resending the purchase receipt will permit the customer one additional download if their limit has already been reached.', 'edd' ) . '</p>' .
48 
49             '<p>' . __( '<strong>Button Options</strong> - Disable the automatic output the purchase button. If disabled, no button will be added to the download page unless the <code>[purchase_link]</code> shortcode is used.', 'edd' ) . '</p>'
50     ) );
51 
52     $screen->add_help_tab( array(
53         'id'        => 'edd-product-notes',
54         'title'     => __( 'Product Notes', 'edd' ),
55         'content'   => '<p>' . __( 'Special notes or instructions for the product. These notes will be added to the purchase receipt, and additionaly may be used by some extensions or themes on the frontend.', 'edd' ) . '</p>'
56     ) );
57 
58     $colors = array(
59         'gray', 'pink', 'blue', 'green', 'teal', 'black', 'dark gray', 'orange', 'purple', 'slate'
60     );
61 
62     $screen->add_help_tab( array(
63         'id'        => 'edd-purchase-shortcode',
64         'title'     => __( 'Purchase Shortcode', 'edd' ),
65         'content'   =>
66             '<p>' . __( '<strong>Purchase Shortcode</strong> - If the automatic output of the purchase button has been disabled via the Download Configuration box, a shortcode can be used to output the button or link.', 'edd' ) . '</p>' .
67             '<p><code>[purchase_link id="#" price="1" text="Add to Cart" color="blue"]</code></p>' .
68             '<ul>
69                 <li><strong>id</strong> - ' . __( 'The ID of a specific download to purchase.', 'edd' ) . '</li>
70                 <li><strong>price</strong> - ' . __( 'Whether to show the price on the purchase button. 1 to show the price, 0 to disable it.', 'edd' ) . '</li>
71                 <li><strong>text</strong> - ' . __( 'The text to be displayed on the button or link.', 'edd' ) . '</li>
72                 <li><strong>style</strong> - ' . __( '<em>button</em> | <em>text</em> - The style of the purchase link.', 'edd' ) . '</li>
73                 <li><strong>color</strong> - <em>' . implode( '</em> | <em>', $colors ) . '</em></li>
74                 <li><strong>class</strong> - ' . __( 'One or more custom CSS classes you want applied to the button.', 'edd' ) . '</li>
75             </ul>' .
76             '<p>' . sprintf( __( 'For more information, see <a href="%s">using Shortcodes</a> on the WordPress.org Codex or <a href="%s">Easy Digital Downloads Documentation</a>', 'edd' ), 'http://codex.wordpress.org/Shortcode', 'https://easydigitaldownloads.com/docs/display-purchase-buttons-purchase_link/' ) . '</p>'
77     ) );
78 
79     do_action( 'edd_downloads_contextual_help', $screen );
80 }
81 add_action( 'load-post.php', 'edd_downloads_contextual_help' );
82 add_action( 'load-post-new.php', 'edd_downloads_contextual_help' );
Easy Digital Downloads API documentation generated by ApiGen 2.8.0