This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp core download | |
wp core config --dbname="dbname" --dbuser="dbuser" --dbpass="dbpass" --extra-php <<PHP | |
/* Pressbooks */ | |
define( 'WP_DEFAULT_THEME', 'pressbooks-book' ); | |
define( 'PB_PRINCE_COMMAND', '/usr/bin/prince' ); | |
define( 'PB_KINDLEGEN_COMMAND', '/opt/kindlegen/kindlegen' ); | |
define( 'PB_EPUBCHECK_COMMAND', '/usr/bin/java -jar /opt/epubcheck-3.0.1/epubcheck-3.0.1.jar' ); | |
define( 'PB_XMLLINT_COMMAND', '/usr/bin/xmllint' ); | |
PHP | |
wp core install --url="http://domain.com" --title="Pressbooks" --admin_user="username" --admin_password="password" --admin_email="[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hypothesis_test_init() { | |
register_post_type( 'hypothesis-test', array( | |
'labels' => array( | |
'name' => __( 'Hypothesis Tests', 'hypothesis-test' ), | |
'singular_name' => __( 'Hypothesis Test', 'hypothesis-test' ), | |
'all_items' => __( 'All Hypothesis Tests', 'hypothesis-test' ), | |
'new_item' => __( 'New Hypothesis Test', 'hypothesis-test' ), | |
'add_new' => __( 'Add New', 'hypothesis-test' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#wrap { | |
width: 940px; | |
} | |
#content { | |
width: 520px; | |
padding-right: 60px; | |
padding-left: 60px; | |
margin-right: 60px; | |
margin-left: 60px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="__UNKNOWN__"> | |
<p class="import-NormalWeb" style="background-color:#FFFFFF;text-align:justify;text-justify:inter-ideograph;"><span style="font-family:Arial;color:#000000;font-size:10.5pt;"/><span style="font-family:Arial;color:#000000;font-size:10.5pt;">Lorem ipsum </span><span style="font-family:Arial;color:#000000;font-size:10.5pt;">dolor</span><span style="font-family:Arial;color:#000000;font-size:10.5pt;"> sit</span><span style="font-family:Arial;color:#000000;font-size:10.5pt;"> </span><span style="font-family:Arial;color:#000000;font-size:10.5pt;">amet</span><span style="font-family:Arial;color:#000000;font-size:10.5pt;">, </span><span style="font-family:Arial;color:#000000;font-size:10.5pt;">consectetur</span><span style="font-family:Arial;color:#000000;font-size:10.5pt;"> </span><span style="font-family:Arial;color:#000000;font-size:10.5pt;">adipiscing</span><span style="font-family:Arial;color:#000000;font-size:10.5pt;"> </span><span style="font-family:Arial;color:#000000;font-size:10.5pt; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pb_theme_options_web_add_settings_fields', 'add_custom_web_settings', 10, 2 ); | |
add_filter( 'pb_theme_options_web_booleans', 'get_custom_booleans' ); | |
/** | |
* Add the setting itself. | |
* | |
* @param string $_page The settings identifier, e.g. pressbooks_theme_options_web | |
* @param string $_section The settings section identifier, e.g. web_options_section |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
parse_str(implode('&', array_slice($argv, 1)), $_GET); | |
$finfo = finfo_open(FILEINFO_MIME_TYPE); | |
$real_mime = finfo_file($finfo, $_GET['file']); | |
finfo_close($finfo); | |
echo $real_mime . "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SCSS v2 (first draft) | |
// Set variable | |
@if $type = 'epub' { | |
$body-font-size: medium !default; | |
} @elseif $type = 'prince' { | |
$body-font-size: 11pt !default; | |
} @elseif $type = 'web' { | |
$body-font-size: 14pt !default; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Array with filter hook. | |
$my_array = apply_filters( 'filter_my_array', array( | |
'value1', | |
'value2', | |
'value3', | |
) ); | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
$base-font-size: 12; | |
@function em($size, $base-font-size) { | |
@return ($size / $base-font-size) * 1em; | |
} |