replace scaffold with new name
parent
2d1666982b
commit
064ec833ff
|
@ -3,9 +3,9 @@
|
|||
<!-- 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)?
|
||||
* [ ] 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?
|
||||
* [ ] 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
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ after_success:
|
|||
# skip_cleanup: true
|
||||
# api_key:
|
||||
# secure:
|
||||
# file: "pressbooks-plugin-scaffold-$TRAVIS_TAG.zip"
|
||||
# file: "roe-pressbooks-$TRAVIS_TAG.zip"
|
||||
# on:
|
||||
# tags: true
|
||||
# repo: pressbooks/pressbooks-plugin-scaffold
|
||||
# repo: villa7/roe-pressbooks
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[pressbooks.pressbooks-plugin-scaffold]
|
||||
source_file = languages/pressbooks-plugin-scaffold.pot
|
||||
[pressbooks.roe-pressbooks]
|
||||
source_file = languages/roe-pressbooks.pot
|
||||
source_lang = en
|
||||
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
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name": "pressbooks/pressbooks-plugin-scaffold",
|
||||
"name": "villa7/roe-pressbooks",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"type": "wordpress-plugin",
|
||||
"description": "Scaffolding for a Pressbooks plugin.",
|
||||
"homepage": "https://github.com/pressbooks/pressbooks-plugin-scaffold",
|
||||
"homepage": "https://github.com/villa7/roe-pressbooks",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Book Oven Inc.",
|
||||
|
@ -15,8 +15,8 @@
|
|||
"support": {
|
||||
"email": "code@pressbooks.com",
|
||||
"issues":
|
||||
"https://github.com/pressbooks/pressbooks-plugin-scaffold/issues/",
|
||||
"source": "https://github.com/pressbooks/pressbooks-plugin-scaffold/"
|
||||
"https://github.com/villa7/roe-pressbooks/issues/",
|
||||
"source": "https://github.com/villa7/roe-pressbooks/"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
|
@ -41,7 +41,7 @@
|
|||
"vendor/bin/phpcs --standard=phpcs.ruleset.xml *.php inc/ bin/"
|
||||
],
|
||||
"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"
|
||||
],
|
||||
"readme": ["vendor/bin/wp2md -i readme.txt -o README.md"]
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"_readme": [
|
||||
"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"
|
||||
],
|
||||
"content-hash": "73e08036361eb664dd67121e725010bc",
|
||||
"content-hash": "3adf684f645e9c447a480f458f7b2d7b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v1.5.0",
|
||||
"version": "v1.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/installers.git",
|
||||
"reference": "049797d727261bf27f2690430d935067710049c2"
|
||||
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2",
|
||||
"reference": "049797d727261bf27f2690430d935067710049c2",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
|
||||
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -124,20 +124,20 @@
|
|||
"zend",
|
||||
"zikula"
|
||||
],
|
||||
"time": "2017-12-29T09:13:20+00:00"
|
||||
"time": "2018-08-27T06:10:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yahnis-elsts/plugin-update-checker",
|
||||
"version": "v4.4",
|
||||
"version": "v4.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
|
||||
"reference": "da4286343601e1f5c01836e1d51e1c57cedb0f6d"
|
||||
"reference": "57a25d905a9a4db2fdb60bc8f0b0f861cc3ee110"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/da4286343601e1f5c01836e1d51e1c57cedb0f6d",
|
||||
"reference": "da4286343601e1f5c01836e1d51e1c57cedb0f6d",
|
||||
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/57a25d905a9a4db2fdb60bc8f0b0f861cc3ee110",
|
||||
"reference": "57a25d905a9a4db2fdb60bc8f0b0f861cc3ee110",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -169,7 +169,7 @@
|
|||
"theme updates",
|
||||
"wordpress"
|
||||
],
|
||||
"time": "2017-12-22T10:39:11+00:00"
|
||||
"time": "2019-01-04T17:13:39+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
@ -255,41 +255,41 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pressbooks/coding-standards.git",
|
||||
"reference": "f09f0ba4dd3d20c2acb63c13b28a14bfe86ed229"
|
||||
"reference": "139db4785f32c84142b9d1a3a678129bf2ddddd9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pressbooks/coding-standards/zipball/f09f0ba4dd3d20c2acb63c13b28a14bfe86ed229",
|
||||
"reference": "f09f0ba4dd3d20c2acb63c13b28a14bfe86ed229",
|
||||
"url": "https://api.github.com/repos/pressbooks/coding-standards/zipball/139db4785f32c84142b9d1a3a678129bf2ddddd9",
|
||||
"reference": "139db4785f32c84142b9d1a3a678129bf2ddddd9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"fig-r/psr2r-sniffer": "0.5.0",
|
||||
"humanmade/coding-standards": "0.5.0",
|
||||
"squizlabs/php_codesniffer": "3.3.0"
|
||||
"squizlabs/php_codesniffer": "3.3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "6.5.8"
|
||||
"phpunit/phpunit": "6.5.14"
|
||||
},
|
||||
"type": "project",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-3.0-or-later"
|
||||
],
|
||||
"time": "2018-07-13T14:56:39+00:00"
|
||||
"time": "2019-03-15T14:31:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -323,20 +323,20 @@
|
|||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2016-10-10T12:19:37+00:00"
|
||||
"time": "2018-11-20T15:27:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266"
|
||||
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86873af43b4aa9d1f39a3601cc0cfcf02b25266",
|
||||
"reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
|
||||
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -374,20 +374,20 @@
|
|||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2018-06-06T23:58:19+00:00"
|
||||
"time": "2018-09-23T23:08:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v3.4.12",
|
||||
"version": "v3.4.23",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00"
|
||||
"reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00",
|
||||
"reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/71ce77f37af0c5ffb9590e43cc4f70e426945c5e",
|
||||
"reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -399,6 +399,9 @@
|
|||
"symfony/dependency-injection": "<3.4",
|
||||
"symfony/process": "<3.3"
|
||||
},
|
||||
"provide": {
|
||||
"psr/log-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/log": "~1.0",
|
||||
"symfony/config": "~3.3|~4.0",
|
||||
|
@ -408,7 +411,7 @@
|
|||
"symfony/process": "~3.3|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log-implementation": "For using the console logger",
|
||||
"psr/log": "For using the console logger",
|
||||
"symfony/event-dispatcher": "",
|
||||
"symfony/lock": "",
|
||||
"symfony/process": ""
|
||||
|
@ -443,20 +446,20 @@
|
|||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-05-23T05:02:55+00:00"
|
||||
"time": "2019-02-23T15:06:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v3.4.12",
|
||||
"version": "v3.4.23",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "47e6788c5b151cf0cfdf3329116bf33800632d75"
|
||||
"reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75",
|
||||
"reference": "47e6788c5b151cf0cfdf3329116bf33800632d75",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/8d8a9e877b3fcdc50ddecf8dcea146059753f782",
|
||||
"reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -499,20 +502,20 @@
|
|||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-06-25T11:10:40+00:00"
|
||||
"time": "2019-02-24T15:45:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.8.0",
|
||||
"version": "v1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
|
||||
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
|
||||
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
|
||||
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -524,7 +527,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.8-dev"
|
||||
"dev-master": "1.11-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -558,7 +561,7 @@
|
|||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-04-26T10:06:28+00:00"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wp-coding-standards/wpcs",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace ROE\Admin;
|
||||
|
||||
use ROE
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
|
@ -2,19 +2,13 @@
|
|||
"name": "roe-pressbooks",
|
||||
"description": "Scaffolding for a Pressbooks plugin.",
|
||||
"scripts": {
|
||||
"build":
|
||||
"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",
|
||||
"hot":
|
||||
"cross-env NODE_ENV=development webpack-dev-server --inline --hot --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",
|
||||
"build": "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",
|
||||
"hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --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",
|
||||
"lint": "npm -s run lint:styles && npm -s run lint:scripts",
|
||||
"lint:styles":
|
||||
"cross-env NODE_ENV=development node_modules/stylelint/bin/stylelint.js \"assets/src/styles/**/*.scss\" --syntax scss",
|
||||
"lint:scripts":
|
||||
"cross-env NODE_ENV=development node_modules/eslint/bin/eslint.js \"assets/src/scripts/*.js\"",
|
||||
"lint:styles": "cross-env NODE_ENV=development node_modules/stylelint/bin/stylelint.js \"assets/src/styles/**/*.scss\" --syntax scss",
|
||||
"lint:scripts": "cross-env NODE_ENV=development node_modules/eslint/bin/eslint.js \"assets/src/scripts/*.js\"",
|
||||
"test": "npm -s run lint"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -26,14 +20,14 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/pressbooks/pressbooks-plugin-scaffold.git"
|
||||
"url": "git+https://github.com/villa7/roe-pressbooks.git"
|
||||
},
|
||||
"author": "Book Oven Inc. <code@pressbooks.com>",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"bugs": {
|
||||
"url": "https://github.com/pressbooks/pressbooks-plugin-scaffold/issues"
|
||||
"url": "https://github.com/villa7/roe-pressbooks/issues"
|
||||
},
|
||||
"homepage": "https://github.com/pressbooks/pressbooks-plugin-scaffold/",
|
||||
"homepage": "https://github.com/villa7/roe-pressbooks/",
|
||||
"eslintConfig": {
|
||||
"extends": "./node_modules/pressbooks-build-tools/config/eslint.js"
|
||||
},
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
</rule>
|
||||
<!-- Disable Side Effects and MissingNamespace rules for bootstrapping files: -->
|
||||
<rule ref="PSR1.Files.SideEffects">
|
||||
<exclude-pattern>/pressbooks-plugin-scaffold.php</exclude-pattern>
|
||||
<exclude-pattern>/roe-pressbooks.php</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
|
||||
<exclude-pattern>/pressbooks-plugin-scaffold.php</exclude-pattern>
|
||||
<exclude-pattern>/roe-pressbooks.php</exclude-pattern>
|
||||
</rule>
|
||||
<!-- Disable all rules for these files: -->
|
||||
<exclude-pattern>*.blade.php</exclude-pattern>
|
||||
|
|
|
@ -18,7 +18,7 @@ Network: True
|
|||
// -------------------------------------------------------------------------------------------------------------------
|
||||
if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP_PLUGIN_DIR . '/pressbooks/compatibility.php' ) ) { // @codingStandardsIgnoreLine
|
||||
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;
|
||||
} elseif ( ! pb_meets_minimum_requirements() ) {
|
||||
|
@ -28,12 +28,12 @@ if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP
|
|||
// -------------------------------------------------------------------------------------------------------------------
|
||||
// Class autoloader
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
\HM\Autoloader\register_class_path( 'ROEPressbooks', __DIR__ . '/inc' );
|
||||
\HM\Autoloader\register_class_path( 'ROE', __DIR__ . '/inc' );
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
// Composer autoloader
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
if ( ! class_exists( '\SomeRequiredClass' ) ) {
|
||||
if ( ! class_exists( '\ROE\ROEIntegration' ) ) {
|
||||
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
} else {
|
||||
|
@ -48,11 +48,10 @@ if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP
|
|||
// Check for updates
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
if ( ! \Pressbooks\Book::isBook() ) {
|
||||
$updater = new \Puc_v4p2_Vcs_PluginUpdateChecker(
|
||||
new \Pressbooks\Updater( 'https://github.com/pressbooks/pressbooks-plugin-scaffold/' ),
|
||||
__FILE__, // Fully qualified path to the main plugin file
|
||||
'pressbooks-plugin-scaffold',
|
||||
24
|
||||
$updater = Puc_v4_Factory::buildUpdateChecker(
|
||||
'https://github.com/villa7/roe-pressbooks/',
|
||||
__FILE__,
|
||||
'roe-pressbooks'
|
||||
);
|
||||
$updater->setBranch( 'master' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue