edd_ajax_get_download_title

Get Download Title via AJAX (used only in WordPress Admin).

Description

edd_ajax_get_download_title(); 

Usage

  1. if ( !function_exists( 'edd_ajax_get_download_title' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/ajax-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = edd_ajax_get_download_title(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/ajax-functions.php  
  1. function edd_ajax_get_download_title() { 
  2. if ( isset( $_POST['download_id'] ) ) { 
  3. $title = get_the_title( $_POST['download_id'] ); 
  4. if ( $title ) { 
  5. echo $title; 
  6. } else { 
  7. echo 'fail'; 
  8. edd_die();