Browse Source

Load default content from resources/docs.

pull/22/head
Ned Zimmerman 7 years ago
parent
commit
ccfbc4732f
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 22
      app/activation.php
  2. 3
      composer.json
  3. 88
      composer.lock

22
app/activation.php

@ -3,28 +3,18 @@
namespace Aldine; namespace Aldine;
add_action('admin_init', function () { add_action('admin_init', function () {
$extra = new \ParsedownExtra();
$about = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/about.md'));
$help = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/help.md'));
$default_pages = [ $default_pages = [
'about' => [ 'about' => [
'post_title' => __('About', 'aldine'), 'post_title' => __('About', 'aldine'),
// @codingStandardsIgnoreStart 'post_content' => apply_filters('pb_root_about_page_content', $about)
'post_content' => apply_filters('pb_root_about_page_content', __('Pressbooks is simple book production software. You can use Pressbooks to publish textbooks, scholarly monographs, syllabi, fiction and non-fiction books, white papers, and more in multiple formats including:
<ul><li>MOBI (for Kindle ebooks)</li>
<li>EPUB (for all other ebookstores)</li>
<li>designed PDF (for print-on-demand and digital distribution)</li></ul>
Pressbooks is used by educational institutions around the world as well as authors and publishers.
For more information about Pressbooks, see <a href="https://pressbooks.com/about">here</a>.', 'aldine'))
// @codingstandardsIgnoreEnd
], ],
'help' => [ 'help' => [
'post_title' => __('Help', 'aldine'), 'post_title' => __('Help', 'aldine'),
// @codingStandardsIgnoreStart 'post_content' => apply_filters('pb_root_help_page_content', $help)
'post_content' => apply_filters('pb_root_help_page_content', __('The easiest way to get started with Pressbooks is to follow our <a href="https://pressbooks.com/how-to-make-a-book-with-pressbooks">4 Step Guide to Making a Book on Pressbooks</a>. Or, you can review our <a href="https://guide.pressbooks.com/">Guide to Using Pressbooks</a>.
If you require further assistance, please contact your network manager.', 'aldine'))
// @codingstandardsIgnoreEnd
], ],
'catalog' => [ 'catalog' => [
'post_title' => __('Catalog', 'aldine'), 'post_title' => __('Catalog', 'aldine'),

3
composer.json

@ -32,7 +32,8 @@
"illuminate/support": "~5.4", "illuminate/support": "~5.4",
"roots/sage-lib": "~9.0.0-beta.4", "roots/sage-lib": "~9.0.0-beta.4",
"soberwp/controller": "~9.0.0-beta.4", "soberwp/controller": "~9.0.0-beta.4",
"soberwp/intervention": "1.2.0-p" "soberwp/intervention": "1.2.0-p",
"erusev/parsedown-extra": "^0.7.1"
}, },
"require-dev": { "require-dev": {
"squizlabs/php_codesniffer": "^2.8.0" "squizlabs/php_codesniffer": "^2.8.0"

88
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "b64704b574ef5a22a123a59ab6fbc069", "content-hash": "f7726a4926f063ad567227228ba400b8",
"packages": [ "packages": [
{ {
"name": "brain/hierarchy", "name": "brain/hierarchy",
@ -246,6 +246,92 @@
], ],
"time": "2017-07-22T12:18:28+00:00" "time": "2017-07-22T12:18:28+00:00"
}, },
{
"name": "erusev/parsedown",
"version": "1.6.3",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
"reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Parsedown": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "Parser for Markdown.",
"homepage": "http://parsedown.org",
"keywords": [
"markdown",
"parser"
],
"time": "2017-05-14T14:47:48+00:00"
},
{
"name": "erusev/parsedown-extra",
"version": "0.7.1",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown-extra.git",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c",
"shasum": ""
},
"require": {
"erusev/parsedown": "~1.4"
},
"type": "library",
"autoload": {
"psr-0": {
"ParsedownExtra": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "An extension of Parsedown that adds support for Markdown Extra.",
"homepage": "https://github.com/erusev/parsedown-extra",
"keywords": [
"markdown",
"markdown extra",
"parsedown",
"parser"
],
"time": "2015-11-01T10:19:22+00:00"
},
{ {
"name": "hassankhan/config", "name": "hassankhan/config",
"version": "0.10.0", "version": "0.10.0",

Loading…
Cancel
Save