-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
49 lines (39 loc) · 1.26 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* @author PressBooks <[email protected]>
* @license GPLv2 (or any later version)
*/
/**
* Google Webfonts
*/
function austen_enqueue_styles() {
wp_enqueue_style( 'austen-fonts', 'http://fonts.googleapis.com/css?family=MarcellusSC|SortsMillGoudy:400,400italic' );
}
add_action( 'wp_print_styles', 'austen_enqueue_styles' );
/**
* Aonham features we inject ourselves, (not user options)
*
* @param $css
*
* @return string
*/
function austen_theme_pdf_css_override( $css ) {
// Translate "Part" to whatever language this book is in
$css .= '#toc .part a::before { content: "' . __( 'part', 'pressbooks' ) . ' "counter(part) ". "; }' . "\n";
$css .= 'div.part-title-wrap > h3.part-number:before { content: "' . __( 'part', 'pressbooks' ) . ' "; }' . "\n";
return $css;
}
add_filter( 'pb_pdf_css_override', 'austen_theme_pdf_css_override' );
/**
* Austen features we inject ourselves, (not user options)
*
* @param $css
*
* @return string
*/
function austen_theme_ebook_css_override( $css ) {
// Translate "Part" to whatever language this book is in
$css .= 'div.part-title-wrap > h3.part-number:before { content: "' . __( 'part', 'pressbooks' ) . ' "; }' . "\n";
return $css;
}
add_filter( 'pb_epub_css_override', 'austen_theme_ebook_css_override' );