// End of the Contextual/Highlight Search functions
function is_tree( $pid ) {
- global $post;
+ global $post;
if ( is_page($pid) )
- return true;
+ return true;
$anc = get_post_ancestors( $post->ID );
foreach ( $anc as $ancestor ) {
}
return false;
}
+function glm_has_shortcode($shortcode)
+{
+ global $post;
+ $page = get_post( $post->ID );
+ return has_shortcode( $page->post_content, $shortcode );
+}
?>
<?php
$isEmploymentAppPage = false;
if (shortcode_exists('glmjobs')) {
- $isEmploymentAppPage = true;
- $applyOnline = (isset($_REQUEST['applyOnline']))
- ? filter_var($_REQUEST['applyOnline'], FILTER_VALIDATE_INT)
- : false;
+ $isEmploymentAppPage = glm_has_shortcode('glmjobs');
+ if (defined('GLM_EMP_SETTING_NAME')) {
+ $plugin_options = get_option(GLM_EMP_SETTING_NAME);
+ $applyPageId = $plugin_options['employment_form_page'];
+ if (is_page($applyPageId)) {
+ $applyOnline = true;
+ }
+ }
+
+ //$applyOnline = (isset($_REQUEST['applyOnline']))
+ //? filter_var($_REQUEST['applyOnline'], FILTER_VALIDATE_INT)
+ //: false;
$job = (isset($_REQUEST['job']))
? filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)
: false;
: false;
}
?>
- <?php if( !(is_page(2670)) && !$isEmploymentAppPage ) { ?>
+ <?php if( !(is_page(2670)) && !$isEmploymentAppPage && !$applyOnline) { ?>
<div id="main-content" class="small-12 large-8 columns right">
<?php if(have_posts()) : while(have_posts()): the_post();?>
<?php the_content();?>
</div>
<?php } else { ?>
<div id="main-content" class="small-12 large-12 columns">
- <?php if (!$search && !$job && !$applyOnline):?>
+ <?php if (!$search && !$job):?>
<?php if(have_posts()) : while(have_posts()): the_post();?>
<?php the_content();?>
<?php endwhile; else:?>