custom_info['pdf_heading']; ?>

Enter a heading and any PDF documents attached will be shown on the page.

custom_info['pdf_heading']; if (!empty($pdf_heading) && $pdfs=$this->get_pdfs()) { $html .= '
'; $html .= "

$pdf_heading

"; $html .= ''; $html .= '
'; } return $html; } function get_pdfs() { $pdfs = get_children( array('post_parent' => $this->post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'application/pdf', 'order' => 'ASC', 'orderby' => 'menu_order ID') ); return $pdfs; } function format_bytes($bytes, $precision = 2) { $units = array('B', 'KB', 'MB', 'GB', 'TB'); $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return round($bytes, $precision) . $units[$pow]; } } ?>