+++ /dev/null
-<?php
-/**
- * Plugin Name: Gaslight Media Employment
- * Description: Online Employment Application for Gaslight Media Clients.
- * Version: 1.3.1
- * Author: Steve Sutton
- * Author URI: http://www.gaslightmedia.com
- * License: All right reserved
- */
-
-defined('ABSPATH') or die();
-/**
- * Defines for the plugin
- */
-define('GLM_EMP_PLUGIN_PATH_FILE', __FILE__);
-define('GLM_EMP_VERSION', '0.0.1');
-define('GLM_EMP_SETTING_NAME', 'staffordsjobs_settings');
-define('GLM_EMP_SETTINGS', 'staffordsjobs_settings');
-define('GLM_EMP_NEW_CAPABILITY', 'edit_staffords_jobs');
-define('GLM_EMP_BUILT_IN_CAPABILITY', 'edit_posts');
-define('GLM_EMP_VRS_OPTION_NAME', 'glm_jobs_db_version');
-define('GLM_EMP_POST_TYPE', 'glm_jobs');
-define('GLM_EMP_TAX_CATEGORIES', 'glm_jobscategory');
-define('GLM_EMP_CATEGORY_SINGLE', 'Category');
-define('GLM_EMP_CATEGORY_PLURAL', 'Categories');
-define('GLM_EMP_TAX_DEPARTMENTS', 'glm_jobsdepartment');
-define('GLM_EMP_DEPARTMENT_SINGLE', 'Department');
-define('GLM_EMP_DEPARTMENT_PLURAL', 'Departments');
-define('GLM_EMP_APPLICATION_TABLE', 'glm_jobs_application');
-define('GLM_EMP_FORM_TABLE', 'glm_jobs_app_form');
-$wp_upload_dir = wp_upload_dir();
-define('GLM_EMP_UPLOAD_DIR', $wp_upload_dir['basedir'] . '/glm-emp/');
-define('GLM_EMP_UPLOAD_URL', $wp_upload_dir['baseurl'] . '/glm-emp/');
-/**
- * Create the upload directory for the resume files if not already there
- */
-if (!is_dir(GLM_EMP_UPLOAD_DIR)) {
- // create the upload directory
- $oldUmask = umask(0);
- mkdir(GLM_EMP_UPLOAD_DIR, 0770);
- umask($oldUmask);
-}
-/**
- * Require the class files
- */
-require_once 'controllers/admin.php';
-require_once 'controllers/front.php';
-require_once 'models/job.php';
-require_once 'models/database.php';
-/**
- * The Database class
- */
-$glm_member_db = new glm_employment_models_database($GLOBALS['wpdb']);
-
-/**
- * Setup class to call in the Controllers
- */
-class glm_employment_setup
-{
- public function __construct()
- {
- if (is_admin()) {
- $adminController = new glm_employment_admin(
- plugin_dir_path(__FILE__),
- $GLOBALS['wpdb']
- );
- } else {
- $frontController = new glm_employment_front(
- plugin_dir_path(__FILE__),
- $GLOBALS['wpdb']
- );
- }
-
- }
-}
-
-$employmentApp = new glm_employment_setup();
-
-/**
- * Load style sheet for displaying the view and print for the application forms
- */
-function glm_load_view_style()
-{
- wp_enqueue_style('foundation', plugin_dir_url(__FILE__) . 'css/foundation.css');
-}
-function glm_load_edit_style()
-{
- wp_enqueue_style('glm_jobs', plugin_dir_url(__FILE__) . 'css/glm_jobs.css');
-}
-if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') {
- add_action('admin_enqueue_scripts', 'glm_load_view_style');
-}
-if ( isset($_REQUEST['post_type'])
- && $_REQUEST['post_type'] == GLM_EMP_POST_TYPE
- && !isset($_REQUEST['page'])
-) {
- add_action('admin_enqueue_scripts', 'glm_load_edit_style');
-}
--- /dev/null
+<?php
+/**
+ * Plugin Name: Gaslight Media Employment
+ * Description: Online Employment Application for Gaslight Media Clients.
+ * Version: 1.3.1
+ * Author: Steve Sutton
+ * Author URI: http://www.gaslightmedia.com
+ * License: All right reserved
+ */
+
+defined('ABSPATH') or die();
+/**
+ * Defines for the plugin
+ */
+define('GLM_EMP_PLUGIN_PATH_FILE', __FILE__);
+define('GLM_EMP_VERSION', '0.0.1');
+define('GLM_EMP_SETTING_NAME', 'staffordsjobs_settings');
+define('GLM_EMP_SETTINGS', 'staffordsjobs_settings');
+define('GLM_EMP_NEW_CAPABILITY', 'edit_staffords_jobs');
+define('GLM_EMP_BUILT_IN_CAPABILITY', 'edit_posts');
+define('GLM_EMP_VRS_OPTION_NAME', 'glm_jobs_db_version');
+define('GLM_EMP_POST_TYPE', 'glm_jobs');
+define('GLM_EMP_TAX_CATEGORIES', 'glm_jobscategory');
+define('GLM_EMP_CATEGORY_SINGLE', 'Category');
+define('GLM_EMP_CATEGORY_PLURAL', 'Categories');
+define('GLM_EMP_TAX_DEPARTMENTS', 'glm_jobsdepartment');
+define('GLM_EMP_DEPARTMENT_SINGLE', 'Department');
+define('GLM_EMP_DEPARTMENT_PLURAL', 'Departments');
+define('GLM_EMP_APPLICATION_TABLE', 'glm_jobs_application');
+define('GLM_EMP_FORM_TABLE', 'glm_jobs_app_form');
+$wp_upload_dir = wp_upload_dir();
+define('GLM_EMP_UPLOAD_DIR', $wp_upload_dir['basedir'] . '/glm-emp/');
+define('GLM_EMP_UPLOAD_URL', $wp_upload_dir['baseurl'] . '/glm-emp/');
+/**
+ * Create the upload directory for the resume files if not already there
+ */
+if (!is_dir(GLM_EMP_UPLOAD_DIR)) {
+ // create the upload directory
+ $oldUmask = umask(0);
+ mkdir(GLM_EMP_UPLOAD_DIR, 0770);
+ umask($oldUmask);
+}
+/**
+ * Require the class files
+ */
+require_once 'controllers/admin.php';
+require_once 'controllers/front.php';
+require_once 'models/job.php';
+require_once 'models/database.php';
+/**
+ * The Database class
+ */
+$glm_member_db = new glm_employment_models_database($GLOBALS['wpdb']);
+
+/**
+ * Setup class to call in the Controllers
+ */
+class glm_employment_setup
+{
+ public function __construct()
+ {
+ if (is_admin()) {
+ $adminController = new glm_employment_admin(
+ plugin_dir_path(__FILE__),
+ $GLOBALS['wpdb']
+ );
+ } else {
+ $frontController = new glm_employment_front(
+ plugin_dir_path(__FILE__),
+ $GLOBALS['wpdb']
+ );
+ }
+
+ }
+}
+
+$employmentApp = new glm_employment_setup();
+
+/**
+ * Load style sheet for displaying the view and print for the application forms
+ */
+function glm_load_view_style()
+{
+ wp_enqueue_style('foundation', plugin_dir_url(__FILE__) . 'css/foundation.css');
+}
+function glm_load_edit_style()
+{
+ wp_enqueue_style('glm_jobs', plugin_dir_url(__FILE__) . 'css/glm_jobs.css');
+}
+if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') {
+ add_action('admin_enqueue_scripts', 'glm_load_view_style');
+}
+if ( isset($_REQUEST['post_type'])
+ && $_REQUEST['post_type'] == GLM_EMP_POST_TYPE
+ && !isset($_REQUEST['page'])
+) {
+ add_action('admin_enqueue_scripts', 'glm_load_edit_style');
+}