<?php
/**
 * Plugin Name:       coreSocial: Social Networks Sharing
 * Plugin URI:        https://www.dev4press.com/plugins/coresocial/
 * Description:       Add popular social networks share buttons to posts and pages, lists of social network profiles with customizable styling and full block editor support.
 * Author:            Milan Petrovic
 * Author URI:        https://www.dev4press.com/
 * Text Domain:       coresocial
 * Version:           3.6.1
 * Requires at least: 6.2
 * Tested up to:      6.9
 * Requires PHP:      8.0
 * License:           GPLv3 or later
 * License URI:       https://www.gnu.org/licenses/gpl-3.0.html
 *
 * == Copyright ==
 * Copyright 2008 - 2025 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/>
 *
 * @package         coreSocial
   */

use Dev4Press\v54\WordPress;

if ( function_exists( 'coresocial_fs' ) ) {
	coresocial_fs()->set_basename( false, __FILE__ );
} else {
	define( 'CORESOCIAL_FILE', __FILE__ );
	define( 'CORESOCIAL_PATH', __DIR__ . '/' );
	define( 'CORESOCIAL_BLOCKS_PATH', CORESOCIAL_PATH . 'build/blocks/' );
	define( 'CORESOCIAL_URL', plugins_url( '/', __FILE__ ) );

	if ( ! defined( 'D4P_TAB' ) ) {
		define( 'D4P_TAB', "\t" );
	}

	require_once CORESOCIAL_PATH . 'vendor/autoload.php';

	require_once CORESOCIAL_PATH . 'vendor/dev4press/library/core.php';

	require_once CORESOCIAL_PATH . 'core/freemius.php';
	require_once CORESOCIAL_PATH . 'core/autoload.php';
	require_once CORESOCIAL_PATH . 'core/bridge.php';
	require_once CORESOCIAL_PATH . 'core/functions.php';

	coresocial();
	coresocial_settings();

	if ( WordPress::instance()->is_admin() ) {
		coresocial_admin();
	}

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