Page footer

Used internally by FPDF
6603
public function Footer()
    {
        $this->SetY(-15);
        $this->billetSetFont('footer');
        $this->Cell(88.5, 5, $this->PageNo() . " / $this->AliasNbPages");
        $this->Cell(88.5, 5, date('Y-m-d H:i:s O'), 0, 0, 'R');
    }
1093042
public function renderFooter()
    {
        if (!$this->isAddButtonPositionFooter()) {
            return '';
        }

        $cells = [];
        $cells[] = Html::tag('td', '&nbsp;');
        $cells[] = Html::tag('td', $this->renderAddButton(), [
            'class' => 'list-cell__button'
        ]);

        return Html::tag('tfoot', Html::tag('tr', implode("\n", $cells)));
    }
1329066
private function _writeFooter()
	{
		$record  = 0x0015;			   // Record identifier

		/* removing for now
		// need to fix character count (multibyte!)
		if (strlen($this->_phpSheet->getHeaderFooter()->getOddFooter()) <= 255) {
			$str = $this->_phpSheet->getHeaderFooter()->getOddFooter();
		} else {
			$str = '';
		}
		*/

		$recordData = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($this->_phpSheet->getHeaderFooter()->getOddFooter());
		$length = strlen($recordData);

		$header	= pack("vv", $record, $length);

		$this->_append($header . $recordData);
	}
1223166
public function registerPageMargins(): PdfInterface
    {
        $mpdf = $this->mpdf;

        /* Set the margins and page current page width */
        $mpdf->SetLeftMargin($this->marginLeft);
        $mpdf->SetTopMargin($this->marginTop);
        $mpdf->SetRightMargin($this->marginRight);
        $mpdf->SetAutoPageBreak(true, $this->marginBottom);
        $mpdf->margin_header = $this->marginHeader;
        $mpdf->margin_footer = $this->marginFooter;
        $mpdf->orig_lMargin = $mpdf->DeflMargin = $mpdf->lMargin = $this->marginLeft;
        $mpdf->orig_tMargin = $mpdf->tMargin = $this->marginTop;
        $mpdf->orig_rMargin = $mpdf->DefrMargin = $mpdf->rMargin = $this->marginRight;
        $mpdf->orig_bMargin = $mpdf->bMargin = $this->marginBottom;
        $mpdf->orig_hMargin = $mpdf->margin_header = $this->marginHeader;
        $mpdf->orig_fMargin = $mpdf->margin_footer = $this->marginFooter;
        $mpdf->pgwidth = $mpdf->w - $mpdf->lMargin - $mpdf->rMargin;

        return $this;
    }
519159
public function footer()
    {
        $this->output->write($this->color('success', sprintf("\n  %d passing", $this->passing)));
        $this->output->writeln(sprintf($this->color('muted', " (%s)"), \PHP_Timer::secondsToTimeString($this->getTime())));
        if (! empty($this->errors)) {
            $this->output->writeln($this->color('error', sprintf("  %d failing", count($this->errors))));
        }
        if ($this->pending) {
            $this->output->writeln($this->color('pending', sprintf("  %d pending", $this->pending)));
        }
        $this->output->writeln("");
        $errorCount = count($this->errors);
        for ($i = 0; $i < $errorCount; $i++) {
            list($test, $error) = $this->errors[$i];
            $this->outputError($i + 1, $test, $error);
            $this->output->writeln('');
        }
    }
410541
def _prior_headerfooter(self):
        """"""
        preceding_sectPr = self._sectPr.preceding_sectPr
        return (
            None if preceding_sectPr is None
            else _Footer(preceding_sectPr, self._document_part, self._hdrftr_index)
        )
