Kumi
3b51684b3a
Moved class files into a dedicated 'classes' directory to improve project organization. Updated file paths in functions.php to reflect these changes. This helps maintain a cleaner directory structure and separates core files from auxiliary classes.
24 lines
No EOL
831 B
PHP
24 lines
No EOL
831 B
PHP
<?php
|
|
|
|
require_once get_template_directory() . '/vendor/autoload.php';
|
|
|
|
class PaperPDF extends TCPDF {
|
|
|
|
// Page header
|
|
public function Header() {
|
|
$logo_url = wp_get_attachment_image_url(get_theme_mod('custom_logo'), 'full');
|
|
if ($logo_url) {
|
|
$this->Image($logo_url, 10, 10, 50, '', '', '', 'T', false, 300, '', false, false, 0, false, false, false);
|
|
}
|
|
$this->SetFont('helvetica', 'B', 20);
|
|
$this->Cell(0, 15, get_bloginfo('name'), 0, false, 'C', 0, '', 0, false, 'T', 'M');
|
|
$this->Ln(20);
|
|
}
|
|
|
|
// Page footer
|
|
public function Footer() {
|
|
$this->SetY(-15);
|
|
$this->SetFont('helvetica', 'I', 8);
|
|
$this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
|
|
}
|
|
} |