<?php
/*
Plugin Name: STM Post Type
Plugin URI: http://stylemixthemes.com/
Description: STM Post Type
Author: Stylemix Themes
Author URI: http://stylemixthemes.com/
Text Domain: stm_post_type
Version: 2.0
*/

define( 'STM_POST_TYPE', 'stm_post_type' );
$plugin_path = dirname( __FILE__ );
define( 'STM_POST_TYPE_DIR', $plugin_path );
define( 'STM_CONFIGURATIONS_URL', plugin_dir_url( __FILE__ ) );
require_once $plugin_path . '/post_type.class.php';
require_once STM_POST_TYPE_DIR . '/widgets/widget_contacts.php';
require_once STM_POST_TYPE_DIR . '/widgets/posts.php';
if(is_admin()){
	require_once(STM_POST_TYPE_DIR . '/announcement/main.php');
}

function stm_plugin_styles() {
	$plugin_url = plugins_url( '', __FILE__ );

	wp_enqueue_style( 'wp-color-picker' );
	wp_enqueue_script( 'wp-color-picker' );

	wp_enqueue_media();
}

add_action( 'admin_enqueue_scripts', 'stm_plugin_styles' );