<?php

/*
Plugin Name:       DemoPress: Demo Content Generator
Plugin URI:        https://www.dev4press.com/plugins/demopress/
Description:       Generate demo content for newly created websites used during the website development and testing, before real content is created and added.
Author:            Milan Petrovic
Author URI:        https://www.dev4press.com/
Text Domain:       demopress
Version:           2.0
Requires at least: 5.9
Tested up to:      6.6
Requires PHP:      7.4
License:           GPLv3 or later
License URI:       https://www.gnu.org/licenses/gpl-3.0.html

== Copyright ==
Copyright 2008 - 2024 Milan Petrovic (email: support@dev4press.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/

use Dev4Press\v50\WordPress;

$demopress_dirname_basic = dirname( __FILE__ ) . '/';
$demopress_urlname_basic = plugins_url( '/demopress/' );

define( 'DEMOPRESS_PATH', $demopress_dirname_basic );
define( 'DEMOPRESS_URL', $demopress_urlname_basic );
define( 'DEMOPRESS_D4PLIB_PATH', $demopress_dirname_basic . 'library/' );

require_once( DEMOPRESS_D4PLIB_PATH . 'core.php' );

require_once( DEMOPRESS_PATH . 'vendor/autoload.php' );
require_once( DEMOPRESS_PATH . 'core/autoload.php' );
require_once( DEMOPRESS_PATH . 'core/bridge.php' );
require_once( DEMOPRESS_PATH . 'core/functions.php' );

demopress();
demopress_settings();

if ( WordPress::instance()->is_admin() ) {
	demopress_admin();

	if ( WordPress::instance()->is_ajax() ) {
		demopress_ajax();
	}
}