1288434
public function footer() {
        global $CFG, $DB, $PAGE;

        // Give plugins an opportunity to touch the page before JS is finalized.
        $pluginswithfunction = get_plugins_with_function('before_footer', 'lib.php');
        foreach ($pluginswithfunction as $plugins) {
            foreach ($plugins as $function) {
                $function();
            }
        }

        $output = $this->container_end_all(true);

        $footer = $this->opencontainers->pop('header/footer');

        if (debugging() and $DB and $DB->is_transaction_started()) {
            // TODO: MDL-20625 print warning - transaction will be rolled back
        }

        // Provide some performance info if required
        $performanceinfo = '';
        if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {
            $perf = get_performance_info();
            if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {
                $performanceinfo = $perf['html'];
            }
        }

        // We always want performance data when running a performance test, even if the user is redirected to another page.
        if (MDL_PERF_TEST && strpos($footer, $this->unique_performance_info_token) === false) {
            $footer = $this->unique_performance_info_token . $footer;
        }
        $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);

        // Only show notifications when we have a $PAGE context id.
        if (!empty($PAGE->context->id)) {
            $this->page->requires->js_call_amd('core/notification', 'init', array(
                $PAGE->context->id,
                \core\notification::fetch_as_array($this)
            ));
        }
        $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);

        $this->page->set_state(moodle_page::STATE_DONE);

        return $output . $footer;
    }
1018601
public function setFooter(string $footer): void {
		if ($this->compiled) {
			throw new ViewException("Attempt to alter view after compilation.", ViewException::AFTER_COMPILE_ALTERATION);
		}
		
		// like the header above, $footer might be a file or the
		// actual footer
		
		$this->footer = is_file($footer)
			? file_get_contents($footer)
			: $footer;
	}
1346986
public function customizerFooter()
    {
        if (get_field('footer_layout', 'options') !== 'customizer') {
            return;
        }

        $customizerFooter = new \Municipio\Customizer\Source\CustomizerRepeaterInput('customizer__footer_sections', 'options', 'id');

        $classes = array();
        $classes[] = 's-site-footer';
        $classes[] = 'hidden-print';
        $classes[] = (get_field('scroll_elevator_enabled', 'option')) ? 'scroll-elevator-toggle' : '';

        $this->data['footerLayout']['template'] = 'customizer';
        $this->data['footerLayout']['classes'] = implode(' ', $classes);

        if ($customizerFooter->hasItems) {
            foreach ($customizerFooter->repeater as $footerData) {
                $this->data['footerSections'][] = new \Municipio\Customizer\Footer($footerData);
            }
        }
    }
17217
private function renderFooter()
    {
        if (!$this->paginator) {
            return "";
        }
        if (count($this->columns) == 0) {
            return "";
        }
        $currentpage = $this->currentpage;

        $content = '<ul class="pagination">';
        $pages = $this->getPageCount();
        if ($pages <= 1)
            return '';

        if ($currentpage - $this->firstButton > $this->maxbuttons) {

            $this->firstButton = $currentpage - $this->maxbuttons;
        }
        if ($currentpage < $this->firstButton) {
            $this->firstButton = $currentpage - 1;
        }

        if ($this->firstButton > 1) {
            $content .= "<li  class=\"page-item\"><a   class=\"page-link\"  href='void(0);' onclick=\"" . $this->getPaginatorLink(1) . "\"><span aria-hidden=\"true\">&laquo;</span></a></li>";
            $content .= "<li class=\"page-item\"><a   class=\"page-link\"  href='void(0);' onclick=\"" . $this->getPaginatorLink($currentpage - 1) . "\"><span aria-hidden=\"true\">&lsaquo;</span></a></li>";
            $content .= "<li  class=\"page-item\"><a   class=\"page-link\" href=\"javascript:void(0);\" >&hellip;</a></li>";
        }



        for ($i = $this->firstButton; $i <= $this->firstButton + $this->maxbuttons; $i++) {
            if ($i > $pages)
                break;
            if ($currentpage == $i) {
                $content .= "<li class=\"page-item active\"><a  class=\"page-link\"  href=\"javascript:void(0);\" > {$i} </a></li>";
            } else {
                $content .= "<li  class=\"page-item\"><a   class=\"page-link\" href=\"javascript:void(0);\"  onclick=\"" . $this->getPaginatorLink($i) . "\"> {$i} </a></li>";
            }
        }

        if ($pages > $this->firstButton + $this->maxbuttons) {
            $content .= "<li  class=\"page-item\" ><a   class=\"page-link\" href=\"javascript:void(0);\" >&hellip;</a></li>";
            $content .= "<li  class=\"page-item\"><a  class=\"page-link\" href='void(0);' onclick=\"" . $this->getPaginatorLink($currentpage + 1) . "\"aria-label=\"Next\">       <span aria-hidden=\"true\">&rsaquo;</span></a></li>";
            $content .= "<li  class=\"page-item\"><a  class=\"page-link\" href='void(0);' onclick=\"" . $this->getPaginatorLink($pages) . "\"aria-label=\"Next\">       <span aria-hidden=\"true\">&raquo;</span></a></li>";
        }
        
        $countall = $this->getAllRowsCount();
        $show =  $currentpage * $this->pagesize;
        if($pages ==$currentpage) $show = $countall;
        if($countall <= $this->pagesize) $show = $countall;
        
        $content = "<table  ><tr><td valign='middle'>{$show} строк с  {$countall} &nbsp;&nbsp;&nbsp;&nbsp;</td><td align='right'> {$content}</td></tr></table>";
        return "<tr ><td class=\"footercell\"  colspan=\"" . count($this->columns) . "\" >{$content}</ul></td></tr>";
    }
