| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: codoc |
| 4 |
Plugin URI: https://plugins.svn.wordpress.org/codoc/ |
| 5 |
Description: plugin for codoc paywall service. |
| 6 |
Author: codoc.jp |
| 7 |
Author URI: https://codoc.jp |
| 8 |
Version: 0.1 |
| 9 |
License: GPLv2 |
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
Text Domain: codoc |
| 12 |
*/ |
| 13 |
|
| 14 |
defined( 'ABSPATH' ) || exit; |
| 15 |
|
| 16 |
const CODOC_URL = 'https://codoc.jp'; |
| 17 |
const CODOC_USERCODE_OPTION_NAME = 'codoc_usercode'; |
| 18 |
|
| 19 |
if ( version_compare( PHP_VERSION, '5.4', '<' ) ) |
| 20 |
{ |
| 21 |
exit( sprintf( 'The codoc Paywall plugin requires PHP 5.4 or higher. You’re using %s.', PHP_VERSION ) ); |
| 22 |
} |
| 23 |
|
| 24 |
|
| 25 |
require 'class-codoc.php'; |
| 26 |
$codoc = ( new Codoc )->register(); |
| 27 |
|
| 28 |
if ( is_admin() ) { |
| 29 |
// gutenberg |
| 30 |
require_once 'src/init.php'; |
| 31 |
// tinymce |
| 32 |
$codoc->add_mce(); |
| 33 |
} |
| 34 |
|