PHP code example of publishpress / publishpress-instance-protection
1. Go to this page and download the library: Download publishpress/publishpress-instance-protection library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
publishpress / publishpress-instance-protection example snippets
if (! defined('PP_AUTHORS_LOADED')) {
// define('PP_AUTHORS_LOADED', true);
}
if (! defined('PP_AUTHORS_PRO_LOADED') && ! defined('PP_AUTHORS_LOADED')) {
// efine('PP_AUTHORS_PRO_LOADED', true);
}
$includeFilebRelativePath = '/publishpress/instance-protection/include.php';
if (file_exists(__DIR__ . '/vendor' . $includeFilebRelativePath)) {
. $includeFilebRelativePath;
}
if (class_exists('PublishPressInstanceProtection\\Config')) {
$pluginCheckerConfig = new PublishPressInstanceProtection\Config();
$pluginCheckerConfig->pluginSlug = 'publishpress-authors';
$pluginCheckerConfig->pluginName = 'PublishPress Authors';
$pluginCheckerConfig->pluginFolder = 'publishpress-authors'; // Only
$includeFilebRelativePath = '/publishpress/instance-protection/include.php';
if (file_exists(__DIR__ . '/vendor' . $includeFilebRelativePath)) {
. $includeFilebRelativePath;
}
if (class_exists('PublishPressInstanceProtection\\Config')) {
$pluginCheckerConfig = new PublishPressInstanceProtection\Config();
$pluginCheckerConfig->pluginSlug = 'publishpress-authors-pro';
$pluginCheckerConfig->pluginName = 'PublishPress Authors Pro';
$pluginCheckerConfig->pluginFolder = 'publishpress-authors-pro'; // Only
$includeFilebRelativePath = '/publishpress/instance-protection/include.php';
if (file_exists(__DIR__ . '/vendor' . $includeFilebRelativePath)) {
R_PATH . $es
// instantiate the plugin, hooks, etc
define('PP_AUTHORS_LOADED', true);
}