441866
protected void doFooter() throws DocumentException {
    	if (footer == null) return;
		// Begin added by Edgar Leonardo Prieto Perilla
    	// Avoid footer indentation
    	float tmpIndentLeft = indentation.indentLeft;
    	float tmpIndentRight = indentation.indentRight;
    	// Begin added: Bonf (Marc Schneider) 2003-07-29
        float tmpListIndentLeft = indentation.listIndentLeft;
        float tmpImageIndentLeft = indentation.imageIndentLeft;
        float tmpImageIndentRight = indentation.imageIndentRight;
        // End added: Bonf (Marc Schneider) 2003-07-29

        indentation.indentLeft = indentation.indentRight = 0;
        // Begin added: Bonf (Marc Schneider) 2003-07-29
        indentation.listIndentLeft = 0;
        indentation.imageIndentLeft = 0;
        indentation.imageIndentRight = 0;
        // End added: Bonf (Marc Schneider) 2003-07-29
        // End Added by Edgar Leonardo Prieto Perilla
        footer.setPageNumber(pageN);
        leading = footer.paragraph().getTotalLeading();
        add(footer.paragraph());
        // adding the footer limits the height
        indentation.indentBottom = currentHeight;
        text.moveText(left(), indentBottom());
        flushLines();
        text.moveText(-left(), -bottom());
        footer.setTop(bottom(currentHeight));
        footer.setBottom(bottom() - (0.75f * leading));
        footer.setLeft(left());
        footer.setRight(right());
        graphics.rectangle(footer);
        indentation.indentBottom = currentHeight + leading * 2;
        currentHeight = 0;
        // Begin added by Edgar Leonardo Prieto Perilla
        indentation.indentLeft = tmpIndentLeft;
        indentation.indentRight = tmpIndentRight;
        // Begin added: Bonf (Marc Schneider) 2003-07-29
        indentation.listIndentLeft = tmpListIndentLeft;
        indentation.imageIndentLeft = tmpImageIndentLeft;
        indentation.imageIndentRight = tmpImageIndentRight;
        // End added: Bonf (Marc Schneider) 2003-07-29
        // End added by Edgar Leonardo Prieto Perilla
    }
79743
private function gridFooterBuild() {
        $html = '<tfoot class="table-footer">' . self::$phpEOL;
        $html .= '<tr>' . self::$phpEOL;

        if (!isset($this->arrayData['config']['disableckeckall']) or $this->arrayData['config']['disableckeckall'] != 'true') {
            $html .= '<th class="nosorter width-select">&nbsp;</th>' . self::$phpEOL;
        }

        foreach ($this->arrayData['header'] as $value) {

            $class = '';
            if (isset($value['class']) and ! empty($value['class'])) {
                $class .= $value['class'];
            }

            if (isset($value['sortable']) and $value['sortable'] == 'false') {
                $class .= ' nosorter ';
            }

            if (isset($value['searchable']) and $value['searchable'] == 'false') {
                $class .= ' filter-false ';
            }

            if (isset($value['type'])) {
                switch ($value['type']) {
                    case 'datetime':
                        $class .= ' width-datetime ';
                        break;
                    case 'date':
                        $class .= ' width-date ';
                        break;
                    case 'status':
                        $class .= ' width-status ';
                        break;
                    case 'primarykey':
                        $class .= ' width-primary ';
                        break;
                    case 'integer':
                    case 'int':
                    case 'float':
                    case 'double':
                    case 'decimal':
                        $class .= ' width-number ';
                        break;
                    case 'money':
                        $class .= ' width-money ';
                        break;
                    case 'char':
                        $class .= ' width-shortstring ';
                        break;
                    case 'varchar':
                        $class .= ' width-mediumstring ';
                        break;
                    default:
                        break;
                }
            }

            $html .= "<th class='{$class}'>" . $value['value'] . '</th>' . self::$phpEOL;
        }
        if (!isset($this->arrayData['config']['disablebuttons']) or $this->arrayData['config']['disablebuttons'] != 'true') {
            $html .= '<th class="nosorter width-action">' . 'Ação' . '</th>';
        }
        $html .= '</tr>' . self::$phpEOL;

        $html .= '</tfoot>' . self::$phpEOL;

        return $html;
    }
