<?php
/*
  Plugin Name: Dexen Core
  Plugin URI:
  Description: Helping for the SmartDataSoft theme.
  Version: 1.2
  Author: smartdatasoft
  Author URI: http://smartdatasoft.com/
  License: GPLv2 or later
  Text Domain: dexencore
  Domain Path: /languages/
 */

/**
 * Load plugin dexen.
 *
 * @since 1.0.0
 */
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}


define( 'PLUGIN_DIR', dirname( __FILE__ ) . '/' );

if ( ! defined( 'DEXEN_CORE_PLUGIN_URI' ) ) {
	define( 'DEXEN_CORE_PLUGIN_URI', plugin_dir_url( __FILE__ ) );
}

require_once PLUGIN_DIR . '/breadcrumb-navxt/breadcrumb-navxt.php';
require_once PLUGIN_DIR . '/meta-box/config-meta-box.php';

/**
 * addons Initializer.
 */
require_once plugin_dir_path( __FILE__ ) . 'elementor-addons/init.php';

if ( ! function_exists( 'get_contact_form_7_posts' ) ) :

	function get_contact_form_7_posts() {

		$args = array(
			'post_type'      => 'wpcf7_contact_form',
			'posts_per_page' => -1,
		);

		$catlist = array();

		if ( $categories = get_posts( $args ) ) {
			foreach ( $categories as $category ) {
				(int) $catlist[ $category->ID ] = $category->post_title;
			}
		} else {
			(int) $catlist['0'] = esc_html__( 'No contect From 7 form found', 'void' );
		}
		return $catlist;
	}

endif;
