File: /home/codo66ho/www/aamcc.emtiyz.com/wp-content/plugins/consultar-core/consultar-core.php
<?php
/*
Plugin Name: Consultar Core
Plugin URI: http://themeforest.net/user/wpoceans
Description: Plugin to contain shortcodes and custom post types of the consultar theme.
Author: wpoceans
Author URI: http://themeforest.net/user/wpoceans/portfolio
Version: 1.0.5
Text Domain: consultar-core
*/
if (!function_exists('consultar_block_direct_access')) {
function consultar_block_direct_access()
{
if (!defined('ABSPATH')) {
exit('Forbidden');
}
}
}
// Plugin URL
define('CONSULTAR_PLUGIN_URL', plugins_url('/', __FILE__));
// Plugin PATH
define('CONSULTAR_PLUGIN_PATH', plugin_dir_path(__FILE__));
define('CONSULTAR_PLUGIN_ASTS', CONSULTAR_PLUGIN_URL . 'assets');
define('CONSULTAR_PLUGIN_IMGS', CONSULTAR_PLUGIN_ASTS . '/images');
define('CONSULTAR_PLUGIN_INC', CONSULTAR_PLUGIN_PATH . 'include');
// DIRECTORY SEPARATOR
define('DS', DIRECTORY_SEPARATOR);
// Consultar Elementor Shortcode Path
define('CONSULTAR_EM_SHORTCODE_BASE_PATH', CONSULTAR_PLUGIN_PATH . 'elementor/');
define('CONSULTAR_EM_SHORTCODE_PATH', CONSULTAR_EM_SHORTCODE_BASE_PATH . 'widgets/');
/**
* Check if Codestar Framework is Active or Not!
*/
function consultar_framework_active()
{
return (defined('CS_VERSION')) ? true : false;
}
/* CONSULTAR_THEME_NAME_PLUGIN */
define('CONSULTAR_THEME_NAME_PLUGIN', 'Consultar');
// Initial File
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
if (is_plugin_active('consultar-core/consultar-core.php')) {
// Custom Post Type
require_once(CONSULTAR_PLUGIN_INC . '/custom-post-type.php');
if (is_plugin_active('kingcomposer/kingcomposer.php')) {
define('CONSULTAR_KC_SHORTCODE_BASE_PATH', CONSULTAR_PLUGIN_PATH . 'kc/');
define('CONSULTAR_KC_SHORTCODE_PATH', CONSULTAR_KC_SHORTCODE_BASE_PATH . 'shortcodes/');
// Shortcodes
require_once(CONSULTAR_KC_SHORTCODE_BASE_PATH . '/kc-setup.php');
require_once(CONSULTAR_KC_SHORTCODE_BASE_PATH . '/library.php');
}
// Theme Custom Shortcode
require_once(CONSULTAR_PLUGIN_INC . '/custom-shortcodes/theme-shortcodes.php');
require_once(CONSULTAR_PLUGIN_INC . '/custom-shortcodes/custom-shortcodes.php');
// Importer
require_once(CONSULTAR_PLUGIN_INC . '/demo/importer.php');
if (class_exists('WP_Widget') && is_plugin_active('codestar-framework/cs-framework.php')) {
// Widgets
require_once(CONSULTAR_PLUGIN_INC . '/widgets/nav-widget.php');
require_once(CONSULTAR_PLUGIN_INC . '/widgets/recent-posts.php');
require_once(CONSULTAR_PLUGIN_INC . '/widgets/footer-posts.php');
require_once(CONSULTAR_PLUGIN_INC . '/widgets/text-widget.php');
require_once(CONSULTAR_PLUGIN_INC . '/widgets/widget-extra-fields.php');
// Elementor
if (file_exists(CONSULTAR_EM_SHORTCODE_BASE_PATH . '/em-setup.php')) {
require_once(CONSULTAR_EM_SHORTCODE_BASE_PATH . '/em-setup.php');
require_once(CONSULTAR_EM_SHORTCODE_BASE_PATH . 'lib/fields/icons.php');
require_once(CONSULTAR_EM_SHORTCODE_BASE_PATH . 'lib/icons-manager/icons-manager.php');
}
}
add_action('wp_enqueue_scripts', 'consultar_plugin_enqueue_scripts');
function consultar_plugin_enqueue_scripts()
{
wp_enqueue_script('plugin-scripts', CONSULTAR_PLUGIN_ASTS . '/plugin-scripts.js', array('jquery'), '', true);
}
}
// Extra functions
require_once(CONSULTAR_PLUGIN_INC . '/theme-functions.php');