Updating the href link for the appl now link
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 1 Mar 2016 19:53:42 +0000 (14:53 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 1 Mar 2016 19:53:42 +0000 (14:53 -0500)
controllers/front.php

index 01866b5..8f5b321 100644 (file)
@@ -418,13 +418,19 @@ class emmet_employment_front
         $job->emmet_jobs_contact   = $custom['emmet_jobs_contact'][0];
         $job->emmet_jobs_phone     = $custom['emmet_jobs_phone'][0];
         $job->emmet_jobs_email     = $custom['emmet_jobs_email'][0];
-        
+
         $cats = wp_get_post_terms($job->ID, EMMET_EMP_TAX_DEPARTMENTS, array('fields' => 'names'));
         $terms = wp_get_post_terms($job->ID, EMMET_EMP_TAX_CATEGORIES, array('fields' => 'names'));
-        
+
         $job->terms = $terms;
         $job->cats  = $cats;
-        
+
+        $plugin_options          = get_option(EMMET_EMP_SETTING_NAME);
+        $applyOnlineHref         = (isset($plugin_options['employment_form_page']))
+            ? get_permalink( $plugin_options['employment_form_page'] )
+                . '?position_name=' . urlencode( $job->post_title )
+            : false;
+
         include $this->frontViewDir . '/jobDetail.php';
         return;
     }