628415
private function _readFooter()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = substr($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: var
			// realized that $recordData can be empty even when record exists
			if ($recordData) {
				if ($this->_version == self::XLS_BIFF8) {
					$string = self::_readUnicodeStringLong($recordData);
				} else {
					$string = $this->_readByteStringShort($recordData);
				}
				$this->_phpSheet->getHeaderFooter()->setOddFooter($string['value']);
				$this->_phpSheet->getHeaderFooter()->setEvenFooter($string['value']);
			}
		}
	}
685360
def add_page_footer
      @pdf.repeat :all do
        @pdf.bounding_box([0, @pdf.bounds.bottom], width: 540, height: @format[:footer_size]) do
          @pdf.move_down 50
          @pdf.stroke_color '999999'
          @pdf.stroke_horizontal_rule
          @pdf.move_down 10
          @pdf.font_size(8) do
            @pdf.text "<color rgb='999999'>This invoice has been generated by Maestrano Pty Ltd on behalf of the #{MnoEnterprise.app_name} platform (the \"Service\").</color>", inline_format: true
            @pdf.text "<color rgb='999999'>All charges in this invoice are in #{@data[:invoice_currency_name]} (#{@data[:invoice_currency]}). Credit card payments will be processed by Maestrano Pty Ltd.</color>", inline_format: true
            @pdf.text " ", inline_format: true
            @pdf.text "<color rgb='999999'>Maestrano Pty Ltd | Suite 504, 46 Market Street, Sydney, NSW 2000, Australia | ABN: 80 152 564 424</color>", inline_format: true
          end
        end
      end
    end
196572
static function decorate_root(Frame $root, DOMPDF $dompdf) {
    $frame = new Page_Frame_Decorator($root, $dompdf);
    $frame->set_reflower( new Page_Frame_Reflower($frame) );
    $root->set_decorator($frame);
    return $frame;
  }
