<?php

if ( is_admin() ) {

	// Setup //
	$options = wpj_get_folder_files( get_template_directory() . '/admin/setup' );
	foreach ( $options as $option ) { if ( ! strpos( 'menu.php', $option ) ) include_once $option; }

	// Pages //
	$pages = wpj_get_folder_files( get_template_directory() . '/admin/pages' );
	foreach ( $pages as $page ) { include_once $page; }

	// Orders //
	$orders = wpj_get_folder_files( get_template_directory() . '/admin/jobster-orders' );
	foreach ( $orders as $order ) { include_once $order; }

	// Ajax //
	add_action( 'wp_ajax_subscription_price_update_notification_action', 'wpj_send_subscription_price_updated_email' );

}

if ( is_admin_bar_showing() )
	include_once get_template_directory() . '/admin/setup/menu.php';