replace scaffold with new name

master
unknown 2019-03-25 18:02:16 -04:00
parent 2d1666982b
commit 064ec833ff
11 changed files with 16069 additions and 108 deletions

View File

@ -3,9 +3,9 @@
<!-- Check the boxes below by changing them from `[ ]` to `[x]`. --> <!-- Check the boxes below by changing them from `[ ]` to `[x]`. -->
* [ ] Can you reproduce the behavior you wish to address with [all plugins except Pressbooks and this plugin deactivated](http://codex.wordpress.org/Multisite_Network_Administration#Plugins)? * [ ] Can you reproduce the behavior you wish to address with [all plugins except Pressbooks and this plugin deactivated](http://codex.wordpress.org/Multisite_Network_Administration#Plugins)?
* [ ] Are you running the [latest version of Pressbooks](http://github.com/pressbooks/pressbooks/releases/latest/), the latest version of [this plugin](http://github.com/pressbooks/pressbooks-plugin-scaffold/releases/latest/) and the [latest version of WordPress](http://codex.wordpress.org/Upgrading_WordPress)? * [ ] Are you running the [latest version of Pressbooks](http://github.com/pressbooks/pressbooks/releases/latest/), the latest version of [this plugin](http://github.com/villa7/roe-pressbooks/releases/latest/) and the [latest version of WordPress](http://codex.wordpress.org/Upgrading_WordPress)?
* [ ] Are you experiencing this issue with one of our built-in root or book themes? * [ ] Are you experiencing this issue with one of our built-in root or book themes?
* [ ] Did you [perform a cursory search](https://github.com/issues?q=+is%3Aissue+repo%3Apressbooks%2Fpressbooks-plugin-scaffold) to see if your bug or enhancement is already listed? * [ ] Did you [perform a cursory search](https://github.com/issues?q=+is%3Aissue+repo%3Apressbooks%2Froe-pressbooks) to see if your bug or enhancement is already listed?
### Description ### Description

View File

@ -59,7 +59,7 @@ after_success:
# skip_cleanup: true # skip_cleanup: true
# api_key: # api_key:
# secure: # secure:
# file: "pressbooks-plugin-scaffold-$TRAVIS_TAG.zip" # file: "roe-pressbooks-$TRAVIS_TAG.zip"
# on: # on:
# tags: true # tags: true
# repo: pressbooks/pressbooks-plugin-scaffold # repo: villa7/roe-pressbooks

View File

@ -1,9 +1,9 @@
[main] [main]
host = https://www.transifex.com host = https://www.transifex.com
[pressbooks.pressbooks-plugin-scaffold] [pressbooks.roe-pressbooks]
source_file = languages/pressbooks-plugin-scaffold.pot source_file = languages/roe-pressbooks.pot
source_lang = en source_lang = en
type = PO type = PO
file_filter = languages/pressbooks-plugin-scaffold-<lang>.po file_filter = languages/roe-pressbooks-<lang>.po
lang_map = de:de_DE, es:es_ES, fr:fr_FR, gl:gl_ES, nb:nb_NO, it:it_IT, ka:ka_GE, ru:ru_RU, ta:ta_LK lang_map = de:de_DE, es:es_ES, fr:fr_FR, gl:gl_ES, nb:nb_NO, it:it_IT, ka:ka_GE, ru:ru_RU, ta:ta_LK

View File

@ -1,9 +1,9 @@
{ {
"name": "pressbooks/pressbooks-plugin-scaffold", "name": "villa7/roe-pressbooks",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"type": "wordpress-plugin", "type": "wordpress-plugin",
"description": "Scaffolding for a Pressbooks plugin.", "description": "Scaffolding for a Pressbooks plugin.",
"homepage": "https://github.com/pressbooks/pressbooks-plugin-scaffold", "homepage": "https://github.com/villa7/roe-pressbooks",
"authors": [ "authors": [
{ {
"name": "Book Oven Inc.", "name": "Book Oven Inc.",
@ -15,8 +15,8 @@
"support": { "support": {
"email": "code@pressbooks.com", "email": "code@pressbooks.com",
"issues": "issues":
"https://github.com/pressbooks/pressbooks-plugin-scaffold/issues/", "https://github.com/villa7/roe-pressbooks/issues/",
"source": "https://github.com/pressbooks/pressbooks-plugin-scaffold/" "source": "https://github.com/villa7/roe-pressbooks/"
}, },
"config": { "config": {
"platform": { "platform": {
@ -41,7 +41,7 @@
"vendor/bin/phpcs --standard=phpcs.ruleset.xml *.php inc/ bin/" "vendor/bin/phpcs --standard=phpcs.ruleset.xml *.php inc/ bin/"
], ],
"localize": [ "localize": [
"wp-pot -s \"**/*.php\" -o languages/pressbooks-plugin-scaffold.pot -p \"Pressbooks\" -t \"Pressbooks (Book Oven Inc.) <code@pressbooks.com>\"", "wp-pot -s \"**/*.php\" -o languages/roe-pressbooks.pot -p \"Pressbooks\" -t \"Pressbooks (Book Oven Inc.) <code@pressbooks.com>\"",
"bash bin/i18n.sh" "bash bin/i18n.sh"
], ],
"readme": ["vendor/bin/wp2md -i readme.txt -o README.md"] "readme": ["vendor/bin/wp2md -i readme.txt -o README.md"]

93
composer.lock generated
View File

@ -1,23 +1,23 @@
{ {
"_readme": [ "_readme": [
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"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#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "73e08036361eb664dd67121e725010bc", "content-hash": "3adf684f645e9c447a480f458f7b2d7b",
"packages": [ "packages": [
{ {
"name": "composer/installers", "name": "composer/installers",
"version": "v1.5.0", "version": "v1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/installers.git", "url": "https://github.com/composer/installers.git",
"reference": "049797d727261bf27f2690430d935067710049c2" "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
"reference": "049797d727261bf27f2690430d935067710049c2", "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -124,20 +124,20 @@
"zend", "zend",
"zikula" "zikula"
], ],
"time": "2017-12-29T09:13:20+00:00" "time": "2018-08-27T06:10:37+00:00"
}, },
{ {
"name": "yahnis-elsts/plugin-update-checker", "name": "yahnis-elsts/plugin-update-checker",
"version": "v4.4", "version": "v4.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/YahnisElsts/plugin-update-checker.git", "url": "https://github.com/YahnisElsts/plugin-update-checker.git",
"reference": "da4286343601e1f5c01836e1d51e1c57cedb0f6d" "reference": "57a25d905a9a4db2fdb60bc8f0b0f861cc3ee110"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/da4286343601e1f5c01836e1d51e1c57cedb0f6d", "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/57a25d905a9a4db2fdb60bc8f0b0f861cc3ee110",
"reference": "da4286343601e1f5c01836e1d51e1c57cedb0f6d", "reference": "57a25d905a9a4db2fdb60bc8f0b0f861cc3ee110",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -169,7 +169,7 @@
"theme updates", "theme updates",
"wordpress" "wordpress"
], ],
"time": "2017-12-22T10:39:11+00:00" "time": "2019-01-04T17:13:39+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -255,41 +255,41 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pressbooks/coding-standards.git", "url": "https://github.com/pressbooks/coding-standards.git",
"reference": "f09f0ba4dd3d20c2acb63c13b28a14bfe86ed229" "reference": "139db4785f32c84142b9d1a3a678129bf2ddddd9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pressbooks/coding-standards/zipball/f09f0ba4dd3d20c2acb63c13b28a14bfe86ed229", "url": "https://api.github.com/repos/pressbooks/coding-standards/zipball/139db4785f32c84142b9d1a3a678129bf2ddddd9",
"reference": "f09f0ba4dd3d20c2acb63c13b28a14bfe86ed229", "reference": "139db4785f32c84142b9d1a3a678129bf2ddddd9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"fig-r/psr2r-sniffer": "0.5.0", "fig-r/psr2r-sniffer": "0.5.0",
"humanmade/coding-standards": "0.5.0", "humanmade/coding-standards": "0.5.0",
"squizlabs/php_codesniffer": "3.3.0" "squizlabs/php_codesniffer": "3.3.2"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "6.5.8" "phpunit/phpunit": "6.5.14"
}, },
"type": "project", "type": "project",
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"GPL-3.0-or-later" "GPL-3.0-or-later"
], ],
"time": "2018-07-13T14:56:39+00:00" "time": "2019-03-15T14:31:39+00:00"
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.0.2", "version": "1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -323,20 +323,20 @@
"psr", "psr",
"psr-3" "psr-3"
], ],
"time": "2016-10-10T12:19:37+00:00" "time": "2018-11-20T15:27:04+00:00"
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "3.3.0", "version": "3.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266" "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86873af43b4aa9d1f39a3601cc0cfcf02b25266", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
"reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266", "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -374,20 +374,20 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2018-06-06T23:58:19+00:00" "time": "2018-09-23T23:08:17+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v3.4.12", "version": "v3.4.23",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00" "reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00", "url": "https://api.github.com/repos/symfony/console/zipball/71ce77f37af0c5ffb9590e43cc4f70e426945c5e",
"reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00", "reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -399,6 +399,9 @@
"symfony/dependency-injection": "<3.4", "symfony/dependency-injection": "<3.4",
"symfony/process": "<3.3" "symfony/process": "<3.3"
}, },
"provide": {
"psr/log-implementation": "1.0"
},
"require-dev": { "require-dev": {
"psr/log": "~1.0", "psr/log": "~1.0",
"symfony/config": "~3.3|~4.0", "symfony/config": "~3.3|~4.0",
@ -408,7 +411,7 @@
"symfony/process": "~3.3|~4.0" "symfony/process": "~3.3|~4.0"
}, },
"suggest": { "suggest": {
"psr/log-implementation": "For using the console logger", "psr/log": "For using the console logger",
"symfony/event-dispatcher": "", "symfony/event-dispatcher": "",
"symfony/lock": "", "symfony/lock": "",
"symfony/process": "" "symfony/process": ""
@ -443,20 +446,20 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-05-23T05:02:55+00:00" "time": "2019-02-23T15:06:07+00:00"
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v3.4.12", "version": "v3.4.23",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "47e6788c5b151cf0cfdf3329116bf33800632d75" "reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75", "url": "https://api.github.com/repos/symfony/debug/zipball/8d8a9e877b3fcdc50ddecf8dcea146059753f782",
"reference": "47e6788c5b151cf0cfdf3329116bf33800632d75", "reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -499,20 +502,20 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-06-25T11:10:40+00:00" "time": "2019-02-24T15:45:11+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.8.0", "version": "v1.11.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "3296adf6a6454a050679cde90f95350ad604b171" "reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
"reference": "3296adf6a6454a050679cde90f95350ad604b171", "reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -524,7 +527,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8-dev" "dev-master": "1.11-dev"
} }
}, },
"autoload": { "autoload": {
@ -558,7 +561,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2018-04-26T10:06:28+00:00" "time": "2019-02-06T07:57:58+00:00"
}, },
{ {
"name": "wp-coding-standards/wpcs", "name": "wp-coding-standards/wpcs",

View File

@ -0,0 +1,5 @@
<?php
namespace ROE\Admin;
use ROE

View File

@ -0,0 +1,80 @@
<?php
namespace ROE;
class ROEIntegration {
const VERSION = '1.0.0';
protected $plugin_slug = 'roe-pressbooks';
/**
* Instance of this class.
*
* @since 1.0.0
* @var object
*/
protected static $instance = null;
private function __construct () {
}
/**
* Return an instance of this class.
*
* @since 1.0.0
*
* @return object A single instance of this class.
*/
public static function get_instance () {
// If the single instance hasn't been set, set it now.
if (null == self::$instance) {
self::$instance = new self;
}
return self::$instance;
}
/**
* Returns merged array of all ROE user options
* @since 1.0.2
* @return array
*/
private function getUserOptions () {
$other = get_option('roe_other_settings', []);
$result = @array_merge($other);
return $result;
}
/**
* Fired when the plugin is activated.
* @since 1.0.0
*/
function activate () {
if (!current_user_can('activate_plugins')) {
return;
}
add_site_option('roe-pressbooks-activated', true);
}
/**
* Fired when the plugin is deactivated.
* @since 1.0.0
*/
function deactivate () {
if (!current_user_can('activate_plugins')) {
return;
}
delete_site_option('roe-pressbooks-activated');
}
/**
* Return the plugin slug.
* @since 1.0.0
* @return Plugin slug variable.
*/
function getPluginSlug () {
return $this->plugin_slug;
}
}

15880
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +1,37 @@
{ {
"name": "roe-pressbooks", "name": "roe-pressbooks",
"description": "Scaffolding for a Pressbooks plugin.", "description": "Scaffolding for a Pressbooks plugin.",
"scripts": { "scripts": {
"build": "build": "cross-env NODE_ENV=development webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"cross-env NODE_ENV=development webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "build:production": "cross-env NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "lint": "npm -s run lint:styles && npm -s run lint:scripts",
"cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "lint:styles": "cross-env NODE_ENV=development node_modules/stylelint/bin/stylelint.js \"assets/src/styles/**/*.scss\" --syntax scss",
"build:production": "lint:scripts": "cross-env NODE_ENV=development node_modules/eslint/bin/eslint.js \"assets/src/scripts/*.js\"",
"cross-env NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "test": "npm -s run lint"
"lint": "npm -s run lint:styles && npm -s run lint:scripts", },
"lint:styles": "engines": {
"cross-env NODE_ENV=development node_modules/stylelint/bin/stylelint.js \"assets/src/styles/**/*.scss\" --syntax scss", "node": ">= 6.9.4"
"lint:scripts": },
"cross-env NODE_ENV=development node_modules/eslint/bin/eslint.js \"assets/src/scripts/*.js\"", "dependencies": {},
"test": "npm -s run lint" "devDependencies": {
}, "pressbooks-build-tools": "^0.11.0"
"engines": { },
"node": ">= 6.9.4" "repository": {
}, "type": "git",
"dependencies": {}, "url": "git+https://github.com/villa7/roe-pressbooks.git"
"devDependencies": { },
"pressbooks-build-tools": "^0.11.0" "author": "Book Oven Inc. <code@pressbooks.com>",
}, "license": "GPL-3.0-or-later",
"repository": { "bugs": {
"type": "git", "url": "https://github.com/villa7/roe-pressbooks/issues"
"url": "git+https://github.com/pressbooks/pressbooks-plugin-scaffold.git" },
}, "homepage": "https://github.com/villa7/roe-pressbooks/",
"author": "Book Oven Inc. <code@pressbooks.com>", "eslintConfig": {
"license": "GPL-3.0-or-later", "extends": "./node_modules/pressbooks-build-tools/config/eslint.js"
"bugs": { },
"url": "https://github.com/pressbooks/pressbooks-plugin-scaffold/issues" "stylelint": {
}, "extends": "./node_modules/pressbooks-build-tools/config/stylelint.js"
"homepage": "https://github.com/pressbooks/pressbooks-plugin-scaffold/", }
"eslintConfig": {
"extends": "./node_modules/pressbooks-build-tools/config/eslint.js"
},
"stylelint": {
"extends": "./node_modules/pressbooks-build-tools/config/stylelint.js"
}
} }

View File

@ -7,10 +7,10 @@
</rule> </rule>
<!-- Disable Side Effects and MissingNamespace rules for bootstrapping files: --> <!-- Disable Side Effects and MissingNamespace rules for bootstrapping files: -->
<rule ref="PSR1.Files.SideEffects"> <rule ref="PSR1.Files.SideEffects">
<exclude-pattern>/pressbooks-plugin-scaffold.php</exclude-pattern> <exclude-pattern>/roe-pressbooks.php</exclude-pattern>
</rule> </rule>
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace"> <rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
<exclude-pattern>/pressbooks-plugin-scaffold.php</exclude-pattern> <exclude-pattern>/roe-pressbooks.php</exclude-pattern>
</rule> </rule>
<!-- Disable all rules for these files: --> <!-- Disable all rules for these files: -->
<exclude-pattern>*.blade.php</exclude-pattern> <exclude-pattern>*.blade.php</exclude-pattern>

View File

@ -18,7 +18,7 @@ Network: True
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP_PLUGIN_DIR . '/pressbooks/compatibility.php' ) ) { // @codingStandardsIgnoreLine if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP_PLUGIN_DIR . '/pressbooks/compatibility.php' ) ) { // @codingStandardsIgnoreLine
add_action('admin_notices', function () { add_action('admin_notices', function () {
echo '<div id="message" class="error fade"><p>' . __( 'Cannot find Pressbooks install.', 'pressbooks-plugin-scaffold' ) . '</p></div>'; echo '<div id="message" class="error fade"><p>' . __( 'Cannot find Pressbooks install.', 'roe-pressbooks' ) . '</p></div>';
}); });
return; return;
} elseif ( ! pb_meets_minimum_requirements() ) { } elseif ( ! pb_meets_minimum_requirements() ) {
@ -28,12 +28,12 @@ if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Class autoloader // Class autoloader
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
\HM\Autoloader\register_class_path( 'ROEPressbooks', __DIR__ . '/inc' ); \HM\Autoloader\register_class_path( 'ROE', __DIR__ . '/inc' );
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Composer autoloader // Composer autoloader
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
if ( ! class_exists( '\SomeRequiredClass' ) ) { if ( ! class_exists( '\ROE\ROEIntegration' ) ) {
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/vendor/autoload.php';
} else { } else {
@ -48,11 +48,10 @@ if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP
// Check for updates // Check for updates
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
if ( ! \Pressbooks\Book::isBook() ) { if ( ! \Pressbooks\Book::isBook() ) {
$updater = new \Puc_v4p2_Vcs_PluginUpdateChecker( $updater = Puc_v4_Factory::buildUpdateChecker(
new \Pressbooks\Updater( 'https://github.com/pressbooks/pressbooks-plugin-scaffold/' ), 'https://github.com/villa7/roe-pressbooks/',
__FILE__, // Fully qualified path to the main plugin file __FILE__,
'pressbooks-plugin-scaffold', 'roe-pressbooks'
24
); );
$updater->setBranch( 'master' ); $updater->setBranch( 'master' );
} }