216357
function init() {
		$_option = 'pressbooks_theme_options_' . $this->getSlug();
		$_page = $_option;
		$_section = $this->getSlug() . '_options_section';

		if ( false === get_option( $_option ) ) {
			add_option( $_option, $this->defaults );
		}

		add_settings_section(
			$_section,
			$this->getTitle(),
			[ $this, 'display' ],
			$_page
		);

		$custom_styles = Container::get( 'Styles' );
		$v2_compatible = $custom_styles->isCurrentThemeCompatible( 2 );

		if ( $v2_compatible ) {
			add_settings_field(
				'pdf_body_font_size',
				__( 'Body Font Size', 'pressbooks' ),
				[ $this, 'renderBodyFontSizeField' ],
				$_page,
				$_section,
				[
					__( 'Heading sizes are proportional to the body font size and will also be affected by this setting.', 'pressbooks' ),
					'pt',
					'label_for' => 'pdf_body_font_size',
				]
			);

			add_settings_field(
				'pdf_body_line_height',
				__( 'Body Line Height', 'pressbooks' ),
				[ $this, 'renderBodyLineHightField' ],
				$_page,
				$_section,
				[
					'',
					'em',
					'label_for' => 'pdf_body_line_height',
				]
			);
		}

		add_settings_field(
			'pdf_page_size',
			__( 'Page Size', 'pressbooks' ),
			[ $this, 'renderPageSizeField' ],
			$_page,
			$_section,
			[
				__( 'Digest (5.5&quot; &times; 8.5&quot;)', 'pressbooks' ),
				__( 'US Trade (6&quot; &times; 9&quot;)', 'pressbooks' ),
				__( 'US Letter (8.5&quot; &times; 11&quot;)', 'pressbooks' ),
				__( 'Custom (8.5&quot; &times; 9.25&quot;)', 'pressbooks' ),
				__( 'Duodecimo (5&quot; &times; 7.75&quot;)', 'pressbooks' ),
				__( 'Pocket (4.25&quot; &times; 7&quot;)', 'pressbooks' ),
				__( 'A4 (21cm &times; 29.7cm)', 'pressbooks' ),
				__( 'A5 (14.8cm &times; 21cm)', 'pressbooks' ),
				__( '5&quot; &times; 8&quot;', 'pressbooks' ),
				__( 'Custom&hellip;', 'pressbooks' ),
				'label_for' => 'pdf_page_size',
			]
		);

		add_settings_field(
			'pdf_page_width',
			__( 'Page Width', 'pressbooks' ),
			[ $this, 'renderPageWidthField' ],
			$_page,
			$_section,
			[
				__( 'Page width must be expressed in CSS-compatible units, e.g. &lsquo;5.5in&rsquo; or &lsquo;10cm&rsquo;.' ),
				'label_for' => 'pdf_page_width',
			]
		);

		add_settings_field(
			'pdf_page_height',
			__( 'Page Height', 'pressbooks' ),
			[ $this, 'renderPageHeightField' ],
			$_page,
			$_section,
			[
				__( 'Page height must be expressed in CSS-compatible units, e.g. &lsquo;8.5in&rsquo; or &lsquo;10cm&rsquo;.' ),
				'label_for' => 'pdf_page_height',
			]
		);

		if ( $v2_compatible ) {
			add_settings_field(
				'pdf_page_margins',
				__( 'Margins', 'pressbooks' ),
				[ $this, 'renderMarginsField' ],
				$_page,
				$_section,
				[
					__( 'Customize your book&rsquo;s margins using the fields below.', 'pressbooks' ),
				]
			);

			add_settings_field(
				'pdf_page_margin_outside',
				__( 'Outside Margin', 'pressbooks' ),
				[ $this, 'renderOutsideMarginField' ],
				$_page,
				$_section,
				[
					__( 'Margins must be expressed in CSS-compatible units, e.g. &lsquo;8.5in&rsquo; or &lsquo;10cm&rsquo;.', 'pressbooks' ),
					'label_for' => 'pdf_page_margin_outside',
				]
			);

			add_settings_field(
				'pdf_page_margin_inside',
				__( 'Inside Margin', 'pressbooks' ),
				[ $this, 'renderInsideMarginField' ],
				$_page,
				$_section,
				[
					__( 'Margins must be expressed in CSS-compatible units, e.g. &lsquo;8.5in&rsquo; or &lsquo;10cm&rsquo;.', 'pressbooks' ),
					'label_for' => 'pdf_page_margin_inside',
				]
			);

			add_settings_field(
				'pdf_page_margin_top',
				__( 'Top Margin', 'pressbooks' ),
				[ $this, 'renderTopMarginField' ],
				$_page,
				$_section,
				[
					__( 'Margins must be expressed in CSS-compatible units, e.g. &lsquo;8.5in&rsquo; or &lsquo;10cm&rsquo;.', 'pressbooks' ),
					'label_for' => 'pdf_page_margin_top',
				]
			);

			add_settings_field(
				'pdf_page_margin_bottom',
				__( 'Bottom Margin', 'pressbooks' ),
				[ $this, 'renderBottomMarginField' ],
				$_page,
				$_section,
				[
					__( 'Margins must be expressed in CSS-compatible units, e.g. &lsquo;8.5in&rsquo; or &lsquo;10cm&rsquo;.', 'pressbooks' ),
					'label_for' => 'pdf_page_margin_bottom',
				]
			);
		}

		add_settings_field(
			'pdf_hyphens',
			__( 'Hyphens', 'pressbooks' ),
			[ $this, 'renderHyphenationField' ],
			$_page,
			$_section,
			[
				__( 'Enable hyphenation', 'pressbooks' ),
			]
		);

		add_settings_field(
			'pdf_paragraph_separation',
			__( 'Paragraph Separation', 'pressbooks' ),
			[ $this, 'renderParagraphSeparationField' ],
			$_page,
			$_section,
			[
				'indent' => __( 'Indent paragraphs', 'pressbooks' ),
				'skiplines' => __( 'Skip lines between paragraphs', 'pressbooks' ),
			]
		);

		add_settings_field(
			'pdf_sectionopenings',
			__( 'Section Openings', 'pressbooks' ),
			[ $this, 'renderSectionOpeningsField' ],
			$_page,
			$_section,
			[
				'openauto' => __( 'Left or right page section opening (for print PDF)', 'pressbooks' ),
				'openright' => __( 'Right page section openings (for print PDF)', 'pressbooks' ),
				'remove' => __( 'No blank pages (for web PDF)', 'pressbooks' ),
			]
		);

		add_settings_field(
			'pdf_toc',
			__( 'Table of Contents', 'pressbooks' ),
			[ $this, 'renderTOCField' ],
			$_page,
			$_section,
			[
				__( 'Display table of contents', 'pressbooks' ),
			]
		);

		add_settings_field(
			'pdf_crop_marks',
			__( 'Crop Marks', 'pressbooks' ),
			[ $this, 'renderCropMarksField' ],
			$_page,
			$_section,
			[
				__( 'Display crop marks', 'pressbooks' ),
			]
		);

		if ( CustomCss::isCustomCss() ) {
			add_settings_field(
				'pdf_romanize_parts',
				__( 'Romanize Part Numbers', 'pressbooks' ),
				[ $this, 'renderRomanizePartsField' ],
				$_page,
				$_section,
				[
					__( 'Convert part numbers into Roman numerals', 'pressbooks' ),
				]
			);
		}

		add_settings_field(
			'pdf_footnotes_style',
			__( 'Footnote Style', 'pressbooks' ),
			[ $this, 'renderFootnoteStyleField' ],
			$_page,
			$_section,
			[
				'footnotes' => __( 'Regular footnotes', 'pressbooks' ),
				'endnotes' => __( 'Display as chapter endnotes', 'pressbooks' ),
			]
		);

		add_settings_field(
			'widows',
			__( 'Widows', 'pressbooks' ),
			[ $this, 'renderWidowsField' ],
			$_page,
			$_section,
			[
				'label_for' => 'widows',
			]
		);

		add_settings_field(
			'orphans',
			__( 'Orphans', 'pressbooks' ),
			[ $this, 'renderOrphansField' ],
			$_page,
			$_section,
			[
				'label_for' => 'orphans',
			]
		);

		if ( $v2_compatible ) {
			add_settings_field(
				'running_content',
				__( 'Running Heads & Feet', 'pressbooks' ),
				[ $this, 'renderRunningContentField' ],
				$_page,
				$_section,
				[
					__( 'Running content appears in either running heads or running feet (at the top or bottom of the page) depending on your theme.', 'pressbooks' ),
				]
			);

			add_settings_field(
				'running_content_front_matter_left',
				__( 'Front Matter Left Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentFrontMatterLeftField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%section_title%' => __( 'Front Matter Title', 'pressbooks' ),
					'%section_author%' => __( 'Front Matter Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Front Matter Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_front_matter_left',
				]
			);

			add_settings_field(
				'running_content_front_matter_right',
				__( 'Front Matter Right Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentFrontMatterRightField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%section_title%' => __( 'Front Matter Title', 'pressbooks' ),
					'%section_author%' => __( 'Front Matter Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Front Matter Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_front_matter_right',
				]
			);

			add_settings_field(
				'running_content_introduction_left',
				__( 'Introduction Left Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentIntroductionLeftField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%section_title%' => __( 'Introduction Title', 'pressbooks' ),
					'%section_author%' => __( 'Introduction Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Introduction Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_introduction_left',
				]
			);

			add_settings_field(
				'running_content_introduction_right',
				__( 'Introduction Right Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentIntroductionRightField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%section_title%' => __( 'Introduction Title', 'pressbooks' ),
					'%section_author%' => __( 'Introduction Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Introduction Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_introduction_right',
				]
			);

			add_settings_field(
				'running_content_part_left',
				__( 'Part Left Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentPartLeftField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%part_number%' => __( 'Part Number', 'pressbooks' ),
					'%part_title%' => __( 'Part Title', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_part_left',
				]
			);

			add_settings_field(
				'running_content_part_right',
				__( 'Part Right Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentPartRightField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%part_number%' => __( 'Part Number', 'pressbooks' ),
					'%part_title%' => __( 'Part Title', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_part_right',
				]
			);

			add_settings_field(
				'running_content_chapter_left',
				__( 'Chapter Left Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentChapterLeftField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%part_number%' => __( 'Part Number', 'pressbooks' ),
					'%part_title%' => __( 'Part Title', 'pressbooks' ),
					'%section_title%' => __( 'Chapter Title', 'pressbooks' ),
					'%section_author%' => __( 'Chapter Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Chapter Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_chapter_left',
				]
			);

			add_settings_field(
				'running_content_chapter_right',
				__( 'Chapter Right Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentChapterRightField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%part_number%' => __( 'Part Number', 'pressbooks' ),
					'%part_title%' => __( 'Part Title', 'pressbooks' ),
					'%section_title%' => __( 'Chapter Title', 'pressbooks' ),
					'%section_author%' => __( 'Chapter Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Chapter Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_chapter_right',
				]
			);

			add_settings_field(
				'running_content_back_matter_left',
				__( 'Back Matter Left Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentBackMatterLeftField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%section_title%' => __( 'Back Matter Title', 'pressbooks' ),
					'%section_author%' => __( 'Back Matter Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Back Matter Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_back_matter_left',
				]
			);

			add_settings_field(
				'running_content_back_matter_right',
				__( 'Back Matter Right Page Running Content', 'pressbooks' ),
				[ $this, 'renderRunningContentBackMatterRightField' ],
				$_page,
				$_section,
				[
					'%book_title%' => __( 'Book Title', 'pressbooks' ),
					'%book_subtitle%' => __( 'Book Subtitle', 'pressbooks' ),
					'%book_author%' => __( 'Book Author', 'pressbooks' ),
					'%section_title%' => __( 'Back Matter Title', 'pressbooks' ),
					'%section_author%' => __( 'Back Matter Author', 'pressbooks' ),
					'%section_subtitle%' => __( 'Back Matter Subtitle', 'pressbooks' ),
					'%blank%' => __( 'Blank', 'pressbooks' ),
					'' => __( 'Custom&hellip;', 'pressbooks' ),
					'label_for' => 'running_content_back_matter_right',
				]
			);
		}

		if ( ! $v2_compatible ) {
			add_settings_field(
				'pdf_fontsize',
				__( 'Increase Font Size', 'pressbooks' ),
				[ $this, 'renderFontSizeField' ],
				$_page,
				$_section,
				[
					__( 'Increases font size and line height for greater accessibility', 'pressbooks' ),
				]
			);
		}

		/**
		 * Add custom settings fields.
		 *
		 * @since 3.9.7
		 *
		 * @param string $arg1
		 * @param string $arg2
		 */
		do_action( 'pb_theme_options_pdf_add_settings_fields', $_page, $_section );

		register_setting(
			$_option,
			$_option,
			[ $this, 'sanitize' ]
		);
	}
30146
public function Footer()
    {
        // prepare the text from the tranlated text
        $txt = '';
        if ($this->_footerParam['form']) {
            $txt = Locale::get('pdf05');
        }
        if ($this->_footerParam['date'] && $this->_footerParam['time']) {
            $txt.= ($txt ? ' - ' : '').Locale::get('pdf03');
        }
        if ($this->_footerParam['date'] && !$this->_footerParam['time']) {
            $txt.= ($txt ? ' - ' : '').Locale::get('pdf01');
        }
        if (!$this->_footerParam['date'] && $this->_footerParam['time']) {
            $txt.= ($txt ? ' - ' : '').Locale::get('pdf02');
        }
        if ($this->_footerParam['page']) {
            $txt.= ($txt ? ' - ' : '').Locale::get('pdf04');
        }

        if (strlen($txt)>0) {
            // replace some values
            $toReplace = array(
                '[[date_d]]'  => date('d'),
                '[[date_m]]'  => date('m'),
                '[[date_y]]'  => date('Y'),
                '[[date_h]]'  => date('H'),
                '[[date_i]]'  => date('i'),
                '[[date_s]]'  => date('s'),
                '[[page_cu]]' => $this->getMyNumPage(),
                '[[page_nb]]' => $this->getMyAliasNbPages(),
            );
            $txt = str_replace(array_keys($toReplace), array_values($toReplace), $txt);

            // draw the footer
            parent::SetY(-11);
            $this->SetFont('helvetica', 'I', 8);
            $this->Cell(0, 10, $txt, 0, 0, 'R');
        }
    }